aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-30 17:40:39 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-30 18:08:37 +0200
commit41db5a756369f5b14d1e67a523ee0940cad56744 (patch)
tree4f0aea430e3ebd080ec68357d1f43b6490163643 /gnu/tests
parent151cb9738a1903670acfee8cc28b5a2e441172ce (diff)
downloadpatches-41db5a756369f5b14d1e67a523ee0940cad56744.tar
patches-41db5a756369f5b14d1e67a523ee0940cad56744.tar.gz
activation: Change permissions on /root to #o700.
Reported by Alex Griffin <a@ajgrf.com>. Fixes <http://bugs.gnu.org/27135>. * gnu/build/activation.scm (add-user): When UID is zero, add 'chmod' call. * gnu/tests/base.scm (run-basic-test)["permissions on /root"]: New test.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/base.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index e5ac320b74..f5bbfafee3 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -199,6 +199,15 @@ info --version")
',users+homes))
marionette)))
+ (test-equal "permissions on /root"
+ #o700
+ (let ((root-home #$(any (lambda (account)
+ (and (zero? (user-account-uid account))
+ (user-account-home-directory
+ account)))
+ (operating-system-user-accounts os))))
+ (stat:perms (marionette-eval `(stat ,root-home) marionette))))
+
(test-equal "no extra home directories"
'()