mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
Revert "gnu: system: Add home-directory-permissions field to <user-account>."
This reverts commit e9a5eebc78
, 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
This commit is contained in:
parent
37cca1d87e
commit
5a2c3352d8
3 changed files with 3 additions and 10 deletions
|
@ -18057,10 +18057,6 @@ administrator's choice; reconfiguring does @emph{not} change their name.
|
|||
@item @code{home-directory}
|
||||
This is the name of the home directory for the account.
|
||||
|
||||
@item @code{home-directory-permissions} (default: @code{#o700})
|
||||
The permission bits for the home directory. By default, full access is
|
||||
granted to the user account and all other access is denied.
|
||||
|
||||
@item @code{create-home-directory?} (default: @code{#t})
|
||||
Indicates whether the home directory of this account should be created
|
||||
if it does not exist yet.
|
||||
|
|
|
@ -162,14 +162,14 @@ (define (activate-users+groups users groups)
|
|||
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)
|
||||
|
|
|
@ -29,7 +29,6 @@ (define-module (gnu system accounts)
|
|||
user-account-supplementary-groups
|
||||
user-account-comment
|
||||
user-account-home-directory
|
||||
user-account-home-directory-permissions
|
||||
user-account-create-home-directory?
|
||||
user-account-shell
|
||||
user-account-system?
|
||||
|
@ -71,8 +70,6 @@ (define-record-type* <user-account>
|
|||
(comment user-account-comment (default ""))
|
||||
(home-directory user-account-home-directory (thunked)
|
||||
(default (default-home-directory this-record)))
|
||||
(home-directory-permissions user-account-home-directory-permissions
|
||||
(default #o700))
|
||||
(create-home-directory? user-account-create-home-directory? ;Boolean
|
||||
(default #t))
|
||||
(shell user-account-shell ; gexp
|
||||
|
|
Loading…
Reference in a new issue