Move call of md5_crypt from des_fcrypt to (des_)crypt where it belongs.
Only include md5_crypt suport for FreeBSD, other systems have already fix the export problems of UNIX crypt. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3352 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -99,9 +99,10 @@
|
||||
#define STATIC static
|
||||
#endif
|
||||
|
||||
/* It is really only FreeBSD that still suffers from MD5 based crypts,
|
||||
* for now let all platforms support it. */
|
||||
/* It is really only FreeBSD that still suffers from MD5 based crypts */
|
||||
#ifdef __FreeBSD__
|
||||
#define MD5_CRYPT_SUPPORT 1
|
||||
#endif
|
||||
#if MD5_CRYPT_SUPPORT
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@@ -319,6 +320,11 @@ const char *salt;
|
||||
{
|
||||
static char buff[14];
|
||||
|
||||
#if MD5_CRYPT_SUPPORT
|
||||
if (!strncmp(salt, "$1$", 3))
|
||||
return crypt_md5(buf, salt);
|
||||
#endif
|
||||
|
||||
return(des_fcrypt(buf,salt,buff));
|
||||
}
|
||||
|
||||
@@ -337,11 +343,6 @@ char *ret;
|
||||
unsigned char *b=bb;
|
||||
unsigned char c,u;
|
||||
|
||||
#if MD5_CRYPT_SUPPORT
|
||||
if (!strncmp(salt, "$1$", 3))
|
||||
return crypt_md5(buf, salt);
|
||||
#endif
|
||||
|
||||
/* eay 25/08/92
|
||||
* If you call crypt("pwd","*") as often happens when you
|
||||
* have * as the pwd field in /etc/passwd, the function
|
||||
|
Reference in New Issue
Block a user