summary refs log tree commit diff
path: root/gnu/build/activation.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2023-08-20 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2023-08-20 02:00:00 +0200
commit5a2c3352d8f8a08a5ba01542a3f282799e503d33 (patch)
treee88dfd8995312f69692bcc87c6d8ead62337ede7 /gnu/build/activation.scm
parent37cca1d87e18c257a9697110557a2bfaf9bc684b (diff)
downloadguix-5a2c3352d8f8a08a5ba01542a3f282799e503d33.tar.gz
Revert "gnu: system: Add home-directory-permissions field to <user-account>."
This reverts commit e9a5eebc785cb843034b38c5c5a6dd10904bdf2a, which
as far as I can tell breaks system roll-backs thusly:

[...]
In gnu/build/accounts.scm:
   239:27  3 (_ #<<password-entry> name: "root" password: "x" uid: 0 gid: 0 real-name: "System >)
In unknown file:
           2 (string-join ("root" "x" "0" "0" "System administrator" "/root" #t) ":" #<undefined>)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure string-append: Wrong type (expecting string): #t
Diffstat (limited to 'gnu/build/activation.scm')
-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 fd043ca131..eea2233563 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.
+      ;; accounts.  If a service needs looser permissions on its home
+      ;; directories, it can always chmod it in an activation snippet.
       (chown home (passwd:uid pwd) (passwd:gid pwd))
-      (chmod home home-permissions)))
+      (chmod home #o700)))
 
   (define system-accounts
     (filter (lambda (user)