/*
 * Global definitions
 */

char	*dial[] = {
	"ttya", "ttyb", "ttyc", "ttyd", "ttye", 0
};				/* Dial-up terminals */
char	*ttyx = "/dev/ttyxxxxxxxxxxxxxx"; /* My terminal device pathname */

char	terms[64][16];		/* Logged on user terminals */
char	unm[10];		/* User name to log into */
char	pw[16];			/* Encrypted password of account */
char	buf[512];		/* General work buffer */
char	passbuf[16];		/* Password input buffer */

char 	*mytty = 0;		/* My terminal name */
int	moerr;			/* Interrupt or Quit during MOTD */
int	mail = 0;		/* Mail flag: 1 = mail, 0 = no mail */
int	motdflg = 0;		/* Print MOTD: 1 = No, 0 = Yes */
int	kflg = 0;		/* Flag to indicate timeout proc */
int	passflg = 0;		/* Password supplied on name line */

int	tmout();		/* Alarm clock expired */
int	mint();			/* Interrupt or Quit during MOTD */
int	quoflg = 0;		/* Is user over quota */
char   *ttyname();
int	ttyslot();
extern	char **environ;

char	*QFILE = QUOFILE;
struct	pwent	pwe;
struct	utmp	who;
struct	utsname	utsname;
struct	info	info;
struct	qent	q;

char	wbuf[4608];
char 	homedir[MAXHOMELEN] = "HOME=";
char	teletype[MAXTTYLEN] = "TTY=";
char	*envinit[] = {
	homedir,
	"PATH=:/bin:/usr/bin",
	"TERM=adm3a",
	teletype,
	"TZ=EST5EDT",
	0
};


char	*paddr[10] = {
	0, &pwe.passwd, &pwe.uid, &pwe.gid,
#ifdef	NICEFIELD
	&pwe.prio,
#endif
	0, 0, 0, &pwe.homedir, &pwe.shell };
int	plen[10] = {
#ifdef	NICEFIELD
	0, 13, 5, 5, 4, 0, 0, 0, 22, 0 };
#else
	0, 13, 5, 5, 0, 0, 0, 22, 0 };
#endif

int	qfd;
uint	qval;
short	usercnt = 0;		/* Number of users already logged in */

#ifdef	EXPSTUFF
struct	exp entry;
#endif


char	*errmsg[] = {
	"Bad name",
	"Bad password",
	"Resource shortage users=",
	"Over logon limit allowed",
	"Denied over logon limit",
	"Over quota",
	"No directory",
	"No shell",
	"Bad hash format",
	"No hashed password",
	"Bad/no /etc/passwd",
	"Bad /etc/passwd line",
	"Exceeded max number over logins",
	"No chgquo program",
	"Bad account status",
	"Account disabled by leader",
	"Dumb password -- change forced",
	"/bin/passwd program missing john!!!"
};

