util: when joining a namespace make sure to reset all uids to 0 after

the transition
This commit is contained in:
Lennart Poettering
2013-12-14 05:04:49 +01:00
parent bc9fd78c7b
commit 5e2b3214aa

View File

@@ -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;
}