summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@canonical.com>2019-09-29 17:16:55 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-02 16:11:02 +0200
commit8084dcb9d759e93669127f200bf5ca755432b96e (patch)
tree1a6f80d1643f60c79654e4dd7d5088eac5218d30 /src/core/automount.c
parent67acde4869a9505f9721e31fa5167c82445e0e12 (diff)
downloadsystemd-8084dcb9d759e93669127f200bf5ca755432b96e.tar.gz
src/core/automount: use DirectoryMode when calling mkdir -p
mkdir -p is called both when setting up the autofs mount, as well as after being notified that the real mount unit should be called. However the first mkdir -p is hardcoded with 0555, while the second uses the value specified to DirectoryMode in the automount unit; the second mkdir -p is only needed when called from coldplug, so under normal operation the dirs are incorrectly created with mode 0555. This replaces the hardcoded 0555 mode with the value of DirectoryMode. Closes #13683.
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index bcdd7e19a9..a54e56c312 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -568,7 +568,7 @@ static void automount_enter_waiting(Automount *a) {
if (r < 0)
goto fail;
- (void) mkdir_p_label(a->where, 0555);
+ (void) mkdir_p_label(a->where, a->directory_mode);
unit_warn_if_dir_nonempty(UNIT(a), a->where);