/* * config.h -- * Included in the cpp-Makefile, this file contains defines which control * the making of GNU Finger. * * Id: config.h.netbsd,v 1.1 1998/07/22 12:08:23 is Exp ICSI (Berkeley) * $NetBSD: config.h.netbsd,v 1.2 1998/08/07 11:10:41 agc Exp $ */ #ifndef _CONFIG_H_ #define _CONFIG_H_ #undef SVR4 /* Define HAVE_X11 if you are using the X11 window system. */ #undef HAVE_X11 #undef HAVE_SUNVIEW #undef PRINT_WIDGET /* Change the definition of FingerDir if you don't want things in the default place. This directory contains the database of clients to poll, the serverhost file, and accumulated data about users. Change the definition of BinDir and EtcDir to suit your personal system setup. BinDir is where the user-callable programs go, (finger, fingerd), while EtcDir is where the inet daemons go (in.fingerd, in.cfingerd). Change the definition of MugShotPath to be a colon-separated list of directories to search for mugshots (faces). Note that this value should be surrounded by double quotes. */ #define FingerDir /var/run/fingerdir #define MugShotPath "/usr/pkg/images/finger" #define BinDir /usr/pkg/bin #define EtcDir /usr/pkg/sbin #define ManDir /usr/pkg/man #define ManExt 1 #define Man5Ext 5 #define Man8Ext 8 /* Binaries with names identical to standard UNIX versions may be prefixed e.g., "gfinger" instead of "finger". */ #define BinPrefix g /* Define X11Dir to the root of your X11 installation if you don't have it spread out around /usr/bin/X11, /usr/lib/X11, /usr/include/X11, etc. as is the default in the MIT distributions. Define this to /usr/openwin for Suns that don't have MIT X11 installed. */ #define X11Dir /usr/X11R6 /* Define to please your compiler (as chosen in Makefile) */ #define CcOptions -O #define CcLibs /* Install commands and flags. The ones below assume a BSD-style install. A script that has the required functionality can be found in support/install.sh */ #define InstallCmd install -c #define InstallBin InstallCmd -s -m 755 #define InstallScript InstallCmd -m 755 #define InstallMan InstallCmd -m 444 #define InstallData InstallCmd -m 444 /* NB: ./support/install-finger relies on these above defines being present in this file. If you comment them out, you will have to do the install by hand. */ /* Should we look up system accounting information to fill in the "What" field for each login? There are at least three good reasons for not enabling this feature: 1 - It entails a considerable overhead because in the worst case the entire (possibly large) accounting file has to be scanned once. 2 - It may constitute a breach of user privacy to the outside world. 3 - It is not really useful because all it gives you is the last, not the current command executed by the user. However, the accounting information can always be surpressed by specifying an empty "acctfile" hostconfig attribute, so there is no real reason to disable it here. */ #undef WANT_ACCT /* Default print widths in short finger output (one login per line). These refer to the real name, what, hostname, and location field, respectively. Since screen real estate is precious you want to adjust this according to wha is requried for local hostnames etc. It can be changed at runtime using the -width option. The field widths probably not add up to more than 49 or the output will exceed a standard 80 column tty width. (You might want to decrease this by one if your terminal driver cannot handle 80 character lines without inserting blank lines). */ #ifdef WANT_ACCT #define DEFAULT_WIDTHS 16, 7, 8, 17 #else #define DEFAULT_WIDTHS 24, 0, 12, 13 #endif /* **************************************************************** */ /* */ /* Defines for FACE parameters */ /* */ /* **************************************************************** */ /* Define MIT_MUGSHOTS if you store your mugshots in the same format as the Lisp machine mugshots used at ai.mit.edu. */ /* #define MIT_MUGSHOTS */ /* Define X11_MUGSHOTS if you store your mugshots in X11 bitmap format. */ /* #define X11_MUGSHOTS */ /* Define BITMAP_MUGSHOTS if you want to use the format supplied with GNU Finger. */ /* #define BITMAP_MUGSHOTS */ /* Define FACE_MUGSHOTS if your faces are stored in the Facesaver format from uunet.uu.net. *not yet tested* */ /* #define FACE_MUGSHOTS */ /* Define RAST_MUGSHOTS if your mugshots are all of Rastafarians. No, wait, I mean if your mugshots are stored in Sun (tm) rasterfile format. */ /* #define RAST_MUGSHOTS */ #ifdef PRINT_WIDGET /* Define PRINT_COMMAND to a parametrized string to build the print spooling command line. The first string parameter is the printer name, the second one a PostScript file containing the image to be printed. */ #define PRINT_COMMAND "/usr/ucb/lpr -P%s %s" /* Define DEFAULT_PRINTER to the printer name used in absence of the PRINTER environment variable. */ #define DEFAULT_PRINTER "ps" #endif /* PRINT_WIDGET */ /* **************************************************************** */ /* */ /* Defines for network configuration */ /* */ /* **************************************************************** */ /* Default number of seconds between polling cycles. */ #define DEFAULT_POLL_INTERVAL 30 /* Maximum number of clients to poll in one cycle. */ #define DEFAULT_POLL_COUNT 100 /* Default number of milliseconds before poll connection attempt times out. */ #define DEFAULT_CONNECT_TIMEOUT 1000000 /* Default number of milliseconds before read from poll connection times out. */ #define DEFAULT_POLL_TIMEOUT 10000000 /* How old the database files maintained by the polling daemon can get before the software suspects something is wrong and issues a warning. */ #define MIN_UPDATE_INTERVAL (4 * DEFAULT_POLL_INTERVAL) /* Define to a filename that should be looked for in user's home directories and executed to produce long finger output. Undefine to disable user script execution. */ #undef FINGERRC /* Define the timeout in seconds used in talking to an RFC 931 server. */ #define AUTH_TIMEOUT 10 /* Define NOBODY_USER to the name of a user the finger reply daemon should run as in case your inetd doesn't support such a user specification in /etc/inetd.conf. This also determines the user/group id fingerrc scripts are run with. Typically these values point to the anonymous user "nobody" to prevent private information from being given out inadvertedly. NEVER leave in.fingerd running as root and have the FINGERRC mechanism enabled. Even without FINGERRC, in.fingerd running as root will allow users to circumvent read restrictions on files. */ #define NOBODY_USER "nobody" /* Define USE_SYSLOG to the facility categeory under which you want error and warning message to be logged. Check /usr/include/syslog.h for appropriate categories, like LOG_DAEMON or LOG_LOCAL1. If you have an old 4.2BSD syslog (like Ultrix) that knows no facilities, define this anyway, to whatever you want. Leaving USE_SYSLOG undefined will route messages to standard error. This is not recommended because finger users will see error messages really meant for the system administrator. */ /* #undef USE_SYSLOG */ #define USE_SYSLOG LOG_LOCAL5 /* Define CPP_CMD if you want .plan files to be processed by cpp. If the first character of a .plan file is `#' it is passed through cpp before it is output. The following symbols are defined for convenience: LOCAL 0 or 1 depending on where the finger is coming from YEAR, MONTH, DAY, HOUR, MINUTE the current local time Actually, you can define CPP_CMD to be any command that understands -D options like cpp. So m4 would be fine, too, if you prefer that. NOTE: This feature is subsumed by the more general FINGERRC functionality and will disappear soon. Don't enable it if users currently don't rely on it. SECURITY NOTE: This feature should only be used if in.fingerd can be arranged to run as user nobody. Even then, a user could inadvertedly give out public, but possibly sensitive information using this feature, such as the contents of /etc/passwd. However, all such information would have to be world-readable, and therefore could easily be compromised using other means, such as copying or mailing to other hosts. Still, BEWARE! */ #undef CPP_CMD /* **************************************************************** */ /* */ /* Defines for OS configuration */ /* */ /* **************************************************************** */ /* * On the platforms mentioned in README.ICSI, the definitions * below shouldn't require changes (except maybe USE_HPCLUSTER). * If not, notify the maintainer. The same applies if you port * the software to a new platform. */ /* Define SYSV to enable various things that most System V things tend to do differently from real UNIXes (i.e., BSD). This includes the location of the mail spool and various system calls. SYSV is just an attempt to get things right most of the time, but you may have to replace more specific #ifdef's where this fails. */ #undef SYSV /* Define USE_LASTLOG if your system has a lastlog(5) database. This will cause finger to accurately initialize its user database from the information found in that file. */ #if !defined(SYSV) || defined(sgi) || defined(__osf__) || defined(SVR4) || defined(linux) #define USE_LASTLOG #endif /* Define USE_TTYENT if your system has a getttyent(3) function and you want to use the comment fields in the system's tty database file as a fallback resource for tty locations. */ #if !defined(SYSV) || defined(__osf__) #define USE_TTYENT #endif /* Define HAVE_UTMPX if your system supports an extended utmp database (including, among other things, full remote hostnames). Look for /usr/include/utmpx.h. */ #if defined(SVR4) #define HAVE_UTMPX #endif #undef HAVE_XUTMP /* Define HAVE_UTHOST if your utmp records contain the ut_host field recording the origin of remote logins (or the display names of X11 terminal emulators). This is a major win in determining the `Where' filed of finger packets. Check /usr/include/utmp.h to verify. */ #define HAVE_UTHOST #undef NEED_UALARM #undef NEED_FLOCK #undef NEED_GETUSERSHELL #define HAVE_GETDOMAINNAME /* Define KEYBOARD to a device name whose access time is indicative of console (e.g., keyboard or mouse) input. Same for KEYBOARD2 if there is more than one such device. Make sure these device names are NOT "console". */ #define KEYBOARD "kbd" #define KEYBOARD2 "mouse" #define MAILDIR "/var/mail" #ifdef __STRICT_BSD__ #define SIGRET int #endif #define HAVE_VFORK #define HAVE_DIRENT #undef HAVE_MEMORY #undef HAVE_RASTERFILE /* Accounting file location (defaults should work in most cases) */ #ifdef linux #define ACCT_FILE "/var/log/pacct" #endif /* Define USE_DBMALLOC only if you are a finger hacker and want to debug heap management. It assumes Conor P. Cahill's dbmalloc package is accessible with #include and -ldbmalloc. */ /* #define USE_DBMALLOC */ #define TTYLOCFILE "/usr/pkg/etc/fingerdir/ttylocs" /* File with miscellaneous host configuration info. */ #define HOSTCONFIGFILE "/usr/pkg/etc/fingerdir/hostconfig" /* Directory to look for special target scripts in */ #define TargetDir /usr/pkg/etc/fingerdir/targets #define TARGETDIR "/usr/pkg/etc/fingerdir/targets" #endif /* _CONFIG_H_ */