forked from pool/whois
9f4f7e06b6
- enable use of crypt_gensalt to support all glibc supported algorithms - allow 8bit passwords read from file - support new blowfish $2y algorithm I've sent the patches to Marco d'Itri <md@linux.it>, he said he will include them in the next whois release. OBS-URL: https://build.opensuse.org/request/show/76616 OBS-URL: https://build.opensuse.org/package/show/network:utilities/whois?expand=0&rev=19
29 lines
847 B
Diff
29 lines
847 B
Diff
From 45731d21f551b72e10e211edfa1b3c4e2ed3f8ad Mon Sep 17 00:00:00 2001
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Thu, 14 Jul 2011 13:39:07 +0200
|
|
Subject: [PATCH whois 5/7] set default blowfish rounds to 5
|
|
|
|
five rounds is the crypt_blowfish default
|
|
---
|
|
mkpasswd.c | 4 ++--
|
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/mkpasswd.c b/mkpasswd.c
|
|
index 281d970..ee997ba 100644
|
|
--- a/mkpasswd.c
|
|
+++ b/mkpasswd.c
|
|
@@ -232,8 +232,8 @@ int main(int argc, char *argv[])
|
|
|
|
if (streq(salt_prefix, "$2a$")
|
|
|| streq(salt_prefix, "$2y$")) { /* OpenBSD Blowfish */
|
|
- if (rounds <= 4)
|
|
- rounds = 4;
|
|
+ if (rounds < 5)
|
|
+ rounds = 5;
|
|
/* actually for 2a it is the logarithm of the number of rounds */
|
|
snprintf(rounds_str, sizeof(rounds_str), "%02u$", rounds);
|
|
} else if (rounds_support && rounds)
|
|
--
|
|
1.7.3.4
|
|
|