unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Oleg Pykhalov <go.wigust@gmail.com>, 47364@debbugs.gnu.org
Subject: [bug#47364] [PATCH 2/2] services: slim: Add pam-gnupg support.
Date: Wed, 24 Mar 2021 20:22:43 +0100	[thread overview]
Message-ID: <6ca83b55b46c4677a45fd0e026ac14880093ea7f.camel@telenet.be> (raw)
In-Reply-To: <20210324165233.28428-2-go.wigust@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Hi,

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

On Wed, 2021-03-24 at 19:52 +0300, Oleg Pykhalov wrote:
> [...]
> 
> diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm
> index ad02586be8..75edd01908 100644
> --- a/gnu/system/pam.scm
> +++ b/gnu/system/pam.scm
> [...]
>     (lambda* (name #:key allow-empty-passwords? (allow-root? #f) motd
> -                   login-uid?)
> +                   login-uid? (gnupg? #f))

Nitpick: keyword variables have #f as default by default, so you could just write ...

     (lambda* (name #:key allow-empty-passwords? (allow-root? #f) motd
> -                   login-uid?)
> +                   login-uid? gnupg?)

... here.  As a minimal example, you could run the following code in a Guile REPL:

> ;; These both evaluate to (#f #f)!
> ((lambda* (#:key login-uid? gnupg?) (list login-uid? gnupg?)))
> ((lambda* (#:key login-uid? (gnupg? #f)) (list login-uid? gnupg?)))

Hmm, maybe (allow-root? #f) could be replaced with simply allow-root? here ...

>        "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

It would be nice if this docstring documents GNUPG? as well.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-03-24 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 16:49 [bug#47364] [PATCH 0/2] Add pam-gnupg and PAM rules for SLiM Oleg Pykhalov
2021-03-24 16:52 ` [bug#47364] [PATCH 1/2] gnu: Add pam-gnupg Oleg Pykhalov
2021-03-24 16:52   ` [bug#47364] [PATCH 2/2] services: slim: Add pam-gnupg support Oleg Pykhalov
2021-03-24 19:22     ` Maxime Devos [this message]
2021-03-24 19:48       ` Oleg Pykhalov
2021-03-24 20:14         ` Maxime Devos
2021-08-16 22:13 ` bug#47364: [PATCH 0/2] Add pam-gnupg and PAM rules for SLiM Oleg Pykhalov

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=6ca83b55b46c4677a45fd0e026ac14880093ea7f.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=47364@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    /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).