opie_cfg.h revision 22347
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#if HAVE_DIRENT_H
64#include <dirent.h>
65#else /* HAVE_DIRENT_H */
66#define dirent direct
67#if HAVE_SYS_NDIR_H
68#include <sys/ndir.h>
69#endif /* HAVE_SYS_NDIR_H */
70#if HAVE_SYS_DIR_H
71#include <sys/dir.h>
72#endif /* HAVE_SYS_DIR_H */
73#if HAVE_NDIR_H
74#include <ndir.h>
75#endif /* HAVE_NDIR_H */
76#endif /* HAVE_DIRENT_H */
77
78#ifndef MAIL_DIR
79#ifdef PATH_MAIL
80#define MAIL_DIR PATH_MAIL
81#else /* PATH_MAIL */
82#ifdef _PATH_MAIL
83#define MAIL_DIR _PATH_MAIL
84#else /* _PATH_MAIL */
85#ifdef _PATH_MAILDIR
86#define MAIL_DIR _PATH_MAILDIR
87#else /* _PATH_MAILDIR */
88#define MAIL_DIR "/usr/spool/mail"
89#endif /* _PATH_MAILDIR */
90#endif /* _PATH_MAIL */
91#endif /* PATH_MAIL */
92#endif /* MAIL_DIR */
93
94#if HAVE_SHADOW_H && HAVE_GETSPENT && HAVE_ENDSPENT
95#if defined(linux) && !HAVE_ETC_SHADOW
96#define HAVE_SHADOW 0
97#else /* defined(linux) && !HAVE_ETC_SHADOW */
98#define HAVE_SHADOW 1
99#endif /* defined(linux) && !HAVE_ETC_SHADOW */
100#endif /* HAVE_SHADOW_H && HAVE_GETSPENT && HAVE_ENDSPENT */
101
102#if !HAVE_SETEUID && HAVE_SETREUID
103#define seteuid(x) setreuid(-1, x)
104#endif /* !HAVE_SETEUID && HAVE_SETREUID */
105
106#if !HAVE_SETEGID && HAVE_SETREGID
107#define setegid(x) setregid(-1, x)
108#endif /* !HAVE_SETEGID && HAVE_SETREGID */
109
110/* If the user didn't specify, default to MD5 */
111#ifndef MDX
112#define MDX 5
113#endif	/* MDX */
114
115#ifndef _PATH_BSHELL
116#define _PATH_BSHELL    "/bin/sh"
117#endif
118
119#ifndef _PATH_DEVNULL
120#define _PATH_DEVNULL	  "/dev/null"
121#endif
122
123#ifndef _PATH_FTPUSERS
124#define	_PATH_FTPUSERS	"/etc/ftpusers"
125#endif
126
127#ifndef TTYGRPNAME
128#define TTYGRPNAME	"tty"	/* name of group to own ttys */
129#endif
130
131#ifndef NO_LOGINS_FILE
132#define NO_LOGINS_FILE	"/etc/nologin"
133#endif
134
135#ifndef QUIET_LOGIN_FILE
136#define QUIET_LOGIN_FILE  ".hushlogin"
137#endif
138
139#ifndef OPIE_ALWAYS_FILE
140#define OPIE_ALWAYS_FILE ".opiealways"
141#endif
142
143#ifndef OPIE_LOCK_PREFIX
144#define OPIE_LOCK_PREFIX "/tmp/opie-lock."
145#endif
146
147#ifndef OPIE_LOCK_TIMEOUT
148#define OPIE_LOCK_TIMEOUT (30*60)
149#endif
150
151#ifndef MOTD_FILE
152#define MOTD_FILE         "/etc/motd"
153#endif
154
155#ifndef NBBY
156#define NBBY 8	/* Reasonable for modern systems */
157#endif	/* NBBY */
158
159#ifndef LOGIN_PATH
160#define LOGIN_PATH "/usr/ucb:/bin:/usr/bin"
161#endif	/* LOGIN_PATH */
162
163#ifndef POINTER
164#define POINTER unsigned char *
165#endif /* POINTER */
166
167#define _OPIE 1
168