Skip to content

Commit

Permalink
linux-pam: don't create dangling symlink during build
Browse files Browse the repository at this point in the history
  • Loading branch information
winterqt committed Jan 1, 2022
1 parent dcab2ec commit 0715ef5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ in
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pam}/sbin/unix_chkpwd.orig";
source = "${pkgs.pam}/sbin/unix_chkpwd";
};
};

Expand Down
12 changes: 0 additions & 12 deletions pkgs/os-specific/linux/pam/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,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:))
Expand Down

0 comments on commit 0715ef5

Please sign in to comment.