opie_cfg.h revision 29967
1/* opie_cfg.h: Various configuration-type pieces of information for OPIE. 2 3%%% portions-copyright-cmetz-96 4Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights 5Reserved. The Inner Net License Version 2 applies to these portions of 6the software. 7You should have received a copy of the license with this software. If 8you didn't get a copy, you may request one from <license@inner.net>. 9 10Portions of this software are Copyright 1995 by Randall Atkinson and Dan 11McDonald, All Rights Reserved. All Rights under this copyright are assigned 12to the U.S. Naval Research Laboratory (NRL). The NRL Copyright Notice and 13License Agreement applies to this software. 14 15 History: 16 17 Modified by cmetz for OPIE 2.31. Added 4.4BSD-Lite pathnames.h 18 definitions from ftpd. Added struct spwd definition and 19 HAVE_SHADOW logic for SunOS C2 shadow password support. 20 Moved user locking config to configure script. Removed 21 options.h. 22 Modified by cmetz for OPIE 2.3. Splatted with opie_auto.h. 23 Obseleted many symbols. Changed OPIE_PASS_{MIN,MAX} to 24 OPIE_SECRET_{MIN,MAX}. Fixed SHADOW+UTMP definitions. 25 Removed a lot of symbols. 26 Modified by cmetz for OPIE 2.2. Got rid of ANSIPROTO and ARGS. 27 Got rid of TRUE and FALSE definitions. Moved UINT4 to 28 opie.h and removed UINT2. 29 Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration. 30 Gutted for autoconf. Split up for autoconf. 31 Written at NRL for OPIE 2.0. 32 33 History of opie_auto.h: 34 35 Modified by cmetz for OPIE 2.22. Support the Solaris TTYPROMPT drain 36 bamage on all systems -- it doesn't hurt others, and it's 37 not something Autoconf can check for yet. 38 Modified by cmetz for OPIE 2.2. Don't replace sigprocmask by ifdef. 39 Added configure check for LS_COMMAND. Added setreuid/setgid 40 band-aids. 41 Modified at NRL for OPIE 2.2. Require /etc/shadow for Linux to use 42 shadow passwords. 43 Modified at NRL for OPIE 2.11. Removed version defines. 44 Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration. 45 Gutted for autoconf. Split up for autoconf. 46 Written at NRL for OPIE 2.0. 47*/ 48 49#ifndef _OPIE_CFG_H 50#define _OPIE_CFG_H 1 51 52#define VERSION "2.31" 53#define DATE "Thursday, March 20, 1997" 54 55#ifndef unix 56#define unix 1 57#endif /* unix */ 58 59#include "config.h" 60 61/* System characteristics */ 62 63#if HAVE_GETUTXLINE && HAVE_UTMPX_H 64#define DOUTMPX 1 65#else /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 66#define DOUTMPX 0 67#endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ 68 69/* Adapted from the Autoconf hypertext info pages */ 70#include <sys/types.h> 71#if HAVE_DIRENT_H 72#include <dirent.h> 73#else /* HAVE_DIRENT_H */ 74#define dirent direct 75#if HAVE_SYS_NDIR_H 76#include <sys/ndir.h> 77#endif /* HAVE_SYS_NDIR_H */ 78#if HAVE_SYS_DIR_H 79#include <sys/dir.h> 80#endif /* HAVE_SYS_DIR_H */ 81#if HAVE_NDIR_H 82#include <ndir.h> 83#endif /* HAVE_NDIR_H */ 84#endif /* HAVE_DIRENT_H */ 85 86#ifndef MAIL_DIR 87#ifdef PATH_MAIL 88#define MAIL_DIR PATH_MAIL 89#else /* PATH_MAIL */ 90#ifdef _PATH_MAIL 91#define MAIL_DIR _PATH_MAIL 92#else /* _PATH_MAIL */ 93#ifdef _PATH_MAILDIR 94#define MAIL_DIR _PATH_MAILDIR 95#else /* _PATH_MAILDIR */ 96#define MAIL_DIR "/usr/spool/mail" 97#endif /* _PATH_MAILDIR */ 98#endif /* _PATH_MAIL */ 99#endif /* PATH_MAIL */ 100#endif /* MAIL_DIR */ 101 102#if HAVE_SHADOW_H && HAVE_GETSPNAM && HAVE_ENDSPENT 103#if defined(linux) && !HAVE_ETC_SHADOW 104#define HAVE_SHADOW 0 105#else /* defined(linux) && !HAVE_ETC_SHADOW */ 106#define HAVE_SHADOW 1 107#endif /* defined(linux) && !HAVE_ETC_SHADOW */ 108#endif /* HAVE_SHADOW_H && HAVE_GETSPNAM && HAVE_ENDSPENT */ 109 110#if HAVE_SUNOS_C2_SHADOW && !HAVE_SHADOW 111#undef HAVE_SHADOW 112#define HAVE_SHADOW 1 113#endif /* HAVE_SUNOS_C2_SHADOW && !HAVE_SHADOW */ 114 115/* If the user didn't specify, default to MD5 */ 116#ifndef MDX 117#define MDX 5 118#endif /* MDX */ 119 120#ifndef _PATH_BSHELL 121#define _PATH_BSHELL "/bin/sh" 122#endif 123 124#ifndef _PATH_DEVNULL 125#define _PATH_DEVNULL "/dev/null" 126#endif 127 128#ifndef _PATH_FTPUSERS 129#define _PATH_FTPUSERS "/etc/ftpusers" 130#endif 131 132#ifndef _PATH_FTPLOGINMESG 133#define _PATH_FTPLOGINMESG "/etc/ftpmotd" 134#endif /* _PATH_FTPLOGINMESG */ 135 136#ifndef _PATH_FTPWELCOME 137#define _PATH_FTPWELCOME "/etc/ftpwelcome" 138#endif /* _PATH_FTPWELCOME */ 139 140#ifndef _PATH_NOLOGIN 141#define _PATH_NOLOGIN "/etc/nologin" 142#endif /* _PATH_NOLOGIN */ 143 144#ifndef TTYGRPNAME 145#define TTYGRPNAME "tty" /* name of group to own ttys */ 146#endif 147 148#ifndef QUIET_LOGIN_FILE 149#define QUIET_LOGIN_FILE ".hushlogin" 150#endif 151 152#ifndef OPIE_ALWAYS_FILE 153#define OPIE_ALWAYS_FILE ".opiealways" 154#endif 155 156#ifndef OPIE_LOCK_TIMEOUT 157#define OPIE_LOCK_TIMEOUT (30*60) 158#endif 159 160#ifndef MOTD_FILE 161#define MOTD_FILE "/etc/motd" 162#endif 163 164#ifndef NBBY 165#define NBBY 8 /* Reasonable for modern systems */ 166#endif /* NBBY */ 167 168#ifndef LOGIN_PATH 169#define LOGIN_PATH "/usr/ucb:/bin:/usr/bin" 170#endif /* LOGIN_PATH */ 171 172#ifndef POINTER 173#define POINTER unsigned char * 174#endif /* POINTER */ 175 176#ifdef HAVE_SUNOS_C2_SHADOW 177struct spwd { 178 char *sp_pwdp; 179}; 180#endif /* HAVE_SUNOS_C2_SHADOW */ 181 182#define _OPIE 1 183#endif /* _OPIE_CFG_H */ 184