mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
tmpfiles: make a new file 0644 when the f entry has no mode
A file from an f entry without a mode got what the umask left of
0666, so the result depended on who called tmpfiles:
f /run/app/state
tmpfiles.d(5) has 0644 as the default. Use that for a file the entry
creates.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
4 files changed
+9
-2
No files matched your search
@@ -115,3 +115,8 @@ run "/libexec/finit/tmpfiles --create $CONF"
|
||||
assert "v" "$(texec stat -c '%F %a %U:%G' $DIR/v)" = "directory 750 bin:sys"
|
||||
assert "q" "$(texec stat -c '%F %a %U:%G' $DIR/q)" = "directory 700 sys:bin"
|
||||
assert "Q" "$(texec stat -c '%F %a %U:%G' $DIR/Q)" = "directory 755 root:root"
|
||||
|
||||
sep
|
||||
say 'A new file without a mode is 0644, whatever the umask'
|
||||
run "echo 'f $DIR/default' > $CONF; umask 077; /libexec/finit/tmpfiles --create $CONF"
|
||||
assert "Default mode" "$(texec stat -c '%a' $DIR/default)" = "644"
|
||||
Reference in new issue
Block a user