forked from pool/whois
- 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
889 B
Diff
29 lines
889 B
Diff
From b8cdda35e57303fa67e96165e8eb37a19e22171b Mon Sep 17 00:00:00 2001
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Thu, 14 Jul 2011 13:06:56 +0200
|
|
Subject: [PATCH whois 3/7] crypt_gensalt might change the prefix
|
|
|
|
It's undocumented behavior but be prepared for it.
|
|
---
|
|
mkpasswd.c | 4 +++-
|
|
1 files changed, 3 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/mkpasswd.c b/mkpasswd.c
|
|
index 59c7a58..8bdc7f3 100644
|
|
--- a/mkpasswd.c
|
|
+++ b/mkpasswd.c
|
|
@@ -331,7 +331,9 @@ int main(int argc, char *argv[])
|
|
fprintf(stderr, "crypt failed.\n");
|
|
exit(2);
|
|
}
|
|
- if (!strneq(result, salt_prefix, strlen(salt_prefix))) {
|
|
+ /* yes, using strlen(salt_prefix) on salt. It's not
|
|
+ * documented whether crypt_gensalt may change the prefix */
|
|
+ if (!strneq(result, salt, strlen(salt_prefix))) {
|
|
fprintf(stderr, _("Method not supported by crypt(3).\n"));
|
|
exit(2);
|
|
}
|
|
--
|
|
1.7.3.4
|
|
|