diff options
author | Taro Yamada <archer_ame@yahoo.co.jp> | 2019-01-22 11:47:45 +0900 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-01-22 11:14:51 +0100 |
commit | 0bf05f0122f0f13cd0c0bc35a31861875d2ead31 (patch) | |
tree | c0384c39f20fba036d78242ec5f5779f3bf4a8e0 | |
parent | 5745ca8ed8b5ae281162ca997d47c5ef81ca7b8f (diff) | |
download | systemd-0bf05f0122f0f13cd0c0bc35a31861875d2ead31.tar.gz |
Fixes #11128
-rw-r--r-- | src/core/execute.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 07c5a72721..092c80a6e7 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2160,8 +2160,14 @@ static int setup_exec_directory( r = mkdir_label(p, context->directories[type].mode); if (r < 0 && r != -EEXIST) goto fail; - if (r == -EEXIST && !context->dynamic_user) - continue; + if (r == -EEXIST) { + if (chmod(p, context->directories[type].mode) < 0) { + r = -errno; + goto fail; + } + if (!context->dynamic_user) + continue; + } } /* Don't change the owner of the configuration directory, as in the common case it is not written to by |