Setting the files cipher algorithm depending on the architecture

(with libxcrypt or without libxcrypt, at the end)

svn path=/nixos/trunk/; revision=17389
This commit is contained in:
Lluís Batlle i Rossell 2009-09-23 20:50:41 +00:00
parent e49ea46466
commit 7b14ee9932
2 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,7 @@ CRYPT=des
# for local files, use a more secure hash. We
# don't need to be portable here:
CRYPT_FILES=blowfish
CRYPT_FILES=@filesCipher@
# sometimes we need to specify special options for
# a hash (variable is prepended by the name of the

View File

@ -33,7 +33,14 @@ in
{ # /etc/default/passwd: configuration for passwd and friends
# (e.g., hash algorithm for /etc/passwd).
source = ./passwd.conf;
source = pkgs.substituteAll {
src = ./passwd.conf;
# This depends on pam_unix2 being built with libxcrypt or libc's libcrypt.
# Only in the first case it will understand 'blowfish'. And pam_unix2
# is not built with libxcrypt at the time of writing (it did not build)
filesCipher = if (pkgs.stdenv.system == "armv5tel-linux") then
"des" else "blowfish";
};
target = "default/passwd";
}