[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54997] [PATCH v2 14/15] services: quassel: Use 'least-authority-wra
From: |
Ludovic Courtès |
Subject: |
[bug#54997] [PATCH v2 14/15] services: quassel: Use 'least-authority-wrapper'. |
Date: |
Wed, 27 Apr 2022 18:56:34 +0200 |
* gnu/services/messaging.scm (quassel-shepherd-service): Use
'least-authority-wrapper' instead of
'make-forkexec-constructor/container'.
---
gnu/services/messaging.scm | 42 ++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 7fdd8cf285..05bf6e784b 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -939,29 +939,31 @@ (define-record-type* <quassel-configuration>
(define quassel-shepherd-service
(match-lambda
(($ <quassel-configuration> quassel interface port loglevel)
- (with-imported-modules (source-module-closure
- '((gnu build shepherd)
- (gnu system file-systems)))
+ (let ((quassel (least-authority-wrapper
+ (file-append quassel "/bin/quasselcore")
+ #:name "quasselcore"
+ #:mappings (list (file-system-mapping
+ (source "/var/lib/quassel")
+ (target source)
+ (writable? #t))
+ (file-system-mapping
+ (source "/var/log/quassel")
+ (target source)
+ (writable? #t)))
+ ;; XXX: The daemon needs to live in the main user
+ ;; namespace, as root, so it can access /var/lib/quassel
+ ;; owned by "quasselcore".
+ #:namespaces (fold delq %namespaces '(net user)))))
(list (shepherd-service
(provision '(quassel))
(requirement '(user-processes networking))
- (modules '((gnu build shepherd)
- (gnu system file-systems)))
- (start #~(make-forkexec-constructor/container
- (list #$(file-append quassel "/bin/quasselcore")
- "--configdir=/var/lib/quassel"
- "--logfile=/var/log/quassel/core.log"
- (string-append "--loglevel=" #$loglevel)
- (string-append "--port=" (number->string
#$port))
- (string-append "--listen=" #$interface))
- #:mappings (list (file-system-mapping
- (source "/var/lib/quassel")
- (target source)
- (writable? #t))
- (file-system-mapping
- (source "/var/log/quassel")
- (target source)
- (writable? #t)))))
+ (start #~(make-forkexec-constructor
+ (list #$quassel
+ "--configdir=/var/lib/quassel"
+ "--logfile=/var/log/quassel/core.log"
+ (string-append "--loglevel=" #$loglevel)
+ (string-append "--port=" (number->string
#$port))
+ (string-append "--listen=" #$interface))))
(stop #~(make-kill-destructor))))))))
(define %quassel-account
--
2.35.1
- [bug#54997] [PATCH v2 04/15] linux-container: Ensure signal-handling asyncs get a chance to run., (continued)
- [bug#54997] [PATCH v2 04/15] linux-container: Ensure signal-handling asyncs get a chance to run., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 02/15] file-systems: Avoid load-time warnings when attempting to load (guix store)., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 12/15] services: wesnothd: Grant write access to /var/run/wesnothd., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 08/15] services: dicod: Use 'make-inetd-constructor'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 06/15] Add (guix least-authority)., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 07/15] services: dicod: Rewrite using 'least-authority-wrapper'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 13/15] services: wesnothd: Use 'least-authority-wrapper'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 10/15] services: ipfs: Adjust for Shepherd 0.9., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 09/15] services: bitlbee: Use 'make-inetd-constructor'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 11/15] services: ipfs: Use 'least-authority-wrapper'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 14/15] services: quassel: Use 'least-authority-wrapper'.,
Ludovic Courtès <=
- [bug#54997] [PATCH v2 15/15] services: opendht: Use 'least-authority-wrapper'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH 05/12] services: dicod: Rewrite using 'least-authority-wrapper'., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 07/12] services: bitlbee: Use 'make-inetd-constructor'., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 10/12] services: wesnothd: Grant write access to /var/run/wesnothd., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 11/12] services: wesnothd: Use 'least-authority-wrapper'., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 12/12] services: quassel: Use 'least-authority-wrapper'., Ludovic Courtès, 2022/04/17