From: Greg Hudson Date: Sat, 19 Aug 2017 18:21:31 +0000 (-0400) Subject: Fix bugs in kadm5_auth commit X-Git-Tag: krb5-1.16-beta1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9e8bdc9858a1dbe135db2d12c70854ef1851ce8;p=thirdparty%2Fkrb5.git 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 --- diff --git a/doc/admin/conf_files/krb5_conf.rst b/doc/admin/conf_files/krb5_conf.rst index 7951149132..fbcf192995 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 1f804badf1..efe9c6961b 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;