-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
libcrypt.so.1: support newer hash types via libxcrypt #112371
Comments
It is possible to add tcb support? - #109457 |
|
I failed to configure linux-pam and patch passwd. |
@dottedmag Are you still working on this? I propose that we get a new Hydra jobset so we can smoke out these deps (i.e. we push a jobset with glibc's libcrypt disabled and see what breaks) |
I took a hiatus from working on NixOS at the moment, but still intend to do it some time in the future. |
No worries - do you mind if I pick it up for the moment? |
Sure, feel free to. |
ppp does not depend on libcrypt from glibc anymore since 2.4.8 (ppp-project/ppp@3c7b862), so that should not be a blocker anymore. |
openssh appears to currently be incompatible with
|
@lukegb @lourkeur Anyone still working on this? Does everyone agree with the steps mentioned in the action plan?
This is probably just |
@mweinelt I use a quick and dirty overlay on the daily but I am not working on a proper solution. I think broadly the action plan is correct. |
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 2fc89a968f8..2ea58072014 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -36,6 +36,7 @@
, withLinuxHeaders ? false
, profilingLibraries ? false
, withGd ? false
+, withLibcrypt ? true
, meta
, extraBuildInputs ? []
, extraNativeBuildInputs ? []
@@ -201,7 +202,9 @@ stdenv.mkDerivation ({
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
- ] ++ lib.optional withGd "--with-gd";
+ ]
+ ++ lib.optional withGd "--with-gd"
+ ++ lib.optional (!withLibcrypt) "--disable-crypt";
makeFlags = [
"OBJCOPY=${stdenv.cc.targetPrefix}objcopy"
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index ba782321559..d34bbdccf25 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -2,6 +2,7 @@
, withLinuxHeaders ? true
, profilingLibraries ? false
, withGd ? false
+, withLibcrypt? false
, buildPackages
}:
@@ -16,7 +17,7 @@ in
callPackage ./common.nix { inherit stdenv; } {
pname = "glibc" + lib.optionalString withGd "-gd";
- inherit withLinuxHeaders profilingLibraries withGd;
+ inherit withLinuxHeaders profilingLibraries withGd withLibcrypt;
# Note:
# Things you write here override, and do not add to, |
We are now in staging and everything is scheduled for this going live in 22.11. https://nixpk.gs/pr-tracker.html?pr=181764 There are some additional changes (docs, release notes, deprecations) that I'm currently working over in #195271. Reviews welcome. |
Fixed in #195271. |
This is more "intent to implement" rather than a bug report.
Describe the bug
glibc's libcrypt implementation supports a narrow range of hashes, and none of modern RAM-heavy ones.
glibc maintaines would like to spin this library off into a separate project and drop libcrypt from the glibc altogether.
Some distributions have already switched to API- and ABI-compatible libxcrypt:
Expected behaviour
All packages that use
libcrypt.so.1
can use strong hash types.Action plan
libxcrypt
.withLibcrypt
(defaults to true) toglibc
package that disables building and installinglibcrypt.so.1
andcrypt.h
if set to false.libcrypt.so.1
inglibc
by giving them a flaguseGlibcLibcrypt
(defaults to true).useGlibcLibcrypt
(defaults to true), and disablewithLibgcrypt
inglibc
anduseGlibcLibgcrypt
in other packages it is set to false.useGibcLibcrypt
to default to false.withLibcrypt
,useGlibcLibcrypt
from packages, makeuseGlibcLibcrypt
no-op.Known issues
I have stumbled upon the following problems while doing a PoC on the packages I regularly use (not the whole archive):
libcrypt
inglibc
Affected packages
Normally it would be easy to do a reverse-dependency search to see what relies on a particular library. However with a library bundled in
glibc
the tree of reverse dependencies is not particularly useful.I have
grep
ed the wholenixos-unstable
and manually processed the results. Attached is the list oflibcrypt.so.1
and actually use symbols from them (+++
)libcrypt.so.1
, but don't actually use any symbols (???
)libcrypt.so.1
, but don't link to it (mostly text) (XXX
).This is a very rough list, the only way to get a definite list is by rebuilding the archive, however it should suffice as a starting point.
libcrypt-users.txt
Notify maintainers
@edolstra
The text was updated successfully, but these errors were encountered: