projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8679efd
)
core: don't chown() the configuration directory
author
Lennart Poettering
<lennart@poettering.net>
Tue, 1 Aug 2017 08:36:33 +0000
(10:36 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 10 Aug 2017 13:02:49 +0000
(15:02 +0200)
The configuration directory is commonly not owned by a service, but
remains root-owned, hence don't change the owner automatically for it.
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index
cefe9b1
..
2453cb2
100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-1888,6
+1888,11
@@
static int setup_exec_directory(
if (r < 0)
goto fail;
+ /* Don't change the owner of the configuration directory, as in the common case it is not written to by
+ * a service, and shall not be writable. */
+ if (type == EXEC_DIRECTORY_CONFIGURATION)
+ continue;
+
r = chmod_and_chown(p, context->directories[type].mode, uid, gid);
if (r < 0)
goto fail;