122347Spst/* opie_cfg.h: Various configuration-type pieces of information for OPIE. 222347Spst 329967Sache%%% portions-copyright-cmetz-96 492914SmarkmPortions of this software are Copyright 1996-1999 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 1792914Smarkm Modified by cmetz for OPIE 2.4. Removed NBBY definition. 1859121Skris Modified by cmetz for OPIE 2.32. Include <sys/types.h> before 1959121Skris <dirent.h> to make *BSD happy. 2029967Sache Modified by cmetz for OPIE 2.31. Added 4.4BSD-Lite pathnames.h 2129967Sache definitions from ftpd. Added struct spwd definition and 2229967Sache HAVE_SHADOW logic for SunOS C2 shadow password support. 2329967Sache Moved user locking config to configure script. Removed 2429967Sache options.h. 2522347Spst Modified by cmetz for OPIE 2.3. Splatted with opie_auto.h. 2622347Spst Obseleted many symbols. Changed OPIE_PASS_{MIN,MAX} to 2722347Spst OPIE_SECRET_{MIN,MAX}. Fixed SHADOW+UTMP definitions. 2822347Spst Removed a lot of symbols. 2922347Spst Modified by cmetz for OPIE 2.2. Got rid of ANSIPROTO and ARGS. 3022347Spst Got rid of TRUE and FALSE definitions. Moved UINT4 to 3122347Spst opie.h and removed UINT2. 3222347Spst Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration. 3322347Spst Gutted for autoconf. Split up for autoconf. 3422347Spst Written at NRL for OPIE 2.0. 3522347Spst 3622347Spst History of opie_auto.h: 3722347Spst 3822347Spst Modified by cmetz for OPIE 2.22. Support the Solaris TTYPROMPT drain 3922347Spst bamage on all systems -- it doesn't hurt others, and it's 4022347Spst not something Autoconf can check for yet. 4122347Spst Modified by cmetz for OPIE 2.2. Don't replace sigprocmask by ifdef. 4222347Spst Added configure check for LS_COMMAND. Added setreuid/setgid 4322347Spst band-aids. 4422347Spst Modified at NRL for OPIE 2.2. Require /etc/shadow for Linux to use 4522347Spst shadow passwords. 4622347Spst Modified at NRL for OPIE 2.11. Removed version defines. 4722347Spst Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration. 4822347Spst Gutted for autoconf. Split up for autoconf. 4922347Spst Written at NRL for OPIE 2.0. 5059121Skris 5159121Skris$FreeBSD$ 5222347Spst*/ 5322347Spst 5429967Sache#ifndef _OPIE_CFG_H 5529967Sache#define _OPIE_CFG_H 1 5622347Spst 5792914Smarkm#define VERSION "2.4" 5892914Smarkm#define DATE "Friday, January 19, 2001" 5929967Sache 6022347Spst#ifndef unix 6122347Spst#define unix 1 6222347Spst#endif /* unix */ 6322347Spst 6422347Spst#include "config.h" 6522347Spst 6622347Spst/* System characteristics */ 6722347Spst 6822347Spst#if HAVE_GETUTXLINE && HAVE_UTMPX_H 6922347Spst#define DOUTMPX 1 7022347Spst#else /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 7122347Spst#define DOUTMPX 0 7222347Spst#endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 7322347Spst 7459121Skris#include <sys/types.h> 7522347Spst/* Adapted from the Autoconf hypertext info pages */ 7622347Spst#if HAVE_DIRENT_H 7722347Spst#include <dirent.h> 7822347Spst#else /* HAVE_DIRENT_H */ 7922347Spst#define dirent direct 8022347Spst#if HAVE_SYS_NDIR_H 8122347Spst#include <sys/ndir.h> 8222347Spst#endif /* HAVE_SYS_NDIR_H */ 8322347Spst#if HAVE_SYS_DIR_H 8422347Spst#include <sys/dir.h> 8522347Spst#endif /* HAVE_SYS_DIR_H */ 8622347Spst#if HAVE_NDIR_H 8722347Spst#include <ndir.h> 8822347Spst#endif /* HAVE_NDIR_H */ 8922347Spst#endif /* HAVE_DIRENT_H */ 9022347Spst 9122347Spst#ifndef MAIL_DIR 9222347Spst#ifdef PATH_MAIL 9322347Spst#define MAIL_DIR PATH_MAIL 9422347Spst#else /* PATH_MAIL */ 9522347Spst#ifdef _PATH_MAIL 9622347Spst#define MAIL_DIR _PATH_MAIL 9722347Spst#else /* _PATH_MAIL */ 9822347Spst#ifdef _PATH_MAILDIR 9922347Spst#define MAIL_DIR _PATH_MAILDIR 10022347Spst#else /* _PATH_MAILDIR */ 10122347Spst#define MAIL_DIR "/usr/spool/mail" 10222347Spst#endif /* _PATH_MAILDIR */ 10322347Spst#endif /* _PATH_MAIL */ 10422347Spst#endif /* PATH_MAIL */ 10522347Spst#endif /* MAIL_DIR */ 10622347Spst 10729967Sache#if HAVE_SHADOW_H && HAVE_GETSPNAM && HAVE_ENDSPENT 10829967Sache#if defined(linux) && !HAVE_ETC_SHADOW 10922347Spst#define HAVE_SHADOW 0 11022347Spst#else /* defined(linux) && !HAVE_ETC_SHADOW */ 11122347Spst#define HAVE_SHADOW 1 11222347Spst#endif /* defined(linux) && !HAVE_ETC_SHADOW */ 11329967Sache#endif /* HAVE_SHADOW_H && HAVE_GETSPNAM && HAVE_ENDSPENT */ 11422347Spst 11529967Sache#if HAVE_SUNOS_C2_SHADOW && !HAVE_SHADOW 11629967Sache#undef HAVE_SHADOW 11729967Sache#define HAVE_SHADOW 1 11829967Sache#endif /* HAVE_SUNOS_C2_SHADOW && !HAVE_SHADOW */ 11922347Spst 12022347Spst/* If the user didn't specify, default to MD5 */ 12122347Spst#ifndef MDX 12222347Spst#define MDX 5 12322347Spst#endif /* MDX */ 12422347Spst 12522347Spst#ifndef _PATH_BSHELL 12622347Spst#define _PATH_BSHELL "/bin/sh" 12722347Spst#endif 12822347Spst 12922347Spst#ifndef _PATH_DEVNULL 13022347Spst#define _PATH_DEVNULL "/dev/null" 13122347Spst#endif 13222347Spst 13322347Spst#ifndef _PATH_FTPUSERS 13422347Spst#define _PATH_FTPUSERS "/etc/ftpusers" 13522347Spst#endif 13622347Spst 13729967Sache#ifndef _PATH_FTPLOGINMESG 13829967Sache#define _PATH_FTPLOGINMESG "/etc/ftpmotd" 13929967Sache#endif /* _PATH_FTPLOGINMESG */ 14029967Sache 14129967Sache#ifndef _PATH_FTPWELCOME 14229967Sache#define _PATH_FTPWELCOME "/etc/ftpwelcome" 14329967Sache#endif /* _PATH_FTPWELCOME */ 14429967Sache 14529967Sache#ifndef _PATH_NOLOGIN 14629967Sache#define _PATH_NOLOGIN "/etc/nologin" 14729967Sache#endif /* _PATH_NOLOGIN */ 14829967Sache 14922347Spst#ifndef TTYGRPNAME 15022347Spst#define TTYGRPNAME "tty" /* name of group to own ttys */ 15122347Spst#endif 15222347Spst 15322347Spst#ifndef QUIET_LOGIN_FILE 15422347Spst#define QUIET_LOGIN_FILE ".hushlogin" 15522347Spst#endif 15622347Spst 15722347Spst#ifndef OPIE_ALWAYS_FILE 15822347Spst#define OPIE_ALWAYS_FILE ".opiealways" 15922347Spst#endif 16022347Spst 16122347Spst#ifndef OPIE_LOCK_TIMEOUT 16222347Spst#define OPIE_LOCK_TIMEOUT (30*60) 16322347Spst#endif 16422347Spst 16522347Spst#ifndef MOTD_FILE 16622347Spst#define MOTD_FILE "/etc/motd" 16722347Spst#endif 16822347Spst 16922347Spst#ifndef LOGIN_PATH 17022347Spst#define LOGIN_PATH "/usr/ucb:/bin:/usr/bin" 17122347Spst#endif /* LOGIN_PATH */ 17222347Spst 17322347Spst#ifndef POINTER 17422347Spst#define POINTER unsigned char * 17522347Spst#endif /* POINTER */ 17622347Spst 17729967Sache#ifdef HAVE_SUNOS_C2_SHADOW 17829967Sachestruct spwd { 17929967Sache char *sp_pwdp; 18029967Sache}; 18129967Sache#endif /* HAVE_SUNOS_C2_SHADOW */ 18229967Sache 18322347Spst#define _OPIE 1 18429967Sache#endif /* _OPIE_CFG_H */ 185