diff options
author | EuAndreh <eu@euandre.org> | 2022-11-30 17:48:13 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-30 17:48:13 -0300 |
commit | 30a6f02b4fb7cca2255b3a0fadf522258e5dbcff (patch) | |
tree | ee7f2cf84cd8c92f56d8bc39ea8840b4a8587d5d | |
parent | queue.scm: Do not run saslauthd under root (diff) | |
download | package-repository-30a6f02b4fb7cca2255b3a0fadf522258e5dbcff.tar.gz package-repository-30a6f02b4fb7cca2255b3a0fadf522258e5dbcff.tar.xz |
queue.scm: change permision of Cyrus SASL state-dir
-rw-r--r-- | src/xyz/euandreh/queue.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xyz/euandreh/queue.scm b/src/xyz/euandreh/queue.scm index cca1354..88a405c 100644 --- a/src/xyz/euandreh/queue.scm +++ b/src/xyz/euandreh/queue.scm @@ -404,12 +404,15 @@ collections.OrderedDict that works in Python 2.4-2.6.") (define (cyrus-sasl-activation config) (match-record config <cyrus-sasl-configuration> - (state-dir) + (user state-dir) #~(begin (use-modules (guix build utils)) - (format (current-error-port) - "Creating Cyrus SASL socket directory: \"~a\".~%" #$state-dir) - (mkdir-p #$state-dir)))) + (let ((user (getpwnam #$user))) + (format (current-error-port) + "Creating Cyrus SASL socket directory: \"~a\".~%" #$state-dir) + (mkdir-p #$state-dir) + (chown #$state-dir (passwd:uid user) (passwd:gid user)) + (chmod #$state-dir #o755))))) (define (cyrus-sasl-accounts config) (match-record config <cyrus-sasl-configuration> |