[29969] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix kadm5.acl error reporting

daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Jun 19 15:44:31 2017

Date: Mon, 19 Jun 2017 15:44:27 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201706191944.v5JJiREs016780@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/3efb19294012ad38ac3a95d407e739313838c68a
commit 3efb19294012ad38ac3a95d407e739313838c68a
Author: Greg Hudson <ghudson@mit.edu>
Date:   Mon Jun 19 11:30:38 2017 -0400

    Fix kadm5.acl error reporting
    
    In kadm5int_acl_get_line(), increment *lnp after skipping a blank or
    comment line, so that kadm5int_acl_load_acl_file() correctly reports
    the line number if it fails to parse a line.
    
    In acl_syn_err_msg, use %.10s to limit the amount of the line included
    in the error message, not %10s to left-pad it with spaces if it is
    shorter than ten characters.
    
    ticket: 8588 (new)
    target_version: 1.15-next
    target_version: 1.14-next
    tags: pullup

 src/lib/kadm5/srv/server_acl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/kadm5/srv/server_acl.c b/src/lib/kadm5/srv/server_acl.c
index c2cf691..679fc7c 100644
--- a/src/lib/kadm5/srv/server_acl.c
+++ b/src/lib/kadm5/srv/server_acl.c
@@ -91,7 +91,7 @@ static const char *acl_line2long_msg = N_("%s: line %d too long, truncated");
 static const char *acl_op_bad_msg = N_("Unrecognized ACL operation '%c' in "
                                        "%s");
 static const char *acl_syn_err_msg = N_("%s: syntax error at line %d "
-                                        "<%10s...>");
+                                        "<%.10s...>");
 static const char *acl_cantopen_msg = N_("%s while opening ACL file %s");
 
 /*
@@ -107,9 +107,9 @@ kadm5int_acl_get_line(fp, lnp)
     static int  line_incr = 0;
     static char acl_buf[BUFSIZ];
 
-    *lnp += line_incr;
-    line_incr = 0;
     for (domore = 1; domore && !feof(fp); ) {
+        *lnp += line_incr;
+        line_incr = 0;
         /* Copy in the line, with continuations */
         for (i = 0; ((i < BUFSIZ) && !feof(fp)); i++) {
             int byte;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post