krb5 commit: Fix bugs in kadm5_auth commit

Greg Hudson ghudson at mit.edu
Mon Aug 21 16:34:15 EDT 2017


https://github.com/krb5/krb5/commit/d9e8bdc9858a1dbe135db2d12c70854ef1851ce8
commit d9e8bdc9858a1dbe135db2d12c70854ef1851ce8
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sat Aug 19 14:21:31 2017 -0400

    Fix bugs in kadm5_auth commit
    
    Commit 92a1a7efe2fc43337416098f2227038a72f1e35a uses line after it is
    freed in load_acl_file().  Move the k5_setmsg() call earlier to fix
    it.  The same commit also used the wrong header underline in
    krb5_conf.rst for the kadm5_auth interface subsection.  Fix it.
    
    ticket: 8595

 doc/admin/conf_files/krb5_conf.rst |    2 +-
 src/kadmin/server/auth_acl.c       |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/admin/conf_files/krb5_conf.rst b/doc/admin/conf_files/krb5_conf.rst
index 7951149..fbcf192 100644
--- a/doc/admin/conf_files/krb5_conf.rst
+++ b/doc/admin/conf_files/krb5_conf.rst
@@ -781,7 +781,7 @@ in for this interface.
 .. _kadm5_auth:
 
 kadm5_auth interface
-====================
+####################
 
 The kadm5_auth section (introduced in release 1.16) controls modules
 for the kadmin authorization interface, which determines whether a
diff --git a/src/kadmin/server/auth_acl.c b/src/kadmin/server/auth_acl.c
index 1f804ba..efe9c69 100644
--- a/src/kadmin/server/auth_acl.c
+++ b/src/kadmin/server/auth_acl.c
@@ -418,12 +418,12 @@ load_acl_file(krb5_context context, const char *fname, struct acl_state *state)
             krb5_klog_syslog(LOG_ERR,
                              _("%s: syntax error at line %d <%.10s...>"),
                              fname, lineno, line);
-            free_acl_entries(state);
-            free(line);
-            fclose(fp);
             k5_setmsg(context, EINVAL,
                       _("%s: syntax error at line %d <%.10s...>"),
                       fname, lineno, line);
+            free_acl_entries(state);
+            free(line);
+            fclose(fp);
             return EINVAL;
         }
         entry_slot = &(*entry_slot)->next;


More information about the cvs-krb5 mailing list