mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
services: Refactor opensmtpd-set-gids.
* gnu/services/mail.scm (opensmtpd-set-gids): Rewrite using MAP technology. Change-Id: I30b7eddaf64d242196b1c56f98dec42a86436c18
This commit is contained in:
parent
79833cdbc6
commit
ed3649bcce
1 changed files with 14 additions and 31 deletions
|
@ -1743,37 +1743,20 @@ (define %opensmtpd-pam-services
|
|||
(define (opensmtpd-set-gids config)
|
||||
(match-record config <opensmtpd-configuration> (package config-file setgid-commands?)
|
||||
(if setgid-commands?
|
||||
(list
|
||||
(privileged-program
|
||||
(program (file-append package "/sbin/smtpctl"))
|
||||
(setuid? #false)
|
||||
(setgid? #true)
|
||||
(group "smtpq"))
|
||||
(privileged-program
|
||||
(program (file-append package "/sbin/sendmail"))
|
||||
(setuid? #false)
|
||||
(setgid? #true)
|
||||
(group "smtpq"))
|
||||
(privileged-program
|
||||
(program (file-append package "/sbin/send-mail"))
|
||||
(setuid? #false)
|
||||
(setgid? #true)
|
||||
(group "smtpq"))
|
||||
(privileged-program
|
||||
(program (file-append package "/sbin/makemap"))
|
||||
(setuid? #false)
|
||||
(setgid? #true)
|
||||
(group "smtpq"))
|
||||
(privileged-program
|
||||
(program (file-append package "/sbin/mailq"))
|
||||
(setuid? #false)
|
||||
(setgid? #true)
|
||||
(group "smtpq"))
|
||||
(privileged-program
|
||||
(program (file-append package "/sbin/newaliases"))
|
||||
(setuid? #false)
|
||||
(setgid? #true)
|
||||
(group "smtpq")))
|
||||
(map (lambda (command)
|
||||
(privileged-program
|
||||
(program (file-append package "/" command))
|
||||
(setgid? #t)
|
||||
(group "smtpq")))
|
||||
(list "sbin/smtpctl"
|
||||
|
||||
;; Also privilege the compatibility symlinks created by
|
||||
;; the Guix opensmtpd package; all synonyms for smtpctl.
|
||||
"sbin/mailq"
|
||||
"sbin/makemap"
|
||||
"sbin/newaliases"
|
||||
"sbin/sendmail"
|
||||
"sbin/send-mail"))
|
||||
'())))
|
||||
|
||||
(define opensmtpd-service-type
|
||||
|
|
Loading…
Reference in a new issue