diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-04-06 23:50:27 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-04-06 23:56:24 +0200 |
commit | d7113bb655ff80a868a9e624c913f9d23e6c63ad (patch) | |
tree | 1c1f31c9cdbd52650ad5b4e7dab67f0355c2ad28 /gnu/tests | |
parent | 42a87136f0c99c0f1956e053d92f23bf096bddb6 (diff) | |
download | guix-d7113bb655ff80a868a9e624c913f9d23e6c63ad.tar.gz |
services: syslog: Create log files as non-world-readable.
Partly fixes <https://bugs.gnu.org/40405>. Reported by Diego Nicola Barbato <dnbarbato@posteo.de>. * gnu/services/base.scm (syslog-service-type): Change 'start' method to set umask to #o137 before spawning syslogd. * gnu/tests/base.scm (run-basic-test)["/var/log/messages is not world-readable"]: New test.
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/base.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 37b83dc7ec..fe63cecbd0 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -195,6 +195,14 @@ info --version") (pk 'services services) '(root #$@(operating-system-shepherd-service-names os))))) + (test-equal "/var/log/messages is not world-readable" + #o640 ;<https://bugs.gnu.org/40405> + (begin + (wait-for-file "/var/log/messages" marionette + #:read 'get-u8) + (marionette-eval '(stat:perms (lstat "/var/log/messages")) + marionette))) + (test-assert "homes" (let ((homes '#$(map user-account-home-directory |