mirror of
https://github.com/troglobit/finit.git
synced 2026-11-20 19:41:51 +00:00
tmpfiles: keep the mode of an existing directory when none is given
A d entry without a mode reset an existing directory to 0755. On
finix a bare "d /tmp" line took the sticky bit and the write
permission for others off the /tmp mount, so nobody but root could
create files there:
mkdir -p /tmp/t && chmod 1777 /tmp/t
echo 'd /tmp/t' > t.conf
tmpfiles --create t.conf
stat -c %a /tmp/t
This gave 755. Commit 3a72d126 made the chmod of an existing
directory work, and it used the 0755 default for a new directory as
the mode to set.
The default is now only for creating the directory. With no mode in
the entry, dirperm() leaves the mode alone.
Fixes #523
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
(cherry picked from commit 94bdccd2002d8847736743cb31e9b7bd56bdcada)
This commit is contained in:
4 files changed
+49
-9
No files matched your search
+7
-6
@@ -54,12 +54,13 @@ All relevant changes are documented in this file.
|
||||
- Fix misspelled `SIGUNKOWN` returned by `sig_name()` for unknown
|
||||
signal numbers, now spelled correctly as `SIGUNKNOWN`. Surfaced by
|
||||
the new restart log above
|
||||
- Fix mode of existing `d`/`D` directories in tmpfiles, the chmod branch
|
||||
never ran because the directory creation swallowed `EEXIST`. Mode and
|
||||
owner of `d`/`D`, `e`, and `f`/`F` entries, and of the directories
|
||||
`mksubsys()` creates for the dbus plugin, are now set through an open fd
|
||||
and only when they differ, so an immutable directory like `/var/empty`
|
||||
no longer warns on every boot. By Sam Brkopac
|
||||
- Fix mode of existing `d`/`D` directories in tmpfiles when the entry
|
||||
gives one, the chmod branch never ran because the directory creation
|
||||
swallowed `EEXIST`. Mode and owner of `d`/`D`, `e`, and `f`/`F`
|
||||
entries, and of the directories `mksubsys()` creates for the dbus
|
||||
plugin, are now set through an open fd and only when they differ, so
|
||||
an immutable directory like `/var/empty` no longer warns on every
|
||||
boot. By Sam Brkopac
|
||||
- Fix crash at config load for a `stop:` or `reload:` script written
|
||||
with a timeout, e.g. `stop:5,/bin/true`, which took PID 1 down
|
||||
- Fix a lost reload for a service paused mid-reload by a condition in
|
||||
|
||||
Reference in new issue
Block a user