1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

sanity.bbclass: skip check_userns for non-local uid

Bitbake preserve network for non-local uid, refer [1],
so check_userns is not needed for non-local uid

[1] https://git.openembedded.org/bitbake/commit/?id=4eafae7904bae6e5c6bc50356e8a9077f2e207fa

(From OE-Core rev: 808d0cece22bcbee15236717e158da247cbedaf1)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Changqing Li
2024-10-17 19:15:20 +08:00
committed by Richard Purdie
parent bada336904
commit 570560f59b
+2
View File
@@ -484,6 +484,8 @@ def check_userns():
# succeeds (at which point the uid is nobody) but writing to the uid_map
# fails (so the uid isn't reset back to the user's uid). We can detect this.
parentuid = os.getuid()
if not bb.utils.is_local_uid(parentuid):
return None
pid = os.fork()
if not pid:
try: