mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-15 05:57:26 +03:00
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:
parent
b64c7b3d5b
commit
f418f31d50
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user