mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-12 09:17:44 +03:00
core: don't chown() the configuration directory
The configuration directory is commonly not owned by a service, but remains root-owned, hence don't change the owner automatically for it.
This commit is contained in:
parent
8679efde21
commit
c71b2eb77e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user