summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/git.py
blob: f12874dc7d11c5c475d6e49c2c45f86e52e29116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import bitbake

class GitCheck(OESelftestTestCase):
    def test_git_intercept(self):
        """
        Git binaries with CVE-2022-24765 fixed will refuse to operate on a
        repository which is owned by a different user. This breaks our
        do_install task as that runs inside pseudo, so the git repository is
        owned by the build user but git is running as (fake)root.

        We have an intercept which disables pseudo, so verify that it works.
        """
        bitbake("git-submodule-test -c test_git_as_user")
        bitbake("git-submodule-test -c test_git_as_root")