X-Git-Url: http://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/d9898ee81388d1eff40cf71e85d9ce9b5c1401fe..refs/tags/upstream/0.60.1:/checkpasswordmd5.c diff --git a/checkpasswordmd5.c b/checkpasswordmd5.c index d3333e4..a676b78 100644 --- a/checkpasswordmd5.c +++ b/checkpasswordmd5.c @@ -1,5 +1,5 @@ /* -** Copyright 1998 - 1999 Double Precision, Inc. See COPYING for +** Copyright 1998 - 2007 Double Precision, Inc. See COPYING for ** distribution information. */ @@ -13,7 +13,7 @@ #include "md5/md5.h" #include "auth.h" -static const char rcsid[]="$Id: checkpasswordmd5.c,v 1.7 2004/10/21 00:10:49 mrsam Exp $"; +static const char rcsid[]="$Id: checkpasswordmd5.c,v 1.8 2007/10/07 02:50:45 mrsam Exp $"; int authcheckpasswordmd5(const char *password, const char *encrypted_password) { @@ -27,5 +27,10 @@ int authcheckpasswordmd5(const char *password, const char *encrypted_password) { return (strcmp(encrypted_password+5, md5_hash_courier(password))); } + if (strncasecmp(encrypted_password, "{MD5RAW}", 8) == 0) + { + return (strcmp(encrypted_password+8, md5_hash_raw(password))); + } + return (-1); }