[Top][All Lists]

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

02/03: system: pam: Honor /etc/environment.

From: ???
Subject: 02/03: system: pam: Honor /etc/environment.
Date: Sat, 05 Dec 2015 02:52:17 +0000

iyzsong pushed a commit to branch master
in repository guix.

commit af9908ff56fc9263c5f343c23002ac11300e195e
Author: 宋文武 <address@hidden>
Date:   Wed Dec 2 21:28:35 2015 +0800

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

diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm
index d8470f0..99d94a1 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 
 (define unix-pam-service
   (let ((unix (pam-entry
                (control "required")
-               (module ""))))
+               (module "")))
+        (env  (pam-entry ; to honor /etc/environment.
+               (control "required")
+               (module ""))))
     (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 
                           ;; Store SHA-512 encrypted passwords in /etc/shadow.
                           (arguments '("sha512" "shadow")))))
          (session (if motd
-                      (list unix
+                      (list env unix
                              (control "optional")
                              (module "")
                               (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

reply via email to

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