summaryrefslogtreecommitdiff
path: root/apache/mksuexec/suexec.h
blob: e76a3bb7312e2843bca3605405f14240c8755916 (plain)
  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. * suexec.h -- user-definable variables for the suexec wrapper code.
  17. * (See README.configure on how to customize these variables.)
  18. */
  19. #ifndef _SUEXEC_H
  20. #define _SUEXEC_H
  21. /*
  22. * Include ap_config_layout so we can work out where the default htdocsdir
  23. * and logsdir are.
  24. */
  25. #include "ap_config_layout.h"
  26. /*
  27. * HTTPD_USER -- Define as the username under which Apache normally
  28. * runs. This is the only user allowed to execute
  29. * this program.
  30. */
  31. #ifndef AP_HTTPD_USER
  32. #define AP_HTTPD_USER "www"
  33. #endif
  34. /*
  35. * UID_MIN -- Define this as the lowest UID allowed to be a target user
  36. * for suEXEC. For most systems, 500 or 100 is common.
  37. */
  38. #ifndef AP_UID_MIN
  39. #define AP_UID_MIN 100
  40. #endif
  41. /*
  42. * GID_MIN -- Define this as the lowest GID allowed to be a target group
  43. * for suEXEC. For most systems, 100 is common.
  44. */
  45. #ifndef AP_GID_MIN
  46. #define AP_GID_MIN 100
  47. #endif
  48. /*
  49. * USERDIR_SUFFIX -- Define to be the subdirectory under users'
  50. * home directories where suEXEC access should
  51. * be allowed. All executables under this directory
  52. * will be executable by suEXEC as the user so
  53. * they should be "safe" programs. If you are
  54. * using a "simple" UserDir directive (ie. one
  55. * without a "*" in it) this should be set to
  56. * the same value. suEXEC will not work properly
  57. * in cases where the UserDir directive points to
  58. * a location that is not the same as the user's
  59. * home directory as referenced in the passwd file.
  60. *
  61. * If you have VirtualHosts with a different
  62. * UserDir for each, you will need to define them to
  63. * all reside in one parent directory; then name that
  64. * parent directory here. IF THIS IS NOT DEFINED
  65. * PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK!
  66. * See the suEXEC documentation for more detailed
  67. * information.
  68. */
  69. #ifndef AP_USERDIR_SUFFIX
  70. #define AP_USERDIR_SUFFIX "public_html"
  71. #endif
  72. /*
  73. * LOG_EXEC -- Define this as a filename if you want all suEXEC
  74. * transactions and errors logged for auditing and
  75. * debugging purposes.
  76. */
  77. #ifndef AP_LOG_EXEC
  78. #define AP_LOG_EXEC DEFAULT_EXP_LOGFILEDIR "/suexec_log" /* Need me? */
  79. #endif
  80. /*
  81. * DOC_ROOT -- Define as the DocumentRoot set for Apache. This
  82. * will be the only hierarchy (aside from UserDirs)
  83. * that can be used for suEXEC behavior.
  84. */
  85. #ifndef AP_DOC_ROOT
  86. #define AP_DOC_ROOT DEFAULT_EXP_HTDOCSDIR
  87. #endif
  88. /*
  89. * SAFE_PATH -- Define a safe PATH environment to pass to CGI executables.
  90. *
  91. */
  92. #ifndef AP_SAFE_PATH
  93. #define AP_SAFE_PATH "/usr/local/bin:/usr/bin:/bin"
  94. #endif
  95. #endif /* _SUEXEC_H */