=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tcfs/Attic/unix_auth.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/tcfs/Attic/unix_auth.c 2000/06/19 20:06:19 1.2 --- src/usr.bin/tcfs/Attic/unix_auth.c 2000/06/19 22:42:29 1.3 *************** *** 23,44 **** #include "tcfserrors.h" int ! unix_auth (char **user, char **password, int flag) { char *luser, *passwd; struct passwd *passentry; ! luser = (char*)calloc (LOGIN_NAME_MAX, sizeof(char)); ! passwd = (char*)calloc (_PASSWORD_LEN, sizeof(char)); if (!luser || !passwd) ! tcfs_error (ER_MEM, NULL); if (flag) { passentry = getpwuid(getuid()); strlcpy(luser, passentry->pw_name, LOGIN_NAME_MAX); } else { ! printf ("Enter user: "); fgets(luser, LOGIN_NAME_MAX, stdin); luser[strlen(luser)-1] = '\0'; passentry = getpwnam(luser); --- 23,44 ---- #include "tcfserrors.h" int ! unix_auth(char **user, char **password, int flag) { char *luser, *passwd; struct passwd *passentry; ! luser = (char *)calloc(LOGIN_NAME_MAX, sizeof(char)); ! passwd = (char *)calloc(_PASSWORD_LEN, sizeof(char)); if (!luser || !passwd) ! tcfs_error(ER_MEM, NULL); if (flag) { passentry = getpwuid(getuid()); strlcpy(luser, passentry->pw_name, LOGIN_NAME_MAX); } else { ! printf("Enter user: "); fgets(luser, LOGIN_NAME_MAX, stdin); luser[strlen(luser)-1] = '\0'; passentry = getpwnam(luser); *************** *** 47,54 **** passwd = getpass("Password:"); if (passentry == NULL) { ! bzero (passwd, strlen(passwd)); ! return 0; } if (strcmp(crypt(passwd, passentry->pw_passwd), passentry->pw_passwd)) --- 47,54 ---- passwd = getpass("Password:"); if (passentry == NULL) { ! bzero(passwd, strlen(passwd)); ! return (0); } if (strcmp(crypt(passwd, passentry->pw_passwd), passentry->pw_passwd))