opie_cfg.h revision 22373
1/* opie_cfg.h: Various configuration-type pieces of information for OPIE.
2
3%%% portions-copyright-cmetz
4Portions of this software are Copyright 1996 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.3. Splatted with opie_auto.h.
18	        Obseleted many symbols. Changed OPIE_PASS_{MIN,MAX} to
19		OPIE_SECRET_{MIN,MAX}. Fixed SHADOW+UTMP definitions.
20		Removed a lot of symbols.
21        Modified by cmetz for OPIE 2.2. Got rid of ANSIPROTO and ARGS.
22                Got rid of TRUE and FALSE definitions. Moved UINT4 to
23                opie.h and removed UINT2.
24	Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration.
25		Gutted for autoconf. Split up for autoconf.
26	Written at NRL for OPIE 2.0.
27
28	History of opie_auto.h:
29
30	Modified by cmetz for OPIE 2.22. Support the Solaris TTYPROMPT drain
31		bamage on all systems -- it doesn't hurt others, and it's
32		not something Autoconf can check for yet.
33        Modified by cmetz for OPIE 2.2. Don't replace sigprocmask by ifdef.
34                Added configure check for LS_COMMAND. Added setreuid/setgid
35                band-aids.
36        Modified at NRL for OPIE 2.2. Require /etc/shadow for Linux to use
37                shadow passwords.
38        Modified at NRL for OPIE 2.11. Removed version defines.
39	Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration.
40		Gutted for autoconf. Split up for autoconf.
41	Written at NRL for OPIE 2.0.
42*/
43
44#define VERSION "2.3"
45#define DATE    "Sunday, September 22, 1996"
46
47#ifndef unix
48#define unix 1
49#endif /* unix */
50
51#include "config.h"
52#include "options.h"
53
54/* System characteristics */
55
56#if HAVE_GETUTXLINE && HAVE_UTMPX_H
57#define DOUTMPX 1
58#else /* HAVE_GETUTXLINE && HAVE_UTMPX_H */
59#define DOUTMPX 0
60#endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */
61
62/* Adapted from the Autoconf hypertext info pages */
63#include <sys/types.h>
64#if HAVE_DIRENT_H
65#include <dirent.h>
66#else /* HAVE_DIRENT_H */
67#define dirent direct
68#if HAVE_SYS_NDIR_H
69#include <sys/ndir.h>
70#endif /* HAVE_SYS_NDIR_H */
71#if HAVE_SYS_DIR_H
72#include <sys/dir.h>
73#endif /* HAVE_SYS_DIR_H */
74#if HAVE_NDIR_H
75#include <ndir.h>
76#endif /* HAVE_NDIR_H */
77#endif /* HAVE_DIRENT_H */
78
79#ifndef MAIL_DIR
80#ifdef PATH_MAIL
81#define MAIL_DIR PATH_MAIL
82#else /* PATH_MAIL */
83#ifdef _PATH_MAIL
84#define MAIL_DIR _PATH_MAIL
85#else /* _PATH_MAIL */
86#ifdef _PATH_MAILDIR
87#define MAIL_DIR _PATH_MAILDIR
88#else /* _PATH_MAILDIR */
89#define MAIL_DIR "/usr/spool/mail"
90#endif /* _PATH_MAILDIR */
91#endif /* _PATH_MAIL */
92#endif /* PATH_MAIL */
93#endif /* MAIL_DIR */
94
95#if HAVE_SHADOW_H && HAVE_GETSPENT && HAVE_ENDSPENT
96#if defined(linux) && !HAVE_ETC_SHADOW
97#define HAVE_SHADOW 0
98#else /* defined(linux) && !HAVE_ETC_SHADOW */
99#define HAVE_SHADOW 1
100#endif /* defined(linux) && !HAVE_ETC_SHADOW */
101#endif /* HAVE_SHADOW_H && HAVE_GETSPENT && HAVE_ENDSPENT */
102
103#if !HAVE_SETEUID && HAVE_SETREUID
104#define seteuid(x) setreuid(-1, x)
105#endif /* !HAVE_SETEUID && HAVE_SETREUID */
106
107#if !HAVE_SETEGID && HAVE_SETREGID
108#define setegid(x) setregid(-1, x)
109#endif /* !HAVE_SETEGID && HAVE_SETREGID */
110
111/* If the user didn't specify, default to MD5 */
112#ifndef MDX
113#define MDX 5
114#endif	/* MDX */
115
116#ifndef _PATH_BSHELL
117#define _PATH_BSHELL    "/bin/sh"
118#endif
119
120#ifndef _PATH_DEVNULL
121#define _PATH_DEVNULL	  "/dev/null"
122#endif
123
124#ifndef _PATH_FTPUSERS
125#define	_PATH_FTPUSERS	"/etc/ftpusers"
126#endif
127
128#ifndef TTYGRPNAME
129#define TTYGRPNAME	"tty"	/* name of group to own ttys */
130#endif
131
132#ifndef NO_LOGINS_FILE
133#define NO_LOGINS_FILE	"/etc/nologin"
134#endif
135
136#ifndef QUIET_LOGIN_FILE
137#define QUIET_LOGIN_FILE  ".hushlogin"
138#endif
139
140#ifndef OPIE_ALWAYS_FILE
141#define OPIE_ALWAYS_FILE ".opiealways"
142#endif
143
144#ifndef OPIE_LOCK_PREFIX
145#define OPIE_LOCK_PREFIX "/tmp/opie-lock."
146#endif
147
148#ifndef OPIE_LOCK_TIMEOUT
149#define OPIE_LOCK_TIMEOUT (30*60)
150#endif
151
152#ifndef MOTD_FILE
153#define MOTD_FILE         "/etc/motd"
154#endif
155
156#ifndef NBBY
157#define NBBY 8	/* Reasonable for modern systems */
158#endif	/* NBBY */
159
160#ifndef LOGIN_PATH
161#define LOGIN_PATH "/usr/ucb:/bin:/usr/bin"
162#endif	/* LOGIN_PATH */
163
164#ifndef POINTER
165#define POINTER unsigned char *
166#endif /* POINTER */
167
168#define _OPIE 1
169