mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 20:25:38 +03:00
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.
(cherry picked from commit 8084dcb9d7
)
This commit is contained in:
parent
20438f96c3
commit
f406a691a7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user