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.
This commit is contained in:
Brandon Philips 2014-03-13 15:19:40 -07:00 committed by Lennart Poettering
parent b64c7b3d5b
commit f418f31d50

View file

@ -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;
}