Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-pam: don't create dangling symlink during build #153104

Merged
merged 1 commit into from
Jan 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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