home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3345 / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-17  |  6.7 KB  |  275 lines

  1. /*
  2.  * Copyright 1989, 1990, John F. Haugh II
  3.  * All rights reserved.
  4.  *
  5.  * Use, duplication, and disclosure prohibited without
  6.  * the express written permission of the author.
  7.  */
  8.  
  9. /*
  10.  * Configuration file for login.
  11.  *
  12.  *    @(#)config.h    3.4    14:43:20    12/18/90
  13.  */
  14.  
  15. /*
  16.  * Define DIALUP to use dialup password files.  Define PORTTIME
  17.  * to use the port time restriction file, see port.h for more
  18.  * information.
  19.  */
  20.  
  21. #define    DIALUP
  22. #define    PORTTIME
  23.  
  24. /*
  25.  * Define SHADOWPWD to use shadow [ unreadable ] password file.
  26.  * Release 3 has a requirement that SHADOWPWD always be defined.
  27.  * Define AUTOSHADOW to have root always copy sp_pwdp to pw_passwd
  28.  * for getpwuid() and getpwnam().  This provides compatibility for
  29.  * privileged applications which are shadow-ignorant.  YOU ARE
  30.  * ENCOURAGED TO NOT USE THIS OPTION UNLESS ABSOLUTELY NECESSARY.
  31.  */
  32.  
  33. #define    SHADOWPWD
  34. #undef    AUTOSHADOW
  35.  
  36. /*
  37.  * Define DOUBLESIZE to use 16 character passwords
  38.  */
  39.  
  40. #define DOUBLESIZE
  41.  
  42. /*
  43.  * Define OBSCURE to include hard password testing code.
  44.  */
  45.  
  46. #define    OBSCURE
  47.  
  48. /*
  49.  * Define PASSLENGTH to be shortest legal password
  50.  */
  51.  
  52. #define    PASSLENGTH    5
  53.  
  54. /*
  55.  * Define NOBLANK if you want all passwords prompted for, including
  56.  * empty ones.
  57.  
  58. #undef    NOBLANK
  59.  
  60. /*
  61.  * Define MAXDAYS to be the default maximum number of days a password
  62.  * is valid for when converting to shadow passwords.  Define MINDAYS
  63.  * to be the minimum number of days before a password may be changed.
  64.  * See pwconv.c for more details.
  65.  */
  66.  
  67. #define    MAXDAYS    10000
  68. #define    MINDAYS    0
  69.  
  70. /*
  71.  * Define NDEBUG for production versions
  72.  */
  73.  
  74. #define    NDEBUG
  75.  
  76. /*
  77.  * Define HZ if login must set HZ value
  78.  */
  79.  
  80. #define    HZ    "HZ=50"
  81.  
  82. /*
  83.  * Define TZ if login must set timezone
  84.  *
  85.  * The first example sets the variable directly.  The
  86.  * second example names a file which is read to determine
  87.  * the proper value.  The file consists of a single line
  88.  * of the form 'TZ=zone-name'
  89.  */
  90.  
  91. /* #define    TZ    "TZ=CST6CDT" */
  92. #define    TZ    "/etc/tzname"
  93.  
  94. /*
  95.  * Define the default PATH and SUPATH here.  PATH is for non-privileged
  96.  * users, SUPATH is for root.  The first pair are for real trusting
  97.  * systems, the second pair are for the paranoid ...
  98.  */
  99.  
  100. /* #define    PATH    "PATH=:/bin:/usr/bin"    */
  101. /* #define    SUPATH    "PATH=:/bin:/usr/bin:/etc" */
  102. #define    PATH    "PATH=/bin:/usr/bin"
  103. #define    SUPATH    "PATH=/bin:/usr/bin:/etc"
  104.  
  105. /*
  106.  * Define the mailbox directory
  107.  */
  108.  
  109. #define    MAILDIR    "/usr/spool/mail/"
  110.  
  111. /*
  112.  * Define AGING if you want the password aging checks made.
  113.  * Define WARNAGE to be the number of days notice a user receives
  114.  * of a soon to expire password.  Release 3 has a requirement that
  115.  * AGING always be defined.
  116.  */
  117.  
  118. #define    AGING
  119. #define    WARNAGE    10
  120.  
  121. /*
  122.  * Define MAILCHECK if you want the mailbox checked for new mail
  123.  *
  124.  * One of two messages are printed - `You have new mail.' or
  125.  * `You have mail.'.
  126.  */
  127.  
  128. #define    MAILCHECK
  129.  
  130. /*
  131.  * Define CONSOLE if you want ROOT restricted to a particular terminal.
  132.  *
  133.  * Use the name of the tty line if you only want a single line, or use
  134.  * the name of the file containing the permissible ports if you wish to
  135.  * allow root logins on more than one port.
  136.  */
  137.  
  138. /* #define    CONSOLE    "console"    /* root on /dev/console only */
  139. #define    CONSOLE    "/etc/consoles"        /* check /etc/consoles for a list */
  140.  
  141. /*
  142.  * Define NOLOGINS if you want to be able to deny non-root users logins.
  143.  * Logins will not be permitted if this file exists.
  144.  */
  145.  
  146. #define    NOLOGINS    "/etc/nologin"
  147.  
  148. /*
  149.  * Define NOUSE if you want to be able to declare accounts which can't
  150.  * be logged into.  Define NOLOGIN if you want it to be an su-only account.
  151.  */
  152.  
  153. #define    NOUSE    "NOUSE"
  154. #define    NOLOGIN    "NOLOGIN"
  155.  
  156. /*
  157.  * Define MOTD if you want the message of the day (/etc/motd) printed
  158.  * at login time.
  159.  */
  160.  
  161. #define    MOTD
  162.  
  163. /*
  164.  * Define HUSHLOGIN if you want the code added to avoid printing the
  165.  * motd if a file $HOME/.hushlogin exists.  This obviously only matters
  166.  * if any of MOTD, MAILCHECK or LASTLOG are #define'd.
  167.  */
  168.  
  169. #define    HUSHLOGIN
  170.  
  171. /*
  172.  * Define LASTLOG if you want a record made of logins in /usr/adm/lastlog.
  173.  */
  174.  
  175. #define    LASTLOG
  176.  
  177. /*
  178.  * Define FAILLOG if you want a record make of failed logins in
  179.  * /usr/adm/faillog.  See faillog.h for more details.  See fail(1L)
  180.  * for even still more details ...  Also, define FTMP to record utmp
  181.  * style records for failed logins.  FTMP is the name of a utmp-like
  182.  * file.  You can use who(1) instead of faillog(L), which is an
  183.  * advantage.  Define UNKNOWNS if you do want unknown user names
  184.  * recorded.  This can be a security hole since passwords are often
  185.  * entered mistakenly as user names.
  186.  */
  187.  
  188. #define    FAILLOG
  189. #define    FTMP    "/etc/ftmp"
  190. #define    UNKNOWNS
  191.  
  192. /*
  193.  * Define TTYPERM to be the initial terminal permissions.  Defining
  194.  * as 0600 will not allow messages, 0622 will.
  195.  */
  196.  
  197. #define    TTYPERM    0600
  198.  
  199. /*
  200.  * Define TTYTYPE to the be name of the port to terminal type
  201.  * mapping file.  This is used to set the environmental variable
  202.  * "TERM" to the correct terminal type.
  203.  */
  204.  
  205. #define    TTYTYPE    "/etc/ttytype"
  206.  
  207. /*
  208.  * Define QUOTAS if you want the code added in setup.c to support
  209.  * file ulimit and nice [ and umask as well ] setting from the password
  210.  * file.
  211.  */
  212.  
  213. #define    QUOTAS
  214.  
  215. /*
  216.  * Pick your version of DBM.  If you define either DBM or NDBM, you
  217.  * must define GETPWENT.  If you define NDBM you must define GETGRENT
  218.  * as well.
  219.  */
  220.  
  221. /* #define    DBM /* */
  222. #define    NDBM    /* */
  223.  
  224. /*
  225.  * Define file name for sulog.  If SULOG is not defined, there will be
  226.  * no logging.  This is NOT a good idea ...  We also define other file
  227.  * names.
  228.  */
  229.  
  230. #define    SULOG    "/usr/adm/sulog"
  231. #define    SUCON    "/dev/console"
  232. #define    PWDFILE    "/etc/passwd"
  233. #define    OPWDFILE "/etc/passwd-"
  234. #define    NPWDFILE "/etc/npasswd"
  235. #define    OSHADOW "/etc/shadow-"
  236. #define    NSHADOW "/etc/nshadow"
  237. #define    GRPFILE    "/etc/group"
  238. #define    OGRPFILE "/etc/group-"
  239. #define    NGRPFILE "/etc/ngroup"
  240.  
  241. /*
  242.  * Define PWDLOCK to be a locking semaphore for updating the password
  243.  * file.  GRPLOCK is the same for the group file.
  244.  */
  245.  
  246. #define    PWDLOCK    "/etc/passwd.lock"
  247. #define    GRPLOCK "/etc/group.lock"
  248. #define    SPWLOCK "/etc/shadow.lock"
  249.  
  250. /*
  251.  * Wierd stuff follows ...
  252.  *
  253.  *    The following macros exist solely to override stuff ...
  254.  *    You will probably want to change their values to suit your
  255.  *    fancy.
  256.  */
  257.  
  258. #define    ERASECHAR    '\b'
  259. #define    KILLCHAR    '\025'
  260. #define    UMASK        022
  261.  
  262. #define    ULIMIT    (1L<<20) /* Define if your UNIX supports ulimit() */
  263. #define    FGETPWENT    /* Define if library does not include FGETPWENT */
  264. #define    GETPWENT    /* Define if you want my GETPWENT(3) routines */
  265. #define    GETGRENT    /* Define if you want my GETGRENT(3) routines */
  266. #define    NEED_AL64    /* Define if library does not include a64l() */
  267.  
  268. /*
  269.  *    These macros control the contents of <pwd.h>.
  270.  */
  271.  
  272. #define    ATT_AGE        /* the pw_age field exists */
  273. #define    ATT_COMMENT    /* the pw_comment field exists */
  274. #undef    BSD_QUOTA    /* the pw_quota field exists */
  275.