]> granicus.if.org Git - apache/commitdiff
Don't log AuthMerging XXX as <RequireXXX>
authorStefan Fritsch <sf@apache.org>
Sat, 8 Jan 2011 14:37:09 +0000 (14:37 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 8 Jan 2011 14:37:09 +0000 (14:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1056717 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authz_core.c

index 8be3487b36c5fc11785f4f1dca596d539d0e577f..4a8be33297594c76a27edecd060fbd5d37bdd18d 100644 (file)
@@ -73,6 +73,9 @@ struct authz_section_conf {
     apr_int64_t limited;
     authz_logic_op op;
     int negate;
+    /** true if this is not a real container but produced by AuthMerging;
+     *  only used for logging */
+    int is_merged;
     authz_section_conf *first;
     authz_section_conf *next;
 };
@@ -136,6 +139,7 @@ static void *merge_authz_core_dir_config(apr_pool_t *p,
                     base->section->limited | new->section->limited;
 
                 section->op = new->op;
+                section->is_merged = 1;
 
                 section->first = apr_pmemdup(p, base->section,
                                              sizeof(*base->section));
@@ -325,7 +329,7 @@ static const char* format_authz_result(authz_status result)
             : ((result == AUTHZ_GRANTED)
                ? "granted"
                : ((result == AUTHZ_DENIED_NO_USER)
-                  ? "denied (no authenticated user)"
+                  ? "denied (no authenticated user yet)"
                   : "neutral")));
 }
 
@@ -336,11 +340,11 @@ static const char* format_authz_command(apr_pool_t *p,
             ? apr_pstrcat(p, "Require ", (section->negate ? "not " : ""),
                           section->provider_name, " ",
                           section->provider_args, NULL)
-            : apr_pstrcat(p, "<Require",
+            : apr_pstrcat(p, section->is_merged ? "AuthMerging " : "<Require",
                           ((section->op == AUTHZ_LOGIC_AND)
                            ? (section->negate ? "NotAll" : "All")
                            : (section->negate ? "None" : "Any")),
-                          ">", NULL));
+                          section->is_merged ? "" : ">", NULL));
 }
 
 static authz_section_conf* create_default_section(apr_pool_t *p)