Always use the kdc_flags in the right bit order.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18200 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-10-02 11:54:45 +00:00
parent 0766e2a20a
commit 204118e4d1
2 changed files with 7 additions and 10 deletions

View File

@@ -409,7 +409,7 @@ add_padata(krb5_context context,
static krb5_error_code static krb5_error_code
init_as_req (krb5_context context, init_as_req (krb5_context context,
krb5_kdc_flags opts, KDCOptions opts,
krb5_creds *creds, krb5_creds *creds,
const krb5_addresses *addrs, const krb5_addresses *addrs,
const krb5_enctype *etypes, const krb5_enctype *etypes,
@@ -427,7 +427,7 @@ init_as_req (krb5_context context,
a->pvno = 5; a->pvno = 5;
a->msg_type = krb_as_req; a->msg_type = krb_as_req;
a->req_body.kdc_options = opts.b; a->req_body.kdc_options = opts;
a->req_body.cname = malloc(sizeof(*a->req_body.cname)); a->req_body.cname = malloc(sizeof(*a->req_body.cname));
if (a->req_body.cname == NULL) { if (a->req_body.cname == NULL) {
ret = ENOMEM; ret = ENOMEM;
@@ -647,14 +647,14 @@ krb5_get_in_cred(krb5_context context,
krb5_salt salt; krb5_salt salt;
krb5_keyblock *key; krb5_keyblock *key;
size_t size; size_t size;
krb5_kdc_flags opts; KDCOptions opts;
PA_DATA *pa; PA_DATA *pa;
krb5_enctype etype; krb5_enctype etype;
krb5_preauthdata *my_preauth = NULL; krb5_preauthdata *my_preauth = NULL;
unsigned nonce; unsigned nonce;
int done; int done;
opts.i = options; opts = int2KDCOptions(options);
krb5_generate_random_block (&nonce, sizeof(nonce)); krb5_generate_random_block (&nonce, sizeof(nonce));
nonce &= 0xffffffff; nonce &= 0xffffffff;
@@ -799,12 +799,9 @@ krb5_get_in_tkt(krb5_context context,
krb5_kdc_rep *ret_as_reply) krb5_kdc_rep *ret_as_reply)
{ {
krb5_error_code ret; krb5_error_code ret;
krb5_kdc_flags opts;
opts.i = 0;
opts.b = int2KDCOptions(options);
ret = krb5_get_in_cred (context, ret = krb5_get_in_cred (context,
opts.i, options,
addrs, addrs,
etypes, etypes,
ptypes, ptypes,

View File

@@ -513,7 +513,7 @@ krb5_get_init_creds_keytab(krb5_context context,
a->keytab = keytab; a->keytab = keytab;
ret = krb5_get_in_cred (context, ret = krb5_get_in_cred (context,
ctx.flags.i, KDCOptions2int(ctx.flags),
ctx.addrs, ctx.addrs,
ctx.etypes, ctx.etypes,
ctx.pre_auth_types, ctx.pre_auth_types,
@@ -1559,7 +1559,7 @@ krb5_get_init_creds_keyblock(krb5_context context,
goto out; goto out;
ret = krb5_get_in_cred (context, ret = krb5_get_in_cred (context,
ctx.flags.i, KDCOptions2int(ctx.flags),
ctx.addrs, ctx.addrs,
ctx.etypes, ctx.etypes,
ctx.pre_auth_types, ctx.pre_auth_types,