From d429878daf3e3eb21660ed80934b1d4b0603f6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 8 Mar 2019 22:48:04 +0100 Subject: activation: Shared system home directories are now 555 and root-owned. Fixes . Reported by Jack Hill . Regression introduced by the combination of 8bb76f3d44c1f5ffec8011819494db306a51d801 and 0ae735bcc8ff7fdc89d67b492bdee9091ee19e86: /var/empty would be 700 and owned by one of the system accounts (thus inaccessible to others), and /var/run/dbus would be 700 as well, thereby preventing D-Bus clients from connecting to the daemon. * gnu/build/activation.scm (duplicates): New procedure. (activate-users+groups)[system-accounts]: New variable. Use it. Make shared system account home directories #o555 and root-owned. * gnu/services/dbus.scm (dbus-activation): Make /var/run/dbus #o755. * gnu/tests/base.scm (run-basic-test): Test the ownership and permissions of /var/empty. --- gnu/tests/base.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/tests') diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index cc8b273c98..f9390ee8e4 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -258,6 +258,12 @@ info --version") (operating-system-user-accounts os)))) (stat:perms (marionette-eval `(stat ,root-home) marionette)))) + (test-equal "ownership and permissions of /var/empty" + '(0 0 #o555) + (let ((st (marionette-eval `(stat "/var/empty") marionette))) + (list (stat:uid st) (stat:gid st) + (stat:perms st)))) + (test-equal "no extra home directories" '() -- cgit v1.2.3