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

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

krb5 commit [krb5-1.13]: Fix EOF check in kadm5.acl line processing

daemon@ATHENA.MIT.EDU (Tom Yu)
Fri Jan 15 17:10:31 2016

Date: Fri, 15 Jan 2016 17:10:27 -0500
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201601152210.u0FMARKG005943@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/8a697b6ef9d4e528a33c66c781403698551982fc
commit 8a697b6ef9d4e528a33c66c781403698551982fc
Author: Robbie Harwood <rharwood@redhat.com>
Date:   Wed Jan 13 18:17:09 2016 -0500

    Fix EOF check in kadm5.acl line processing
    
    On platforms where the char type is unsigned, the check for EOF (which
    is negative) will always fail, leaving a 255 byte at the end of the
    line.  This can cause a syntax error, in turn causing the contents of
    kadm5.acl to be ignored.  Fix this bug by removing the cast on EOF.
    
    [ghudson@mit.edu: more precisely describe consequences of bug in
    commit message]
    
    (cherry picked from commit 8fd85a77789496b8d7f8092f6e8a2824bc09a6cf)
    
    ticket: 8346
    version_fixed: 1.13.4
    tags: -pullup
    status: resolved

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

diff --git a/src/lib/kadm5/srv/server_acl.c b/src/lib/kadm5/srv/server_acl.c
index 64f7385..719f6de 100644
--- a/src/lib/kadm5/srv/server_acl.c
+++ b/src/lib/kadm5/srv/server_acl.c
@@ -115,7 +115,7 @@ kadm5int_acl_get_line(fp, lnp)
             int byte;
             byte = fgetc(fp);
             acl_buf[i] = byte;
-            if (byte == (char)EOF) {
+            if (byte == EOF) {
                 if (i > 0 && acl_buf[i-1] == '\\')
                     i--;
                 break;          /* it gets nulled-out below */
_______________________________________________
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