summaryrefslogtreecommitdiffstats
path: root/scripts/lib/checklayer/case.py
diff options
context:
space:
mode:
authorEilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>2024-10-23 13:15:41 +0200
committerSteve Sakoman <steve@sakoman.com>2024-11-02 06:32:36 -0700
commit3ee23c255f598120f493220a8f5bd83d68a0efb5 (patch)
tree0ddc4f65d7f6c2cf44e45f5536071d4a5861600f /scripts/lib/checklayer/case.py
parent0186d190a1cf6aa473b4398de65bc58a22a3cb00 (diff)
downloadpoky-3ee23c255f598120f493220a8f5bd83d68a0efb5.tar.gz
nativesdk-intercept: Fix bad intercept chgrp/chown logic
Running either of these ends up corrupting the os.execv args. If we run: ./scripts/nativesdk-intercept/chown -R foo:foo bar The loop here ends up missing the conversion of foo:foo to root:root because it sees sys.argv[0] and assumes that it's the user:group argument and that we should convert that. We end up a os.execv(path, args) that have the following args: ['root:root', '-R', 'foo:foo', 'bar'] As os.execv ignores args[0], we can just populate it with sys.argv[0] and then loop through sys.argv[1:]. As both chgrp and chown would have either flags and USER[:GROUP] next, this fixes the issue. (Backported from OE-Core rev: 2a75f647ec7696d353f4b09099d777ba53f34d36) (From OE-Core rev: ed009b5d58914582c0770222115fc5c5a16bf16d) Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts/lib/checklayer/case.py')
0 files changed, 0 insertions, 0 deletions