summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 66276aa54e..b5ffaa1c3c 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -6022,5 +6022,11 @@ int namespace_enter(int namespace_fd, int root_fd) {
if (chroot(".") < 0)
return -errno;
+ if (setresgid(0, 0, 0) < 0)
+ return -errno;
+
+ if (setresuid(0, 0, 0) < 0)
+ return -errno;
+
return 0;
}