home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <signal.h>
- #include <string.h>
- #include <time.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <utmp.h>
-
- #define REST 180 /* rest period between checks */
- #define GRACE 60 /* grace time (sec) for user reply */
- #define KWAIT 20 /* time to wait after kill (in sec) */
- #define WARNING 1 /* a warning message */
- #define LOGOFF 2 /* a log-off message */
- #define NOLOGOFF 3 /* a log-off failure message */
- #define SEC 60 /* seconds per minute */
- #define START_DAY 8 /* start time of daytime cycle */
- #define END_DAY 17 /* end time of daytime cycle */
- #define DAY_MAX 3 /* daytime max idle allowed */
- #define NIGHT_MAX 45 /* nighttime max idle allowed */
- #define AB_MAX 60 /* nobody allowed past this unless immune */
-
- /* Path to the executibles */
- #define BIN "/usr/ulbin"
-
- /* Name of the autologout program */
- /* This must match here and the Makefile*/
- #define APROG "autologout"
-
- /* Path to your favorite mailer */
- #define MAIL "/bin/mail"
-
- #undef EXT_USERS /* NOT IMPLEMENTED IN THIS VERSION */
- /* defined only if you allow some users */
- /* extended idle time */
-
- #define IMMUNE_USERS /* defined only if you allow immunity */
- /* to some users */
- /* HIGHLY RECOMMENDED!!!! NOTE: "root" */
- /* will be immune unless you specify */
- /* below, but sysadm and such will NOT */
-
- #undef KILL_ROOT /* Not recommended..should not, but */
- /* could kill processes that you don't */
- /* want killed..../etc/cron(?) */
- /* This code needs further testing at */
- /* this time - jbc */
-
- #ifdef EXT_USERS /* File to look up extended users */
- #define EXT_FILE "extend.usr"
- #endif
-
- #ifdef IMMUNE_USERS /* File to look up immune users */
- #define IMMUNE_FILE "/usr/adm/immune.usr"
- #endif
-
- /* File to record warnings and logouts */
- #define LOG_FILE "/usr/adm/logout.log"
-
- struct utmp *utmpp; /* pointer to utmp file entry */
- char *ctime(); /* returns pointer to time string */
- struct utmp *getutent(); /* returns next utmp file entry */
-