Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/GnuTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ jobs:
- name: Run GNU root tests
shell: bash
run: |
## Root tests drop to nobody via `chroot --user`. /home/runner is
## 0750, so that user cannot reach our build dir and PATH lookup silently
## falls back to the runner's own /usr/bin coreutils. Allow traversal.
dir="${GITHUB_WORKSPACE}"
while [ "${dir}" != / ]; do sudo chmod o+x "${dir}"; dir=$(dirname "${dir}"); done
## Fail here if that user still cannot run our build, instead of letting the
## tests pass or fail on whatever coreutils the runner image ships.
sudo -u nobody "${GITHUB_WORKSPACE}/uutils/target/release-small/id" -u

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment says $NON_ROOT_USERNAME but here it is hardcoded to nobody, could you please use the same in both?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

## Run GNU root tests
path_GNU='gnu'
path_UUTILS='uutils'
Expand Down
Loading