mirror of
https://github.com/systemd/systemd.git
synced 2026-07-16 04:20:34 +00:00
util: when joining a namespace make sure to reset all uids to 0 after
the transition
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user