From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: 61462@debbugs.gnu.org
Subject: [bug#61462] [PATCH v2 01/10] system: Disallow file-like setuid-programs.
Date: Sun, 16 Jul 2023 01:59:51 +0200 [thread overview]
Message-ID: <129e8d298556f6a159fcb704ed3df4bf0709ddd3.1689465600.git.me@tobias.gr> (raw)
In-Reply-To: <87r0uuehlr.fsf@nckx>
It has been a warning for well over a year now. Now, with
privileged-programs coming, don't let's support nested deprecation
hacks.
* gnu/system.scm (<operating-system>):
Don't ‘sanitize’ the setuid-programs field.
(ensure-setuid-program-list): Delete syntax.
(%ensure-setuid-program-list): Delete variable.
---
This is a quick snapshot of my rebased tree at the request of vagrantc.
There shouldn't be any functional changes. If there are, that's cool too.
gnu/system.scm | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 23addf41e9..e32879b240 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -296,8 +296,7 @@ (define-record-type* <operating-system> operating-system
(pam-services operating-system-pam-services ; list of PAM services
(default (base-pam-services)))
(setuid-programs operating-system-setuid-programs
- (default %setuid-programs) ; list of <setuid-program>
- (sanitize ensure-setuid-program-list))
+ (default %setuid-programs)) ; list of <setuid-program>
(sudoers-file operating-system-sudoers-file ; file-like
(default %sudoers-specification))
@@ -1203,31 +1202,6 @@ (define (operating-system-environment-variables os)
;; when /etc/machine-id is missing. Make sure these warnings are non-fatal.
("DBUS_FATAL_WARNINGS" . "0")))
-;; Ensure LST is a list of <setuid-program> records and warn otherwise.
-(define-with-syntax-properties (ensure-setuid-program-list (lst properties))
- (%ensure-setuid-program-list lst properties))
-
-;; We want to be able to use defines, so define a procedure.
-(define (%ensure-setuid-program-list lst properties)
- (define warned? #f)
-
- (define (warn-once)
- (unless warned?
- (warning (source-properties->location properties)
- (G_ "representing setuid programs with file-like objects is \
-deprecated; use 'setuid-program' instead~%"))
- (set! warned? #t)))
-
- (map (match-lambda
- ((? setuid-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
;; Default set of setuid-root programs.
(let ((shadow (@ (gnu packages admin) shadow)))
base-commit: 21b718f4d6c3ded8ef50d12f6e9ae6474f74620f
prerequisite-patch-id: efc79914a4e3e994a8786e02774237de36f6b105
prerequisite-patch-id: 1986dc849c15ae6c1502df25f9c17b53a02df83d
prerequisite-patch-id: bb189cbd1346b0d00e9b79189155c9916731788b
prerequisite-patch-id: 062a02ed88acf0f11c5895b67065faa55d71fae8
prerequisite-patch-id: 2eea585e7940a16c24baeed3b65a123b1b10fd6b
prerequisite-patch-id: 31a3407b0c583d01cc2664168ec6cf499f10cb53
prerequisite-patch-id: a0566799f4aef296a3efcd228c3a223202662f86
prerequisite-patch-id: cd50cb9494a47433c7fd167729e239178c78d7f1
prerequisite-patch-id: e86e94b9a40613e3ce534ce778d027210b93b05a
prerequisite-patch-id: c7068d2079b3d2f0f172cc4cf9e0791ff5e84da3
prerequisite-patch-id: b52b35693094914ea1962ac2f186a52617d38c8a
prerequisite-patch-id: b2bdf5541825c9cd57d2fe3e3e9a90e5fc8ffbe6
prerequisite-patch-id: f085c8ee7c7f1d0250b0ed8a548a72d397d96056
prerequisite-patch-id: 49c8f3f912d24147362a3a874c2b2c0b4b182d5d
prerequisite-patch-id: 1f0fc1ca1a40444f4831beaf3183d7d4f866fd6d
prerequisite-patch-id: 8c69acfe3cb01ff3c0a46a2efe04b53ad063002d
prerequisite-patch-id: 10f972ac75020ce096d83b53a68a3b2f1eba1c8c
prerequisite-patch-id: 74586b82a25b775527adc7e8cf09b15bdb4850f7
prerequisite-patch-id: 7388ac8d395ef16830105026230e47d903026335
prerequisite-patch-id: 2c7df330bf50663218016e01b9c0922a6b3a001f
prerequisite-patch-id: f45ec5e6d6023fc5538e1578bbb4e270d7b23baf
prerequisite-patch-id: 0083d0b8d60fd0e526449cd192f153d0bd1bde0b
prerequisite-patch-id: 7e6e4ab87b52996e9bb6cd8595889f21ba87e9fe
--
2.41.0
next prev parent reply other threads:[~2023-07-20 20:44 UTC|newest]
Thread overview: 34+ 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 ` [bug#61462] [PATCH 07/10] build: Rename activate-setuid-programs Tobias Geerinckx-Rice via Guix-patches via
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 ` Tobias Geerinckx-Rice via Guix-patches via [this message]
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
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=129e8d298556f6a159fcb704ed3df4bf0709ddd3.1689465600.git.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).