summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-06-07 23:52:00 -0400
committerGuix Patches Tester <>2020-06-08 18:48:13 +0100
commit5bc2a968f8aa4f32a456efee23c9cfa962108d59 (patch)
treedbff8136e3e2bd1a7a040986cf56da76c3917d88
parent1fd2c00efbe701a81d86c254d5f4f285e63c1cde (diff)
downloadguix-patches-5bc2a968f8aa4f32a456efee23c9cfa962108d59.tar
guix-patches-5bc2a968f8aa4f32a456efee23c9cfa962108d59.tar.gz
services: opensmtpd: Fix the setgid problem for the smtpctl utility.series-4257
The utility was complaining that it wasn't setgid to the group ID of the "smtpq" group. * gnu/services/mail.scm (opensmtpd-service-type): Extend the setuid-program-service-type with the smtpctl program.
-rw-r--r--gnu/services/mail.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index cfcaf4601b..91c6cc9d31 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1662,6 +1662,11 @@ match from local for any action outbound
(home-directory "/var/empty")
(shell (file-append shadow "/sbin/nologin")))))
+(define (opensmtpd-setuid-programs opensmtpd-configuration)
+ (let ((smtpctl (file-append (opensmtpd-configuration-package
+ opensmtpd-configuration) "/sbin/smtpctl")))
+ (list (list smtpctl "smtpq"))))
+
(define opensmtpd-activation
(match-lambda
(($ <opensmtpd-configuration> package config-file)
@@ -1684,6 +1689,8 @@ match from local for any action outbound
(extensions
(list (service-extension account-service-type
(const %opensmtpd-accounts))
+ (service-extension setuid-program-service-type
+ opensmtpd-setuid-programs)
(service-extension activation-service-type
opensmtpd-activation)
(service-extension pam-root-service-type