guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: services: Explicitly refer to Shadow when requiring the 'nologin'


From: Ludovic Courtès
Subject: 03/03: services: Explicitly refer to Shadow when requiring the 'nologin' shell.
Date: Fri, 17 Apr 2015 11:53:25 +0000

civodul pushed a commit to branch master
in repository guix.

commit 5e25ebe2fa70297d094fe891b81c4970e45a906a
Author: Ludovic Courtès <address@hidden>
Date:   Fri Apr 17 13:53:05 2015 +0200

    services: Explicitly refer to Shadow when requiring the 'nologin' shell.
    
    * gnu/services/avahi.scm (avahi-service): Change 'shell' to a gexp
      referring to "nologin" in the SHADOW package.
    * gnu/services/dbus.scm (dbus-service): Likewise.
    * gnu/services/networking.scm (ntp-service, tor-service): Likewise.
---
 gnu/services/avahi.scm      |    3 ++-
 gnu/services/dbus.scm       |    3 ++-
 gnu/services/networking.scm |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 89478cb..0a56f3d 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -20,6 +20,7 @@
   #:use-module (gnu services)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages avahi)
+  #:use-module (gnu packages admin)
   #:use-module (guix monads)
   #:use-module (guix store)
   #:use-module (guix gexp)
@@ -106,6 +107,6 @@ sockets."
                             (comment "Avahi daemon user")
                             (home-directory "/var/empty")
                             (shell
-                             "/run/current-system/profile/sbin/nologin"))))))))
+                             #~(string-append #$shadow "/sbin/nologin")))))))))
 
 ;;; avahi.scm ends here
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 671dafa..8f3b350 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -20,6 +20,7 @@
   #:use-module (gnu services)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages admin)
   #:use-module (guix monads)
   #:use-module (guix store)
   #:use-module (guix gexp)
@@ -99,7 +100,7 @@ and policy files.  For example, to allow avahi-daemon to use 
the system bus,
                             (comment "D-Bus system bus user")
                             (home-directory "/var/run/dbus")
                             (shell
-                             "/run/current-system/profile/sbin/nologin"))))
+                             #~(string-append #$shadow "/sbin/nologin")))))
       (activate #~(begin
                     (use-modules (guix build utils))
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index af8dd43..f9d262d 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -227,7 +227,7 @@ restrict -6 ::1\n"))
                             (comment "NTP daemon user")
                             (home-directory "/var/empty")
                             (shell
-                             "/run/current-system/profile/sbin/nologin"))))))))
+                             #~(string-append #$shadow "/sbin/nologin")))))))))
 
 (define* (tor-service #:key (tor tor))
   "Return a service to run the @uref{https://torproject.org,Tor} daemon.
@@ -257,7 +257,7 @@ policy) as the @code{tor} unprivileged user."
                             (comment "Tor daemon user")
                             (home-directory "/var/empty")
                             (shell
-                             "/run/current-system/profile/sbin/nologin"))))
+                             #~(string-append #$shadow "/sbin/nologin")))))
 
       (documentation "Run the Tor anonymous network overlay.")))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]