diff options
author | Tom Gundersen <teg@jklm.no> | 2015-08-06 14:34:12 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-08-06 14:34:12 +0200 |
commit | 089157763aee96e36201bf1924fe10c82947a1c7 (patch) | |
tree | 49b3fe61f825f3e38a22c93182ea6464eed7f20f /src/core | |
parent | 855fc9744f63c04b220392f2ee30a83e4d6a7610 (diff) | |
parent | 6bfe5c28cad4716ed3ff6667c1546b5e180391fb (diff) |
Merge pull request #896 from poettering/runtimedir-exec
execute: don't fail if we create the runtime directory from two proceā¦
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/execute.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 125cb0dbd4..3820165241 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1554,7 +1554,13 @@ static int exec_child( return -ENOMEM; } - r = mkdir_safe_label(p, context->runtime_directory_mode, uid, gid); + r = mkdir_p_label(p, context->runtime_directory_mode); + if (r < 0) { + *exit_status = EXIT_RUNTIME_DIRECTORY; + return r; + } + + r = chmod_and_chown(p, context->runtime_directory_mode, uid, gid); if (r < 0) { *exit_status = EXIT_RUNTIME_DIRECTORY; return r; |