From 324655468259d8bc2bea05f236ef0cf07d9b698f Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 15 Jun 1997 21:32:33 +0000 Subject: [PATCH] new field names in `krb5_address' git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1910 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/address.c | 2 +- lib/krb5/auth_context.c | 25 +++++++++++++++++++++---- lib/krb5/build_ap_req.c | 2 +- lib/krb5/get_addrs.c | 2 +- lib/krb5/mk_priv.c | 2 +- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/lib/krb5/address.c b/lib/krb5/address.c index 272b31d51..f0b5aff3b 100644 --- a/lib/krb5/address.c +++ b/lib/krb5/address.c @@ -20,7 +20,7 @@ krb5_address_compare(krb5_context context, const krb5_address *addr1, const krb5_address *addr2) { - return addr1->type == addr2->type + return addr1->addr_type == addr2->addr_type && memcmp (addr1->address.data, addr2->address.data, addr1->address.length); } diff --git a/lib/krb5/auth_context.c b/lib/krb5/auth_context.c index 346f8941c..545b78db1 100644 --- a/lib/krb5/auth_context.c +++ b/lib/krb5/auth_context.c @@ -56,11 +56,11 @@ krb5_auth_con_setaddrs(krb5_context context, krb5_address *local_addr, krb5_address *remote_addr) { - auth_context->local_address.type = local_addr->type; + auth_context->local_address.addr_type = local_addr->addr_type; krb5_data_copy (&auth_context->local_address.address, local_addr->address.data, local_addr->address.length); - auth_context->remote_address.type = remote_addr->type; + auth_context->remote_address.addr_type = remote_addr->addr_type; krb5_data_copy (&auth_context->remote_address.address, remote_addr->address.data, remote_addr->address.length); @@ -81,7 +81,7 @@ krb5_auth_con_getaddrs(krb5_context context, *local_addr = malloc (sizeof(**local_addr)); if (*local_addr == NULL) return ENOMEM; - (*local_addr)->type = auth_context->local_address.type; + (*local_addr)->addr_type = auth_context->local_address.addr_type; ret = krb5_data_copy (&(*local_addr)->address, auth_context->local_address.address.data, auth_context->local_address.address.length); @@ -93,7 +93,7 @@ krb5_auth_con_getaddrs(krb5_context context, *remote_addr = malloc (sizeof(**remote_addr)); if (*remote_addr == NULL) return ENOMEM; - (*remote_addr)->type = auth_context->remote_address.type; + (*remote_addr)->addr_type = auth_context->remote_address.addr_type; ret = krb5_data_copy (&(*remote_addr)->address, auth_context->remote_address.address.data, auth_context->remote_address.address.length); @@ -192,6 +192,14 @@ krb5_auth_getlocalseqnumber(krb5_context context, return 0; } +krb5_error_code +krb5_auth_setlocalseqnumber (krb5_context context, + krb5_auth_context auth_context, + int32_t seqnumber) +{ + auth_context->local_seqnumber = seqnumber; + return 0; +} krb5_error_code krb5_auth_getremoteseqnumber(krb5_context context, @@ -202,6 +210,15 @@ krb5_auth_getremoteseqnumber(krb5_context context, return 0; } +krb5_error_code +krb5_auth_setremoteseqnumber (krb5_context context, + krb5_auth_context auth_context, + int32_t seqnumber) +{ + auth_context->remote_seqnumber = seqnumber; + return 0; +} + krb5_error_code krb5_auth_getauthenticator(krb5_context context, diff --git a/lib/krb5/build_ap_req.c b/lib/krb5/build_ap_req.c index febd48897..a290829ab 100644 --- a/lib/krb5/build_ap_req.c +++ b/lib/krb5/build_ap_req.c @@ -40,7 +40,7 @@ krb5_build_ap_req (krb5_context context, ret->length = length_AP_REQ(&ap); ret->data = malloc(ret->length); - encode_AP_REQ(ret->data + ret->length - 1, ret->length, &ap); + encode_AP_REQ((char *)ret->data + ret->length - 1, ret->length, &ap); free_AP_REQ(&ap); return 0; diff --git a/lib/krb5/get_addrs.c b/lib/krb5/get_addrs.c index 68672696b..e09d6ce23 100644 --- a/lib/krb5/get_addrs.c +++ b/lib/krb5/get_addrs.c @@ -21,7 +21,7 @@ krb5_get_all_client_addrs (krb5_addresses *res) return errno; res->number = 1; res->addrs = malloc (sizeof(*res->addrs)); - res->addrs[0].type = hostent->h_addrtype; + res->addrs[0].addr_type = hostent->h_addrtype; res->addrs[0].address.data = NULL; res->addrs[0].address.length = 0; err = krb5_data_alloc (&res->addrs[0].address, hostent->h_length); diff --git a/lib/krb5/mk_priv.c b/lib/krb5/mk_priv.c index 0c34ff53c..dcec57763 100644 --- a/lib/krb5/mk_priv.c +++ b/lib/krb5/mk_priv.c @@ -32,7 +32,7 @@ krb5_mk_priv(krb5_context context, *(part.seq_number) = ++auth_context->local_seqnumber; } else part.seq_number = NULL; - part.s_address.addr_type = addr.addrs[0].type; + part.s_address.addr_type = addr.addrs[0].addr_type; part.s_address.address = addr.addrs[0].address; part.r_address = NULL;