httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chr...@apache.org
Subject svn commit: r709742 - /httpd/httpd/trunk/modules/aaa/mod_authz_core.c
Date Sat, 01 Nov 2008 18:22:55 GMT
Author: chrisd
Date: Sat Nov  1 11:22:55 2008
New Revision: 709742

URL: http://svn.apache.org/viewvc?rev=709742&view=rev
Log:
move some variable initializations prior to larger changes

Modified:
    httpd/httpd/trunk/modules/aaa/mod_authz_core.c

Modified: httpd/httpd/trunk/modules/aaa/mod_authz_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_core.c?rev=709742&r1=709741&r2=709742&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authz_core.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authz_core.c Sat Nov  1 11:22:55 2008
@@ -194,10 +194,13 @@
         if (prvdraliasrec) {
             ap_conf_vector_t *orig_dir_config = r->per_dir_config;
 
-            r->per_dir_config = ap_merge_per_dir_configs(r->pool, orig_dir_config,
-                                                         prvdraliasrec->sec_auth);
-            ret = prvdraliasrec->provider->check_authorization(r,
-                                                    prvdraliasrec->provider_args);
+            r->per_dir_config =
+                ap_merge_per_dir_configs(r->pool, orig_dir_config,
+                                         prvdraliasrec->sec_auth);
+
+            ret = prvdraliasrec->provider->
+                check_authorization(r, prvdraliasrec->provider_args);
+
             r->per_dir_config = orig_dir_config;
         }
     }
@@ -213,14 +216,14 @@
 static const char *authz_require_alias_section(cmd_parms *cmd, void *mconfig,
                                                const char *arg)
 {
-    int old_overrides = cmd->override;
     const char *endp = ap_strrchr_c(arg, '>');
     const char *args;
-    char *provider_alias;
     char *provider_name;
+    char *provider_alias;
     char *provider_args;
-    const char *errmsg;
     ap_conf_vector_t *new_authz_config = ap_create_per_dir_config(cmd->pool);
+    int old_overrides = cmd->override;
+    const char *errmsg;
 
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -525,14 +528,15 @@
     return merge_authz_provider(conf, newp);
 }
 
-static const char *authz_require_section(cmd_parms *cmd, void *mconfig, const char *arg)
+static const char *authz_require_section(cmd_parms *cmd,
+                                         void *mconfig, const char *arg)
 {
-    int old_overrides = cmd->override;
+    authz_core_dir_conf *conf = (authz_core_dir_conf*)mconfig;
     const char *endp = ap_strrchr_c(arg, '>');
     const char *args;
-    const char *errmsg;
     authz_request_state old_reqstate;
-    authz_core_dir_conf *conf = (authz_core_dir_conf*)mconfig;
+    int old_overrides = cmd->override;
+    const char *errmsg;
 
     if (endp == NULL) {
         return apr_pstrcat(cmd->pool, cmd->cmd->name,
@@ -745,12 +749,13 @@
 
 static int authorize_user(request_rec *r)
 {
-    authz_core_dir_conf *conf = ap_get_module_config(r->per_dir_config,
-            &authz_core_module);
+    authz_core_dir_conf *conf;
     authz_status auth_result;
     authz_provider_list *current_provider;
     const char *note = apr_table_get(r->notes, AUTHZ_ACCESS_PASSED_NOTE);
 
+    conf = ap_get_module_config(r->per_dir_config, &authz_core_module);
+
     /* If we're not really configured for providers, stop now. */
     if (!conf->providers) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
@@ -813,11 +818,12 @@
 
 static int authz_some_auth_required(request_rec *r)
 {
-    authz_core_dir_conf *conf = ap_get_module_config(r->per_dir_config,
-            &authz_core_module);
+    authz_core_dir_conf *conf;
     authz_provider_list *current_provider;
     int req_authz = 0;
 
+    conf = ap_get_module_config(r->per_dir_config, &authz_core_module);
+
     current_provider = conf->providers;
 
     while (current_provider) {



Mime
View raw message