summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-07-03 12:30:53 +0200
committerLennart Poettering <lennart@poettering.net>2015-07-03 12:30:53 +0200
commit391567f479f56c2ae7c2beb9eb5305f5c02f5d82 (patch)
treee2a1dd25eb679672e6e25b5b76ef435c1eab1700 /src
parent200edc2bcfdf3845ee8ee5c71306dfbe20dc28d3 (diff)
Revert "nspawn: determine_uid_shift before forking"
Diffstat (limited to 'src')
-rw-r--r--src/nspawn/nspawn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 7fa098bea8..df341a6e74 100644
--- 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;