summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Philips <brandon.philips@coreos.com>2014-03-13 15:19:40 -0700
committerLennart Poettering <lennart@poettering.net>2014-03-14 02:25:56 +0100
commitf418f31d5042398344740f2d8ac4dc1c2583151c (patch)
treeab99d4bdeb63cad459ed2e1ec4d107030ab80ee3
parentb64c7b3d5b06af9fafd47c0795acb003ddbe90ef (diff)
nspawn: allow -EEXIST on mkdir_safe /home/${uid}
With systemd 211 nspawn attempts to create the home directory for the given uid. However, if the home directory already exists then it will fail. Don't error out on -EEXIST.
-rw-r--r--src/nspawn/nspawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index b637b51f61..7c3d7b89be 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -2543,7 +2543,7 @@ static int change_uid_gid(char **_home) {
}
r = mkdir_safe(home, 0755, uid, gid);
- if (r < 0) {
+ if (r < 0 && r != -EEXIST) {
log_error("Failed to make home directory: %s", strerror(-r));
return r;
}