Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 7 | from oeqa.selftest.case import OESelftestTestCase |
| 8 | from oeqa.utils.commands import bitbake |
| 9 | |
| 10 | class GitCheck(OESelftestTestCase): |
| 11 | def test_git_intercept(self): |
| 12 | """ |
| 13 | Git binaries with CVE-2022-24765 fixed will refuse to operate on a |
| 14 | repository which is owned by a different user. This breaks our |
| 15 | do_install task as that runs inside pseudo, so the git repository is |
| 16 | owned by the build user but git is running as (fake)root. |
| 17 | |
| 18 | We have an intercept which disables pseudo, so verify that it works. |
| 19 | """ |
| 20 | bitbake("git-submodule-test -c test_git_as_user") |
| 21 | bitbake("git-submodule-test -c test_git_as_root") |