Blame SOURCES/krb5-1.14-kadmind_defunct_on_platforms_where_char_is_signed_char.patch

01ee0a
# Fix for RH Bug #1250154 ("[s390x, ppc64, ppc64le]: kadmind does not
01ee0a
# accept ACL if kadm5.acl does not end with EOL")
01ee0a
# The code "accidently" works on x86/AMD64 because declaring a variable
01ee0a
# |char| results in an |unsigned char| by default while most other platforms
01ee0a
# (e.g. { s390x, ppc64, ppc64le, ...} ) default to |signed char|.
01ee0a
# Lesson learned: Use lint(1) for development by default (saying that 
01ee0a
# because Sun Studio lint(1) has found 38 more of these issues in
01ee0a
# krb1.13.2... ;-( )
01ee0a
# Written by Roland Mainz <rmainz@redhat.com>
01ee0a
--- a/src/lib/kadm5/srv/server_acl.c
01ee0a
+++ b/src/lib/kadm5/srv/server_acl.c
01ee0a
@@ -115,7 +115,7 @@
01ee0a
             int byte;
01ee0a
             byte = fgetc(fp);
01ee0a
             acl_buf[i] = byte;
01ee0a
-            if (byte == (char)EOF) {
01ee0a
+            if (byte == EOF) {
01ee0a
                 if (i > 0 && acl_buf[i-1] == '\\')
01ee0a
                     i--;
01ee0a
                 break;          /* it gets nulled-out below */
01ee0a
01ee0a