version 1.10, 1996/11/05 18:23:49 |
version 1.11, 1996/11/09 06:39:41 |
|
|
#include <sys/time.h> |
#include <sys/time.h> |
#include <sys/resource.h> |
#include <sys/resource.h> |
#include <sys/file.h> |
#include <sys/file.h> |
|
#include <sys/wait.h> |
|
|
#include <err.h> |
#include <err.h> |
#include <errno.h> |
#include <errno.h> |
|
|
void motd __P((void)); |
void motd __P((void)); |
int rootterm __P((char *)); |
int rootterm __P((char *)); |
void sigint __P((int)); |
void sigint __P((int)); |
|
void sighup __P((int)); |
void sleepexit __P((int)); |
void sleepexit __P((int)); |
char *stypeof __P((char *)); |
char *stypeof __P((char *)); |
void timedout __P((int)); |
void timedout __P((int)); |
|
|
(void)alarm(timeout); |
(void)alarm(timeout); |
(void)signal(SIGQUIT, SIG_IGN); |
(void)signal(SIGQUIT, SIG_IGN); |
(void)signal(SIGINT, SIG_IGN); |
(void)signal(SIGINT, SIG_IGN); |
|
(void)signal(SIGHUP, sighup); |
(void)setpriority(PRIO_PROCESS, 0, 0); |
(void)setpriority(PRIO_PROCESS, 0, 0); |
|
|
openlog("login", LOG_ODELAY, LOG_AUTH); |
openlog("login", LOG_ODELAY, LOG_AUTH); |
|
|
ctime(&pwd->pw_expire)); |
ctime(&pwd->pw_expire)); |
|
|
/* Nothing else left to fail -- really log in. */ |
/* Nothing else left to fail -- really log in. */ |
|
(void)signal(SIGHUP, SIG_DFL); |
memset((void *)&utmp, 0, sizeof(utmp)); |
memset((void *)&utmp, 0, sizeof(utmp)); |
(void)time(&utmp.ut_time); |
(void)time(&utmp.ut_time); |
(void)strncpy(utmp.ut_name, username, sizeof(utmp.ut_name)); |
(void)strncpy(utmp.ut_name, username, sizeof(utmp.ut_name)); |
|
|
{ |
{ |
(void)sleep(5); |
(void)sleep(5); |
exit(eval); |
exit(eval); |
|
} |
|
|
|
void |
|
sighup(signum) |
|
int signum; |
|
{ |
|
if (username) |
|
badlogin(username); |
|
|
|
exit(W_EXITCODE(0, signum)); |
} |
} |