summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2002-01-23 19:18:40 +0000
committermbr <mbr@FreeBSD.org>2002-01-23 19:18:40 +0000
commit8e8534979465fc6f588a302d1e43ab2e85db5649 (patch)
tree459e08b0c3a6c93fe68d7bd6e5d812b533499bf8 /www
parent77e25c33390cc596ceae0b53a14cf0f62defdb97 (diff)
downloadFreeBSD-ports-8e8534979465fc6f588a302d1e43ab2e85db5649.zip
FreeBSD-ports-8e8534979465fc6f588a302d1e43ab2e85db5649.tar.gz
Stop segfaulting on commandline, if the calling user has UID of httpd.
Check if the HTTP environment is existent.
Diffstat (limited to 'www')
-rw-r--r--www/mod_frontpage/files/patch-fpexec.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/www/mod_frontpage/files/patch-fpexec.c b/www/mod_frontpage/files/patch-fpexec.c
new file mode 100644
index 0000000..a026fb8
--- /dev/null
+++ b/www/mod_frontpage/files/patch-fpexec.c
@@ -0,0 +1,26 @@
+--- fpexec.c.orig Sun Dec 9 23:35:39 2001
++++ fpexec.c Wed Jan 23 20:10:14 2002
+@@ -247,6 +247,11 @@
+ cidx++;
+
+ for (ep = environ; *ep && cidx < AP_ENVBUF-1; ep++) {
++ if (*ep == NULL) {
++ log_err("HTTP header mismatch, stop\n");
++ exit(120);
++ }
++
+ if (!strncmp(*ep, "HTTP_", 5) || !strncmp(*ep,"HTTPS",5)
+ || !strncmp(*ep,"SSL_",4)) {
+ cleanenv[cidx] = *ep;
+@@ -327,6 +332,11 @@
+ exit(103);
+ }
+ #endif /*_OSD_POSIX*/
++
++ if (target_uname == NULL) {
++ log_err("invalid target user name: (NULL)\n");
++ exit(105);
++ }
+
+ if (!strncmp("~", target_uname, 1)) {
+ target_uname++;
OpenPOWER on IntegriCloud