summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2024-08-18 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2024-08-18 02:00:00 +0200
commited4e0b48f16530def08862657301178b5cf00a9a (patch)
tree12bcbdb18a09d54bda350c3cb6060e381e539706 /gnu
parented3649bcce1ea0db5385744f9114d4b40d6dce55 (diff)
Replace some more occurrences of ‘setuid-programs’.
* gnu/packages/containers.scm (podman, buildah)[arguments]: Substitute /run/privileged/bin for /run/setuid-programs. * gnu/packages/mail.scm (opensmtpd)[arguments]: Likewise. * gnu/packages/spice.scm (spice-gtk)[arguments]: Likewise. * gnu/packages/patches/enlightenment-fix-setuid-path.patch: Likewise. * gnu/packages/xdisorg.scm (xsecurelock)[description]: Rewrite example code to use the ‘privileged-program(s)’ terminology. * doc/guix-cookbook.texi (Network bridge for QEMU): Likewise. * gnu/packages/disk.scm (udevil)[arguments]: Update a comment. Change-Id: I7f467e8743a3ef556cd89bac41509bf51d9edb30
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/containers.scm4
-rw-r--r--gnu/packages/disk.scm6
-rw-r--r--gnu/packages/mail.scm2
-rw-r--r--gnu/packages/patches/enlightenment-fix-setuid-path.patch14
-rw-r--r--gnu/packages/spice.scm2
-rw-r--r--gnu/packages/xdisorg.scm18
6 files changed, 24 insertions, 22 deletions
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 6ce9042c13c..929234c772f 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -536,7 +536,7 @@ Its main purpose is to support the key usage by @code{docker-init}:
536 ,(string-append #$iptables "/sbin") 536 ,(string-append #$iptables "/sbin")
537 ,(string-append #$passt "/bin") 537 ,(string-append #$passt "/bin")
538 ,(string-append #$procps "/bin") ; ps 538 ,(string-append #$procps "/bin") ; ps
539 "/run/setuid-programs"))))) 539 "/run/privileged/bin")))))
540 (add-after 'install 'install-completions 540 (add-after 'install 'install-completions
541 (lambda _ 541 (lambda _
542 (invoke "make" "install.completions" 542 (invoke "make" "install.completions"
@@ -669,7 +669,7 @@ being rootless and not requiring any daemon to be running.")
669 (,(string-append #$crun "/bin") 669 (,(string-append #$crun "/bin")
670 ,(string-append #$gcc "/bin") ; cpp 670 ,(string-append #$gcc "/bin") ; cpp
671 ,(string-append #$passt "/bin") 671 ,(string-append #$passt "/bin")
672 "/run/setuid-programs"))))) 672 "/run/privileged/bin")))))
673 (add-after 'install 'install-completions 673 (add-after 'install 'install-completions
674 (lambda _ 674 (lambda _
675 (invoke "make" "install.completions" 675 (invoke "make" "install.completions"
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index d45da82276f..ec8ea9a94f7 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -209,9 +209,9 @@ and write-back caching.")
209 (string-append "--sysconfdir=" 209 (string-append "--sysconfdir="
210 (assoc-ref %outputs "out") 210 (assoc-ref %outputs "out")
211 "/etc") 211 "/etc")
212 ;; udevil expects these programs to be run with uid set as root. 212 ;; udevil expects these programs to be run with an UID of root.
213 ;; user has to manually add these programs to setuid-programs. 213 ;; mount and umount are %default-privileged-programs on Guix System;
214 ;; mount and umount are default setuid-programs in guix system. 214 ;; the others must be explicitly added if desired.
215 "--with-mount-prog=/run/privileged/bin/mount" 215 "--with-mount-prog=/run/privileged/bin/mount"
216 "--with-umount-prog=/run/privileged/bin/umount" 216 "--with-umount-prog=/run/privileged/bin/umount"
217 "--with-losetup-prog=/run/privileged/bin/losetup" 217 "--with-losetup-prog=/run/privileged/bin/losetup"
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 1f245928344..3387d870b15 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -3327,7 +3327,7 @@ from the Cyrus IMAP project.")
3327 ;; avoids warning smtpd: couldn't enqueue offline message 3327 ;; avoids warning smtpd: couldn't enqueue offline message
3328 ;; smtpctl exited abnormally 3328 ;; smtpctl exited abnormally
3329 (substitute* "usr.sbin/smtpd/smtpd.h" 3329 (substitute* "usr.sbin/smtpd/smtpd.h"
3330 (("/usr/bin/smtpctl") "/run/setuid-programs/smtpctl")) 3330 (("/usr/bin/smtpctl") "/run/privileged/bin/smtpctl"))
3331 (substitute* "usr.sbin/smtpd/smtpctl.c" 3331 (substitute* "usr.sbin/smtpd/smtpctl.c"
3332 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't. 3332 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
3333 (("/bin/cat" file) (search-input-file inputs file))) 3333 (("/bin/cat" file) (search-input-file inputs file)))
diff --git a/gnu/packages/patches/enlightenment-fix-setuid-path.patch b/gnu/packages/patches/enlightenment-fix-setuid-path.patch
index e4f98de7c81..7233b91da81 100644
--- a/gnu/packages/patches/enlightenment-fix-setuid-path.patch
+++ b/gnu/packages/patches/enlightenment-fix-setuid-path.patch
@@ -10,7 +10,7 @@ index 6d07a0ac3..31e0e728f 100644
10 snprintf(buf, sizeof(buf), 10 snprintf(buf, sizeof(buf),
11- "%s/enlightenment/utils/enlightenment_ckpasswd pw", 11- "%s/enlightenment/utils/enlightenment_ckpasswd pw",
12- e_prefix_lib_get()); 12- e_prefix_lib_get());
13+ "/run/setuid-programs/enlightenment_ckpasswd pw"); 13+ "/run/privileged/bin/enlightenment_ckpasswd pw");
14 exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); 14 exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
15 if (!exe) goto out; 15 if (!exe) goto out;
16 snprintf(buf, sizeof(buf), "pw %s", passwd); 16 snprintf(buf, sizeof(buf), "pw %s", passwd);
@@ -20,7 +20,7 @@ index 6d07a0ac3..31e0e728f 100644
20 snprintf(buf, sizeof(buf), 20 snprintf(buf, sizeof(buf),
21- "%s/enlightenment/utils/enlightenment_ckpasswd pk", 21- "%s/enlightenment/utils/enlightenment_ckpasswd pk",
22- e_prefix_lib_get()); 22- e_prefix_lib_get());
23+ "/run/setuid-programs/enlightenment_ckpasswd pk"); 23+ "/run/privileged/bin/enlightenment_ckpasswd pk");
24 exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); 24 exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL);
25 if (!exe) goto out; 25 if (!exe) goto out;
26 snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd); 26 snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd);
@@ -33,7 +33,7 @@ index 9b10b3117..74e6b72ad 100644
33 char buf[PATH_MAX]; 33 char buf[PATH_MAX];
34 34
35- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); 35- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
36+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_sys"); 36+ snprintf(buf, sizeof(buf), "/run/privileged/bin/enlightenment_sys");
37 eeze_disk_mount_wrapper_set(v->disk, buf); 37 eeze_disk_mount_wrapper_set(v->disk, buf);
38 } 38 }
39 v->guard = ecore_timer_loop_add(E_FM_EJECT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_eject_timeout, v); 39 v->guard = ecore_timer_loop_add(E_FM_EJECT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_eject_timeout, v);
@@ -42,7 +42,7 @@ index 9b10b3117..74e6b72ad 100644
42 char buf[PATH_MAX]; 42 char buf[PATH_MAX];
43 43
44- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); 44- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
45+ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_sys"); 45+ snprintf(buf, sizeof(buf), "/run/privileged/bin/enlightenment_sys");
46 eeze_disk_mount_wrapper_set(v->disk, buf); 46 eeze_disk_mount_wrapper_set(v->disk, buf);
47 } 47 }
48 v->guard = ecore_timer_loop_add(E_FM_UNMOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_unmount_timeout, v); 48 v->guard = ecore_timer_loop_add(E_FM_UNMOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_unmount_timeout, v);
@@ -51,7 +51,7 @@ index 9b10b3117..74e6b72ad 100644
51 char buf2[PATH_MAX]; 51 char buf2[PATH_MAX];
52 52
53- snprintf(buf2, sizeof(buf2), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx)); 53- snprintf(buf2, sizeof(buf2), "%s/enlightenment/utils/enlightenment_sys", eina_prefix_lib_get(pfx));
54+ snprintf(buf2, sizeof(buf2), "/run/setuid-programs/enlightenment_sys"); 54+ snprintf(buf2, sizeof(buf2), "/run/privileged/bin/enlightenment_sys");
55 eeze_disk_mount_wrapper_set(v->disk, buf2); 55 eeze_disk_mount_wrapper_set(v->disk, buf2);
56 } 56 }
57 v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); 57 v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v);
@@ -65,7 +65,7 @@ index 722063339..2da2d5a23 100644
65 myasprintf(&buf3, 65 myasprintf(&buf3,
66- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", 66- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system",
67- eina_prefix_lib_get(pfx)); 67- eina_prefix_lib_get(pfx));
68+ "E_ALERT_SYSTEM_BIN=/run/setuid-programs/enlightenment_system"); 68+ "E_ALERT_SYSTEM_BIN=/run/privileged/bin/enlightenment_system");
69 putenv(buf3); 69 putenv(buf3);
70 70
71 home = getenv("HOME"); 71 home = getenv("HOME");
@@ -78,7 +78,7 @@ index bfd43e7e2..45d78b7ed 100644
78 if (_respawn_count > 5) return; 78 if (_respawn_count > 5) return;
79 snprintf(buf, sizeof(buf), 79 snprintf(buf, sizeof(buf),
80- "%s/enlightenment/utils/enlightenment_system", e_prefix_lib_get()); 80- "%s/enlightenment/utils/enlightenment_system", e_prefix_lib_get());
81+ "/run/setuid-programs/enlightenment_system"); 81+ "/run/privileged/bin/enlightenment_system");
82 _system_exe = ecore_exe_pipe_run 82 _system_exe = ecore_exe_pipe_run
83 (buf, ECORE_EXE_NOT_LEADER | ECORE_EXE_TERM_WITH_PARENT | 83 (buf, ECORE_EXE_NOT_LEADER | ECORE_EXE_TERM_WITH_PARENT |
84 ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, NULL); 84 ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, NULL);
diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm
index 860b77cf5d6..5c7b9c1674e 100644
--- a/gnu/packages/spice.scm
+++ b/gnu/packages/spice.scm
@@ -172,7 +172,7 @@ which allows users to view a desktop computing environment.")
172 ;; variable. 172 ;; variable.
173 (substitute* "src/usb-acl-helper.c" 173 (substitute* "src/usb-acl-helper.c"
174 (("ACL_HELPER_PATH\"/spice-client-glib-usb-acl-helper\"") 174 (("ACL_HELPER_PATH\"/spice-client-glib-usb-acl-helper\"")
175 "\"/run/setuid-programs/spice-client-glib-usb-acl-helper\"")))) 175 "\"/run/privileged/bin/spice-client-glib-usb-acl-helper\""))))
176 (add-before 'configure 'correct-polkit-dir 176 (add-before 'configure 'correct-polkit-dir
177 (lambda _ 177 (lambda _
178 (substitute* "meson.build" 178 (substitute* "meson.build"
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 455f9170b28..180a08d13bd 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -17,7 +17,7 @@
17;;; Copyright © 2016 Petter <petter@mykolab.ch> 17;;; Copyright © 2016 Petter <petter@mykolab.ch>
18;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com> 18;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
19;;; Copyright © 2017 Nikita <nikita@n0.is> 19;;; Copyright © 2017 Nikita <nikita@n0.is>
20;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> 20;;; Copyright © 2017–2021, 2024 Tobias Geerinckx-Rice <me@tobias.gr>
21;;; Copyright © 2017 Marek Benc <dusxmt@gmx.com> 21;;; Copyright © 2017 Marek Benc <dusxmt@gmx.com>
22;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org> 22;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org>
23;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net> 23;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
@@ -2730,15 +2730,17 @@ temperature of the screen.")
2730 (description "@code{xsecurelock} is an X11 screen locker which uses 2730 (description "@code{xsecurelock} is an X11 screen locker which uses
2731a modular design to avoid the usual pitfalls of screen locking utility design. 2731a modular design to avoid the usual pitfalls of screen locking utility design.
2732 2732
2733As a consequence of the modular design, the usual screen locker service 2733As a consequence of this design, you shouldn't use the usual screen locker
2734shouldn't be used with @code{xsecurelock}. Instead, you need to add a helper 2734service with @code{xsecurelock}. Instead, add a helper binary to your
2735binary to setuid-binaries: 2735@code{operating-system}'s @code{privileged-programs} field:
2736
2736@example 2737@example
2737(setuid-programs 2738(privileged-programs
2738 (cons* 2739 (cons*
2739 (setuid-program 2740 (privileged-program
2740 (program (file-append xsecurelock \"/libexec/xsecurelock/authproto_pam\"))) 2741 (program (file-append xsecurelock \"/libexec/xsecurelock/authproto_pam\"))
2741 %setuid-programs)) 2742 (setuid? #t))
2743 %default-privileged-programs))
2742@end example") 2744@end example")
2743 (license license:asl2.0))) 2745 (license license:asl2.0)))
2744 2746