From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: 61462@debbugs.gnu.org
Subject: [bug#61462] [PATCH 07/10] build: Rename activate-setuid-programs.
Date: Sun, 5 Feb 2023 01:00:16 +0100 [thread overview]
Message-ID: <20230205000019.6259-7-me@tobias.gr> (raw)
In-Reply-To: <20230205000019.6259-1-me@tobias.gr>
* gnu/build/activation.scm (activate-setuid-programs): Rename this…
(activate-privileged-programs): …to this.
Operate on a list of <privileged-program> records.
* gnu/services.scm (setuid-program->activation-gexp): Adjust caller.
---
gnu/build/activation.scm | 24 ++++++++++++------------
gnu/services.scm | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index af947a39fa..b5004a292c 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -27,7 +27,7 @@
(define-module (gnu build activation)
#:use-module (gnu system accounts)
- #:use-module (gnu system setuid)
+ #:use-module (gnu system privilege)
#:use-module (gnu build accounts)
#:use-module (gnu build linux-boot)
#:use-module (guix build utils)
@@ -41,7 +41,7 @@ (define-module (gnu build activation)
#:export (activate-users+groups
activate-user-home
activate-etc
- activate-setuid-programs
+ activate-privileged-programs
activate-special-files
activate-modprobe
activate-firmware
@@ -287,8 +287,8 @@ (define %privileged-program-directory
;; Place where privileged copies of programs are stored.
"/run/privileged/bin")
-(define (activate-setuid-programs programs)
- "Turn PROGRAMS, a list of file setuid-programs records, into privileged
+(define (activate-privileged-programs programs)
+ "Turn PROGRAMS, a list of file privileged-programs records, into privileged
copies stored under %PRIVILEGED-PROGRAM-DIRECTORY."
(define (ensure-empty-directory directory)
(if (file-exists? directory)
@@ -325,11 +325,11 @@ (define (make-deprecated-wrapper program)
(for-each (lambda (program)
(catch 'system-error
(lambda ()
- (let* ((program-name (setuid-program-program program))
- (setuid? (setuid-program-setuid? program))
- (setgid? (setuid-program-setgid? program))
- (user (setuid-program-user program))
- (group (setuid-program-group program))
+ (let* ((program-name (privileged-program-program program))
+ (setuid? (privileged-program-setuid? program))
+ (setgid? (privileged-program-setgid? program))
+ (user (privileged-program-user program))
+ (group (privileged-program-group program))
(uid (match user
((? string?) (passwd:uid (getpwnam user)))
((? integer?) user)))
@@ -339,13 +339,13 @@ (define (make-deprecated-wrapper program)
(make-privileged-program program-name setuid? setgid? uid gid)
(make-deprecated-wrapper program-name)))
(lambda args
- ;; If we fail to create a setuid program, better keep going
+ ;; If we fail to create a privileged program, better keep going
;; so that we don't leave %PRIVILEGED-PROGRAM-DIRECTORY empty
;; or half-populated. This can happen if PROGRAMS contains
;; incorrect file names: <https://bugs.gnu.org/38800>.
(format (current-error-port)
- "warning: failed to make ~s setuid/setgid: ~a~%"
- (setuid-program-program program)
+ "warning: failed to privilege ~s: ~a~%"
+ (privileged-program-program program)
(strerror (system-error-errno args))))))
programs))
diff --git a/gnu/services.scm b/gnu/services.scm
index 26546e1369..af9f4e1db6 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -832,7 +832,7 @@ (define (setuid-program->activation-gexp programs)
#~(begin
(use-modules (gnu system setuid))
- (activate-setuid-programs (list #$@programs))))))
+ (activate-privileged-programs (list #$@programs))))))
(define setuid-program-service-type
(service-type (name 'setuid-program)
--
2.39.1
next prev parent reply other threads:[~2023-02-12 20:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-12 20:37 [bug#61462] Add support for file capabilities(7) Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 01/10] system: Disallow file-like setuid-programs Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 02/10] services: setuid-program: Populate /run/privileged/bin Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 03/10] system: Use /run/privileged/bin in search paths Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 04/10] gnu: Replace (almost) all uses of /run/setuid-programs Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 05/10] system: Add (gnu system privilege) Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 06/10] system: (gnu system setuid) wraps " Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2023-02-05 0:00 ` [bug#61462] [PATCH 08/10] services: Rename setuid-program-service-type Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 09/10] system: Use privileged-program-service-type by default Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 0:00 ` [bug#61462] [PATCH 10/10] system: Add privileged-programs to <operating-system> Tobias Geerinckx-Rice via Guix-patches via
2023-02-12 21:05 ` [bug#61462] Add support for file capabilities(7) Tobias Geerinckx-Rice via Guix-patches via
2023-03-04 16:55 ` Ludovic Courtès
2023-03-24 4:31 ` Vagrant Cascadian via Guix-patches
2023-04-18 13:14 ` Ludovic Courtès
2023-04-18 19:38 ` Vagrant Cascadian
2023-04-20 10:33 ` Ludovic Courtès
2023-07-15 23:59 ` [bug#61462] [PATCH v2 01/10] system: Disallow file-like setuid-programs Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 02/10] services: setuid-program: Populate /run/privileged/bin Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 03/10] system: Use /run/privileged/bin in search paths Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 04/10] gnu: Replace (almost) all uses of /run/setuid-programs Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 05/10] system: Add (gnu system privilege) Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 06/10] system: (gnu system setuid) wraps " Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 07/10] build: Rename activate-setuid-programs Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 08/10] services: Rename setuid-program-service-type Tobias Geerinckx-Rice via Guix-patches via
2023-07-15 23:59 ` [bug#61462] [PATCH v2 09/10] system: Use privileged-program-service-type by default Tobias Geerinckx-Rice via Guix-patches via
2023-07-16 0:00 ` [bug#61462] [PATCH v2 10/10] system: Add privileged-programs to <operating-system> Tobias Geerinckx-Rice via Guix-patches via
2023-07-21 18:53 ` [bug#61462] Add support for file capabilities(7) Vagrant Cascadian
2023-07-21 19:11 ` Vagrant Cascadian
2023-08-08 15:40 ` Ludovic Courtès
2023-08-29 20:29 ` [bug#61462] /run should be cleaned on boot Vagrant Cascadian
[not found] ` <87o7ipvbhh.fsf__48662.4622646318$1693341314$gmane$org@wireframe>
2023-08-29 21:21 ` bug#64775: " brian via Bug reports for GNU Guix
2023-11-15 21:37 ` [bug#61462] Add support for file capabilities(7) Vagrant Cascadian
2023-12-24 0:34 ` Vagrant Cascadian
2024-01-08 16:45 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230205000019.6259-7-me@tobias.gr \
--to=guix-patches@gnu.org \
--cc=61462@debbugs.gnu.org \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.