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:
200edc2
)
Revert "nspawn: determine_uid_shift before forking"
author
Lennart Poettering
<lennart@poettering.net>
Fri, 3 Jul 2015 10:30:53 +0000
(12:30 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 3 Jul 2015 10:30:53 +0000
(12:30 +0200)
src/nspawn/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index
7fa098b
..
df341a6
100644
(file)
--- a/
src/nspawn/nspawn.c
+++ b/
src/nspawn/nspawn.c
@@
-4313,6
+4313,10
@@
static int outer_child(
if (r < 0)
return r;
+ r = determine_uid_shift(directory);
+ if (r < 0)
+ return r;
+
/* Turn directory into bind mount */
if (mount(directory, directory, NULL, MS_BIND|MS_REC, NULL) < 0)
return log_error_errno(errno, "Failed to make bind mount: %m");
@@
-4491,10
+4495,6
@@
int main(int argc, char *argv[]) {
if (r < 0)
goto finish;
- r = determine_uid_shift(arg_directory);
- if (r < 0)
- return r;
-
if (geteuid() != 0) {
log_error("Need to be root.");
r = -EPERM;