all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: 宋文武 <iyzsong@gmail.com>
To: guix-devel@gnu.org
Cc: 宋文武 <iyzsong@gmail.com>
Subject: [PATCH 3/3] system: pam: Honor /etc/environment.
Date: Wed,  2 Dec 2015 21:38:31 +0800	[thread overview]
Message-ID: <1449063511-689-3-git-send-email-iyzsong@gmail.com> (raw)
In-Reply-To: <1449063511-689-1-git-send-email-iyzsong@gmail.com>

* gnu/system/pam.scm (unix-pam-service): Add pam_env module to the session group.
---
 gnu/system/pam.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm
index d8470f0..9823916 100644
--- a/gnu/system/pam.scm
+++ b/gnu/system/pam.scm
@@ -128,7 +128,10 @@ dumped in /etc/pam.d/NAME, where NAME is the name of SERVICE."
 (define unix-pam-service
   (let ((unix (pam-entry
                (control "required")
-               (module "pam_unix.so"))))
+               (module "pam_unix.so")))
+        (env  (pam-entry
+               (control "required")
+               (module "pam_env.so"))))
     (lambda* (name #:key allow-empty-passwords? motd)
       "Return a standard Unix-style PAM service for NAME.  When
 ALLOW-EMPTY-PASSWORDS? is true, allow empty passwords.  When MOTD is true, it
@@ -150,13 +153,13 @@ should be a file-like object used as the message-of-the-day."
                           ;; Store SHA-512 encrypted passwords in /etc/shadow.
                           (arguments '("sha512" "shadow")))))
          (session (if motd
-                      (list unix
+                      (list env unix
                             (pam-entry
                              (control "optional")
                              (module "pam_motd.so")
                              (arguments
                               (list #~(string-append "motd=" #$motd)))))
-                      (list unix))))))))
+                      (list env unix))))))))
 
 (define (rootok-pam-service command)
   "Return a PAM service for COMMAND such that 'root' does not need to
-- 
2.5.0

  parent reply	other threads:[~2015-12-02 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 13:38 [PATCH 1/3] services: Add 'session-environment-service' 宋文武
2015-12-02 13:38 ` [PATCH 2/3] system: Add /etc/environment 宋文武
2015-12-04 14:33   ` Ludovic Courtès
2015-12-05  2:55     ` 宋文武
2015-12-02 13:38 ` 宋文武 [this message]
2015-12-04 14:38   ` [PATCH 3/3] system: pam: Honor /etc/environment Ludovic Courtès
2015-12-02 18:45 ` [PATCH 1/3] services: Add 'session-environment-service' Alex Kost
2015-12-03 11:59   ` 宋文武
2015-12-04 14:29     ` 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

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

  git send-email \
    --in-reply-to=1449063511-689-3-git-send-email-iyzsong@gmail.com \
    --to=iyzsong@gmail.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.