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:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user