From unknown Sat Jun 21 10:35:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63955 <63955@debbugs.gnu.org> To: bug#63955 <63955@debbugs.gnu.org> Subject: Status: [PATCH 0/5] Add pam-gnupg support for Greetd Reply-To: bug#63955 <63955@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:35:33 +0000 retitle 63955 [PATCH 0/5] Add pam-gnupg support for Greetd reassign 63955 guix-patches submitter 63955 wurt@wurtshell.com severity 63955 normal tag 63955 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 00:30:59 2023 Received: (at submit) by debbugs.gnu.org; 8 Jun 2023 04:30:59 +0000 Received: from localhost ([127.0.0.1]:55357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q77IY-0007jg-BP for submit@debbugs.gnu.org; Thu, 08 Jun 2023 00:30:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:48078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6wjN-0007ma-LU for submit@debbugs.gnu.org; Wed, 07 Jun 2023 13:13:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6wjN-0008Cb-CE for guix-patches@gnu.org; Wed, 07 Jun 2023 13:13:57 -0400 Received: from mail.wurtshell.com ([141.94.77.195] helo=wurtshell.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6wjL-0005lf-ID for guix-patches@gnu.org; Wed, 07 Jun 2023 13:13:57 -0400 Received: from localhost.localdomain (unknown [IPv6:2a0c:5a80:8000:bb00:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id A04ED60AEB for ; Wed, 7 Jun 2023 17:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1686158033; bh=/hdg9hBvQ6zHEA5FMzovQVynS8Oz11EvbjhmFaGbU4Q=; h=From:To:Subject:Date:From; b=jHC2fLY/DRb1S8xBELxvfNVKbYQQMVqT3st8Ps2VoNC8Y9D9eROpOritLO6gXD8KJ J+zGGpiFDqzc9+OH1OMnzV0uxXwxoOy1sZ2xd4Xn3WX5i6VvjhErXz/jFWN9WHDuIr PKMurdpoT8F5/yNfV3jx+1WBt9arxudZRl3K6UuDeihc3FxBt7LeZ1HdIbqkTXAHHA 6/AXcuuQrv/ZIoZ7aNiG2/bbXu9chKJMVsMspyAc18oIa4UmfRSOm+aHvi5liwZ6IB uFfUUVs7xxittrU+EB+xLirziXBZaAkLIq36GNDxuts0VnIi1lxSRUexQ9biVnpmsu kVE94PPP5Ahmg== From: wurt@wurtshell.com To: guix-patches@gnu.org Subject: [PATCH 0/5] Add pam-gnupg support for Greetd Date: Wed, 7 Jun 2023 19:13:53 +0200 Message-Id: <20230607171353.8445-1-wurt@wurtshell.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=141.94.77.195; envelope-from=wurt@wurtshell.com; helo=wurtshell.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 08 Jun 2023 00:30:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hi! This series of patches permits to pass your login password to gpg-agent, starting the daemon at login. The needed PAM modules need to come after all PAM modules including pam-mount. So I change a gnu/services/pam-mount.scm to ensure this requisite. Maybe pam-gnupg should be an independent service that transforms all PAM login files (greetd, slim, login, gdm, etc) at the end, but I think that unix-pam-service has the #:gnupg? argument for a reason, so I did not change it. I create a new function on guix/utils.scm that insert a list right before the first element that verify a predicate, maybe is wrong to create a new utility procedure or naming insert-before instead of append-before. I am a newbie using Guile and Guix, so I am probably making mistakes. Carlos Durán Domínguez (5): utils: Add insert-before. system: pam: Add pam-gnupg-module?. services: pam-mount: Fix pam-gnupg incompatibility. services: greetd: Add pam-gnupg support. system: pam: Fix unix pam module order. doc/guix.texi | 9 +++++++ gnu/services/base.scm | 48 ++++++++++++++++++++++---------------- gnu/services/pam-mount.scm | 12 ++++++---- gnu/system/pam.scm | 14 ++++++++--- guix/utils.scm | 18 +++++++++++++- 5 files changed, 73 insertions(+), 28 deletions(-) base-commit: e8f9fb3e03ea8fee0e13f13706a6b16414f74a7b -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 11:17:09 2023 Received: (at 63955) by debbugs.gnu.org; 8 Jun 2023 15:17:09 +0000 Received: from localhost ([127.0.0.1]:57210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNs-0002hN-LF for submit@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:09 -0400 Received: from mail.wurtshell.com ([141.94.77.195]:57694 helo=wurtshell.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNn-0002ga-Vc for 63955@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:07 -0400 Received: from localhost.localdomain (unknown [IPv6:2a0c:5a80:8000:bb00:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id 3A50A60AEB; Thu, 8 Jun 2023 15:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1686237418; bh=kZCUhng4/pqK5n1bhDEYHvsb+bh5nk1CYSCCR6g9MNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PJhTjkie1m/D04IKABx3GCq+CNok9xTGYfQnkDpONunuOuCbgVujuS6nQwZKPKpfG vuZ0lYTMF0kKuWmNodlxF/BX5a76nEl0vHYdJQVNefhHGB/DntQv7qLciFqsITebD8 SMrqjSX+V0KIbjOOSjvS+V9+jcklNDvggZXv63Hl4pWNCvCFVY76RugSybMd78B6x6 A56Xh9470+LmWtW/XxpI61oZJfNjX8M/fxvtiAe744MrVeLy6gebwOu98mUCqJ5FFM 2D7sqg7P3awb7VgPW8Ma0O2QwlGt5yoI2I0yYmOrOqIZlHqZqH0iwPgve/BkYcSapI 4EhnHN/aJDS+w== From: wurt@wurtshell.com To: 63955@debbugs.gnu.org Subject: [PATCH 2/5] system: pam: Add pam-gnupg-module?. Date: Thu, 8 Jun 2023 17:14:36 +0200 Message-Id: <20230608151438.1280-2-wurt@wurtshell.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608151438.1280-1-wurt@wurtshell.com> References: <20230608151438.1280-1-wurt@wurtshell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63955 Cc: =?UTF-8?q?Carlos=20Dur=C3=A1n=20Dom=C3=ADnguez?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Carlos Durán Domínguez --- gnu/system/pam.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm index a035a92e25..7198815ad6 100644 --- a/gnu/system/pam.scm +++ b/gnu/system/pam.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013-2017, 2019-2021 Ludovic Courtès ;;; Copyright © 2023 Josselin Poiret +;;; Copyright © 2023 Carlos Durán Domínguez ;;; ;;; This file is part of GNU Guix. ;;; @@ -64,7 +65,9 @@ (define-module (gnu system pam) pam-extension-shepherd-requirements pam-root-service-type - pam-root-service)) + pam-root-service + + pam-gnupg-module?)) ;;; Commentary: ;;; @@ -454,4 +457,9 @@ (define* (pam-root-service base #:key (transformers '()) (shepherd-requirements (transformers transformers) (shepherd-requirements shepherd-requirements)))) +(define (pam-gnupg-module? name) + "Return `#t' if NAME is the path to the pam-gnupg module, `#f' otherwise." + (equal? (pam-entry-module name) + (file-append pam-gnupg "/lib/security/pam_gnupg.so"))) + -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 11:17:11 2023 Received: (at 63955) by debbugs.gnu.org; 8 Jun 2023 15:17:11 +0000 Received: from localhost ([127.0.0.1]:57213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNv-0002hj-CQ for submit@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:11 -0400 Received: from mail.wurtshell.com ([141.94.77.195]:36076 helo=wurtshell.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNn-0002gY-LK for 63955@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:07 -0400 Received: from localhost.localdomain (unknown [IPv6:2a0c:5a80:8000:bb00:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id E70D1605F3; Thu, 8 Jun 2023 15:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1686237417; bh=DZX35Vhh7SLMaIdU+kPsmpOMEsThFpeCMQCUBICz8rk=; h=From:To:Cc:Subject:Date:From; b=oFvjAPPQpwz8vSNsMJ9TTQ84qpexeGkKq1FPb118HcQSpTqlP+GX/Gok/eWO4XBy4 5Kpi1ZqB2LTWcQmOngYIXNybynmxryBXt+oXTeGoXZ2si1jEZbN0y9DTBWn82r/w9f 03qtc8V7kEgV0+RSoqG3WLhDll/jmw2H0RMm/vP18kGVDk0ve1UBKVsap+mmmTfDZQ XlEnDffgJVelnO99eIpoM/rbGvWlPSvD2JMaxmd3vrurTIX88EO97g3VE6fEwdxKWy /whzg2jHNGwlQsaSOm4qz9na3YvZt+17mVd9Dm1TeHdpJdcOb93tgk6m235597Kl/7 sGdlZgw+HqezA== From: wurt@wurtshell.com To: 63955@debbugs.gnu.org Subject: [PATCH 1/5] utils: Add insert-before. Date: Thu, 8 Jun 2023 17:14:35 +0200 Message-Id: <20230608151438.1280-1-wurt@wurtshell.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63955 Cc: =?UTF-8?q?Carlos=20Dur=C3=A1n=20Dom=C3=ADnguez?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Carlos Durán Domínguez --- guix/utils.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/guix/utils.scm b/guix/utils.scm index b9657df292..5773b55116 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2023 Philip McGrath +;;; Copyright © 2023 Carlos Durán Domínguez ;;; ;;; This file is part of GNU Guix. ;;; @@ -149,7 +150,9 @@ (define-module (guix utils) string-distance string-closest - pretty-print-table)) + pretty-print-table + + insert-before)) ;;; @@ -1128,6 +1131,19 @@ (define* (string-closest trial tests #:key (threshold 3)) #f +inf.0 tests))) + +;;; +;;; List modification. +;;; + +(define (insert-before pred lst1 lst2) + "Return a list appending LST2 just before the first element on LST1 that + satisfy the predicate PRED." + (cond + ((null? lst1) lst2) + ((pred (car lst1)) (append lst2 lst1)) + (else (cons (car lst1) (insert-before pred (cdr lst1) lst2))))) + ;;; ;;; Prettified output. -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 11:17:12 2023 Received: (at 63955) by debbugs.gnu.org; 8 Jun 2023 15:17:12 +0000 Received: from localhost ([127.0.0.1]:57215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNv-0002hn-Of for submit@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:12 -0400 Received: from mail.wurtshell.com ([141.94.77.195]:57702 helo=wurtshell.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNr-0002gl-G3 for 63955@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:08 -0400 Received: from localhost.localdomain (unknown [IPv6:2a0c:5a80:8000:bb00:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id D058D60AED; Thu, 8 Jun 2023 15:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1686237420; bh=/7cj1DSNmxrjW/Siyv4bGVo59NS2LtAhHNTSVQqEFlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mI9pxXOc7ELClc+a0HQPBeFxkFmQZa9YxLuUu6hvSrzwrajXGLc5fy2h+P/Atmfbs lxCG/OHbynni8GkEYfsi8Xr76QuCZXRpRzs5sZ0aBT6I0eUv+vttp39vSKPybBA4pK tExbA0mW9OpWtPRNWncYvEjC99eyIcvCfHWosNw2B7Bc6VAMGMF3fS97CYSuV6cQiP BMr2xtspZj+opi7+pmvbKOn7PPopCKw0IzJRZU2fK5WTxltQmamT8cXsoJiDAr5bWo 7uNO4j3PAqvRG3gQ7gGjyg1jJXl7a28WzLEZb9Et/i4LVfknBZGAJrumug2QrJtceO JdsOUf0voeicw== From: wurt@wurtshell.com To: 63955@debbugs.gnu.org Subject: [PATCH 3/5] services: pam-mount: Fix pam-gnupg incompatibility. Date: Thu, 8 Jun 2023 17:14:37 +0200 Message-Id: <20230608151438.1280-3-wurt@wurtshell.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608151438.1280-1-wurt@wurtshell.com> References: <20230608151438.1280-1-wurt@wurtshell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63955 Cc: =?UTF-8?q?Carlos=20Dur=C3=A1n=20Dom=C3=ADnguez?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Carlos Durán Domínguez --- gnu/services/pam-mount.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gnu/services/pam-mount.scm b/gnu/services/pam-mount.scm index 21c34ddd61..1900c44a86 100644 --- a/gnu/services/pam-mount.scm +++ b/gnu/services/pam-mount.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Guillaume Le Vaillant +;;; Copyright © 2023 Carlos Durán Domínguez ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu services pam-mount) + #:use-module (guix utils) #:use-module (gnu packages admin) #:use-module (gnu services) #:use-module (gnu services configuration) @@ -96,10 +98,12 @@ (module #~(string-append #$pam-mount "/lib/security/pam_mount.so")))) '("login" "greetd" "su" "slim" "gdm-password" "sddm")) (pam-service (inherit pam) - (auth (append (pam-service-auth pam) - (list optional-pam-mount))) - (session (append (pam-service-session pam) - (list optional-pam-mount)))) + (auth (insert-before pam-gnupg-module? + (pam-service-auth pam) + (list optional-pam-mount))) + (session (insert-before pam-gnupg-module? + (pam-service-session pam) + (list optional-pam-mount)))) pam)))))) (define pam-mount-service-type -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 11:17:12 2023 Received: (at 63955) by debbugs.gnu.org; 8 Jun 2023 15:17:12 +0000 Received: from localhost ([127.0.0.1]:57217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNw-0002hz-5h for submit@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:12 -0400 Received: from mail.wurtshell.com ([141.94.77.195]:57718 helo=wurtshell.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNr-0002h0-SG for 63955@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:08 -0400 Received: from localhost.localdomain (unknown [IPv6:2a0c:5a80:8000:bb00:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id 19BAD60AEF; Thu, 8 Jun 2023 15:17:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1686237422; bh=lFPI8dtCNH6syn3BzU8ysduyY7f6uOefIhxBSprZg8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SyY6vpBDEWfgPYOmM66YHiVsBPM1Xd0bUl4sdwPVR0bfaJhS1fH+riuyqROxYEZ6+ kiPbHr8bc1Wx6kvzOSzqNexashGvNz2c174IEK05v2UZywg/o4tNcN5JJvn1MQQNXU Ww46dbO4b44wE12MZ3DFZo7s+keOwYuks/CIW0wCYYqYfDvvuIx+snYFDu2RXZj/eM VXH1SvXZCVWOibeplNX4D6WlDgbsH9DG389W071dbDnpswUCxP5m5ek8DfGzqfj6pE Hx7JUk9cy8GlGdVqZB9vijAQ6WvWjgFNhmEls7Mtq0JirMrGIJpr72HJ2Gng1PZETV BEbm3B4KhvQyg== From: wurt@wurtshell.com To: 63955@debbugs.gnu.org Subject: [PATCH 4/5] services: greetd: Add pam-gnupg support. Date: Thu, 8 Jun 2023 17:14:38 +0200 Message-Id: <20230608151438.1280-4-wurt@wurtshell.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608151438.1280-1-wurt@wurtshell.com> References: <20230608151438.1280-1-wurt@wurtshell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63955 Cc: =?UTF-8?q?Carlos=20Dur=C3=A1n=20Dom=C3=ADnguez?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Carlos Durán Domínguez --- doc/guix.texi | 9 ++++++++ gnu/services/base.scm | 48 +++++++++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 01f4e0105f..fe3ae7f2df 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -116,6 +116,7 @@ Copyright @copyright{} 2022 Antero Mejr@* Copyright @copyright{} 2023 Karl Hallsby@* Copyright @copyright{} 2023 Nathaniel Nicandro@* Copyright @copyright{} 2023 Tanguy Le Carrour@* +Copyright @copyright{} 2023 Carlos Durán Domínguez@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -19373,6 +19374,14 @@ A file-like object containing the ``message of the day''. Allow empty passwords by default so that first-time users can log in when the 'root' account has just been created. +@item @code{gnupg?} (default: @code{#f}) +If enabled, @code{pam-gnupg} will attempt to automatically unlock the +user's GPG keys with the login password via @code{gpg-agent}. The +keygrips of all keys to be unlocked should be written to +@file{~/.pam-gnupg}, and can be queried with @code{gpg -K +--with-keygrip}. Presetting passphrases must be enabled by adding +@code{allow-preset-passphrase} in @file{~/.gnupg/gpg-agent.conf}. + @item @code{terminals} (default: @code{'()}) List of @code{greetd-terminal-configuration} per terminal for which @code{greetd} should be started. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c5b06b57e8..4e93ee4991 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2022 Justin Veilleux ;;; Copyright © 2022 ( ;;; Copyright © 2023 Bruno Victal +;;; Copyright © 2023 Carlos Durán Domínguez ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,6 +39,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu services base) + #:use-module (guix utils) #:use-module (guix store) #:use-module (guix deprecation) #:autoload (guix diagnostics) (warning formatted-message &fix-hint) @@ -3221,6 +3223,7 @@ (define-record-type* greetd-configuration? (motd greetd-motd (default %default-motd)) (allow-empty-passwords? greetd-allow-empty-passwords? (default #t)) + (gnupg? greetd-gnupg? (default #f)) (terminals greetd-terminals (default '())) (greeter-supplementary-groups greetd-greeter-supplementary-groups (default '()))) @@ -3259,26 +3262,31 @@ (define optional-pam-mount (control "optional") (module #~(string-append #$greetd-pam-mount "/lib/security/pam_mount.so")) (arguments '("disable_interactive")))) - - (list - (unix-pam-service "greetd" - #:login-uid? #t - #:allow-empty-passwords? - (greetd-allow-empty-passwords? config) - #:motd - (greetd-motd config)) - (pam-extension - (transformer - (lambda (pam) - (if (member (pam-service-name pam) - '("login" "greetd" "su" "slim" "gdm-password")) - (pam-service - (inherit pam) - (auth (append (pam-service-auth pam) - (list optional-pam-mount))) - (session (append (pam-service-session pam) - (list optional-pam-mount)))) - pam)))))) + (define (optional-pam-mount-transformer pam) + (if (member (pam-service-name pam) + '("login" "greetd" "su" "slim" "gdm-password")) + (pam-service + (inherit pam) + ;; SLiM could have pam-gnupg module, and pam-mount must be before it. + (auth (insert-before pam-gnupg-module? + (pam-service-auth pam) + (list optional-pam-mount))) + (session (insert-before pam-gnupg-module? + (pam-service-session pam) + (list optional-pam-mount)))) + pam)) + + (list (unix-pam-service "greetd" + #:login-uid? #t + #:allow-empty-passwords? + (greetd-allow-empty-passwords? config) + #:gnupg? + (greetd-gnupg? config) + #:motd + (greetd-motd config)) + (pam-extension + (transformer + optional-pam-mount-transformer)))) (define (greetd-shepherd-services config) (map -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 08 11:17:13 2023 Received: (at 63955) by debbugs.gnu.org; 8 Jun 2023 15:17:13 +0000 Received: from localhost ([127.0.0.1]:57219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNw-0002i4-Oa for submit@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:13 -0400 Received: from mail.wurtshell.com ([141.94.77.195]:57720 helo=wurtshell.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7HNs-0002h2-QI for 63955@debbugs.gnu.org; Thu, 08 Jun 2023 11:17:09 -0400 Received: from localhost.localdomain (unknown [IPv6:2a0c:5a80:8000:bb00:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id 3E42C60AF1; Thu, 8 Jun 2023 15:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1686237423; bh=8GN45o87lBBGr9OwxgbCYM7vIwKWu9mvx5xP7nEZWmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WO5+78q00LYPSfIRTmPlCWbx0Njp0o3oQe/pRSU7dC37jQz3BPc71YoWRidBv46m6 /WEF7g6FqmN8Q72N5s8FwIW3KkOl0MBIkSGlD/gW2y9AD0BQkZkI/fa8A+ciqX4QVW 3G2sjOFkvzfhXM7Z6bM3mzgzAT0YZGM62CycmGvJelDuL9TUO1G0zsjLUuKYK8EAzL oEsTZuwSSKQfcHW3mbNCoz6cWk/ZDrt5FCbe/uxtQR0DSH95si6gdXxhC56GPqKhIm ilD/wTQLX6RZQlIe/fbmX/l07l/ZnqNbB4ecWx5SDHtFlDNCnglFMUXC8j1e7NucZj fxPQ89SYP+ltQ== From: wurt@wurtshell.com To: 63955@debbugs.gnu.org Subject: [PATCH 5/5] system: pam: Fix unix pam module order. Date: Thu, 8 Jun 2023 17:14:39 +0200 Message-Id: <20230608151438.1280-5-wurt@wurtshell.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608151438.1280-1-wurt@wurtshell.com> References: <20230608151438.1280-1-wurt@wurtshell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63955 Cc: =?UTF-8?q?Carlos=20Dur=C3=A1n=20Dom=C3=ADnguez?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Carlos Durán Domínguez --- gnu/system/pam.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm index 7198815ad6..5db195b72e 100644 --- a/gnu/system/pam.scm +++ b/gnu/system/pam.scm @@ -267,12 +267,12 @@ (module "pam_motd.so") (control "required") (module "pam_loginuid.so"))) '()) + ,env ,unix ,@(if gnupg? (list (pam-entry (control "required") (module (file-append pam-gnupg "/lib/security/pam_gnupg.so")))) - '()) - ,env ,unix)))))) + '()))))))) (define (rootok-pam-service command) "Return a PAM service for COMMAND such that 'root' does not need to -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 31 03:44:22 2023 Received: (at 63955-done) by debbugs.gnu.org; 31 Aug 2023 07:44:22 +0000 Received: from localhost ([127.0.0.1]:54782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbcLm-0008Rv-1d for submit@debbugs.gnu.org; Thu, 31 Aug 2023 03:44:22 -0400 Received: from mail.wurtshell.com ([141.94.77.195]:45970 helo=wurtshell.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbcLg-0008Rb-Jz for 63955-done@debbugs.gnu.org; Thu, 31 Aug 2023 03:44:19 -0400 Received: by wurtshell.com (Postfix, from userid 117) id 0C86E62DB1; Thu, 31 Aug 2023 07:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1693467842; bh=DONr1m1lh0BU++a/2AVnRbD2uWQE4P08pEq8reeAT/0=; h=From:To:Date:From; b=KZOf8cqAbxbnIGPWq1xr21I3G8SmmUB3jh34W16tLlieRyCby6YvNzM1cH9+8oJO3 atWXntEIJog6VXSKUfJCGvMjbvEjkaj74XrWi6tYi5GP0ElwyoqBx0L31wkU+4g1Am 5TtLdcA7MySLP4N8VSSgmvhy/V+R0KoAsBSF3DD3oXIE1fOyKC30Vy8g2QtuIa3kkV hQeo9xeKfzT7FKb4K9Ok145widHOdgRwqMNOlSuhkDOH9kSarwr7cI2CNmxzG2Uu3v YW1zpTIgsOEIgRQ+jbQAMwS6T7j133w9AbHi7zlAfGSIZ0HJlJYd+3SC69lrD2YbZJ cqNxusCRe/29w== Received: from WurtLaptop.wurtshell.com (unknown [IPv6:2a0c:5a80:8102:3100:e206:e6ff:fe9a:ab42]) by wurtshell.com (Postfix) with ESMTPSA id CFEF962D87 for <63955-done@debbugs.gnu.org>; Thu, 31 Aug 2023 07:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wurtshell.com; s=mail; t=1693467839; bh=DONr1m1lh0BU++a/2AVnRbD2uWQE4P08pEq8reeAT/0=; h=From:To:Date:From; b=jt63AqIL2F8x4JRe2iLPM/YlE4FkvKxVLa9/l3YFOOwU7hTruMDnRRNAWaCiy1w8q hFjbeMNYVkkNFEH/zPZg5J/ZnoanrWRJp6SZOoctDmnnBIkXD92l4/96rMPF0gsX3q dQEaYsxGiVPOLEEpZnbZ85JLCnRdaq0r0CgdVZEVmvbSeSgGazELvLTjqE0vcEVrnp oDBPadL+Wckjr8S01Qkzb82F6eECKGWGcQ0aGQpCbZnF6LvuOeRYmDrPZJo7yc0U4p O1LDxiTQP4fSR+hRdrq7RFOxpMqnLJboSpHoEcB4OrwIZxS8KyiIx3L1XlALNDSL2O XzSUzTUfT/m+w== From: =?utf-8?Q?Carlos_Dur=C3=A1n_Dom=C3=ADnguez?= To: 63955-done@debbugs.gnu.org Date: Thu, 31 Aug 2023 09:43:57 +0200 Message-ID: <87o7infygy.fsf@wurtshell.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Continue on https://issues.guix.gnu.org/65538. I sent a second version of this patch, but not on this thread… sorry. -- Carlos Durán Domínguez Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: 63955-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Continue on https://issues.guix.gnu.org/65538. I sent a second version of this patch, but not on this thread=E2=80=A6 sorry. --=20 Carlos Dur=C3=A1n Dom=C3=ADnguez From unknown Sat Jun 21 10:35:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 Sep 2023 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator