coar 98/06/23 16:14:08
Modified: src/main util_script.c
Log:
Provide for warning of non-executable file in a script directory.
Submitted by: W G Stoddard <[EMAIL PROTECTED]>
Reviewed by: Brian Behlendorf, Ken Coar
Revision Changes Path
1.119 +10 -2 apache-1.3/src/main/util_script.c
Index: util_script.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- util_script.c 1998/06/15 16:27:55 1.118
+++ util_script.c 1998/06/23 23:14:07 1.119
@@ -790,6 +790,7 @@
memset(&pi, 0, sizeof(pi));
interpreter[0] = 0;
+ pid = -1;
exename = strrchr(r->filename, '/');
if (!exename) {
@@ -848,6 +849,14 @@
}
}
}
+ /* Bail out if we haven't figured out what kind of
+ * file this is by now..
+ */
+ if (!is_exe && !is_script && !is_binary) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
+ "%s is not executable", r->filename);
+ return (pid);
+ }
/*
* Make child process use hPipeOutputWrite as standard out,
@@ -859,8 +868,7 @@
si.hStdInput = pinfo->hPipeInputRead;
si.hStdOutput = pinfo->hPipeOutputWrite;
si.hStdError = pinfo->hPipeErrorWrite;
-
- pid = -1;
+
if ((!r->args) || (!r->args[0]) || strchr(r->args, '=')) {
if (is_exe || is_binary) {
/*