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