summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2024-10-17 19:15:20 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-22 12:28:18 +0100
commit570560f59b99786946c3d9e1649637719562f3bc (patch)
tree628522e3b77980c746bb6451835cebe6e3effdcb /meta/classes-global
parentbada33690472f6e4a633f7b3c6a3f1aaa5c7518c (diff)
downloadpoky-570560f59b99786946c3d9e1649637719562f3bc.tar.gz
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>
Diffstat (limited to 'meta/classes-global')
-rw-r--r--meta/classes-global/sanity.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
index 72dab0fea2..a0b2508e11 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -484,6 +484,8 @@ def check_userns():
484 # succeeds (at which point the uid is nobody) but writing to the uid_map 484 # succeeds (at which point the uid is nobody) but writing to the uid_map
485 # fails (so the uid isn't reset back to the user's uid). We can detect this. 485 # fails (so the uid isn't reset back to the user's uid). We can detect this.
486 parentuid = os.getuid() 486 parentuid = os.getuid()
487 if not bb.utils.is_local_uid(parentuid):
488 return None
487 pid = os.fork() 489 pid = os.fork()
488 if not pid: 490 if not pid:
489 try: 491 try: