projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc9fd78
)
util: when joining a namespace make sure to reset all uids to 0 after
author
Lennart Poettering
<lennart@poettering.net>
Sat, 14 Dec 2013 04:04:49 +0000
(
05:04
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Sat, 14 Dec 2013 04:10:25 +0000
(
05:10
+0100)
the transition
src/shared/util.c
patch
|
blob
|
history
diff --git
a/src/shared/util.c
b/src/shared/util.c
index
66276aa
..
b5ffaa1
100644
(file)
--- 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;
}