guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/06: system: Accept gexps in 'setuid-programs'.


From: guix-commits
Subject: 05/06: system: Accept gexps in 'setuid-programs'.
Date: Thu, 12 Aug 2021 06:35:11 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 2826f488e4d492424294012b15f6914ade0ddd36
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Aug 12 12:08:55 2021 +0200

    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(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 4b57f1a..98aeda0 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]