diff mbox series

[bug#47364,2/2] services: slim: Add pam-gnupg support.

Message ID 87ft0ks58u.fsf@gmail.com
State Accepted
Headers show
Series None | expand

Commit Message

Oleg Pykhalov March 24, 2021, 7:48 p.m. UTC
Hi,

Thank you for the review!

Maxime Devos <maximedevos@telenet.be> writes:

> I'm not familiar with PAM, so I can't do much reviewing about that
> (seems ok, though I'm no expert).

I'm :-) too, but it works for me.

[…]

I applied all your suggestions.
Plus in Git commit message “Don't pass "#f" to "allow-root?" argument,
because "lambda*" already does this by default.”.

Comments

M March 24, 2021, 8:14 p.m. UTC | #1
On Wed, 2021-03-24 at 22:48 +0300, Oleg Pykhalov wrote:
> +/proc/self/loginuid, which the libc 'getlogin' function relies on.  When
> +GNUPG? is true, require the 'pam_gnupg.so' module; that module hands over
> +login password to 'gpg-agent'."

Linguistic nitpick:
There seems to be an article missing before "login password".
Maybe add "the".

Also, ideally speaking, there would be a system test in "gnu/tests/" for
this new functionality.

Otherwise no comments, seems good to me to go into the repo
though maybe someone else wants to comment as well. 

Greetings,
Maxime
diff mbox series

Patch

diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm
index 75edd01908..128b2bb0fe 100644
--- a/gnu/system/pam.scm
+++ b/gnu/system/pam.scm
@@ -208,14 +208,16 @@  dumped in /etc/pam.d/NAME, where NAME is the name of SERVICE."
         (env  (pam-entry ; to honor /etc/environment.
                (control "required")
                (module "pam_env.so"))))
-    (lambda* (name #:key allow-empty-passwords? (allow-root? #f) motd
-                   login-uid? (gnupg? #f))
+    (lambda* (name #:key allow-empty-passwords? allow-root? motd
+              login-uid? gnupg?)
       "Return a standard Unix-style PAM service for NAME.  When
 ALLOW-EMPTY-PASSWORDS? is true, allow empty passwords.  When ALLOW-ROOT? is
 true, allow root to run the command without authentication.  When MOTD is
 true, it should be a file-like object used as the message-of-the-day.
 When LOGIN-UID? is true, require the 'pam_loginuid' module; that module sets
-/proc/self/loginuid, which the libc 'getlogin' function relies on."
+/proc/self/loginuid, which the libc 'getlogin' function relies on.  When
+GNUPG? is true, require the 'pam_gnupg.so' module; that module hands over
+login password to 'gpg-agent'."
       ;; See <http://www.linux-pam.org/Linux-PAM-html/sag-configuration-example.html>.
       (pam-service
        (name name)