From e1f0c88ea221d846b5a533c4dc88e99e953af63e Mon Sep 17 00:00:00 2001 From: Leo Nikkilä Date: Mon, 11 Apr 2022 01:00:08 +0300 Subject: shepherd: Add #:supplementary-groups. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To support the argument introduced in Shepherd 0.9.0 when defining container-bound services. * gnu/build/shepherd.scm (exec-command*) (make-forkexec-constructor/container): Add '#:supplementary-groups'. Signed-off-by: Ludovic Courtès --- gnu/build/shepherd.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/build/shepherd.scm') diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index 595db40f2e..d52e53eb78 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018, 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2022 Leo Nikkilä ;;; ;;; This file is part of GNU Guix. ;;; @@ -120,6 +121,7 @@ (define* (read-pid-file/container pid pid-file #:key (max-delay 5)) pid))) (define* (exec-command* command #:key user group log-file pid-file + (supplementary-groups '()) (directory "/") (environment-variables (environ))) "Like 'exec-command', but first restore signal handles modified by shepherd (PID 1)." @@ -135,6 +137,7 @@ (define* (exec-command* command #:key user group log-file pid-file (exec-command command #:user user #:group group + #:supplementary-groups supplementary-groups #:log-file log-file #:directory directory #:environment-variables environment-variables)) @@ -146,6 +149,7 @@ (define* (make-forkexec-constructor/container command (mappings '()) (user #f) (group #f) + (supplementary-groups '()) (log-file #f) pid-file (pid-file-timeout 5) @@ -192,6 +196,8 @@ (define mounts (exec-command* command #:user user #:group group + #:supplementary-groups + supplementary-groups #:pid-file pid-file #:log-file log-file #:directory directory -- cgit v1.2.3