unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: guix-devel@gnu.org
Subject: [PATCH 3/4] gnu: shadow: User shells point to current profile
Date: Tue, 7 Apr 2015 19:37:04 +0200	[thread overview]
Message-ID: <1429087551.701436.30155@badger> (raw)

* gnu/system/shadow.scm (<user-account>): "shell" field is a string,
  and should point to the current profile.  This allows pkexec's
  dubious check that $SHELL is a valid shell to succeed.
* gnu/services/base.scm (guix-build-accounts):
* gnu/services/networking.scm (bitlbee-service):
* gnu/system.scm (user-account->gexp): Update users.
---
 gnu/services/base.scm       | 2 +-
 gnu/services/networking.scm | 3 +--
 gnu/system.scm              | 2 +-
 gnu/system/shadow.scm       | 4 ++--
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 956fa7e..f936b17 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -587,7 +587,7 @@ starting at FIRST-UID, and under GID."
 
              (comment (format #f "Guix Build User ~2d" n))
              (home-directory "/var/empty")
-             (shell #~(string-append #$shadow "/sbin/nologin"))))
+             (shell "/run/current-system/profile/sbin/nologin")))
           1+
           1))
 
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index af8dd43..b63ce14 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -305,8 +305,7 @@ configuration file."
                             (system? #t)
                             (comment "BitlBee daemon user")
                             (home-directory "/var/empty")
-                            (shell #~(string-append #$shadow
-                                                    "/sbin/nologin")))))))))
+                            (shell "/run/current-system/profile/sbin/nologin"))))))))
 
 (define* (wicd-service #:key (wicd wicd))
   "Return a service that runs @url{https://launchpad.net/wicd,Wicd}, a network
diff --git a/gnu/system.scm b/gnu/system.scm
index 6cf12df..71c5ce8 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -588,7 +588,7 @@ fi\n"))
       #$(user-account-supplementary-groups account)
       #$(user-account-comment account)
       #$(user-account-home-directory account)
-      ,#$(user-account-shell account)             ; this one is a gexp
+      #$(user-account-shell account)
       #$(user-account-password account)
       #$(user-account-system? account)))
 
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 16b9e4b..3bf1214 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -67,8 +67,8 @@
                         (default '()))            ; list of strings
   (comment        user-account-comment (default ""))
   (home-directory user-account-home-directory)
-  (shell          user-account-shell              ; gexp
-                  (default #~(string-append #$bash "/bin/bash")))
+  (shell          user-account-shell              ; string
+                  (default "/run/current-system/profile/bin/bash"))
   (system?        user-account-system?            ; Boolean
                   (default #f)))
 
-- 
2.2.1

             reply	other threads:[~2015-04-15  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 17:37 Andy Wingo [this message]
2015-04-17  8:50 ` [PATCH 3/4] gnu: shadow: User shells point to current profile Ludovic Courtès
2015-04-17 10:49   ` 宋文武
2015-04-17 11:54     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429087551.701436.30155@badger \
    --to=wingo@pobox.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).