From 9823c75c6da8cc708394196020dea53c8504b3da Mon Sep 17 00:00:00 2001 From: Jake Abendroth Date: Thu, 1 Oct 2026 02:14:02 -0700 Subject: [PATCH 1/2] GnuTests.yml: let root tests run the uutils build --- .github/workflows/GnuTests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 76ab2fe4b36..2ad69289012 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -137,6 +137,11 @@ jobs: - name: Run GNU root tests shell: bash run: | + ## Root tests drop to $NON_ROOT_USERNAME 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 ## Run GNU root tests path_GNU='gnu' path_UUTILS='uutils' From f68735196ea7c978456d79aee951800f6a2c4d31 Mon Sep 17 00:00:00 2001 From: Jake Abendroth Date: Thu, 1 Oct 2026 19:14:47 -0700 Subject: [PATCH 2/2] GnuTests.yml: fail if the non-root user cannot run the uutils build --- .github/workflows/GnuTests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 2ad69289012..feb27aa254e 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -137,11 +137,14 @@ jobs: - name: Run GNU root tests shell: bash run: | - ## Root tests drop to $NON_ROOT_USERNAME via `chroot --user`. /home/runner is + ## 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 ## Run GNU root tests path_GNU='gnu' path_UUTILS='uutils'