home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / uucp / Uucp.framework / policy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-24  |  30.5 KB  |  720 lines

  1. /* policy.h
  2.    Configuration file for policy decisions.  To be edited on site.
  3.  
  4.    Copyright (C) 1991, 1992, 1993, 1994, 1995 Ian Lance Taylor
  5.  
  6.    This file is part of the Taylor UUCP package.
  7.  
  8.    This program is free software; you can redistribute it and/or
  9.    modify it under the terms of the GNU General Public License as
  10.    published by the Free Software Foundation; either version 2 of the
  11.    License, or (at your option) any later version.
  12.  
  13.    This program is distributed in the hope that it will be useful, but
  14.    WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.    General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with this program; if not, write to the Free Software
  20.    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  21.  
  22.    The author of the program may be contacted at ian@airs.com or
  23.    c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
  24.    */
  25.  
  26. #include "pathnames.h"
  27.  
  28. #define OWNER        _STR_OWNER
  29. #define VERSION        _STR_VERSION
  30. #define SBINDIR        _PATH_SBINDIR
  31. #define OLDCONFIGLIB    _PATH_OLDCONFIGLIB
  32. #define NEWCONFIGLIB    _PATH_NEWCONFIGLIB
  33. #define SPOOLBASEDIR    _PATH_SPOOLBASEDIR
  34.  
  35. #define environ (*_NSGetEnviron())
  36.  
  37. /* This header file contains macro definitions which must be set by
  38.    each site before compilation.  The first few are system
  39.    characteristics that can not be easily discovered by the
  40.    configuration script.  Most are configuration decisions that must
  41.    be made by the local administrator.  */
  42.  
  43. /* System characteristics.  */
  44.  
  45. /* This code tries to use several ANSI C features, including
  46.    prototypes, stdarg.h, the const qualifier and the types void
  47.    (including void * pointers) and unsigned char.  By default it will
  48.    use these features if the compiler defines __STDC__.  If your
  49.    compiler supports these features but does not define __STDC__, you
  50.    should set ANSI_C to 1.  If your compiler does not support these
  51.    features but defines __STDC__ (no compiler should do this, in my
  52.    opinion), you should set ANSI_C to 0.  In most cases (or if you're
  53.    not sure) just leave the line below commented out.  */
  54. /* #define ANSI_C 1 */
  55.  
  56. /* Set USE_STDIO to 1 if data files should be read using the stdio
  57.    routines (fopen, fread, etc.) rather than the UNIX unbuffered I/O
  58.    calls (open, read, etc.).  Unless you know your stdio is really
  59.    rotten, you should leave this as 1.  */
  60. #define USE_STDIO 1
  61.  
  62. /* Exactly one of the following macros must be set to 1.  Many modern
  63.    systems support more than one of these choices through some form of
  64.    compilation environment, in which case the setting will depend on
  65.    the compilation environment you use.  If you have a reasonable
  66.    choice between options, I suspect that TERMIO or TERMIOS will be
  67.    more efficient than TTY, but I have not done any head to head
  68.    comparisons.
  69.  
  70.    If you don't set any of these macros, the code below will guess.
  71.    It will doubtless be wrong on some systems.
  72.  
  73.    HAVE_BSD_TTY -- Use the 4.2BSD tty routines
  74.    HAVE_SYSV_TERMIO -- Use the System V termio routines
  75.    HAVE_POSIX_TERMIOS -- Use the POSIX termios routines
  76.    */
  77. #define HAVE_BSD_TTY 1
  78. #define HAVE_SYSV_TERMIO 0
  79. #define HAVE_POSIX_TERMIOS 0
  80.  
  81. /* This code tries to guess which terminal driver to use if you did
  82.    not make a choice above.  It is in this file to make it easy to
  83.    figure out what's happening if something goes wrong.  */
  84.  
  85. #if HAVE_BSD_TTY + HAVE_SYSV_TERMIO + HAVE_POSIX_TERMIOS == 0
  86. #if HAVE_TERMIOS_H
  87. #undef HAVE_POSIX_TERMIOS
  88. #define HAVE_POSIX_TERMIOS 1
  89. #else /* ! HAVE_TERMIOS_H */
  90. #if HAVE_CBREAK
  91. #undef HAVE_BSD_TTY
  92. #define HAVE_BSD_TTY 1
  93. #else /* ! HAVE_CBREAK */
  94. #undef HAVE_SYSV_TERMIO
  95. #define HAVE_SYSV_TERMIO 1
  96. #endif /* ! HAVE_CBREAK */
  97. #endif /* ! HAVE_TERMIOS_H */
  98. #endif /* HAVE_BSD_TTY + HAVE_SYSV_TERMIO + HAVE_POSIX_TERMIOS == 0 */
  99.  
  100. /* On some systems a write to a serial port will block even if the
  101.    file descriptor has been set to not block.  File transfer can be
  102.    more efficient if the package knows that a write to the serial port
  103.    will not block; however, if the write does block unexpectedly then
  104.    data loss is possible at high speeds.
  105.  
  106.    If writes to a serial port always block even when requested not to,
  107.    you should set HAVE_UNBLOCKED_WRITES to 0; otherwise you should set
  108.    it to 1.  In general on System V releases without STREAMS-based
  109.    ttys (e.g., before SVR4) HAVE_UNBLOCKED_WRITES should be 0 and on
  110.    BSD or SVR4 it should be 1.
  111.  
  112.    If HAVE_UNBLOCKED_WRITES is set to 1 when it should be 0 you may
  113.    see an unexpectedly large number of transmission errors, or, if you
  114.    have hardware handshaking, transfer times may be lower than
  115.    expected (but then, they always are).  If HAVE_UNBLOCKED_WRITES is
  116.    set to 0 when it should be 1, file transfer will use more CPU time
  117.    than necessary.  If you are unsure, setting HAVE_UNBLOCKED_WRITES
  118.    to 0 should always be safe.  */
  119. #define HAVE_UNBLOCKED_WRITES 1
  120.  
  121. /* When the code does do a blocking write, it wants to write the
  122.    largest amount of data which the kernel will accept as a single
  123.    unit.  On BSD this is typically the value of OBUFSIZ in
  124.    <sys/tty.h>, usually 100.  On System V before SVR4 this is
  125.    typically the size of a clist, CLSIZE in <sys/tty.h>, which is
  126.    usually 64.  On SVR4, which uses STREAMS-based ttys, 2048 is
  127.    reasonable.  Define SINGLE_WRITE to the correct value for your
  128.    system.  If SINGLE_WRITE is too large, data loss may occur.  If
  129.    SINGLE_WRITE is too small, file transfer will use more CPU time
  130.    than necessary.  If you have no idea, 64 should work on most modern
  131.    systems.  */
  132. #define SINGLE_WRITE 64
  133.  
  134. /* Some tty drivers, such as those from SCO and AT&T's Unix PC, have a
  135.    bug in the implementation of ioctl() that causes CLOCAL to be
  136.    ineffective until the port is opened a second time.  If
  137.    HAVE_CLOCAL_BUG is set to 1, code will be added to do this second
  138.    open on the port.  Set this if you are getting messages that say
  139.    "Line disconnected" while in the dial chat script after only
  140.    writing the first few characters to the port.  This bug causes the
  141.    resetting of CLOCAL to have no effect, so the "\m" (require
  142.    carrier) escape sequence won't function properly in dialer chat
  143.    scripts.  */
  144. #define    HAVE_CLOCAL_BUG    0
  145.  
  146. /* On some systems, such as SCO Xenix, resetting DTR on a port
  147.    apparently prevents getty from working on the port, and thus
  148.    prevents anybody from dialing in.  If HAVE_RESET_BUG is set to 1,
  149.    DTR will not be reset when a serial port is closed.  */
  150. #define HAVE_RESET_BUG 0
  151.  
  152. /* The Sony NEWS reportedly handles no parity by clearing both the odd
  153.    and even parity bits in the sgtty structure, unlike most BSD based
  154.    systems in which no parity is indicated by setting both the odd and
  155.    even parity bits.  Setting HAVE_PARITY_BUG to 1 will handle this
  156.    correctly.  */
  157. #define HAVE_PARITY_BUG 0
  158.  
  159. #if HAVE_BSD_TTY
  160. #ifdef sony
  161. #undef HAVE_PARITY_BUG
  162. #define HAVE_PARITY_BUG 1
  163. #endif
  164. #endif
  165.  
  166. /* On Ultrix 4.0, at least, setting CBREAK causes input characters to
  167.    be stripped, regardless of the setting of LPASS8 and LLITOUT.  This
  168.    can be worked around by using the termio call to reset ISTRIP.
  169.    This probably does not apply to any other operating system.
  170.    Setting HAVE_STRIP_BUG to 1 will use this workaround.  */
  171. #define HAVE_STRIP_BUG 0
  172.  
  173. #if HAVE_BSD_TTY
  174. #ifdef __ultrix__
  175. #ifndef ultrix
  176. #define ultrix
  177. #endif
  178. #endif
  179. #ifdef ultrix
  180. #undef HAVE_STRIP_BUG
  181. #define HAVE_STRIP_BUG 1
  182. #endif
  183. #endif
  184.  
  185. /* If your system implements full duplex pipes, set
  186.    HAVE_FULLDUPLEX_PIPES to 1.  Everything should work fine if you
  187.    leave it set to 0, but setting it to 1 can be slightly more
  188.    efficient.  */
  189. #define HAVE_FULLDUPLEX_PIPES 0
  190.  
  191. /* TIMES_TICK is the fraction of a second which times(2) returns (for
  192.    example, if times returns 100ths of a second TIMES_TICK should be
  193.    set to 100).  On a true POSIX system (one which has the sysconf
  194.    function and also has _SC_CLK_TCK defined in <unistd.h>) TIMES_TICK
  195.    may simply be left as 0.  On some systems the environment variable
  196.    HZ is what you want for TIMES_TICK, but on some other systems HZ
  197.    has the wrong value; check the man page.  If you leave this set to
  198.    0, the code will try to guess; it will doubtless be wrong on some
  199.    non-POSIX systems.  If TIMES_TICK is wrong the code may report
  200.    incorrect file transfer times in the statistics file, but on many
  201.    systems times(2) will actually not be used and this value will not
  202.    matter at all.  */
  203. #define TIMES_TICK 0
  204.  
  205. /* If your system does not support saved set user ID, set
  206.    HAVE_SAVED_SETUID to 0.  However, this is ignored if your system
  207.    has the setreuid function.  Most modern Unixes have one or the
  208.    other.  If your system has the setreuid function, don't worry about
  209.    this define, or about the following discussion.
  210.  
  211.    If you set HAVE_SAVED_SETUID to 0, you will not be able to use uucp
  212.    to transfer files that the uucp user can not read.  Basically, you
  213.    will only be able to use uucp on world-readable files.  If you set
  214.    HAVE_SAVED_SETUID to 1, but your system does not have saved set
  215.    user ID, uucp will fail with an error message whenever anybody
  216.    other than the uucp user uses it.  */
  217. #define HAVE_SAVED_SETUID 1
  218.  
  219. /* On some systems, such as 4.4BSD-Lite, NetBSD, the DG Aviion and,
  220.    possibly, the RS/6000, the setreuid function is broken.  It should
  221.    be possible to use setreuid to swap the real and effective user
  222.    ID's, but on some systems it will not change the real user ID (I
  223.    believe this is due to a misreading of the POSIX standard).  On
  224.    such a system you must set HAVE_BROKEN_SETREUID to 1; if you do
  225.    not, you will get error messages from setreuid.  Systems on which
  226.    setreuid exists but is broken pretty much always have saved setuid.  */
  227. #define HAVE_BROKEN_SETREUID 0
  228.  
  229. /* On a few systems, such as NextStep 3.3, the POSIX macro F_SETLKW is
  230.    defined, but does not work.  On such systems, you must set
  231.    HAVE_BROKEN_SETLKW to 1.  If you do not, uux will hang, or log
  232.    peculiar error messages, every time it is run.  */
  233. #define HAVE_BROKEN_SETLKW 1
  234.  
  235. /* On the 3B2, and possibly other systems, nap takes an argument in
  236.    hundredths of a second rather than milliseconds.  I don't know of
  237.    any way to test for this.  Set HAVE_HUNDREDTHS_NAP to 1 if this is
  238.    true on your system.  This does not matter if your system does not
  239.    have the nap function.  */
  240. #define HAVE_HUNDREDTHS_NAP 0
  241.  
  242. /* Set MAIL_PROGRAM to a program which can be used to send mail.  It
  243.    will be used for mail to both local and remote users.  Set
  244.    MAIL_PROGRAM_TO_BODY to 1 if the recipient should be specified as a
  245.    To: line in the body of the message; otherwise, the recipient will
  246.    be provided as an argument to MAIL_PROGRAM.  Set
  247.    MAIL_PROGRAM_SUBJECT_BODY if the subject should be specified as a
  248.    Subject: line in the body of the message; otherwise, the subject
  249.    will be provided using the -s option to MAIL_PROGRAM (if your mail
  250.    program does not support the -s option, you must set
  251.    MAIL_PROGRAM_SUBJECT_BODY to 1).  If your system uses sendmail, use
  252.    the sendmail choice below.  Otherwise, select one of the other
  253.    choices as appropriate.  */
  254. #if 1
  255. #define MAIL_PROGRAM "/usr/lib/sendmail -t"
  256. #define MAIL_PROGRAM_TO_BODY 1
  257. #define MAIL_PROGRAM_SUBJECT_BODY 1
  258. #endif
  259. #if 0
  260. #define MAIL_PROGRAM "/usr/ucb/mail"
  261. #define MAIL_PROGRAM_TO_BODY 0
  262. #define MAIL_PROGRAM_SUBJECT_BODY 0
  263. #endif
  264. #if 0
  265. #define MAIL_PROGRAM "/bin/mail"
  266. #define MAIL_PROGRAM_TO_BODY 0
  267. #define MAIL_PROGRAM_SUBJECT_BODY 1
  268. #endif
  269.  
  270. /* Set PS_PROGRAM to the program to run to get a process status,
  271.    including the arguments to pass it.  This is used by ``uustat -p''.
  272.    Set HAVE_PS_MULTIPLE to 1 if a comma separated list of process
  273.    numbers may be appended (e.g. ``ps -flp1,10,100'').  Otherwise ps
  274.    will be invoked several times, with a single process number append
  275.    each time.  The default definitions should work on most systems,
  276.    although some (such as the NeXT) will complain about the 'p'
  277.    option; for those, use the second set of definitions.  The third
  278.    set of definitions are appropriate for System V.  To use the second
  279.    or third set of definitions, change the ``#if 1'' to ``#if 0'' and
  280.    change the appropriate ``#if 0'' to ``#if 1''.  */
  281. #if 1
  282. #define PS_PROGRAM "/bin/ps -lp"
  283. #define HAVE_PS_MULTIPLE 0
  284. #endif
  285. #if 0
  286. #define PS_PROGRAM "/bin/ps -l"
  287. #define HAVE_PS_MULTIPLE 0
  288. #endif
  289. #if 0
  290. #define PS_PROGRAM "/bin/ps -flp"
  291. #define HAVE_PS_MULTIPLE 1
  292. #endif
  293. #ifdef __QNX__
  294. /* Use this for QNX, along with HAVE_QNX_LOCKFILES.  */
  295. #undef PS_PROGRAM
  296. #undef HAVE_PS_MULTIPLE
  297. #define PS_PROGRAM "/bin/ps -l -n -p"
  298. #define HAVE_PS_MULTIPLE 0
  299. #endif
  300.  
  301. /* You must also specify the format of the lock files by setting
  302.    exactly one of the following macros to 1.  Check an existing lock
  303.    file to decide which of these choices is more appropriate.
  304.  
  305.    The HDB style is to write the locking process ID in ASCII, passed
  306.    to ten characters, followed by a newline.
  307.  
  308.    The V2 style is to write the locking process ID as four binary
  309.    bytes in the host byte order.  Many BSD derived systems use this
  310.    type of lock file, including the NeXT.
  311.  
  312.    SCO lock files are similar to HDB lock files, but always lock the
  313.    lowercase version of the tty (i.e., LCK..tty2a is created if you
  314.    are locking tty2A).  They are appropriate if you are using Taylor
  315.    UUCP on an SCO Unix, SCO Xenix, or SCO Open Desktop system.
  316.  
  317.    SVR4 lock files are also similar to HDB lock files, but they use a
  318.    different naming convention.  The filenames are LK.xxx.yyy.zzz,
  319.    where xxx is the major device number of the device holding the
  320.    special device file, yyy is the major device number of the port
  321.    device itself, and zzz is the minor device number of the port
  322.    device.
  323.  
  324.    Sequent DYNIX/ptx (but perhaps not Dynix 3.x) uses yet another
  325.    naming convention.  The lock file for /dev/ttyXA/XAAP is named
  326.    LCK..ttyXAAP.
  327.  
  328.    Coherent use a completely different method of terminal locking.
  329.    See unix/cohtty for details.  For locks other than for terminals,
  330.    HDB type lock files are used.
  331.  
  332.    QNX lock files are similar to HDB lock files except that the node
  333.    ID must be stored in addition to the process ID and for serial
  334.    devices the node ID must be included in the lock file name.  QNX
  335.    boxes are generally used in bunches, and all of them behave like
  336.    one big machine to some extent.  Thus, processes on different
  337.    machines will be sharing the files in the spool directory.  To
  338.    detect if a process has died and a lock is thus stale, you need the
  339.    node ID of the process as well as the process ID.  The process ID
  340.    is stored as a number written using ASCII digits padded to 10
  341.    characters, followed by a space, followed by the node ID written
  342.    using ASCII digits padded to 10 characters, followed by a newline.
  343.    The format for QNX lock files was made up just for Taylor UUCP.
  344.    QNX doesn't come with a version of UUCP.  */
  345. #define HAVE_V2_LOCKFILES 1
  346. #define HAVE_HDB_LOCKFILES 0
  347. #define HAVE_SCO_LOCKFILES 0
  348. #define HAVE_SVR4_LOCKFILES 0
  349. #define HAVE_SEQUENT_LOCKFILES 0
  350. #define HAVE_COHERENT_LOCKFILES 0
  351. #define HAVE_QNX_LOCKFILES 0
  352.  
  353. /* This tries to pick a default based on preprocessor definitions.
  354.    Ignore it if you have explicitly set one of the above values.  */
  355. #if HAVE_V2_LOCKFILES + HAVE_HDB_LOCKFILES + HAVE_SCO_LOCKFILES + HAVE_SVR4_LOCKFILES + HAVE_SEQUENT_LOCKFILES + HAVE_COHERENT_LOCKFILES + HAVE_QNX_LOCKFILES == 0
  356. #ifdef __QNX__
  357. #undef HAVE_QNX_LOCKFILES
  358. #define HAVE_QNX_LOCKFILES 1
  359. #else /* ! defined (__QNX__) */
  360. #ifdef __COHERENT__
  361. #undef HAVE_COHERENT_LOCKFILES
  362. #define HAVE_COHERENT_LOCKFILES 1
  363. #else /* ! defined (__COHERENT__) */
  364. #ifdef _SEQUENT_
  365. #undef HAVE_SEQUENT_LOCKFILES
  366. #define HAVE_SEQUENT_LOCKFILES 1
  367. #else /* ! defined (_SEQUENT) */
  368. #ifdef sco
  369. #undef HAVE_SCO_LOCKFILES
  370. #define HAVE_SCO_LOCKFILES 1
  371. #else /* ! defined (sco) */
  372. #ifdef __svr4__
  373. #undef HAVE_SVR4_LOCKFILES
  374. #define HAVE_SVR4_LOCKFILES 1
  375. #else /* ! defined (__svr4__) */
  376. /* Final default is HDB.  There's no way to tell V2 from HDB.  */
  377. #undef HAVE_HDB_LOCKFILES
  378. #define HAVE_HDB_LOCKFILES 1
  379. #endif /* ! defined (__svr4__) */
  380. #endif /* ! defined (sco) */
  381. #endif /* ! defined (_SEQUENT) */
  382. #endif /* ! defined (__COHERENT__) */
  383. #endif /* ! defined (__QNX__) */
  384. #endif /* no LOCKFILES define */
  385.  
  386. /* If your system supports Internet mail addresses (which look like
  387.    user@host.domain rather than system!user), HAVE_INTERNET_MAIL
  388.    should be set to 1.  This is checked by uuxqt and uustat when
  389.    sending notifications to the person who submitted the job.
  390.  
  391.    If your system does not understand addresses of the form user@host,
  392.    you must set HAVE_INTERNET_MAIL to 0.
  393.  
  394.    If your system does not understand addresses of the form host!user,
  395.    which is unlikely, you must set HAVE_INTERNET_MAIL to 1.
  396.  
  397.    If your system sends mail addressed to "A!B@C" to host C (i.e., it
  398.    parses the address as "(A!B)@C"), you must set HAVE_INTERNET_MAIL
  399.    to 1.
  400.  
  401.    If your system sends mail addressed to "A!B@C" to host A (i.e., it
  402.    parses the address as "A!(B@C)"), you must set HAVE_INTERNET_MAIL
  403.    to 0.
  404.  
  405.    Note that in general it is best to avoid addresses of the form
  406.    "A!B@C" because of this ambiguity of precedence.  UUCP will not
  407.    intentionally generate addresses of this form, but it can occur in
  408.    certain rather complex cases.  */
  409. #define HAVE_INTERNET_MAIL 1
  410.  
  411. /* Adminstrative decisions.  */
  412.  
  413. /* Set USE_RCS_ID to 1 if you want the RCS ID strings compiled into
  414.    the executable.  Leaving them out will decrease the executable
  415.    size.  Leaving them in will make it easier to determine which
  416.    version you are running.  */
  417. #define USE_RCS_ID 0
  418.  
  419. /* DEBUG controls how much debugging information is compiled into the
  420.    code.  If DEBUG is defined as 0, no sanity checks will be done and
  421.    no debugging messages will be compiled in.  If DEBUG is defined as
  422.    1 sanity checks will be done but there will still be no debugging
  423.    messages.  If DEBUG is 2 than debugging messages will be compiled
  424.    in.  When initially testing, DEBUG should be 2, and you should
  425.    probably leave it at 2 unless a small reduction in the executable
  426.    file size will be very helpful.  */
  427. #define DEBUG 2
  428.  
  429. /* Set HAVE_ENCRYPTED_PASSWORDS to 1 if you want login passwords to be
  430.    encrypted before comparing them against the values in the file.
  431.    This only applies when uucico is run with the -l or -e switches and
  432.    is doing its own login prompting.  Note that the passwords used are
  433.    from the UUCP password file, not the system /etc/passwd file.  See
  434.    the documentation for further details.  If you set this, you are
  435.    responsible for encrypting the passwords in the UUCP password file.
  436.    The function crypt will be used to do comparisons.  */
  437. #define HAVE_ENCRYPTED_PASSWORDS 0
  438.  
  439. /* Set the default grade to use for a uucp command if the -g option is
  440.    not used.  The grades, from highest to lowest, are 0 to 9, A to Z,
  441.    a to z.  */
  442. #define BDEFAULT_UUCP_GRADE ('N')
  443.  
  444. /* Set the default grade to use for a uux command if the -g option is
  445.    not used.  */
  446. #define BDEFAULT_UUX_GRADE ('N')
  447.  
  448. /* To compile in use of the new style of configuration files described
  449.    in the documentation, set HAVE_TAYLOR_CONFIG to 1.  */
  450. #define HAVE_TAYLOR_CONFIG 1
  451.  
  452. /* To compile in use of V2 style configuration files (L.sys, L-devices
  453.    and so on), set HAVE_V2_CONFIG to 1.  To compile in use of HDB
  454.    style configuration files (Systems, Devices and so on) set
  455.    HAVE_HDB_CONFIG to 1.  The files will be looked up in the
  456.    oldconfigdir directory as defined in the Makefile.
  457.  
  458.    You may set any or all of HAVE_TAYLOR_CONFIG, HAVE_V2_CONFIG and
  459.    HAVE_HDB_CONFIG to 1 (you must set at least one of the macros).
  460.    When looking something up (a system, a port, etc.) the new style
  461.    configuration files will be read first, followed by the V2
  462.    configuration files, followed by the HDB configuration files.  */
  463. #define HAVE_V2_CONFIG 0
  464. #define HAVE_HDB_CONFIG 0
  465.  
  466. /* Exactly one of the following macros must be set to 1.  The exact
  467.    format of the spool directories is explained in unix/spool.c.
  468.  
  469.    SPOOLDIR_V2 -- Use a Version 2 (original UUCP) style spool directory
  470.    SPOOLDIR_BSD42 -- Use a BSD 4.2 style spool directory
  471.    SPOOLDIR_BSD43 -- Use a BSD 4.3 style spool directory
  472.    SPOOLDIR_HDB -- Use a HDB (BNU) style spool directory
  473.    SPOOLDIR_ULTRIX -- Use an Ultrix style spool directory
  474.    SPOOLDIR_SVR4 -- Use a System V Release 4 spool directory
  475.    SPOOLDIR_TAYLOR -- Use a new style spool directory
  476.  
  477.    If you are not worried about compatibility with a currently running
  478.    UUCP, use SPOOLDIR_TAYLOR.  */
  479. #define SPOOLDIR_V2 0
  480. #define SPOOLDIR_BSD42 0
  481. #define SPOOLDIR_BSD43 0
  482. #define SPOOLDIR_HDB 0
  483. #define SPOOLDIR_ULTRIX 0
  484. #define SPOOLDIR_SVR4 0
  485. #define SPOOLDIR_TAYLOR 1
  486.  
  487. /* The status file generated by UUCP can use either the traditional
  488.    HDB upper case comments or new easier to read lower case comments.
  489.    This affects the display of uustat -m or uustat -q.  Some
  490.    third-party programs read these status files and expect them to be
  491.    in a certain format.  The default is to use the traditional
  492.    comments when using an HDB or SVR4 spool directory, and to use
  493.    lower case comments otherwise.  */
  494. #define USE_TRADITIONAL_STATUS (SPOOLDIR_HDB || SPOOLDIR_SVR4)
  495.  
  496. /* You must select which type of logging you want by setting exactly
  497.    one of the following to 1.  These control output to the log file
  498.    and to the statistics file.
  499.  
  500.    If you define HAVE_TAYLOR_LOGGING, each line in the log file will
  501.    look something like this:
  502.  
  503.    uucico uunet uucp (1991-12-10 09:04:34.45 16390) Receiving uunet/D./D.uunetSwJ72
  504.  
  505.    and each line in the statistics file will look something like this:
  506.  
  507.    uucp uunet (1991-12-10 09:04:40.20) received 2371 bytes in 5 seconds (474 bytes/sec)
  508.  
  509.    If you define HAVE_V2_LOGGING, each line in the log file will look
  510.    something like this:
  511.  
  512.    uucico uunet uucp (12/10-09:04 16390) Receiving uunet/D./D.uunetSwJ72
  513.  
  514.    and each line in the statistics file will look something like this:
  515.  
  516.    uucp uunet (12/10-09:04 16390) (692373862) received data 2371 bytes 5 seconds
  517.  
  518.    If you define HAVE_HDB_LOGGING, each program will by default use a
  519.    separate log file.  For uucico talking to uunet, for example, it
  520.    will be /usr/spool/uucp/.Log/uucico/uunet.  Each line will look
  521.    something like this:
  522.  
  523.    uucp uunet (12/10-09:04:22,16390,1) Receiving uunet/D./D.uunetSwJ72
  524.  
  525.    and each line in the statistics file will look something like this:
  526.  
  527.    uunet!uucp M (12/10-09:04:22) (C,16390,1) [ttyXX] <- 2371 / 5.000 secs, 474 bytes/sec
  528.  
  529.    The main reason to prefer one format over another is that you may
  530.    have shell scripts which expect the files to have a particular
  531.    format.  If you have none, choose whichever format you find more
  532.    appealing.  */
  533. #define HAVE_TAYLOR_LOGGING 1
  534. #define HAVE_V2_LOGGING 0
  535. #define HAVE_HDB_LOGGING 0
  536.  
  537. /* If QNX_LOG_NODE_ID is set to 1, log messages will include the QNX
  538.    node ID just after the process ID.  This is a policy decision
  539.    because it changes the log file entry format, which can break other
  540.    programs (e.g., some of the ones in the contrib directory) which
  541.    expect to read the standard log file format.  */
  542. #ifdef __QNX__
  543. #define QNX_LOG_NODE_ID 1
  544. #else
  545. #define QNX_LOG_NODE_ID 0
  546. #endif
  547.  
  548. /* If LOG_DEVICE_PREFIX is 1, log messages will give the full
  549.    pathname of a device rather than just the final component.  This is
  550.    important because on QNX //2/dev/ser2 refers to a different device
  551.    than //4/dev/ser2.  */
  552. #ifdef __QNX__
  553. #define LOG_DEVICE_PREFIX 1
  554. #else
  555. #define LOG_DEVICE_PREFIX 0
  556. #endif
  557.  
  558. /* If you would like the log, debugging and statistics files to be
  559.    closed after each message, set CLOSE_LOGFILES to 1.  This will
  560.    permit the log files to be easily moved.  If a log file does not
  561.    exist when a new message is written out, it will be created.
  562.    Setting CLOSE_LOGFILES to 1 will obviously require slightly more
  563.    processing time.  */
  564. #define CLOSE_LOGFILES 0
  565.  
  566. /* The name of the default spool directory.  If HAVE_TAYLOR_CONFIG is
  567.    set to 1, this may be overridden by the ``spool'' command in the
  568.    configuration file.  */
  569. #define SPOOLDIR SPOOLBASEDIR "/uucp"
  570. /* #define SPOOLDIR "/usr/spool/uucp" */
  571. /* #define SPOOLDIR "/var/spool/uucp" */
  572.  
  573. /* The name of the default public directory.  If HAVE_TAYLOR_CONFIG is
  574.    set to 1, this may be overridden by the ``pubdir'' command in the
  575.    configuration file.  Also, a particular system may be given a
  576.    specific public directory by using the ``pubdir'' command in the
  577.    system file.  */
  578. #define PUBDIR SPOOLBASEDIR "/uucppublic"
  579. /* #define PUBDIR "/usr/spool/uucppublic" */
  580. /* #define PUBDIR "/var/spool/uucppublic" */
  581.  
  582.    /* If you use other programs that also lock devices, such as cu or
  583.       uugetty, the other programs and UUCP must agree on whether a device
  584.       is locked.  This is typically done by creating a lock file in a
  585.       specific directory; the lock files are generally named
  586.       LCK..something or LK.something.  If the LOCKDIR macro is defined,
  587.       these lock files will be placed in the named directory; otherwise
  588.       they will be placed in the default spool directory.  On some HDB
  589.       systems the lock files are placed in /etc/locks.  On some they are
  590.       placed in /usr/spool/locks.  On the NeXT they are placed in
  591.       /usr/spool/uucp/LCK.  */
  592. /* #define LOCKDIR "/usr/spool/uucp" */
  593. /* #define LOCKDIR "/etc/locks" */
  594. /* #define LOCKDIR "/usr/spool/locks" */
  595. #define LOCKDIR SPOOLDIR "/LCK"
  596. /* #define LOCKDIR "/var/spool/lock" */
  597.  
  598. /* The default command path.  This is a space separated list of
  599.    directories.  Remote command executions requested by uux are looked
  600.    up using this path.  If you are using HAVE_TAYLOR_CONFIG, the
  601.    command path may be overridden for a particular system.  For most
  602.    systems, you should just make sure that the programs rmail and
  603.    rnews can be found using this path.  */
  604. #define CMDPATH "/bin /usr/bin /usr/ucb"
  605.  
  606. /* The default amount of free space to require for systems that do not
  607.    specify an amount with the ``free-space'' command.  This is only
  608.    used when talking to another instance of Taylor UUCP; if accepting
  609.    a file would not leave at least this many bytes free on the disk,
  610.    it will be refused.  */
  611. #define DEFAULT_FREE_SPACE (50000)
  612.  
  613. /* While a file is being received, Taylor UUCP will periodically check
  614.    to see if there is enough free space remaining on the disk.  If
  615.    there is not enough space available on the disk (as determined by
  616.    DEFAULT_FREE_SPACE, above, or the ``free-space'' command for the
  617.    system) the communication will be aborted.  The disk will be
  618.    checked each time FREE_SPACE_DELTA bytes are received.  Lower
  619.    values of FREE_SPACE_DELTA are less likely to fill up the disk, but
  620.    will also waste more time checking the amount of free space.  To
  621.    avoid checking the disk while the file is being received, set
  622.    FREE_SPACE_DELTA to 0.  */
  623. #define FREE_SPACE_DELTA (10240)
  624.  
  625. /* It is possible for an execute job to request to be executed using
  626.    sh(1), rather than execve(2).  This is such a security risk, it is
  627.    being disabled by default; to allow such jobs, set the following
  628.    macro to 1.  */
  629. #define ALLOW_SH_EXECUTION 0
  630.  
  631. /* If a command executed on behalf of a remote system takes a filename
  632.    as an argument, a security breach may be possible (note that on my
  633.    system neither of the default commands, rmail and rnews, take
  634.    filename arguments).  If you set ALLOW_FILENAME_ARGUMENTS to 0, all
  635.    arguments to a command will be checked; if any argument
  636.    1) starts with ../
  637.    2) contains the string /../
  638.    3) begins with a / but does not name a file that may be sent or
  639.       received (according to the specified ``remote-send'' and
  640.       ``remote-receive'')
  641.    the command will be rejected.  By default, any argument is
  642.    permitted. */
  643. #define ALLOW_FILENAME_ARGUMENTS 1
  644.  
  645. /* If you set FSYNC_ON_CLOSE to 1, all output files will be forced out
  646.    to disk using the fsync system call when they are closed.  This can
  647.    be useful if you can not afford to lose people's mail if the system
  648.    crashes.  However, not all systems have the fsync call, and it is
  649.    always less efficient to use it.  Note that some versions of SCO
  650.    Unix, and possibly other systems, make fsync a synonym for sync,
  651.    which is extremely inefficient.  */
  652. #define FSYNC_ON_CLOSE 0
  653.  
  654. #if HAVE_TAYLOR_LOGGING
  655.  
  656. /* The default log file when using HAVE_TAYLOR_LOGGING.  When using
  657.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
  658.    command in the configuration file.  */
  659. #define LOGFILE SPOOLDIR "/Log"
  660. /* #define LOGFILE "/usr/spool/uucp/Log" */
  661. /* #define LOGFILE "/var/spool/uucp/Log" */
  662.  
  663. /* The default statistics file when using HAVE_TAYLOR_LOGGING.  When
  664.    using HAVE_TAYLOR_CONFIG, this may be overridden by the
  665.    ``statfile'' command in the configuration file.  */
  666. #define STATFILE SPOOLDIR "/Stats"
  667. /* #define STATFILE "/usr/spool/uucp/Stats" */
  668. /* #define STATFILE "/var/spool/uucp/Stats" */
  669.  
  670. /* The default debugging file when using HAVE_TAYLOR_LOGGING.  When
  671.    using HAVE_TAYLOR_CONFIG, this may be overridden by the
  672.    ``debugfile'' command in the configuration file.  */
  673. #define DEBUGFILE SPOOLDIR "/Debug"
  674. /* #define DEBUGFILE "/usr/spool/uucp/Debug" */
  675. /* #define DEBUGFILE "/var/spool/uucp/Debug" */
  676.  
  677. #endif /* HAVE_TAYLOR_LOGGING */
  678.  
  679. #if HAVE_V2_LOGGING
  680.  
  681. /* The default log file when using HAVE_V2_LOGGING.  When using
  682.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
  683.    command in the configuration file.  */
  684. #define LOGFILE "/usr/spool/uucp/LOGFILE"
  685.  
  686. /* The default statistics file when using HAVE_V2_LOGGING.  When using
  687.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile''
  688.    command in the configuration file.  */
  689. #define STATFILE "/usr/spool/uucp/SYSLOG"
  690.  
  691. /* The default debugging file when using HAVE_V2_LOGGING.  When using
  692.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile''
  693.    command in the configuration file.  */
  694. #define DEBUGFILE "/usr/spool/uucp/DEBUG"
  695.  
  696. #endif /* HAVE_V2_LOGGING */
  697.  
  698. #if HAVE_HDB_LOGGING
  699.  
  700. /* The default log file when using HAVE_HDB_LOGGING.  When using
  701.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
  702.    command in the configuration file.  The first %s in the string will
  703.    be replaced by the program name (e.g. uucico); the second %s will
  704.    be replaced by the system name (if there is no appropriate system,
  705.    "ANY" will be used).  No other '%' character may appear in the
  706.    string.  */
  707. #define LOGFILE "/usr/spool/uucp/.Log/%s/%s"
  708.  
  709. /* The default statistics file when using HAVE_HDB_LOGGING.  When using
  710.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile''
  711.    command in the configuration file.  */
  712. #define STATFILE "/usr/spool/uucp/.Admin/xferstats"
  713.  
  714. /* The default debugging file when using HAVE_HDB_LOGGING.  When using
  715.    HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile''
  716.    command in the configuration file.  */
  717. #define DEBUGFILE "/usr/spool/uucp/.Admin/audit.local"
  718.  
  719. #endif /* HAVE_HDB_LOGGING */
  720.