summaryrefslogtreecommitdiffstats
path: root/src/test/test-chase.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:28:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:28:34 +0000
commit39bea55b2de0eabc2a876ed40dd664d1f80cbcd2 (patch)
tree440d70559330bcdfe14968d44dd5d33ea570281e /src/test/test-chase.c
parentReleasing progress-linux version 256.5-2~progress7.99u1. (diff)
downloadsystemd-39bea55b2de0eabc2a876ed40dd664d1f80cbcd2.tar.xz
systemd-39bea55b2de0eabc2a876ed40dd664d1f80cbcd2.zip
Merging upstream version 256.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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));