]> granicus.if.org Git - apache/blob - support/suexec.h
Fix all the License issues. Including:
[apache] / support / suexec.h
1 /* ====================================================================
2  * Copyright (c) 1995-2000 The Apache Software Foundation.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer. 
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in
13  *    the documentation and/or other materials provided with the
14  *    distribution.
15  *
16  * 3. All advertising materials mentioning features or use of this
17  *    software must display the following acknowledgment:
18  *    "This product includes software developed by the Apache Software Foundation
19  *    for use in the Apache HTTP server project (http://www.apache.org/)."
20  *
21  * 4. The names "Apache Server" and "Apache Software Foundation" must not be used to
22  *    endorse or promote products derived from this software without
23  *    prior written permission. For written permission, please contact
24  *    apache@apache.org.
25  *
26  * 5. Products derived from this software may not be called "Apache"
27  *    nor may "Apache" appear in their names without prior written
28  *    permission of the Apache Software Foundation.
29  *
30  * 6. Redistributions of any form whatsoever must retain the following
31  *    acknowledgment:
32  *    "This product includes software developed by the Apache Software Foundation
33  *    for use in the Apache HTTP server project (http://www.apache.org/)."
34  *
35  * THIS SOFTWARE IS PROVIDED BY THE Apache Software Foundation ``AS IS'' AND ANY
36  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
38  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE Apache Software Foundation OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
44  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
45  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
46  * OF THE POSSIBILITY OF SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the Apache Software Foundation and was originally based
51  * on public domain software written at the National Center for
52  * Supercomputing Applications, University of Illinois, Urbana-Champaign.
53  * For more information on the Apache Software Foundation and the Apache HTTP server
54  * project, please see <http://www.apache.org/>.
55  *
56  */
57
58 /*
59  * suexec.h -- user-definable variables for the suexec wrapper code.
60  *             (See README.configure on how to customize these variables.)
61  */
62
63
64 #ifndef _SUEXEC_H
65 #define _SUEXEC_H
66
67 /*
68  * HTTPD_USER -- Define as the username under which Apache normally
69  *               runs.  This is the only user allowed to execute
70  *               this program.
71  */
72 #ifndef HTTPD_USER
73 #define HTTPD_USER "www"
74 #endif
75
76 /*
77  * UID_MIN -- Define this as the lowest UID allowed to be a target user
78  *            for suEXEC.  For most systems, 500 or 100 is common.
79  */
80 #ifndef UID_MIN
81 #define UID_MIN 100
82 #endif
83
84 /*
85  * GID_MIN -- Define this as the lowest GID allowed to be a target group
86  *            for suEXEC.  For most systems, 100 is common.
87  */
88 #ifndef GID_MIN
89 #define GID_MIN 100
90 #endif
91
92 /*
93  * USERDIR_SUFFIX -- Define to be the subdirectory under users' 
94  *                   home directories where suEXEC access should
95  *                   be allowed.  All executables under this directory
96  *                   will be executable by suEXEC as the user so 
97  *                   they should be "safe" programs.  If you are 
98  *                   using a "simple" UserDir directive (ie. one 
99  *                   without a "*" in it) this should be set to 
100  *                   the same value.  suEXEC will not work properly
101  *                   in cases where the UserDir directive points to 
102  *                   a location that is not the same as the user's
103  *                   home directory as referenced in the passwd file.
104  *
105  *                   If you have VirtualHosts with a different
106  *                   UserDir for each, you will need to define them to
107  *                   all reside in one parent directory; then name that
108  *                   parent directory here.  IF THIS IS NOT DEFINED
109  *                   PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK!
110  *                   See the suEXEC documentation for more detailed
111  *                   information.
112  */
113 #ifndef USERDIR_SUFFIX
114 #define USERDIR_SUFFIX "public_html"
115 #endif
116
117 /*
118  * LOG_EXEC -- Define this as a filename if you want all suEXEC
119  *             transactions and errors logged for auditing and
120  *             debugging purposes.
121  */
122 #ifndef LOG_EXEC
123 #define LOG_EXEC "/usr/local/apache/logs/cgi.log"       /* Need me? */
124 #endif
125
126 /*
127  * DOC_ROOT -- Define as the DocumentRoot set for Apache.  This
128  *             will be the only hierarchy (aside from UserDirs)
129  *             that can be used for suEXEC behavior.
130  */
131 #ifndef DOC_ROOT
132 #define DOC_ROOT "/usr/local/apache/htdocs"
133 #endif
134
135 /*
136  * SAFE_PATH -- Define a safe PATH environment to pass to CGI executables.
137  *
138  */
139 #ifndef SAFE_PATH
140 #define SAFE_PATH "/usr/local/bin:/usr/bin:/bin"
141 #endif
142
143 #endif /* _SUEXEC_H */