=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/passwd/Attic/yp_passwd.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/passwd/Attic/yp_passwd.c 1997/02/14 23:27:31 1.5 --- src/usr.bin/passwd/Attic/yp_passwd.c 1997/02/16 20:09:00 1.6 *************** *** 1,4 **** ! /* $OpenBSD: yp_passwd.c,v 1.5 1997/02/14 23:27:31 provos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: yp_passwd.c,v 1.6 1997/02/16 20:09:00 provos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. *************** *** 34,40 **** */ #ifndef lint /*static char sccsid[] = "from: @(#)yp_passwd.c 1.0 2/2/93";*/ ! static char rcsid[] = "$OpenBSD: yp_passwd.c,v 1.5 1997/02/14 23:27:31 provos Exp $"; #endif /* not lint */ #ifdef YP --- 34,40 ---- */ #ifndef lint /*static char sccsid[] = "from: @(#)yp_passwd.c 1.0 2/2/93";*/ ! static char rcsid[] = "$OpenBSD: yp_passwd.c,v 1.6 1997/02/16 20:09:00 provos Exp $"; #endif /* not lint */ #ifdef YP *************** *** 192,198 **** register char *p, *t; int tries; char salt[_PASSWORD_LEN], *crypt(), *getpass(); ! void pwd_gensalt __P(( char *, int, struct passwd *, char)); printf("Changing YP password for %s.\n", pw->pw_name); --- 192,198 ---- register char *p, *t; int tries; char salt[_PASSWORD_LEN], *crypt(), *getpass(); ! int pwd_gensalt __P(( char *, int, struct passwd *, char)); printf("Changing YP password for %s.\n", pw->pw_name); *************** *** 231,237 **** break; (void)printf("Mismatch; try again, EOF to quit.\n"); } ! pwd_gensalt( salt, _PASSWORD_LEN, pw, 'y' ); return(strdup(crypt(buf, salt))); } --- 231,240 ---- break; (void)printf("Mismatch; try again, EOF to quit.\n"); } ! if( !pwd_gensalt( salt, _PASSWORD_LEN, pw, 'y' )) { ! (void)printf("Couldn't generate salt.\n"); ! pw_error(NULL, 0, 0); ! } return(strdup(crypt(buf, salt))); }