gsexec.h
Go to the documentation of this file.
1 /* Copyright 1999-2004 The Apache Software Foundation
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /*
17  * suexec.h -- user-definable variables for the suexec wrapper code.
18  * (See README.configure on how to customize these variables.)
19  */
20 
21 
22 #ifndef _SUEXEC_H
23 #define _SUEXEC_H
24 
25 /*
26  * Include ap_config_layout so we can work out where the default htdocsdir
27  * and logsdir are.
28  */
29 #include "ap_config_layout.h"
30 
31 /*
32  * HTTPD_USER -- Define as the username under which Apache normally
33  * runs. This is the only user allowed to execute
34  * this program.
35  */
36 #ifndef AP_HTTPD_USER
37 #define AP_HTTPD_USER "apache"
38 #endif
39 
40 /*
41  * HTTPD_GROUP -- Define as the group under which Apache normally
42  * runs. This is the only user allowed to execute
43  * this program.
44  */
45 #ifndef AP_HTTPD_GROUP
46 #define AP_HTTPD_GROUP "apache"
47 #endif
48 
49 /*
50  * UID_MIN -- Define this as the lowest UID allowed to be a target user
51  * for suEXEC. For most systems, 500 or 100 is common, but
52  * 99 will include user nobody on RedHat Linux systems.
53  */
54 #ifdef AP_UID_MIN
55 #undef AP_UID_MIN
56 #endif
57 #define AP_UID_MIN 99
58 
59 /*
60  * GID_MIN -- Define this as the lowest GID allowed to be a target group
61  * for suEXEC. For most systems, 100 is common, but 99 will
62  * include group nobody on RedHat Linux systems.
63  */
64 #ifdef AP_GID_MIN
65 #undef AP_GID_MIN
66 #endif
67 #define AP_GID_MIN 99
68 
69 /*
70  * USERDIR_SUFFIX -- Define to be the subdirectory under users'
71  * home directories where suEXEC access should
72  * be allowed. All executables under this directory
73  * will be executable by suEXEC as the user so
74  * they should be "safe" programs. If you are
75  * using a "simple" UserDir directive (ie. one
76  * without a "*" in it) this should be set to
77  * the same value. suEXEC will not work properly
78  * in cases where the UserDir directive points to
79  * a location that is not the same as the user's
80  * home directory as referenced in the passwd file.
81  *
82  * If you have VirtualHosts with a different
83  * UserDir for each, you will need to define them to
84  * all reside in one parent directory; then name that
85  * parent directory here. IF THIS IS NOT DEFINED
86  * PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK!
87  * See the suEXEC documentation for more detailed
88  * information.
89  */
90 #ifndef AP_USERDIR_SUFFIX
91 #define AP_USERDIR_SUFFIX "public_html"
92 #endif
93 
94 /*
95  * LOG_EXEC -- Define this as a filename if you want all suEXEC
96  * transactions and errors logged for auditing and
97  * debugging purposes.
98  */
99 #ifndef AP_LOG_EXEC
100 #define AP_LOG_EXEC DEFAULT_EXP_LOGFILEDIR "/suexec_log" /* Need me? */
101 #endif
102 
103 /*
104  * DOC_ROOT -- Define as the DocumentRoot set for Apache. This
105  * will be the only hierarchy (aside from UserDirs)
106  * that can be used for suEXEC behavior.
107  */
108 #ifndef AP_DOC_ROOT
109 #define AP_DOC_ROOT DEFAULT_EXP_HTDOCSDIR
110 #endif
111 
112 /*
113  * SAFE_PATH -- Define a safe PATH environment to pass to CGI executables.
114  *
115  */
116 #ifndef AP_SAFE_PATH
117 #define AP_SAFE_PATH "/usr/local/bin:/usr/bin:/bin"
118 #endif
119 
120 /*
121  * GRST_EXECMAPDIR -- Location of the gridmapdir-style directory of lock files
122  *
123  */
124 #define GRST_EXECMAPDIR "/var/www/execmapdir"
125 
126 #endif /* _SUEXEC_H */