Subject: [PATCH 2/5] system: pam: Add pam-gnupg-module?.

From: [email-masked]
Date: Thu, 8 Jun 2023 17:14:36 +0200

From: Carlos Durán Domínguez <[email-masked]>

---
 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 <[email-masked]>
 ;;; Copyright © 2023 Josselin Poiret <[email-masked]>
+;;; Copyright © 2023 Carlos Durán Domínguez <[email-masked]>
 ;;;
 ;;; 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