mod_info and apachectl -V both output SUEXEC info, even if suexec has been
explicitly turned off with --disable-suexec.
example of current apachectl -V after running with ./configure
--disable-suexec:

>bin/apachectl -V
...
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D APR_CHARSET_EBCDIC
 -D HTTPD_ROOT="/apache"
 *-D SUEXEC_BIN="/apache/bin/suexec"
........

*Note: some existing Apache and third party code assumes that SUEXEC_BIN is
defined, so patch uses a new separate define (AP_HAS_SUEXEC)

Question: Not sure if the expansion in ./configure sets enable_suexec=no for
windows or other platforms as needed, or does there
need to be a #if define(WIN32) || define(BEOS) || define(NETWARE) ...   =>
#define AP_HAS_SUEXEC 0 someplace?


Index: server/main.c
===================================================================
--- server/main.c       (revision 666660)
+++ server/main.c       (working copy)
@@ -226,7 +226,7 @@
     printf(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n");
 #endif

-#ifdef SUEXEC_BIN
+#if AP_HAS_SUEXEC
     printf(" -D SUEXEC_BIN=\"" SUEXEC_BIN "\"\n");
 #endif

Index: modules/generators/mod_info.c
===================================================================
--- modules/generators/mod_info.c       (revision 666660)
+++ modules/generators/mod_info.c       (working copy)
@@ -498,7 +498,7 @@
     ap_rputs(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n", r);
 #endif

-#ifdef SUEXEC_BIN
+#if AP_HAS_SUEXEC
     ap_rputs(" -D SUEXEC_BIN=\"" SUEXEC_BIN "\"\n", r);
 #endif

Index: configure.in
===================================================================
--- configure.in        (revision 666660)
+++ configure.in        (working copy)
@@ -561,6 +561,13 @@
   progname="httpd"] )

 # SuExec parameters
+if test "$enable_suexec" = "no"; then
+    AC_DEFINE(AP_HAS_SUEXEC, 0,
+              [suexec is disabled])
+else
+    AC_DEFINE(AP_HAS_SUEXEC, 1,
+              [suexec is enabled])
+fi
 AC_ARG_WITH(suexec-bin,
 APACHE_HELP_STRING(--with-suexec-bin,Path to suexec binary),[
   AC_DEFINE_UNQUOTED(SUEXEC_BIN, "$withval", [Path to suexec binary] )

Attachment: suexec.patch
Description: Binary data

Reply via email to