On Fri, May 8, 2009 at 10:13 AM,  <[email protected]> wrote:

> +
> +        /* if Includes was enabled without exec in the new config, but
> +         * was enabled with exec in the base, then disable exec in the
> +         * resulting options. */
> +        if ((base->opts & OPT_INC_WITH_EXEC)
> +            && (new->opts & OPT_INC_WITH_EXEC) == 0) {
> +            conf->opts &= ~OPT_INC_WITH_EXEC;


The above is wrapped in
    if (new->opts & OPT_UNSET) {

Which means checking new->opts against anything is probably not needed
and harmful in the case illustrated below. new->opts can be
initialized with OPT_UNSET only when no htaccess is involved (if I
understand the 2nd parm to foo_create_config()):

  create_core_dir_config:
      conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_ALL;

This zaps OPT_INC_WITH_EXEC for a config w/o the htaccess issue (the
real focus of the change):

# only two containers in the config

<Directory />
Options Includes
AllowOverride None
</Directory>

<Directory /home/covener>
# with this container, mod_cgi/mod_cgid complains about exec being off
# without it, exec cmd= works as expected
SetEnv foo bar
</Directory>


Is it safe to drop the entire quoted stanza since new->opts is UNSET anyway?

-- 
Eric Covener
[email protected]

Reply via email to