httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r817830 - in /httpd/mod_fcgid/trunk: CHANGES-FCGID README-FCGID modules/fcgid/fcgid_conf.c modules/fcgid/fcgid_conf.h modules/fcgid/mod_fcgid.c
Date Tue, 22 Sep 2009 20:37:47 GMT
Author: trawick
Date: Tue Sep 22 20:37:44 2009
New Revision: 817830

URL: http://svn.apache.org/viewvc?rev=817830&view=rev
Log:
provide a function to merge per-dir configs so that
directives are inherited in the expected manner

before:
  if no fcgid directives are defined for a container,
  values are inherited from enclosing container (okay)

  if you then add any fcgid per-dir directive to that
  container, all other values are reset to defaults
  instead of continuing to be inherited (not okay)

Modified:
    httpd/mod_fcgid/trunk/CHANGES-FCGID
    httpd/mod_fcgid/trunk/README-FCGID
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.h
    httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c

Modified: httpd/mod_fcgid/trunk/CHANGES-FCGID
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/CHANGES-FCGID?rev=817830&r1=817829&r2=817830&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/CHANGES-FCGID [utf8] (original)
+++ httpd/mod_fcgid/trunk/CHANGES-FCGID [utf8] Tue Sep 22 20:37:44 2009
@@ -1,6 +1,12 @@
                                                          -*- coding: utf-8 -*-
 Changes with mod_fcgid 2.3.2
 
+  *) Merge mod_fcgid per-directory directives so that they can be inherited
+     or overridden within other containers as expected.  Affected directives:
+     FCGIDAccessChecker, FCGIDAccessCheckerAuthoritative, FCGIDAuthenticator,
+     FCGIDAuthenticatorAuthoritative, FCGIDAuthorizer,
+     FCGIDAuthorizerAuthoritative, and FCGIDWrapper.  [Jeff Trawick]
+
   *) Termination of idle processes after inactivity timeout can now be 
      disabled by setting FCGIDIdleTimeout to 0.  Termination of idle 
      processes based on the process lifetime can now be disabled by setting

Modified: httpd/mod_fcgid/trunk/README-FCGID
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/README-FCGID?rev=817830&r1=817829&r2=817830&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/README-FCGID (original)
+++ httpd/mod_fcgid/trunk/README-FCGID Tue Sep 22 20:37:44 2009
@@ -155,6 +155,11 @@
      directives include FCGIDIPCCommTimeout, FCGIDOutputBufferSize, and others.
      (Consult CHANGES-FCGID for the complete list.)
 
+iv.  Some directives which can be placed inside <Directory >, <Location >,
+     etc. were not inherited as expected in older releases.  This has been
+     corrected, and behavior will change for some configurations.  Affected
+     directives include FCGIDWrapper and the AAA-related directives.  (Consult
+     CHANGES-FCGID for the complete list.)
 
 Acknowledgements
 ----------------

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c?rev=817830&r1=817829&r2=817830&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c Tue Sep 22 20:37:44 2009
@@ -162,6 +162,36 @@
     return (void *) config;
 }
 
+void *merge_fcgid_dir_config(apr_pool_t *p, void *basev, void *locv)
+{
+    fcgid_dir_conf *base = (fcgid_dir_conf *) basev;
+    fcgid_dir_conf *local = (fcgid_dir_conf *) locv;
+    fcgid_dir_conf *merged =
+      (fcgid_dir_conf *) apr_pmemdup(p, local, sizeof(fcgid_dir_conf));
+
+    merged->wrapper_info_hash =
+      apr_hash_overlay(p, local->wrapper_info_hash,
+                       base->wrapper_info_hash);
+
+    if (!local->authenticator_info) {
+        merged->authenticator_info = base->authenticator_info;
+    }
+
+    if (!local->authorizer_info) {
+        merged->authorizer_info = base->authorizer_info;
+    }
+
+    if (!local->access_info) {
+        merged->access_info = base->access_info;
+    }
+
+    MERGE_SCALAR(base, local, merged, authenticator_authoritative);
+    MERGE_SCALAR(base, local, merged, authorizer_authoritative);
+    MERGE_SCALAR(base, local, merged, access_authoritative);
+
+    return merged;
+}
+
 const char *set_idle_timeout(cmd_parms * cmd, void *dummy, const char *arg)
 {
     server_rec *s = cmd->server;
@@ -586,6 +616,7 @@
     fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
 
     dirconfig->authenticator_authoritative = arg;
+    dirconfig->authenticator_authoritative_set = 1;
     return NULL;
 }
 
@@ -635,6 +666,7 @@
     fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
 
     dirconfig->authorizer_authoritative = arg;
+    dirconfig->authorizer_authoritative_set = 1;
     return NULL;
 }
 
@@ -683,6 +715,7 @@
     fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
 
     dirconfig->access_authoritative = arg;
+    dirconfig->access_authoritative_set = 1;
     return NULL;
 }
 

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.h
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.h?rev=817830&r1=817829&r2=817830&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.h (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.h Tue Sep 22 20:37:44 2009
@@ -100,20 +100,25 @@
 } fcgid_server_conf;
 
 typedef struct {
+    /* scalar values have corresponding _set field to aid merging */
+
     /* wrapper */
     apr_hash_t *wrapper_info_hash;
 
     /* authenticator */
     auth_conf *authenticator_info;
     int authenticator_authoritative;
+    int authenticator_authoritative_set;
 
     /* authorizer */
     auth_conf *authorizer_info;
     int authorizer_authoritative;
+    int authorizer_authoritative_set;
 
     /* access check */
     auth_conf *access_info;
     int access_authoritative;
+    int access_authoritative_set;
 } fcgid_dir_conf;
 
 void *create_fcgid_server_config(apr_pool_t * p, server_rec * s);
@@ -121,6 +126,8 @@
                                 void *overridesv);
 
 void *create_fcgid_dir_config(apr_pool_t * p, char *dummy);
+void *merge_fcgid_dir_config(apr_pool_t * p, void *basev,
+                             void *overridesv);
 
 const char *set_idle_timeout(cmd_parms * cmd, void *dummy,
                              const char *arg);

Modified: httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c?rev=817830&r1=817829&r2=817830&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c Tue Sep 22 20:37:44 2009
@@ -804,7 +804,7 @@
 module AP_MODULE_DECLARE_DATA fcgid_module = {
     STANDARD20_MODULE_STUFF,
     create_fcgid_dir_config,    /* create per-directory config structure */
-    NULL,                       /* merge per-directory config structures */
+    merge_fcgid_dir_config,     /* merge per-directory config structures */
     create_fcgid_server_config, /* create per-server config structure */
     merge_fcgid_server_config,  /* merge per-server config structures */
     fcgid_cmds,                 /* command apr_table_t */



Mime
View raw message