Skip to content

Commit

Permalink
tests/run_some: make sure unshared root user can descend build dir
Browse files Browse the repository at this point in the history
This was causing errors in my local testing in vms.

Signed-off-by: Serge Hallyn <[email protected]>
Cherry-picked-from: 2457fc7 ("tests/run_some: make sure unshared root user can descend build dir")
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
hallyn authored and alejandro-colomar committed Jun 28, 2024
1 parent 514beca commit d5ecf56
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/run_some
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ unset LANG
unset LANGUAGE
. common/config.sh

# When we unshare -Ur, we must be able to descend the build path.
# But $HOME might not be world x. Fix that.
fixup_home_perms() {
p="${build_path}"
d=""
echo "$p" | tr '/' '\n' | while read f; do
if [ -z "$f" ]; then
continue
fi
d="$d/$f"
chmod ugo+x "$d"
done
}

fixup_home_perms

USE_PAM="yes"
FAILURE_TESTS="yes"

Expand Down

0 comments on commit d5ecf56

Please sign in to comment.