summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2002-05-18 19:22:23 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2002-05-18 19:22:23 +0200
commit4f93d4762ccb9987f953237ad9462d31e5fabc82 (patch)
tree060e934aab85623d6d348a399317d6d19dec9115 /server
parent Although it appears reasonable to immediately gather the Error log and (diff)
downloadapache2-4f93d4762ccb9987f953237ad9462d31e5fabc82.tar.xz
apache2-4f93d4762ccb9987f953237ad9462d31e5fabc82.zip
Resolve the EXEC_ON_READ bit for ServerRoot and other modules that test
the directive context. Should eliminate the segfault. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/core.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/server/core.c b/server/core.c
index 9884a3f209..5a38ab023b 100644
--- a/server/core.c
+++ b/server/core.c
@@ -983,13 +983,20 @@ AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd,
" cannot occur within <Limit> section", NULL);
}
- if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE
- && cmd->path != NULL) {
- return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,
- " cannot occur within <Directory/Location/Files> "
- "section", NULL);
+ if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE) {
+ if (cmd->path != NULL) {
+ return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,
+ " cannot occur within <Directory/Location/Files> "
+ "section", NULL);
+ }
+ if (cmd->cmd->req_override & EXEC_ON_READ) {
+ /* EXEC_ON_READ must be NOT_IN_DIR_LOC_FILE, if not, it will
+ * (deliberately) segfault below in the individual tests...
+ */
+ return NULL;
+ }
}
-
+
if (((forbidden & NOT_IN_DIRECTORY)
&& ((found = find_parent(cmd->directive, "<Directory"))
|| (found = find_parent(cmd->directive, "<DirectoryMatch"))))