core: Fix integer overflow in ap_pregsub. This can be triggered e.g.
with mod_setenvif via a malicious .htaccess. [Stefan Fritsch]
+ *) configure: By default, only load those modules that are either required
+ or explicitly selected by a configure --enable-foo argument. The
+ LoadModule statements for modules enabled by --enable-mods-shared=most
+ and friends will be commented out. [Stefan Fritsch]
+
*) mod_lua: Prevent early Lua hooks (LuaHookTranslateName and
LuaHookQuickHandler) from being configured in <Directory>, <Files>,
and htaccess where the configuration would have been ignored.
< $$i; \
for j in $(DSO_MODULES) "^EOL^"; do \
if test $$j != "^EOL^"; then \
- echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+ if echo "$(ENABLED_DSO_MODULES)"|$(EGREP) "\<$$j\>" > /dev/null ; then \
+ echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+ else \
+ echo "#LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \
+ fi; \
fi; \
done; \
sed -e '1,/@@LoadModule@@/d' \
APACHE_SUBST(MKDEP)
APACHE_SUBST(INSTALL_PROG_FLAGS)
APACHE_SUBST(DSO_MODULES)
+ APACHE_SUBST(ENABLED_DSO_MODULES)
APACHE_SUBST(APR_BINDIR)
APACHE_SUBST(APR_INCLUDEDIR)
APACHE_SUBST(APR_VERSION)
# add default MPM to LoadModule list
if test $1 = $default_mpm; then
DSO_MODULES="$DSO_MODULES mpm_$1"
+ ENABLED_DSO_MODULES="$ENABLED_DSO_MODULES mpm_$1"
fi
fi
$4
dnl its pre-reqs fail.
case "$enable_$1" in
yes|static|shared)
- _apmod_error_fatal="yes"
+ _apmod_required="yes"
;;
*)
case "$module_selection" in
reallyall|all|most)
- _apmod_error_fatal="no"
+ _apmod_required="no"
;;
*)
- _apmod_error_fatal="yes"
+ _apmod_required="yes"
;;
esac
esac
$6
AC_MSG_CHECKING(whether to enable mod_$1)
if test "$enable_$1" = "no"; then
- if test "$_apmod_error_fatal" = "no"; then
+ if test "$_apmod_required" = "no"; then
_apmod_extra_msg=" (disabled)"
else
AC_MSG_ERROR([mod_$1 has been requested but can not be built due to prerequisite failures])
sharedobjs=yes
shared=yes
DSO_MODULES="$DSO_MODULES $1"
+ if test "$_apmod_required" = "yes" ; then
+ ENABLED_DSO_MODULES="$ENABLED_DSO_MODULES $1"
+ fi
;;
esac
define([modprefix], [MOD_]translit($1, [a-z-], [A-Z_]))
dnl Check that mkdir -p works
APR_MKDIR_P_CHECK($top_srcdir/build/mkdir.sh)
+dnl get an EGREP to use in the Makefiles
+AC_PROG_EGREP
+APACHE_SUBST(EGREP)
+
dnl ## Run configure for packages Apache uses
dnl shared library support for these packages doesn't currently