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