From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gQqCLZ+RW2CHuAAAgWs5BA (envelope-from ) for ; Wed, 24 Mar 2021 20:23:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wOwHKJ+RW2CfRAAAB5/wlQ (envelope-from ) for ; Wed, 24 Mar 2021 19:23:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E669910A22 for ; Wed, 24 Mar 2021 20:23:10 +0100 (CET) Received: from localhost ([::1]:47352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP95x-0001iR-Pp for larch@yhetil.org; Wed, 24 Mar 2021 15:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP95q-0001i8-HO for guix-patches@gnu.org; Wed, 24 Mar 2021 15:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP95q-0006Jr-9P for guix-patches@gnu.org; Wed, 24 Mar 2021 15:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lP95q-0002Db-25 for guix-patches@gnu.org; Wed, 24 Mar 2021 15:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47364] [PATCH 2/2] services: slim: Add pam-gnupg support. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Mar 2021 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47364 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov , 47364@debbugs.gnu.org Received: via spool by 47364-submit@debbugs.gnu.org id=B47364.16166137798509 (code B ref 47364); Wed, 24 Mar 2021 19:23:02 +0000 Received: (at 47364) by debbugs.gnu.org; 24 Mar 2021 19:22:59 +0000 Received: from localhost ([127.0.0.1]:36115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP95n-0002DB-BX for submit@debbugs.gnu.org; Wed, 24 Mar 2021 15:22:59 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:45496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lP95k-0002Cz-Kz for 47364@debbugs.gnu.org; Wed, 24 Mar 2021 15:22:57 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id kKNt240040mfAB406KNtVM; Wed, 24 Mar 2021 20:22:53 +0100 Message-ID: <6ca83b55b46c4677a45fd0e026ac14880093ea7f.camel@telenet.be> From: Maxime Devos Date: Wed, 24 Mar 2021 20:22:43 +0100 In-Reply-To: <20210324165233.28428-2-go.wigust@gmail.com> References: <20210324165233.28428-1-go.wigust@gmail.com> <20210324165233.28428-2-go.wigust@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-k9vekRAj6Azlen402TBS" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1616613775; bh=2DAyv8nfNwPhqmW51yQctmZZus82avMpcxoA+8fMwMc=; h=Subject:From:To:Date:In-Reply-To:References; b=GRJzLwrfu4XrDUhuSE2x/BL/vBSfopQ52uNlMXMuv35Po1M9mkryKe8xqRGf/ucFc eMia7UcSFeRIf/2pBWOaz9HMkha61F75lSnIcenJmkk8CWPaRivGy/BrtGXwifxAfl cw5l6QBzqiMzDIt5EX4S3XP4NWI5sY6ds+vg14yd95rgwulTryYQUtYsWf3qz2IN8c 13H4pLbpQUeBOM6kJb9SfKLwnV2kRH2VhTjjrCfclDJqSsoT6YqC3yS+Q1f6FC7duG Xr57aTxAsTre3v1tUyp+cvef6hu/pmcWrfcL9Tq192NfNu57R00OxmXrNDPGkeQnJh 6awcRBhIsBSdg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616613791; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=2DAyv8nfNwPhqmW51yQctmZZus82avMpcxoA+8fMwMc=; b=nZWx5mG/Fwln+k/ne6NNuQ5qq/7Sf/YtVaZVtuhhojGHGmlPNfcrPlVxqV0+0rIu+bw1nJ 7ySLzfBhrWAvqDCpEVyoErwWBuKVrfXCw4hQyw0USuKzF42Y/eukKiEdCPhUI/Om2EUyt/ z0k6kB2r6pYHZrPOwxZECdYd2HL4DVMthsykXccYGOxNKNIop8GHJYj0KKZryMHgNV7rWo cPNlozeDTqDe2ZLwbDD9EPy6DI94Q/Nu466s+lpfv02WCuQlGoxWh/dvyNxnZxrFeCnXei N39FaqVK3OIlMywTMqRx4zk/7YVnEBGx8W/SonsQRbAQz+DZxuQU6iqAQZY6wQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616613791; a=rsa-sha256; cv=none; b=N5sl05ptpQeXxz9ChzD7swbHAQAk6o91cvisUeoz8XRkMk8Jadu+hrIgG3Jqca+j2lR51q R6/sX5FFow30MqVgjkQo+OiPknVs2VkC1I9xI4H+fXzCnWl+/ki/pLRWXOT8lfJnvPwUyC EzsfEXyI5/KKywnbbbDJ2PBGrZ0SFvf6a8A+aaQoJ3q5rjkM9YE91iVcLQW9kLOeRKMQZw 9guPZJlMcW923SMb8eTRytgic0Fyo7ZPHgDSFig7dXXk8mpCPbpSPOlP7a/4ADpW8lyUTj 52ona/mCzHXXPbEsR162bcfDVQZtY9m/avlOmQEZXD59k1XMMk3HRcyoFZ005Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=GRJzLwrf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=GRJzLwrf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E669910A22 X-Spam-Score: -3.97 X-Migadu-Scanner: scn0.migadu.com X-TUID: yhThlTFxIuuE --=-k9vekRAj6Azlen402TBS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: > [...] >=20 > 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 Guil= e 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 i= s It would be nice if this docstring documents GNUPG? as well. Greetings, Maxime. --=-k9vekRAj6Azlen402TBS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYFuRgxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rOyAQCo50xkY2E6ENco+q9TZJLxAOM0 pV3ooKhv4oTbYrMJeAD/Y5UO9qb4USiPaGv9X25KaRk5khhE6/RDAvnvnWkc/gs= =SrzE -----END PGP SIGNATURE----- --=-k9vekRAj6Azlen402TBS--