We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bebdba commit 8cfbccbCopy full SHA for 8cfbccb
tests/integration/helpers.bash
@@ -368,6 +368,12 @@ function rootless_cgroup() {
368
[[ "$ROOTLESS_FEATURES" == *"cgroup"* || -v RUNC_USE_SYSTEMD ]]
369
}
370
371
+function in_userns() {
372
+ # The kernel guarantees the root userns inode number (and thus the value of
373
+ # the magic-link) is always the same value (PROC_USER_INIT_INO).
374
+ [[ "$(readlink /proc/self/ns/user)" != "user:[$((0xEFFFFFFD))]" ]]
375
+}
376
+
377
# Check if criu is available and working.
378
function have_criu() {
379
command -v criu &>/dev/null || return 1
@@ -396,7 +402,7 @@ function requires() {
396
402
fi
397
403
;;
398
404
root)
399
- if [ $EUID -ne 0 ]; then
405
+ if [ $EUID -ne 0 ] || in_userns; then
400
406
skip_me=1
401
407
408
0 commit comments