diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-08-12 12:08:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-08-12 12:34:13 +0200 |
commit | 2826f488e4d492424294012b15f6914ade0ddd36 (patch) | |
tree | 7168fd734cb4034bb6e8c24c68bf5b7133199710 | |
parent | e0bd47b4fd5eb009f34004242e16b976e58756b0 (diff) | |
download | guix-2826f488e4d492424294012b15f6914ade0ddd36.tar.gz guix-2826f488e4d492424294012b15f6914ade0ddd36.zip |
system: Accept gexps in 'setuid-programs'.
Commit a7ac19851baab3fbcc40c4b2cf5b00a6ac9cd2f3 led configs such as the
following one, which were previously valid, to be rejected:
(operating-system
;; ...
(setuid-programs (cons #~(string-append #$wireshark "/bin/dumpcap")
%setuid-programs)))
They are now accepted again.
Reported by wonko on #guix.
* gnu/system.scm (%ensure-setuid-program-list): Handle the case where
PROGRAM is not a file-like.
-rw-r--r-- | gnu/system.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index 4b57f1a8bb..98aeda0306 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1082,11 +1082,13 @@ deprecated; use 'setuid-program' instead~%")) (set! warned? #t))) (map (match-lambda - ((? file-like? program) - (warn-once) - (setuid-program (program program))) ((? setuid-program? program) - program)) + program) + (program + ;; PROGRAM is a file-like or a gexp like #~(string-append #$foo + ;; "/bin/bar"). + (warn-once) + (setuid-program (program program)))) lst)) (define %setuid-programs |