version 1.11, 1999/03/06 20:19:19 |
version 1.12, 1999/03/06 20:27:40 |
|
|
#include <string.h> |
#include <string.h> |
#include <termios.h> |
#include <termios.h> |
#include <unistd.h> |
#include <unistd.h> |
#include <login_cap.h> |
|
|
|
#ifdef SKEY |
#ifdef SKEY |
#include <skey.h> |
#include <skey.h> |
|
|
int ch, sectimeout, usemine; |
int ch, sectimeout, usemine; |
char *ap, *mypw, *ttynam, *tzn; |
char *ap, *mypw, *ttynam, *tzn; |
char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; |
char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; |
login_cap_t *lc = NULL; |
|
|
|
sectimeout = TIMEOUT; |
sectimeout = TIMEOUT; |
mypw = NULL; |
mypw = NULL; |
|
|
break; |
break; |
} |
} |
#endif |
#endif |
#if 0 |
|
if (!strcmp(mypw, crypt(s, mypw))) |
if (!strcmp(mypw, crypt(s, mypw))) |
break; |
break; |
#else |
|
lc = login_getpwclass(pw); |
|
if (lc->lc_style == NULL) |
|
lc->lc_style = login_getstyle(lc, NULL, "login"); |
|
if ((ch = auth_response(pw->pw_name, lc->lc_class, |
|
lc->lc_style, "response", NULL, "", s)) > 0) |
|
break; |
|
warnx("auth_response returned %d", ch); |
|
#endif |
|
} |
} |
else if (!strcmp(s, s1)) |
else if (!strcmp(s, s1)) |
break; |
break; |