summaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-01-14 10:53:16 -0500
committerJosselin Poiret <dev@jpoiret.xyz>2023-08-25 15:12:54 +0200
commite9a5eebc785cb843034b38c5c5a6dd10904bdf2a (patch)
tree3e4a142df6bc9a702ba20875b0f4f7bda98018bd /gnu/build
parent6c447ababfb11581a75cff8281e96f701e216692 (diff)
gnu: system: Add home-directory-permissions field to <user-account>.
* gnu/system/accounts.scm (<user-account>)[home-directory-permissions]: New field. (user-account-home-directory-permissions): New accessor. * gnu/build/activation.scm (activate-users+groups): Use home directory permission bits from the user account object. * doc/guix.texi (User Accounts): Document new field. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/activation.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index eea2233563..fd043ca131 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -162,14 +162,14 @@ owner-writable in HOME."
group records) are all available."
(define (make-home-directory user)
(let ((home (user-account-home-directory user))
+ (home-permissions (user-account-home-directory-permissions user))
(pwd (getpwnam (user-account-name user))))
(mkdir-p home)
;; Always set ownership and permissions for home directories of system
- ;; accounts. If a service needs looser permissions on its home
- ;; directories, it can always chmod it in an activation snippet.
+ ;; accounts.
(chown home (passwd:uid pwd) (passwd:gid pwd))
- (chmod home #o700)))
+ (chmod home home-permissions)))
(define system-accounts
(filter (lambda (user)