From 9abde4f49646254ec5f06d870f95efee02dd0a66 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 30 Nov 2006 21:30:38 +0000 Subject: [PATCH] pull up r18859 from trunk r18859@cathode-dark-space: coffman | 2006-11-21 19:53:34 -0500 subject: fix debug messages ticket: new Tags: pullup Target_Version: 1.6 Change debugging messages so they print salt value correctly and clean up warnings when compiling with DEBUG. ticket: 4846 version_fixed: 1.6 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18885 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/preauth2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c index c7c083fe3..8a50ac257 100644 --- a/src/lib/krb5/krb/preauth2.c +++ b/src/lib/krb5/krb/preauth2.c @@ -561,8 +561,8 @@ krb5_error_code pa_enc_timestamp(krb5_context context, #ifdef DEBUG fprintf (stderr, "%s:%d: salt len=%d", __FILE__, __LINE__, salt->length); - if (salt->length > 0) - fprintf (stderr, " '%*s'", salt->length, salt->data); + if ((int) salt->length > 0) + fprintf (stderr, " '%.*s'", salt->length, salt->data); fprintf (stderr, "; *etype=%d request->ktype[0]=%d\n", *etype, request->ktype[0]); #endif @@ -1378,9 +1378,9 @@ krb5_do_preauth(krb5_context context, } #ifdef DEBUG - fprintf (stderr, "salt len=%d", salt->length); - if (salt->length > 0) - fprintf (stderr, " '%*s'", salt->length, salt->data); + fprintf (stderr, "salt len=%d", (int) salt->length); + if ((int) salt->length > 0) + fprintf (stderr, " '%.*s'", salt->length, salt->data); fprintf (stderr, "; preauth data types:"); for (i = 0; in_padata[i]; i++) { fprintf (stderr, " %d", in_padata[i]->pa_type); @@ -1399,7 +1399,7 @@ krb5_do_preauth(krb5_context context, int k, l, etype_found, valid_etype_found; /* * This is really gross, but is necessary to prevent - * lossge when talking to a 1.0.x KDC, which returns an + * lossage when talking to a 1.0.x KDC, which returns an * erroneous PA-PW-SALT when it returns a KRB-ERROR * requiring additional preauth. */ @@ -1487,7 +1487,7 @@ krb5_do_preauth(krb5_context context, fprintf (stderr, "etype info %d: etype %d salt len=%d", j, e->etype, e->length); if (e->length > 0 && e->length != KRB5_ETYPE_NO_SALT) - fprintf (stderr, " '%*s'", e->length, e->salt); + fprintf (stderr, " '%.*s'", e->length, e->salt); fprintf (stderr, "\n"); } #endif -- 2.26.2