opie_cfg.h revision 29967
122347Spst/* opie_cfg.h: Various configuration-type pieces of information for OPIE. 222347Spst 329967Sache%%% portions-copyright-cmetz-96 429967SachePortions of this software are Copyright 1996-1997 by Craig Metz, All Rights 522347SpstReserved. The Inner Net License Version 2 applies to these portions of 622347Spstthe software. 722347SpstYou should have received a copy of the license with this software. If 822347Spstyou didn't get a copy, you may request one from <license@inner.net>. 922347Spst 1022347SpstPortions of this software are Copyright 1995 by Randall Atkinson and Dan 1122347SpstMcDonald, All Rights Reserved. All Rights under this copyright are assigned 1222347Spstto the U.S. Naval Research Laboratory (NRL). The NRL Copyright Notice and 1322347SpstLicense Agreement applies to this software. 1422347Spst 1522347Spst History: 1622347Spst 1729967Sache Modified by cmetz for OPIE 2.31. Added 4.4BSD-Lite pathnames.h 1829967Sache definitions from ftpd. Added struct spwd definition and 1929967Sache HAVE_SHADOW logic for SunOS C2 shadow password support. 2029967Sache Moved user locking config to configure script. Removed 2129967Sache options.h. 2222347Spst Modified by cmetz for OPIE 2.3. Splatted with opie_auto.h. 2322347Spst Obseleted many symbols. Changed OPIE_PASS_{MIN,MAX} to 2422347Spst OPIE_SECRET_{MIN,MAX}. Fixed SHADOW+UTMP definitions. 2522347Spst Removed a lot of symbols. 2622347Spst Modified by cmetz for OPIE 2.2. Got rid of ANSIPROTO and ARGS. 2722347Spst Got rid of TRUE and FALSE definitions. Moved UINT4 to 2822347Spst opie.h and removed UINT2. 2922347Spst Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration. 3022347Spst Gutted for autoconf. Split up for autoconf. 3122347Spst Written at NRL for OPIE 2.0. 3222347Spst 3322347Spst History of opie_auto.h: 3422347Spst 3522347Spst Modified by cmetz for OPIE 2.22. Support the Solaris TTYPROMPT drain 3622347Spst bamage on all systems -- it doesn't hurt others, and it's 3722347Spst not something Autoconf can check for yet. 3822347Spst Modified by cmetz for OPIE 2.2. Don't replace sigprocmask by ifdef. 3922347Spst Added configure check for LS_COMMAND. Added setreuid/setgid 4022347Spst band-aids. 4122347Spst Modified at NRL for OPIE 2.2. Require /etc/shadow for Linux to use 4222347Spst shadow passwords. 4322347Spst Modified at NRL for OPIE 2.11. Removed version defines. 4422347Spst Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration. 4522347Spst Gutted for autoconf. Split up for autoconf. 4622347Spst Written at NRL for OPIE 2.0. 4722347Spst*/ 4822347Spst 4929967Sache#ifndef _OPIE_CFG_H 5029967Sache#define _OPIE_CFG_H 1 5122347Spst 5229967Sache#define VERSION "2.31" 5329967Sache#define DATE "Thursday, March 20, 1997" 5429967Sache 5522347Spst#ifndef unix 5622347Spst#define unix 1 5722347Spst#endif /* unix */ 5822347Spst 5922347Spst#include "config.h" 6022347Spst 6122347Spst/* System characteristics */ 6222347Spst 6322347Spst#if HAVE_GETUTXLINE && HAVE_UTMPX_H 6422347Spst#define DOUTMPX 1 6522347Spst#else /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 6622347Spst#define DOUTMPX 0 6722347Spst#endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 6822347Spst 6922347Spst/* Adapted from the Autoconf hypertext info pages */ 7022373Spst#include <sys/types.h> 7122347Spst#if HAVE_DIRENT_H 7222347Spst#include <dirent.h> 7322347Spst#else /* HAVE_DIRENT_H */ 7422347Spst#define dirent direct 7522347Spst#if HAVE_SYS_NDIR_H 7622347Spst#include <sys/ndir.h> 7722347Spst#endif /* HAVE_SYS_NDIR_H */ 7822347Spst#if HAVE_SYS_DIR_H 7922347Spst#include <sys/dir.h> 8022347Spst#endif /* HAVE_SYS_DIR_H */ 8122347Spst#if HAVE_NDIR_H 8222347Spst#include <ndir.h> 8322347Spst#endif /* HAVE_NDIR_H */ 8422347Spst#endif /* HAVE_DIRENT_H */ 8522347Spst 8622347Spst#ifndef MAIL_DIR 8722347Spst#ifdef PATH_MAIL 8822347Spst#define MAIL_DIR PATH_MAIL 8922347Spst#else /* PATH_MAIL */ 9022347Spst#ifdef _PATH_MAIL 9122347Spst#define MAIL_DIR _PATH_MAIL 9222347Spst#else /* _PATH_MAIL */ 9322347Spst#ifdef _PATH_MAILDIR 9422347Spst#define MAIL_DIR _PATH_MAILDIR 9522347Spst#else /* _PATH_MAILDIR */ 9622347Spst#define MAIL_DIR "/usr/spool/mail" 9722347Spst#endif /* _PATH_MAILDIR */ 9822347Spst#endif /* _PATH_MAIL */ 9922347Spst#endif /* PATH_MAIL */ 10022347Spst#endif /* MAIL_DIR */ 10122347Spst 10229967Sache#if HAVE_SHADOW_H && HAVE_GETSPNAM && HAVE_ENDSPENT 10329967Sache#if defined(linux) && !HAVE_ETC_SHADOW 10422347Spst#define HAVE_SHADOW 0 10522347Spst#else /* defined(linux) && !HAVE_ETC_SHADOW */ 10622347Spst#define HAVE_SHADOW 1 10722347Spst#endif /* defined(linux) && !HAVE_ETC_SHADOW */ 10829967Sache#endif /* HAVE_SHADOW_H && HAVE_GETSPNAM && HAVE_ENDSPENT */ 10922347Spst 11029967Sache#if HAVE_SUNOS_C2_SHADOW && !HAVE_SHADOW 11129967Sache#undef HAVE_SHADOW 11229967Sache#define HAVE_SHADOW 1 11329967Sache#endif /* HAVE_SUNOS_C2_SHADOW && !HAVE_SHADOW */ 11422347Spst 11522347Spst/* If the user didn't specify, default to MD5 */ 11622347Spst#ifndef MDX 11722347Spst#define MDX 5 11822347Spst#endif /* MDX */ 11922347Spst 12022347Spst#ifndef _PATH_BSHELL 12122347Spst#define _PATH_BSHELL "/bin/sh" 12222347Spst#endif 12322347Spst 12422347Spst#ifndef _PATH_DEVNULL 12522347Spst#define _PATH_DEVNULL "/dev/null" 12622347Spst#endif 12722347Spst 12822347Spst#ifndef _PATH_FTPUSERS 12922347Spst#define _PATH_FTPUSERS "/etc/ftpusers" 13022347Spst#endif 13122347Spst 13229967Sache#ifndef _PATH_FTPLOGINMESG 13329967Sache#define _PATH_FTPLOGINMESG "/etc/ftpmotd" 13429967Sache#endif /* _PATH_FTPLOGINMESG */ 13529967Sache 13629967Sache#ifndef _PATH_FTPWELCOME 13729967Sache#define _PATH_FTPWELCOME "/etc/ftpwelcome" 13829967Sache#endif /* _PATH_FTPWELCOME */ 13929967Sache 14029967Sache#ifndef _PATH_NOLOGIN 14129967Sache#define _PATH_NOLOGIN "/etc/nologin" 14229967Sache#endif /* _PATH_NOLOGIN */ 14329967Sache 14422347Spst#ifndef TTYGRPNAME 14522347Spst#define TTYGRPNAME "tty" /* name of group to own ttys */ 14622347Spst#endif 14722347Spst 14822347Spst#ifndef QUIET_LOGIN_FILE 14922347Spst#define QUIET_LOGIN_FILE ".hushlogin" 15022347Spst#endif 15122347Spst 15222347Spst#ifndef OPIE_ALWAYS_FILE 15322347Spst#define OPIE_ALWAYS_FILE ".opiealways" 15422347Spst#endif 15522347Spst 15622347Spst#ifndef OPIE_LOCK_TIMEOUT 15722347Spst#define OPIE_LOCK_TIMEOUT (30*60) 15822347Spst#endif 15922347Spst 16022347Spst#ifndef MOTD_FILE 16122347Spst#define MOTD_FILE "/etc/motd" 16222347Spst#endif 16322347Spst 16422347Spst#ifndef NBBY 16522347Spst#define NBBY 8 /* Reasonable for modern systems */ 16622347Spst#endif /* NBBY */ 16722347Spst 16822347Spst#ifndef LOGIN_PATH 16922347Spst#define LOGIN_PATH "/usr/ucb:/bin:/usr/bin" 17022347Spst#endif /* LOGIN_PATH */ 17122347Spst 17222347Spst#ifndef POINTER 17322347Spst#define POINTER unsigned char * 17422347Spst#endif /* POINTER */ 17522347Spst 17629967Sache#ifdef HAVE_SUNOS_C2_SHADOW 17729967Sachestruct spwd { 17829967Sache char *sp_pwdp; 17929967Sache}; 18029967Sache#endif /* HAVE_SUNOS_C2_SHADOW */ 18129967Sache 18222347Spst#define _OPIE 1 18329967Sache#endif /* _OPIE_CFG_H */ 184