-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Migrate from glibc's libcrypt to libxcrypt #181764
Merged
Merged
Changes from all commits
Commits
Show all changes
117 commits
Select commit
Hold shift + click to select a range
ff30c89
glibc: make crypt support optional
mweinelt 7c29dcb
libxcrypt: use tarball src, prune dependencies
mweinelt a369108
perl: allow building without libcrypt
mweinelt e36bd3c
libxcrypt: build using perl without libcrypt support
mweinelt 3624ac2
perl: fix build with libxcrypt
fpletz 0097f57
gcc11: fix build with libxcrypt
fpletz 495e650
llvmPackages_11.compiler-rt: fix build with libxcrypt
fpletz 194d852
cpython: fix build with libxcrypt
fpletz 872c524
cyrus_sasl: fix build with libxcrypt
fpletz 44a73d0
libxslt: fix build with libxcrypt
fpletz 2c2fde9
apparmor: fix build with libxcrypt
fpletz 5df544a
pam: enable libxcrypt by default
fpletz 7442422
shadow: fix build with libxcrypt
fpletz f6011b2
systemd: fix build with libxcrypt
fpletz f9090d5
libxcrypt: fix build with musl
fpletz 32e7482
nixos/tests/shadow: new hashes support with libxcrypt
fpletz e8748e2
accountsservice: fix build with libxcrypt
fpletz dd331ad
openldap: fix build with libxcrypt
fpletz ae4e703
tdb: fix build with libxcrypt
fpletz 77a7b43
aprutil: fix build with libxcrypt
fpletz 3028bec
apacheHttpd: fix build with libxcrypt
fpletz cc9be15
alpine: fix build with libxcrypt
fpletz 5b572c5
talloc: fix build with libxcrypt
fpletz 52f2785
vsftpd: fix build with libxcrypt
fpletz c1da199
opensmtpd: fix build with libxcrypt
fpletz 057ae3d
llvmPackage_14.compiler-rt: fix build with libxcrypt
fpletz be9bc07
screen: fix build with libxcrypt
mweinelt 43327d2
pppd: fix build with libxcrypt
mweinelt 728c97f
pppd: inherit nixos test into passthru.tests
mweinelt fd94457
open-vm-tools: fix build with libxcrypt
mweinelt d438cee
conserver: fix build with libxcrypt
fpletz 71dad51
dante: fix build with libxcrypt
fpletz c82e7ee
hiawatha: fix build with libxcrypt
fpletz 5c34a53
ircdHybrid: fix build with libxcrypt
fpletz ce67773
libcli: fix build with libxcrypt
fpletz f51c3fd
ldapvi: fix build with libxcrypt
mweinelt d017316
atheme: fix build with libxcrypt
mweinelt dbf9333
xorg.xdm: fix build with libxcrypt
mweinelt 0465c23
wmic-bin: fix build with libxcrypt
mweinelt 555d39b
libreswan: fix build with libxcrypt
mweinelt 167544c
tengine: fix build with libxcrypt
mweinelt 3575e57
libguestfs: fix build with libxcrypt
fpletz ec31b96
leafnode: fix build with libxcrypt
fpletz 84eda8b
lsh: fix build with libxcrypt
fpletz 31e5ad8
pgpool: fix build with libxcrypt
fpletz 47945f2
groonga: fix build with libxcrypt
fpletz da15c9c
mailutils: fix build with libxcrypt
fpletz 2a7df1a
popa3d: fix build with libxcrypt
fpletz 870b0eb
tcsh: fix build with libxcrypt
mweinelt c7b0317
swiProlog: fix build with libxcrypt
mweinelt 7f0e9f0
sumo: fix build with libxcrypt
mweinelt eb2ed86
toybox: fix build with libxcrypt
mweinelt aac6de8
gcc10: fix build with libxcrypt
mweinelt 21c552e
gcc12: fix build with libxcrypt
mweinelt 126319f
xrootd: fix build with libxcrypt
fpletz 897f5b2
pounce: fix build with libxcrypt
fpletz 2939285
uwsgi: fix build with libxcrypt
fpletz a1c07a6
super: fix build with libxcrypt
fpletz e1f8bfb
policycoreutils: fix build with libxcrypt
fpletz 77c50b0
pies: fix build with libxcrypt
fpletz eee1cec
partimage: fix build with libxcrypt
fpletz 55a5763
otpw: fix build with libxcrypt
fpletz f9df47f
zeroc-ice: fix build with libxcrypt
fpletz 2b899ee
luaPackages.luaposix: fix build with libxcrypt
fpletz fe91064
monit: fix build with libxcrypt
fpletz e963dde
libfilezilla: fix build with libxcrypt
fpletz 2e7e473
libsigrokdecode: fix build with libxcrypt
fpletz 67408de
hylafaxplus: fix build with libxcrypt
fpletz f0f14f1
dropbear: fix build with libxcrypt
fpletz 64e160c
kodi: fix build with libxcrypt
fpletz 24bc454
pure-ftpd: fix build with libxcrypt
fpletz 31f1f36
cernlib: fix build with libxcrypt
fpletz e33af60
bozohttpd: fix build with libxcrypt
fpletz 519b8c8
sawfish: fix build with libxcrypt
fpletz 845ae8e
qnial: fix build with libxcrypt
fpletz 09597d4
unicon-lang: fix build with libxcrypt
fpletz 15f6c0a
gvm-libs: fix build with libxcrypt
fpletz 8dde32e
snis: fix build with libxcrypt
fpletz 125ec34
slock: fix build with libxcrypt
fpletz fd1bcb1
dico: fix build with libxcrypt
fpletz ccba311
dcap: fix build with libxcrypt
fpletz 57f4391
haproxy: fix build with libxcrypt
fpletz cfc636c
srelay: fix build with libxcrypt
fpletz 58bbfeb
nntp-proxy: fix build with libxcrypt
fpletz 7b33ea4
shellhub-agent: fix build with libxcrypt
fpletz 9fb94a8
pam_mysql: fix build with libxcrypt
fpletz 94e54c6
pam_pgsql: fix build with libxcrypt
fpletz 3edcff9
sysvinit: fix build with libxcrypt
fpletz fc4f68d
mokutil: fix build with libxcrypt
fpletz c755643
epic5: fix build with libxcrypt
fpletz bcdde95
kermit: fix build with libxcrypt
fpletz 6264d94
root5: fix build with libxcrypt
fpletz 2c10e08
root: fix build with libxcrypt
fpletz 9430efb
pleroma: fix build with libxcrypt
fpletz 3d6b548
sogo: fix build with libxcrypt
fpletz fb591b9
cde: fix build with libxcrypt
fpletz 993839a
bftpd: fix build with libxcrypt
fpletz f64f770
llvmPackages_13.compiler-rt: fix build with libxcrypt
mweinelt efd944c
llvmPackages_12.compiler-rt: fix build with libxcrypt
mweinelt 716a315
llvmPackages_10.compiler-rt: fix build with libxcrypt
mweinelt 842a2c2
llvmPackages_rocm.llvm: fix build with libxcrypt
mweinelt 284396c
haskellPackages.crypt-sha512: fix build with libxcrypt
mweinelt 7670059
freeswitch: fix build with libxcrypt
mweinelt 6f1812a
haskellPackages.Unixutils: fix build with libxcrypt
mweinelt 3f4de6d
thttpd: fix build with libxcrypt
mweinelt 2d19e7c
haskellPackages.nano-cryptr: fix build with libxcrypt
mweinelt 9001f0d
haskellPackages.xmonad-utils: fix build with libxcrypt
mweinelt e02766b
ocserv: fix build with libxcrypt
mweinelt 2b83e04
ladybird: fix build with libxcrypt
mweinelt 0f7ef68
cdesktopenv: fix build with libxcrypt
mweinelt 01f94c2
wiringpi: fix build with libxcrypt
mweinelt 3cedef1
swift: fix build with libxcrypt
mweinelt 73ffee8
util-linux: pass libxcrypt, so sulogin gets built
mweinelt 1b8d6d3
python3Packages.twisted: Disable failing crypt test
mweinelt 322b510
python3Packages.pillow{,-simd}: fix build with libxcrypt
mweinelt 338d0cc
libxcrypt: Fix static build by using perl from buildPackages
mweinelt 195aa58
boost: fix build with enablePython by passing libxcrypt
mweinelt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ let | |
password2 = "helloworld"; | ||
password3 = "bazqux"; | ||
password4 = "asdf123"; | ||
hashed_bcrypt = "$2b$05$8xIEflrk2RxQtcVXbGIxs.Vl0x7dF1/JSv3cyX6JJt0npzkTCWvxK"; # fnord | ||
hashed_yeshash = "$y$j9T$d8Z4EAf8P1SvM/aDFbxMS0$VnTXMp/Hnc7QdCBEaLTq5ZFOAFo2/PM0/xEAFuOE88."; # fnord | ||
in import ./make-test-python.nix ({ pkgs, ... }: { | ||
name = "shadow"; | ||
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; }; | ||
|
@@ -27,6 +29,16 @@ in import ./make-test-python.nix ({ pkgs, ... }: { | |
password = password4; | ||
shell = pkgs.bash; | ||
}; | ||
users.berta = { | ||
isNormalUser = true; | ||
hashedPassword = hashed_bcrypt; | ||
shell = pkgs.bash; | ||
}; | ||
users.yesim = { | ||
isNormalUser = true; | ||
hashedPassword = hashed_yeshash; | ||
shell = pkgs.bash; | ||
}; | ||
}; | ||
}; | ||
|
||
|
@@ -115,5 +127,23 @@ in import ./make-test-python.nix ({ pkgs, ... }: { | |
shadow.wait_until_succeeds("pgrep login") | ||
shadow.send_chars("${password2}\n") | ||
shadow.wait_until_tty_matches("5", "login:") | ||
|
||
with subtest("check alternate password hashes"): | ||
shadow.send_key("alt-f6") | ||
shadow.wait_until_succeeds("[ $(fgconsole) = 6 ]") | ||
for u in ["berta", "yesim"]: | ||
shadow.wait_for_unit("[email protected]") | ||
shadow.wait_until_succeeds("pgrep -f 'agetty.*tty6'") | ||
shadow.wait_until_tty_matches("6", "login: ") | ||
shadow.send_chars(f"{u}\n") | ||
shadow.wait_until_tty_matches("6", f"login: {u}") | ||
shadow.wait_until_succeeds("pgrep login") | ||
shadow.sleep(2) | ||
shadow.send_chars("fnord\n") | ||
shadow.send_chars(f"whoami > /tmp/{u}\n") | ||
shadow.wait_for_file(f"/tmp/{u}") | ||
print(shadow.succeed(f"cat /tmp/{u}")) | ||
assert u in shadow.succeed(f"cat /tmp/{u}") | ||
shadow.send_chars("logout\n") | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is musl different from glibc here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gist.github.com/mweinelt/b1357859bf4a2f659a7b793db3ec7051