diff options
author | Eray Aslan <eras@gentoo.org> | 2013-04-16 05:02:02 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2013-04-16 05:02:02 +0000 |
commit | b974735d997ffc41908b0a337f449f01af4ff6a9 (patch) | |
tree | 7ae1c28596bf252faafdc29be7fef5aae77c559e /net-proxy/squid/files | |
parent | old (diff) | |
download | gentoo-2-b974735d997ffc41908b0a337f449f01af4ff6a9.tar.gz gentoo-2-b974735d997ffc41908b0a337f449f01af4ff6a9.tar.bz2 gentoo-2-b974735d997ffc41908b0a337f449f01af4ff6a9.zip |
Fix ncsa_auth with glibc-2.17 - bug #464406
(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
Diffstat (limited to 'net-proxy/squid/files')
-rw-r--r-- | net-proxy/squid/files/squid-3.3.3-ncsa_auth.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/net-proxy/squid/files/squid-3.3.3-ncsa_auth.patch b/net-proxy/squid/files/squid-3.3.3-ncsa_auth.patch new file mode 100644 index 000000000000..3e4dd4ab6b6d --- /dev/null +++ b/net-proxy/squid/files/squid-3.3.3-ncsa_auth.patch @@ -0,0 +1,29 @@ +=== modified file 'helpers/basic_auth/NCSA/basic_ncsa_auth.cc' +--- helpers/basic_auth/NCSA/basic_ncsa_auth.cc 2012-11-15 22:26:23 +0000 ++++ helpers/basic_auth/NCSA/basic_ncsa_auth.cc 2013-04-16 00:26:10 +0000 +@@ -144,19 +144,20 @@ + rfc1738_unescape(user); + rfc1738_unescape(passwd); + u = (user_data *) hash_lookup(hash, user); ++ char *crypted = NULL; + if (u == NULL) { + SEND_ERR("No such user"); + #if HAVE_CRYPT +- } else if (strlen(passwd) <= 8 && strcmp(u->passwd, (char *) crypt(passwd, u->passwd)) == 0) { ++ } else if (strlen(passwd) <= 8 && (crypted = crypt(passwd, u->passwd)) && (strcmp(u->passwd, crypted) == 0)) { + // Bug 3107: crypt() DES functionality silently truncates long passwords. + SEND_OK(""); +- } else if (strlen(passwd) > 8 && strcmp(u->passwd, (char *) crypt(passwd, u->passwd)) == 0) { ++ } else if (strlen(passwd) > 8 && (crypted = crypt(passwd, u->passwd)) && (strcmp(u->passwd, crypted) == 0)) { + // Bug 3107: crypt() DES functionality silently truncates long passwords. + SEND_ERR("Password too long. Only 8 characters accepted."); + #endif +- } else if (strcmp(u->passwd, (char *) crypt_md5(passwd, u->passwd)) == 0) { ++ } else if ( (crypted = crypt_md5(passwd, u->passwd)) && strcmp(u->passwd, crypted) == 0) { + SEND_OK(""); +- } else if (strcmp(u->passwd, (char *) md5sum(passwd)) == 0) { ++ } else if ( (crypted = md5sum(passwd)) && strcmp(u->passwd, crypted) == 0) { + SEND_OK(""); + } else { + SEND_ERR("Wrong password"); + |