From: Ezra Peisach Date: Wed, 25 Jul 2001 10:23:36 +0000 (+0000) Subject: * in_tkt_sky.c (krb5_get_in_tkt_with_skey): Change cast from X-Git-Tag: krb5-1.3-alpha1~1175 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70fba736453bed0a85208ff75497ca4005438411;p=krb5.git * in_tkt_sky.c (krb5_get_in_tkt_with_skey): Change cast from krb5_pointer to krb5_const_pointer to ensure const integrity of parameter. * in_tkt_ktb.c (keytab_keyproc): Add const argument to cast of keyseed to struct keytab_keyproc_arg to maintain const status. * conv_princ.c (krb5_524_conv_principal): Cast argument to memcpy to size_t. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13636 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 17ad9ca04..493e92c3e 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,15 @@ +2001-07-24 Ezra Peisach + + * in_tkt_sky.c (krb5_get_in_tkt_with_skey): Change cast from + krb5_pointer to krb5_const_pointer to ensure const integrity of + parameter. + + * in_tkt_ktb.c (keytab_keyproc): Add const argument to cast of + keyseed to struct keytab_keyproc_arg to maintain const status. + + * conv_princ.c (krb5_524_conv_principal): Cast argument to memcpy + to size_t. + 2001-07-06 Ezra Peisach * conv_princ.c (krb5_425_conv_principal): Cast argument to tolower diff --git a/src/lib/krb5/krb/conv_princ.c b/src/lib/krb5/krb/conv_princ.c index 71c5d27b0..3897f5621 100644 --- a/src/lib/krb5/krb/conv_princ.c +++ b/src/lib/krb5/krb/conv_princ.c @@ -161,7 +161,7 @@ krb5_524_conv_principal(context, princ, name, inst, realm) c = strnchr(compo->data, '.', compo->length); if (!c || (c - compo->data) >= INST_SZ - 1) return KRB5_INVALID_PRINCIPAL; - memcpy(inst, compo->data, c - compo->data); + memcpy(inst, compo->data, (size_t) (c - compo->data)); inst[c - compo->data] = '\0'; } break; diff --git a/src/lib/krb5/krb/in_tkt_ktb.c b/src/lib/krb5/krb/in_tkt_ktb.c index a0ced3372..883587fb0 100644 --- a/src/lib/krb5/krb/in_tkt_ktb.c +++ b/src/lib/krb5/krb/in_tkt_ktb.c @@ -55,7 +55,8 @@ keytab_keyproc(context, type, salt, keyseed, key) krb5_const_pointer keyseed; krb5_keyblock ** key; { - struct keytab_keyproc_arg * arg = (struct keytab_keyproc_arg *)keyseed; + const struct keytab_keyproc_arg * arg = + (const struct keytab_keyproc_arg *)keyseed; krb5_keyblock *realkey; krb5_error_code retval = 0; krb5_keytab kt_id; diff --git a/src/lib/krb5/krb/in_tkt_sky.c b/src/lib/krb5/krb/in_tkt_sky.c index 21386affc..672f48598 100644 --- a/src/lib/krb5/krb/in_tkt_sky.c +++ b/src/lib/krb5/krb/in_tkt_sky.c @@ -113,7 +113,7 @@ krb5_get_in_tkt_with_skey(context, options, addrs, ktypes, pre_auth_types, { if (key) return krb5_get_in_tkt(context, options, addrs, ktypes, pre_auth_types, - skey_keyproc, (krb5_pointer)key, + skey_keyproc, (krb5_const_pointer)key, krb5_kdc_rep_decrypt_proc, 0, creds, ccache, ret_as_reply); else