> Luoqi Chen wrote: > > I spend half night yesterday to sort this mess out. If no one objects, > > I'll commit my fixes. (anyone volunteers to make the hat?) > > I know who gets the hat; please cool it on the fixes until the original > committer has finished. > > I'm watching this one closely, and I need to track it on Internat > as well. Not long now. > > M > -- > Mark Murray > Join the anti-SPAM movement: http://www.cauce.org > Ok, I'll let the original committer do it. For those who can't wait to try Matt's new VM system, the following diff will help you get by. After applied the patch, mv/cp/ln secure/lib/libcrypt/crypt.c to crypt-des.c in the same directory. (I hope this patch doesn't reveal any information that would harm national security :-)
-lq Index: lib/Makefile =================================================================== RCS file: /home/ncvs/src/lib/Makefile,v retrieving revision 1.87 diff -u -r1.87 Makefile --- Makefile 1998/12/17 23:02:11 1.87 +++ Makefile 1999/01/21 20:22:54 @@ -39,9 +39,7 @@ # Build both libraries. They have different names, so no harm, # and this avoids having stale libscrypt.* -.if exists(${.CURDIR}/../secure) && !defined(NOSECURE) && !defined(NOCRYPT) -_libcrypt= ../secure/lib/libcrypt libcrypt -.else +.if !defined(NOCRYPT) _libcrypt= libcrypt .endif Index: secure/lib/libcrypt/crypt.c =================================================================== RCS file: /home/ncvs/src/secure/lib/libcrypt/crypt.c,v retrieving revision 1.9 diff -u -r1.9 crypt.c --- crypt.c 1997/02/22 14:40:30 1.9 +++ crypt.c 1999/01/22 23:38:24 @@ -59,9 +59,8 @@ #include <sys/param.h> #include <pwd.h> #include <string.h> +#include "crypt.h" -char *crypt_md5(const char *pw, const char *salt); - /* We can't always assume gcc */ #ifdef __GNUC__ #define INLINE inline @@ -578,20 +577,26 @@ return(retval); } -char * -crypt(char *key, char *setting) +char * +crypt_des(pw, pl, sp, sl, passwd, token) + const unsigned char *pw; + const unsigned int pl; + const unsigned char *sp; + const unsigned int sl; + char * passwd; + char * token; { - int i; - u_long count, salt, l, r0, r1, keybuf[2]; - u_char *p, *q; - static u_char output[21]; + int i; + u_long count, salt, l, r0, r1, keybuf[2]; + u_char *p, *q; + u_char *key = pw, *setting = sp; + u_char *output = (u_char *)passwd; - if (!strncmp(setting, "$1$", 3)) - return crypt_md5(key, setting); + if (!*setting) + setting = key; if (!des_initialised) des_init(); - /* * Copy the key, shifting each character up by one bit To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message