From c3e0666dd2624c20c5f32657846d6f044046205b Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 17 Oct 2024 19:15:20 +0800 Subject: [PATCH] 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 Signed-off-by: Changqing Li Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 808d0cece22bcbee15236717e158da247cbedaf1) Signed-off-by: Steve Sakoman --- meta/classes-global/sanity.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index 72dab0fea2b..a0b2508e116 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass @@ -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: -- 2.47.3