Fix earlier fix for not passing forwardable and friends in TGS-REQs

This commit is contained in:
Nicolas Williams
2012-03-14 23:23:28 -05:00
parent 48d255561e
commit 3f86831c6c

View File

@@ -172,6 +172,9 @@ init_tgs_req (krb5_context context,
goto fail; goto fail;
t->req_body.addresses = addresses; t->req_body.addresses = addresses;
t->req_body.kdc_options = flags.b; t->req_body.kdc_options = flags.b;
t->req_body.kdc_options.forwardable = krbtgt->flags.b.forwardable;
t->req_body.kdc_options.renewable = krbtgt->flags.b.renewable;
t->req_body.kdc_options.proxiable = krbtgt->flags.b.proxiable;
ret = copy_Realm(&in_creds->server->realm, &t->req_body.realm); ret = copy_Realm(&in_creds->server->realm, &t->req_body.realm);
if (ret) if (ret)
goto fail; goto fail;
@@ -188,6 +191,15 @@ init_tgs_req (krb5_context context,
if (ret) if (ret)
goto fail; goto fail;
if (krbtgt->times.starttime) {
ALLOC(t->req_body.from, 1);
if(t->req_body.from == NULL){
ret = krb5_enomem(context);
goto fail;
}
*t->req_body.from = in_creds->times.starttime;
}
/* req_body.till should be NULL if there is no endtime specified, /* req_body.till should be NULL if there is no endtime specified,
but old MIT code (like DCE secd) doesn't like that */ but old MIT code (like DCE secd) doesn't like that */
ALLOC(t->req_body.till, 1); ALLOC(t->req_body.till, 1);
@@ -197,6 +209,15 @@ init_tgs_req (krb5_context context,
} }
*t->req_body.till = in_creds->times.endtime; *t->req_body.till = in_creds->times.endtime;
if (t->req_body.kdc_options.renewable && krbtgt->times.renew_till) {
ALLOC(t->req_body.rtime, 1);
if(t->req_body.rtime == NULL){
ret = krb5_enomem(context);
goto fail;
}
*t->req_body.rtime = in_creds->times.renew_till;
}
t->req_body.nonce = nonce; t->req_body.nonce = nonce;
if(second_ticket){ if(second_ticket){
ALLOC(t->req_body.additional_tickets, 1); ALLOC(t->req_body.additional_tickets, 1);
@@ -1076,13 +1097,6 @@ _krb5_get_cred_kdc_any(krb5_context context,
context->kdc_usec_offset = 0; context->kdc_usec_offset = 0;
} }
if (in_creds->flags.b.renewable)
flags.b.renewable = 1;
if (in_creds->flags.b.forwardable)
flags.b.forwardable = 1;
if (in_creds->flags.b.proxiable)
flags.b.proxiable = 1;
ret = get_cred_kdc_referral(context, ret = get_cred_kdc_referral(context,
flags, flags,
ccache, ccache,