summaryrefslogtreecommitdiff
path: root/make-suexec-for-home
blob: 5cffab45d2ee0367fac785b7565de8fb5989fd10 (plain)
  1. #!/bin/bash
  2. #CONFARGS = --target=apache --with-layout=Debian \
  3. # --enable-suexec --suexec-caller=www-data \
  4. # --suexec-docroot=/var/www \
  5. # --suexec-logfile=/var/log/apache/suexec.log \
  6. # --without-confadjust --without-execstrip \
  7. # --enable-shared=max --enable-rule=SHARED_CHAIN \
  8. # --enable-module=most --enable-module=status \
  9. # --enable-module=log_referer --enable-module=log_agent \
  10. # --enable-module=auth_db \
  11. # --activate-module=src/modules/extra/mod_macro.c
  12. HTTPD_USER="www-data"
  13. LOG_EXEC="/var/log/apache/suexec.log"
  14. DOC_ROOT="/home"
  15. set -e
  16. S=/usr/share/doc/apache-common
  17. B=`pwd`/suexec-build
  18. mkdir $B
  19. #for f in suexec.c suexec.h ap_config.h; do
  20. # zcat $S/$f.gz > $B/$f
  21. #done
  22. zcat $S/suexec.c.gz > $B/suexec.c
  23. #cp suexec.c $B/suexec.c
  24. zcat $S/ap_config.h.gz > $B/ap_config.h
  25. zcat $S/suexec.h.gz > $B/suexec.h.orig
  26. cat $B/suexec.h.orig | sed \
  27. -e 's!^\(#define HTTPD_USER\).*$!\1 "www-data"!' \
  28. -e 's!^\(#define LOG_EXEC\).*$!\1 "/var/log/apache/suexec.log"!' \
  29. -e 's!^\(#define DOC_ROOT\).*$!\1 "/home"!' \
  30. > $B/suexec.h
  31. gcc -lm -lcrypt -ldb1 -ldb -ldl -I/usr/include/apache-1.3 -o $B/suexec $B/suexec.c