From 7e09224d77c88443706962712364d37334bb6ad1 Mon Sep 17 00:00:00 2001 From: code-yeongyu Date: Thu, 6 Aug 2026 18:58:02 +0900 Subject: [PATCH] ci: probe unshare semantics on ubuntu-latest --- .github/workflows/probe-unshare.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/probe-unshare.yml diff --git a/.github/workflows/probe-unshare.yml b/.github/workflows/probe-unshare.yml new file mode 100644 index 00000000..ec9d5f49 --- /dev/null +++ b/.github/workflows/probe-unshare.yml @@ -0,0 +1,28 @@ +name: probe-unshare +on: + workflow_dispatch: +jobs: + probe: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Probe unshare semantics + run: | + echo "=== sysctls ===" + cat /proc/sys/kernel/unprivileged_userns_clone 2>/dev/null || echo "no unprivileged_userns_clone" + cat /proc/sys/kernel/apparmor_restrict_unprivileged_userns 2>/dev/null || echo "no apparmor_restrict_unprivileged_userns" + echo "=== identity ===" + id + echo "=== subuids ===" + getent passwd "$(id -un)" | head -1 + grep -E "$(id -un)|^$(id -u):" /etc/subuid /etc/subgid 2>/dev/null || echo "no subuid/subgid entries" + echo "=== helpers ===" + which unshare newuidmap newgidmap + echo "=== plain ===" + unshare --user --map-root-user true; echo "plain rc=$?" + echo "=== map-auto ===" + unshare --user --map-root-user --map-auto true; echo "auto rc=$?" + echo "=== full launch shape (map-auto) ===" + unshare --user --map-root-user --map-auto --mount --ipc --pid --uts --fork sh -lc "echo alpha"; echo "full rc=$?" + echo "=== full launch shape (plain) ===" + unshare --user --map-root-user --mount --ipc --pid --uts --fork sh -lc "echo alpha"; echo "plain full rc=$?"