From 2826f488e4d492424294012b15f6914ade0ddd36 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 12 Aug 2021 12:08:55 +0200 Subject: 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. --- gnu/system.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gnu/system.scm') 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 -- cgit 1.4.1