summaryrefslogtreecommitdiff
path: root/make-suexec-for-home
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-02-28 14:09:04 +0000
committerJonas Smedegaard <dr@jones.dk>2002-02-28 14:09:04 +0000
commitcafcd5d4368e57f162a641ed3f4835ecb5a6d391 (patch)
tree56166fbf16289d8b388cf0f1f9b51e28c3c4bdf9 /make-suexec-for-home
Initial revision
Diffstat (limited to 'make-suexec-for-home')
-rwxr-xr-xmake-suexec-for-home37
1 files changed, 37 insertions, 0 deletions
diff --git a/make-suexec-for-home b/make-suexec-for-home
new file mode 100755
index 0000000..5cffab4
--- /dev/null
+++ b/make-suexec-for-home
@@ -0,0 +1,37 @@
+#!/bin/bash
+#CONFARGS = --target=apache --with-layout=Debian \
+# --enable-suexec --suexec-caller=www-data \
+# --suexec-docroot=/var/www \
+# --suexec-logfile=/var/log/apache/suexec.log \
+# --without-confadjust --without-execstrip \
+# --enable-shared=max --enable-rule=SHARED_CHAIN \
+# --enable-module=most --enable-module=status \
+# --enable-module=log_referer --enable-module=log_agent \
+# --enable-module=auth_db \
+# --activate-module=src/modules/extra/mod_macro.c
+
+HTTPD_USER="www-data"
+LOG_EXEC="/var/log/apache/suexec.log"
+DOC_ROOT="/home"
+
+set -e
+
+S=/usr/share/doc/apache-common
+B=`pwd`/suexec-build
+
+mkdir $B
+#for f in suexec.c suexec.h ap_config.h; do
+# zcat $S/$f.gz > $B/$f
+#done
+zcat $S/suexec.c.gz > $B/suexec.c
+#cp suexec.c $B/suexec.c
+zcat $S/ap_config.h.gz > $B/ap_config.h
+zcat $S/suexec.h.gz > $B/suexec.h.orig
+
+cat $B/suexec.h.orig | sed \
+ -e 's!^\(#define HTTPD_USER\).*$!\1 "www-data"!' \
+ -e 's!^\(#define LOG_EXEC\).*$!\1 "/var/log/apache/suexec.log"!' \
+ -e 's!^\(#define DOC_ROOT\).*$!\1 "/home"!' \
+ > $B/suexec.h
+
+gcc -lm -lcrypt -ldb1 -ldb -ldl -I/usr/include/apache-1.3 -o $B/suexec $B/suexec.c