Skip to content

Commit

Permalink
linux-pam: make it use SUID wrapped version of unix_ckpwd
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jan 27, 2022
1 parent b32ed60 commit ffdadd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/os-specific/linux/pam/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-IB1AcwsRNbGzzeoJ8sKKxjTXMYHM0Bcs7d7jZJxXkvw=";
};

patches = [ ./suid-wrapper-path.patch ];

outputs = [ "out" "doc" "man" /* "modules" */ ];

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
6 changes: 6 additions & 0 deletions pkgs/os-specific/linux/pam/suid-wrapper-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
It needs the SUID version during runtime, and that can't be in /nix/store/**
--- a/modules/pam_unix/Makefile.in
+++ b/modules/pam_unix/Makefile.in
@@ -651 +651 @@
- -DCHKPWD_HELPER=\"$(sbindir)/unix_chkpwd\" \
+ -DCHKPWD_HELPER=\"/run/wrappers/bin/unix_chkpwd\" \

0 comments on commit ffdadd3

Please sign in to comment.