new field names in `krb5_address'

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1910 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-06-15 21:32:33 +00:00
parent 64e7108d89
commit 3246554682
5 changed files with 25 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ krb5_address_compare(krb5_context context,
const krb5_address *addr1, const krb5_address *addr1,
const krb5_address *addr2) 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); && memcmp (addr1->address.data, addr2->address.data, addr1->address.length);
} }

View File

@@ -56,11 +56,11 @@ krb5_auth_con_setaddrs(krb5_context context,
krb5_address *local_addr, krb5_address *local_addr,
krb5_address *remote_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, krb5_data_copy (&auth_context->local_address.address,
local_addr->address.data, local_addr->address.data,
local_addr->address.length); 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, krb5_data_copy (&auth_context->remote_address.address,
remote_addr->address.data, remote_addr->address.data,
remote_addr->address.length); remote_addr->address.length);
@@ -81,7 +81,7 @@ krb5_auth_con_getaddrs(krb5_context context,
*local_addr = malloc (sizeof(**local_addr)); *local_addr = malloc (sizeof(**local_addr));
if (*local_addr == NULL) if (*local_addr == NULL)
return ENOMEM; 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, ret = krb5_data_copy (&(*local_addr)->address,
auth_context->local_address.address.data, auth_context->local_address.address.data,
auth_context->local_address.address.length); auth_context->local_address.address.length);
@@ -93,7 +93,7 @@ krb5_auth_con_getaddrs(krb5_context context,
*remote_addr = malloc (sizeof(**remote_addr)); *remote_addr = malloc (sizeof(**remote_addr));
if (*remote_addr == NULL) if (*remote_addr == NULL)
return ENOMEM; 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, ret = krb5_data_copy (&(*remote_addr)->address,
auth_context->remote_address.address.data, auth_context->remote_address.address.data,
auth_context->remote_address.address.length); auth_context->remote_address.address.length);
@@ -192,6 +192,14 @@ krb5_auth_getlocalseqnumber(krb5_context context,
return 0; 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_error_code
krb5_auth_getremoteseqnumber(krb5_context context, krb5_auth_getremoteseqnumber(krb5_context context,
@@ -202,6 +210,15 @@ krb5_auth_getremoteseqnumber(krb5_context context,
return 0; 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_error_code
krb5_auth_getauthenticator(krb5_context context, krb5_auth_getauthenticator(krb5_context context,

View File

@@ -40,7 +40,7 @@ krb5_build_ap_req (krb5_context context,
ret->length = length_AP_REQ(&ap); ret->length = length_AP_REQ(&ap);
ret->data = malloc(ret->length); 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); free_AP_REQ(&ap);
return 0; return 0;

View File

@@ -21,7 +21,7 @@ krb5_get_all_client_addrs (krb5_addresses *res)
return errno; return errno;
res->number = 1; res->number = 1;
res->addrs = malloc (sizeof(*res->addrs)); 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.data = NULL;
res->addrs[0].address.length = 0; res->addrs[0].address.length = 0;
err = krb5_data_alloc (&res->addrs[0].address, hostent->h_length); err = krb5_data_alloc (&res->addrs[0].address, hostent->h_length);

View File

@@ -32,7 +32,7 @@ krb5_mk_priv(krb5_context context,
*(part.seq_number) = ++auth_context->local_seqnumber; *(part.seq_number) = ++auth_context->local_seqnumber;
} else } else
part.seq_number = NULL; 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.s_address.address = addr.addrs[0].address;
part.r_address = NULL; part.r_address = NULL;