diff options
| author | Changqing Li <changqing.li@windriver.com> | 2024-10-17 19:15:20 +0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-01-09 06:25:36 -0800 |
| commit | 11ebb861115168d6a488975f80e4540d908002d1 (patch) | |
| tree | 14c7f7bebd5af181175c39e453557d8d576c3bc4 /meta/classes-global | |
| parent | e146288bcbc1c8513f52531795609493cd6131af (diff) | |
| download | poky-11ebb861115168d6a488975f80e4540d908002d1.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: c3e0666dd2624c20c5f32657846d6f044046205b)
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>
(cherry picked from commit 808d0cece22bcbee15236717e158da247cbedaf1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes-global')
| -rw-r--r-- | meta/classes-global/sanity.bbclass | 2 |
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: |
