Blob Blame History Raw
# Fix for RH Bug #1250154 ("[s390x, ppc64, ppc64le]: kadmind does not
# accept ACL if kadm5.acl does not end with EOL")
# The code "accidently" works on x86/AMD64 because declaring a variable
# |char| results in an |unsigned char| by default while most other platforms
# (e.g. { s390x, ppc64, ppc64le, ...} ) default to |signed char|.
# Lesson learned: Use lint(1) for development by default (saying that 
# because Sun Studio lint(1) has found 38 more of these issues in
# krb1.13.2... ;-( )
# Written by Roland Mainz <rmainz@redhat.com>
--- a/src/lib/kadm5/srv/server_acl.c
+++ b/src/lib/kadm5/srv/server_acl.c
@@ -115,7 +115,7 @@
             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 */