chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b64c7b3
)
nspawn: allow -EEXIST on mkdir_safe /home/${uid}
author
Brandon Philips
<brandon.philips@coreos.com>
Thu, 13 Mar 2014 22:19:40 +0000
(15:19 -0700)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 14 Mar 2014 01:25:56 +0000
(
02:25
+0100)
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.
src/nspawn/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index b637b51f61b8739575ec4c35239644cb793cbb2e..7c3d7b89beb03890db7fc73a77f66f7206514c05 100644
(file)
--- 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;
}