From 0bb59d1e91eaa5cf1890768a56905ba2a8a1826d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Wed, 3 Sep 1997 14:34:29 +0000 Subject: [PATCH] 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 --- lib/des/fcrypt.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/des/fcrypt.c b/lib/des/fcrypt.c index 65d592618..3b64c9f44 100644 --- a/lib/des/fcrypt.c +++ b/lib/des/fcrypt.c @@ -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