mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
services: cleanup: Reintroduce explicit ‘chmod’ calls.
This reverts commit e74d05db53
.
* gnu/services.scm (cleanup-gexp): Introduce explicit ‘chmod’ calls
after ‘mkdir’ calls.
* gnu/tests/base.scm (run-basic-test)[test]("permissions on /tmp"):
New test.
Reported-by: Hilton Chain <hako@ultrarare.space>
Change-Id: I1e14dbe52eac526d2ed4ec1dd9c6fd9036f96a63
This commit is contained in:
parent
a1dc5ac832
commit
f92151133d
2 changed files with 10 additions and 1 deletions
|
@ -665,9 +665,14 @@ (define (cleanup-gexp _)
|
|||
(delete-file-recursively "/var/run")
|
||||
(delete-file-recursively "/run")
|
||||
|
||||
;; Note: The second argument to 'mkdir' is and'ed with umask,
|
||||
;; hence the 'chmod' calls.
|
||||
(mkdir "/tmp" #o1777)
|
||||
(chmod "/tmp" #o1777)
|
||||
(mkdir "/var/run" #o755)
|
||||
(mkdir "/run" #o755))))))
|
||||
(chmod "/var/run" #o755)
|
||||
(mkdir "/run" #o755)
|
||||
(chmod "/var/run" #o755))))))
|
||||
|
||||
(define cleanup-service-type
|
||||
;; Service that cleans things up in /tmp and similar.
|
||||
|
|
|
@ -296,6 +296,10 @@ (define (user-owned? file)
|
|||
(operating-system-user-accounts os))))
|
||||
(stat:perms (marionette-eval `(stat ,root-home) marionette))))
|
||||
|
||||
(test-equal "permissions on /tmp"
|
||||
#o1777
|
||||
(stat:perms (marionette-eval '(lstat "/tmp") marionette)))
|
||||
|
||||
(test-equal "ownership and permissions of /var/empty"
|
||||
'(0 0 #o555)
|
||||
(let ((st (marionette-eval `(stat "/var/empty") marionette)))
|
||||
|
|
Loading…
Reference in a new issue