diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2024-09-08 02:00:00 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2024-09-08 02:00:00 +0200 |
commit | c6fe8424e4dd481d40b4f945d9a6a4a1b68544ff (patch) | |
tree | 36e37804c6acc30f90c44e9505cd0e863b728629 /gnu | |
parent | 0dd8e4c35109ed8bc2406a0bc13e18823a334937 (diff) | |
download | guix-c6fe8424e4dd481d40b4f945d9a6a4a1b68544ff.tar guix-c6fe8424e4dd481d40b4f945d9a6a4a1b68544ff.tar.gz |
services: dbus: Migrate to (gnu system privilege).
* gnu/services/dbus.scm (dbus-setuid-programs): Rename this…
(dbus-privileged-programs): …to this. Return a <privileged-program> list.
(dbus-root-service-types): Extend PRIVILEGED-PROGRAM-SERVICE-TYPE with it.
Change-Id: I1f1871bb1e9fd1b37aa0c7890356469c3143e8a6
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/dbus.scm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 2004c48452..f9529f2934 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> +;;; Copyright © 2024 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,7 @@ (define-module (gnu services dbus) #:use-module (gnu services) #:use-module (gnu services shepherd) + #:use-module (gnu system privilege) #:use-module (gnu system setuid) #:use-module (gnu system shadow) #:use-module (gnu system pam) @@ -166,13 +168,14 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in (home-directory "/run/dbus") (shell (file-append shadow "/sbin/nologin"))))) -(define dbus-setuid-programs - ;; Return a list of <setuid-program> for the program that we need. +(define dbus-privileged-programs + ;; Return a list of <privileged-program> for the program that we need. (match-lambda (($ <dbus-configuration> dbus services) - (list (setuid-program + (list (privileged-program (program (file-append - dbus "/libexec/dbus-daemon-launch-helper"))))))) + dbus "/libexec/dbus-daemon-launch-helper")) + (setuid? #t)))))) (define (dbus-activation config) "Return an activation gexp for D-Bus using @var{config}." @@ -255,8 +258,8 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in dbus-etc-files) (service-extension account-service-type (const %dbus-accounts)) - (service-extension setuid-program-service-type - dbus-setuid-programs))) + (service-extension privileged-program-service-type + dbus-privileged-programs))) ;; Extensions consist of lists of packages (representing D-Bus ;; services) that we just concatenate. |