summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2022-02-06 08:16:54 +0300
committerLudovic Courtès <ludo@gnu.org>2022-02-10 23:37:10 +0100
commitf172118ca43369af548af2d4edecb07890f917e8 (patch)
treeff0d3ebcd9040682cd6a5529cb392c3b373e2146 /gnu/system
parentb31ef5638bad5c06e6289931eaa0ab7feda908db (diff)
downloadguix-f172118ca43369af548af2d4edecb07890f917e8.tar.gz
gnu: linux-pam: Change path to unix_chkpwd helper.
* gnu/packages/patches/linux-pam-unix_chkpwd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/linux.scm (linux-pam): Use it.
* gnu/system/pam.scm (pam-root-service-type): Add unix_chkpwd to setuid.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/pam.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm
index 2574e019f1..b635681642 100644
--- a/gnu/system/pam.scm
+++ b/gnu/system/pam.scm
@@ -21,6 +21,7 @@
   #:use-module (guix derivations)
   #:use-module (guix gexp)
   #:use-module (gnu services)
+  #:use-module (gnu system setuid)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
@@ -375,8 +376,13 @@ strings or string-valued gexps."
 
 (define pam-root-service-type
   (service-type (name 'pam)
-                (extensions (list (service-extension etc-service-type
-                                                     /etc-entry)))
+                (extensions
+                 (list (service-extension
+                        setuid-program-service-type
+                        (lambda (_)
+                          (list (file-like->setuid-program
+                                 (file-append linux-pam "/sbin/unix_chkpwd")))))
+                       (service-extension etc-service-type /etc-entry)))
 
                 ;; Arguments include <pam-service> as well as procedures.
                 (compose concatenate)