diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2012-06-12 17:14:19 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2012-06-12 17:14:19 +0000 |
| commit | a0ee974f0badd8a8fafb686be71a49094e2798f6 (patch) | |
| tree | 9cd4e433872bd87e319e56a6c61363dc6ddc2ae9 /lib/libcrypt/crypt.c | |
| parent | 9189ae71faf92ab29f5ba5cd9e629655469b73a7 (diff) | |
Notes
Diffstat (limited to 'lib/libcrypt/crypt.c')
| -rw-r--r-- | lib/libcrypt/crypt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libcrypt/crypt.c b/lib/libcrypt/crypt.c index b949a480de18..bfcbb2049b5a 100644 --- a/lib/libcrypt/crypt.c +++ b/lib/libcrypt/crypt.c @@ -79,23 +79,23 @@ static const struct { } }; +#ifdef HAS_DES +#define CRYPT_DEFAULT "des" +#else +#define CRYPT_DEFAULT "md5" +#endif + static int crypt_type = -1; static void crypt_setdefault(void) { - char *def; size_t i; if (crypt_type != -1) return; - def = auth_getval("crypt_default"); - if (def == NULL) { - crypt_type = 0; - return; - } for (i = 0; i < sizeof(crypt_types) / sizeof(crypt_types[0]) - 1; i++) { - if (strcmp(def, crypt_types[i].name) == 0) { + if (strcmp(CRYPT_DEFAULT, crypt_types[i].name) == 0) { crypt_type = (int)i; return; } |
