]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix scope of kadmind ACL wildcard back-references 260/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 12 Mar 2015 20:36:33 +0000 (16:36 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sat, 14 Mar 2015 03:25:46 +0000 (23:25 -0400)
In kadm5int_acl_find_entry(), clear the wildcard back-references list
for each acl entry.  Otherwise the wildcards we process can affect
back-references for later entries.

ticket: 8154
target_version: 1.13.2
tags: pullup

src/lib/kadm5/srv/server_acl.c
src/tests/t_kadmin_acl.py

index a35d795dc067ca9d268382a4a5b7dd4fb16f1d23..86e136741e7309a6112a063b672d9777a021fd31 100644 (file)
@@ -610,8 +610,8 @@ kadm5int_acl_find_entry(kcontext, principal, dest_princ)
     wildstate_t         state;
 
     DPRINT(DEBUG_CALLS, acl_debug_level, ("* kadm5int_acl_find_entry()\n"));
-    memset(&state, 0, sizeof state);
     for (entry=acl_list_head; entry; entry = entry->ae_next) {
+        memset(&state, 0, sizeof(state));
         if (entry->ae_name_bad)
             continue;
         if (!strcmp(entry->ae_name, "*")) {
index 9ccc80b3a3d8e2a5f4e24f5fb648aaca1630262a..6f5c58981357e142a00aa765697a418a47731051 100644 (file)
@@ -61,6 +61,8 @@ restricted_modify  im  *         +preauth
 restricted_rename  ad  *         +preauth
 
 */*                d   *2/*1
+# The next line is a regression test for #8154; it is not used directly.
+one/*/*/five       l
 */two/*/*          d   *3/*1/*2
 */admin            a
 wctarget           a   wild/*