diff options
Diffstat (limited to 'pkgs/os-specific/linux/pam')
-rw-r--r-- | pkgs/os-specific/linux/pam/default.nix | 18 | ||||
-rw-r--r-- | pkgs/os-specific/linux/pam/suid-wrapper-path.patch | 6 |
2 files changed, 10 insertions, 14 deletions
diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index 12ff9f493a373..1476ae49006ce 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -5,13 +5,15 @@ stdenv.mkDerivation rec { pname = "linux-pam"; - version = "1.5.1"; + version = "1.5.2"; src = fetchurl { url = "https://github.com/linux-pam/linux-pam/releases/download/v${version}/Linux-PAM-${version}.tar.xz"; - sha256 = "sha256-IB1AcwsRNbGzzeoJ8sKKxjTXMYHM0Bcs7d7jZJxXkvw="; + sha256 = "sha256-5OxxMakdpEUSV0Jo9JPG2MoQXIcJFpG46bVspoXU+U0="; }; + patches = [ ./suid-wrapper-path.patch ]; + outputs = [ "out" "doc" "man" /* "modules" */ ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; @@ -23,18 +25,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - postInstall = '' - mv -v $out/sbin/unix_chkpwd{,.orig} - ln -sv /run/wrappers/bin/unix_chkpwd $out/sbin/unix_chkpwd - ''; /* - rm -rf $out/etc - mkdir -p $modules/lib - mv $out/lib/security $modules/lib/ - '';*/ - # don't move modules, because libpam needs to (be able to) find them, - # which is done by dlopening $out/lib/security/pam_foo.so - # $out/etc was also missed: pam_env(login:session): Unable to open config file - preConfigure = lib.optionalString (stdenv.hostPlatform.libc == "musl") '' # export ac_cv_search_crypt=no # (taken from Alpine linux, apparently insecure but also doesn't build O:)) diff --git a/pkgs/os-specific/linux/pam/suid-wrapper-path.patch b/pkgs/os-specific/linux/pam/suid-wrapper-path.patch new file mode 100644 index 0000000000000..71533c51a1902 --- /dev/null +++ b/pkgs/os-specific/linux/pam/suid-wrapper-path.patch @@ -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\" \ |