summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm21
1 files changed, 17 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 4ac619d4eca..44f93f91d17 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -77,6 +77,7 @@
77 #:use-module (gnu system locale) 77 #:use-module (gnu system locale)
78 #:use-module (gnu system pam) 78 #:use-module (gnu system pam)
79 #:use-module (gnu system linux-initrd) 79 #:use-module (gnu system linux-initrd)
80 #:use-module (gnu system privilege)
80 #:use-module (gnu system setuid) 81 #:use-module (gnu system setuid)
81 #:use-module (gnu system uuid) 82 #:use-module (gnu system uuid)
82 #:use-module (gnu system file-systems) 83 #:use-module (gnu system file-systems)
@@ -130,6 +131,7 @@
130 operating-system-keyboard-layout 131 operating-system-keyboard-layout
131 operating-system-name-service-switch 132 operating-system-name-service-switch
132 operating-system-pam-services 133 operating-system-pam-services
134 operating-system-privileged-programs
133 operating-system-setuid-programs 135 operating-system-setuid-programs
134 operating-system-skeletons 136 operating-system-skeletons
135 operating-system-sudoers-file 137 operating-system-sudoers-file
@@ -174,6 +176,7 @@
174 176
175 local-host-aliases ;deprecated 177 local-host-aliases ;deprecated
176 %root-account 178 %root-account
179 %default-privileged-programs
177 %setuid-programs 180 %setuid-programs
178 %sudoers-specification 181 %sudoers-specification
179 %base-packages 182 %base-packages
@@ -301,7 +304,10 @@ VERSION is the target version of the boot-parameters record."
301 304
302 (pam-services operating-system-pam-services ; list of PAM services 305 (pam-services operating-system-pam-services ; list of PAM services
303 (default (base-pam-services))) 306 (default (base-pam-services)))
307 (privileged-programs operating-system-privileged-programs ; list of <privileged-program>
308 (default %default-privileged-programs))
304 (setuid-programs operating-system-setuid-programs 309 (setuid-programs operating-system-setuid-programs
310 ;; For backwards compatibility; will be removed.
305 (default %setuid-programs)) ; list of <setuid-program> 311 (default %setuid-programs)) ; list of <setuid-program>
306 312
307 (sudoers-file operating-system-sudoers-file ; file-like 313 (sudoers-file operating-system-sudoers-file ; file-like
@@ -821,7 +827,8 @@ bookkeeping."
821 (service host-name-service-type host-name) 827 (service host-name-service-type host-name)
822 procs root-fs 828 procs root-fs
823 (service privileged-program-service-type 829 (service privileged-program-service-type
824 (operating-system-setuid-programs os)) 830 (append (operating-system-privileged-programs os)
831 (operating-system-setuid-programs os)))
825 (service profile-service-type 832 (service profile-service-type
826 (operating-system-packages os)) 833 (operating-system-packages os))
827 boot-fs non-boot-fs 834 boot-fs non-boot-fs
@@ -860,7 +867,8 @@ bookkeeping."
860 (service hosts-service-type 867 (service hosts-service-type
861 (local-host-entries host-name))) 868 (local-host-entries host-name)))
862 (service privileged-program-service-type 869 (service privileged-program-service-type
863 (operating-system-setuid-programs os)) 870 (append (operating-system-privileged-programs os)
871 (operating-system-setuid-programs os)))
864 (service profile-service-type (operating-system-packages os))))) 872 (service profile-service-type (operating-system-packages os)))))
865 873
866(define* (operating-system-services os) 874(define* (operating-system-services os)
@@ -1239,8 +1247,7 @@ use 'plain-file' instead~%")
1239 ;; when /etc/machine-id is missing. Make sure these warnings are non-fatal. 1247 ;; when /etc/machine-id is missing. Make sure these warnings are non-fatal.
1240 ("DBUS_FATAL_WARNINGS" . "0"))) 1248 ("DBUS_FATAL_WARNINGS" . "0")))
1241 1249
1242(define %setuid-programs 1250(define %default-privileged-programs
1243 ;; Default set of setuid-root programs.
1244 (let ((shadow (@ (gnu packages admin) shadow))) 1251 (let ((shadow (@ (gnu packages admin) shadow)))
1245 (map file-like->setuid-program 1252 (map file-like->setuid-program
1246 (list (file-append shadow "/bin/passwd") 1253 (list (file-append shadow "/bin/passwd")
@@ -1262,6 +1269,12 @@ use 'plain-file' instead~%")
1262 (file-append util-linux "/bin/mount") 1269 (file-append util-linux "/bin/mount")
1263 (file-append util-linux "/bin/umount"))))) 1270 (file-append util-linux "/bin/umount")))))
1264 1271
1272(define %setuid-programs
1273 ;; Do not add to this list or use it in new code! It's defined only to ease
1274 ;; transition to %default-privileged-programs and will be removed. Some rare
1275 ;; use cases already break, such as the obvious (remove … %setuid-programs).
1276 '())
1277
1265(define %sudoers-specification 1278(define %sudoers-specification
1266 ;; Default /etc/sudoers contents: 'root' and all members of the 'wheel' 1279 ;; Default /etc/sudoers contents: 'root' and all members of the 'wheel'
1267 ;; group can do anything. See 1280 ;; group can do anything. See