summaryrefslogtreecommitdiffstats
path: root/src/test/test-chase.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-chase.c')
-rw-r--r--src/test/test-chase.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-chase.c b/src/test/test-chase.c
index 13ee702..c7ca3fd 100644
--- a/src/test/test-chase.c
+++ b/src/test/test-chase.c
@@ -183,7 +183,7 @@ TEST(chase) {
/* Paths underneath the "root" with different UIDs while using CHASE_SAFE */
- if (geteuid() == 0) {
+ if (geteuid() == 0 && !userns_has_single_user()) {
p = strjoina(temp, "/user");
ASSERT_OK(mkdir(p, 0755));
ASSERT_OK(chown(p, UID_NOBODY, GID_NOBODY));
@@ -313,7 +313,7 @@ TEST(chase) {
r = chase(p, NULL, 0, &result, NULL);
assert_se(r == -ENOENT);
- if (geteuid() == 0) {
+ if (geteuid() == 0 && !userns_has_single_user()) {
p = strjoina(temp, "/priv1");
ASSERT_OK(mkdir(p, 0755));