From 0d0d14cb4eefb098ebde7acab9d8c58a4ec6bfb3 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Wed, 8 Aug 2001 16:31:02 +0000 Subject: [PATCH] * walk_rtree.c (krb5_walk_realm_tree): Do not try to free const char * * mk_safe.c (krb5_mk_safe_basic): Do not declare local_addr and remote_addr const and then cast the attribute away. * mk_req_ext.c (krb5_generate_authenticator): Static function - remove const attribute from cksum pointer. * gc_via_tkt.c (krb5_get_cred_via_tkt): Cast unsigned integer krb5_error error_value to signed before adding ERROR_TABLE_BASE_krb5. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13677 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 14 ++++++++++++++ src/lib/krb5/krb/gc_via_tkt.c | 2 +- src/lib/krb5/krb/mk_req_ext.c | 6 +++--- src/lib/krb5/krb/mk_safe.c | 4 ++-- src/lib/krb5/krb/walk_rtree.c | 6 ++++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 223e7844d..4009fb29a 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,17 @@ +2001-08-08 + + * walk_rtree.c (krb5_walk_realm_tree): Do not try to free const char *. + + * mk_safe.c (krb5_mk_safe_basic): Do not declare local_addr and + remote_addr const and then cast the attribute away. + + * mk_req_ext.c (krb5_generate_authenticator): Static function - + remove const attribute from cksum pointer. + + * gc_via_tkt.c (krb5_get_cred_via_tkt): Cast unsigned integer + krb5_error error_value to signed before adding + ERROR_TABLE_BASE_krb5. + 2001-07-31 Ken Raeburn * chk_trans.c (krb5_check_transited_list): Pointer args now point diff --git a/src/lib/krb5/krb/gc_via_tkt.c b/src/lib/krb5/krb/gc_via_tkt.c index 20098781c..6eda0ce2c 100644 --- a/src/lib/krb5/krb/gc_via_tkt.c +++ b/src/lib/krb5/krb/gc_via_tkt.c @@ -179,7 +179,7 @@ krb5_get_cred_via_tkt (context, tkt, kdcoptions, address, in_cred, out_cred) if (retval) /* neither proper reply nor error! */ goto error_4; - retval = err_reply->error + ERROR_TABLE_BASE_krb5; + retval = (krb5_error_code) err_reply->error + ERROR_TABLE_BASE_krb5; krb5_free_error(context, err_reply); goto error_4; diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index 88daab567..7bb8781ee 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -67,7 +67,7 @@ static krb5_error_code krb5_generate_authenticator PROTOTYPE((krb5_context, krb5_authenticator *, krb5_principal, - const krb5_checksum *, krb5_keyblock *, + krb5_checksum *, krb5_keyblock *, krb5_int32, krb5_authdata ** )); KRB5_DLLIMP krb5_error_code KRB5_CALLCONV @@ -230,7 +230,7 @@ krb5_generate_authenticator(context, authent, client, cksum, key, seq_number, au krb5_context context; krb5_authenticator *authent; krb5_principal client; - const krb5_checksum *cksum; + krb5_checksum *cksum; krb5_keyblock *key; krb5_int32 seq_number; krb5_authdata **authorization; @@ -238,7 +238,7 @@ krb5_generate_authenticator(context, authent, client, cksum, key, seq_number, au krb5_error_code retval; authent->client = client; - authent->checksum = (krb5_checksum *)cksum; + authent->checksum = cksum; if (key) { retval = krb5_copy_keyblock(context, key, &authent->subkey); if (retval) diff --git a/src/lib/krb5/krb/mk_safe.c b/src/lib/krb5/krb/mk_safe.c index 063b3dbf4..dc636c7e9 100644 --- a/src/lib/krb5/krb/mk_safe.c +++ b/src/lib/krb5/krb/mk_safe.c @@ -53,8 +53,8 @@ krb5_mk_safe_basic(context, userdata, keyblock, replaydata, local_addr, const krb5_data * userdata; const krb5_keyblock * keyblock; krb5_replay_data * replaydata; - const krb5_address * local_addr; - const krb5_address * remote_addr; + krb5_address * local_addr; + krb5_address * remote_addr; const krb5_cksumtype sumtype; krb5_data * outbuf; { diff --git a/src/lib/krb5/krb/walk_rtree.c b/src/lib/krb5/krb/walk_rtree.c index 399f5acab..a3a7ee2bf 100644 --- a/src/lib/krb5/krb/walk_rtree.c +++ b/src/lib/krb5/krb/walk_rtree.c @@ -130,7 +130,8 @@ krb5_walk_realm_tree(context, client, server, tree, realm_branch_char) cap_names[2] = cap_server; cap_names[3] = 0; cap_code = profile_get_values(context->profile, cap_names, &cap_nodes); - krb5_xfree(cap_names[1]); /* done with client string */ + krb5_xfree(cap_client); /* done with client string */ + cap_names[1] = 0; if (cap_code == 0) { /* found a path, so lets use it */ links = 0; if (*cap_nodes[0] != '.') { /* a link of . means direct */ @@ -143,7 +144,8 @@ krb5_walk_realm_tree(context, client, server, tree, realm_branch_char) /* cleanup eaiser as well */ links++; /* count the null entry at end */ } else { /* no path use hierarchical method */ - krb5_xfree(cap_names[2]); /* failed, don't need server string */ + krb5_xfree(cap_server); /* failed, don't need server string */ + cap_names[2] = 0; #endif clen = client->length; slen = server->length; -- 2.26.2