home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1696 / header.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  2.1 KB  |  62 lines

  1. #include <stdio.h>
  2. #include <signal.h>
  3. #include <string.h>
  4. #include <time.h>
  5. #include <sys/types.h>
  6. #include <sys/stat.h>
  7. #include <utmp.h>
  8.  
  9. #define REST     180    /* rest period between checks        */
  10. #define    GRACE      60    /* grace time (sec) for user reply     */
  11. #define    KWAIT      20    /* time to wait after kill (in sec)     */
  12. #define    WARNING       1    /* a warning message            */
  13. #define    LOGOFF       2    /* a log-off message            */
  14. #define    NOLOGOFF   3    /* a log-off failure message         */
  15. #define SEC      60    /* seconds per minute           */
  16. #define START_DAY  8    /* start time of daytime cycle        */
  17. #define END_DAY   17    /* end time of daytime cycle        */
  18. #define DAY_MAX   3    /* daytime max idle allowed        */
  19. #define NIGHT_MAX 45    /* nighttime max idle allowed         */
  20. #define AB_MAX    60    /* nobody allowed past this unless immune */
  21.             
  22.             /* Path to the executibles        */
  23. #define BIN     "/usr/ulbin"
  24.  
  25.             /* Name of the autologout program    */
  26.             /* This must match here and the Makefile*/
  27. #define APROG    "autologout"
  28.  
  29.             /* Path to your favorite mailer        */
  30. #define MAIL      "/bin/mail"
  31.  
  32. #undef EXT_USERS    /* NOT IMPLEMENTED IN THIS VERSION    */
  33.             /* defined only if you allow some users */
  34.             /*   extended idle time            */
  35.  
  36. #define IMMUNE_USERS    /* defined only if you allow immunity   */
  37.             /*   to some users            */
  38.             /* HIGHLY RECOMMENDED!!!! NOTE: "root"  */
  39.             /*  will be immune unless you specify   */
  40.             /* below, but sysadm and such will NOT  */
  41.  
  42. #undef KILL_ROOT    /* Not recommended..should not, but     */
  43.             /*  could kill processes that you don't */
  44.             /*  want killed..../etc/cron(?)         */
  45.             /* This code needs further testing at   */
  46.             /*  this time - jbc                     */
  47.  
  48. #ifdef EXT_USERS    /* File to look up extended users */
  49. #define EXT_FILE    "extend.usr"    
  50. #endif
  51.  
  52. #ifdef IMMUNE_USERS    /* File to look up immune users */
  53. #define IMMUNE_FILE "/usr/adm/immune.usr" 
  54. #endif
  55.  
  56.             /* File to record warnings and logouts    */
  57. #define LOG_FILE    "/usr/adm/logout.log"
  58.  
  59. struct utmp *utmpp;     /* pointer to utmp file entry         */
  60. char         *ctime();     /* returns pointer to time string     */
  61. struct utmp *getutent(); /* returns next utmp file entry     */
  62.