summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin Coffman <kwc@citi.umich.edu>2006-11-22 00:53:34 +0000
committerKevin Coffman <kwc@citi.umich.edu>2006-11-22 00:53:34 +0000
commit689afadffe2bc82d04363510fca67df96614ea97 (patch)
tree741c2eeec5029d7229a0a3f8ed37218fe8978ac5 /src
parent72f985d74ba277bb630356ee2fcde4824bd70813 (diff)
downloadkrb5-689afadffe2bc82d04363510fca67df96614ea97.tar.gz
krb5-689afadffe2bc82d04363510fca67df96614ea97.tar.xz
krb5-689afadffe2bc82d04363510fca67df96614ea97.zip
fix debug messages
Change debugging messages so they print salt value correctly and clean up warnings when compiling with DEBUG. ticket: new Tags: pullup Target_Version: 1.6 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18859 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/preauth2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index 6530ea907..81b7e2c57 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