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