summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorDariqq <dariqq@posteo.net>2024-10-18 13:21:22 +0000
committerLudovic Courtès <ludo@gnu.org>2024-10-24 14:50:09 +0200
commitcc67a0b71d4a7d98a3732c3edf2eb340c2799697 (patch)
treee21eb6eff0a4355df8c426fa13991f4d0855086c /gnu/system.scm
parent952682fca61d73ee52a086e552e3985c7f539fde (diff)
gnu: system: Privilege programs after creating accounts.
Ensure that users and groups are already created when the privileging script runs. The order these scripts appear in the folded activation-service depends on the order these services are instantiated in the operating-system. Fixes <https://issues.guix.gnu.org/73680>. * gnu/system.scm (operating-system-default-essential-services): Move privileged-program-service above account-service. (hurd-default-essential-services): Likewise. * gnu/tests/base.scm (%activation-os): New variable. (run-activation-test): New procedure. (%test-activation): New variable. Change-Id: I59a191c5519475f256e81bdf2dc4cb01b96c31fe Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm16
1 files changed, 10 insertions, 6 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 44f93f91d17..c19730b331e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -809,6 +809,11 @@ bookkeeping."
809 %shepherd-root-service 809 %shepherd-root-service
810 810
811 (pam-root-service (operating-system-pam-services os)) 811 (pam-root-service (operating-system-pam-services os))
812 ;; Make sure that privileged-programs activation script
813 ;; runs after accounts are created
814 (service privileged-program-service-type
815 (append (operating-system-privileged-programs os)
816 (operating-system-setuid-programs os)))
812 (account-service (append (operating-system-accounts os) 817 (account-service (append (operating-system-accounts os)
813 (operating-system-groups os)) 818 (operating-system-groups os))
814 (operating-system-skeletons os)) 819 (operating-system-skeletons os))
@@ -826,9 +831,6 @@ bookkeeping."
826 (operating-system-environment-variables os)) 831 (operating-system-environment-variables os))
827 (service host-name-service-type host-name) 832 (service host-name-service-type host-name)
828 procs root-fs 833 procs root-fs
829 (service privileged-program-service-type
830 (append (operating-system-privileged-programs os)
831 (operating-system-setuid-programs os)))
832 (service profile-service-type 834 (service profile-service-type
833 (operating-system-packages os)) 835 (operating-system-packages os))
834 boot-fs non-boot-fs 836 boot-fs non-boot-fs
@@ -850,6 +852,11 @@ bookkeeping."
850 (service shepherd-root-service-type) 852 (service shepherd-root-service-type)
851 853
852 (service user-processes-service-type) 854 (service user-processes-service-type)
855 ;; Make sure that privileged-programs activation script
856 ;; runs after accounts are created
857 (service privileged-program-service-type
858 (append (operating-system-privileged-programs os)
859 (operating-system-setuid-programs os)))
853 (account-service (append (operating-system-accounts os) 860 (account-service (append (operating-system-accounts os)
854 (operating-system-groups os)) 861 (operating-system-groups os))
855 (operating-system-skeletons os)) 862 (operating-system-skeletons os))
@@ -866,9 +873,6 @@ bookkeeping."
866 (list `("hosts" ,hosts-file))) 873 (list `("hosts" ,hosts-file)))
867 (service hosts-service-type 874 (service hosts-service-type
868 (local-host-entries host-name))) 875 (local-host-entries host-name)))
869 (service privileged-program-service-type
870 (append (operating-system-privileged-programs os)
871 (operating-system-setuid-programs os)))
872 (service profile-service-type (operating-system-packages os))))) 876 (service profile-service-type (operating-system-packages os)))))
873 877
874(define* (operating-system-services os) 878(define* (operating-system-services os)