krb5 commit: Rename gss-krb5 cred tgt_expire field
Greg Hudson
ghudson at MIT.EDU
Wed Jun 27 16:05:01 EDT 2012
https://github.com/krb5/krb5/commit/5ed88352a193c1b23991f47989fb623b16eaee48
commit 5ed88352a193c1b23991f47989fb623b16eaee48
Author: Greg Hudson <ghudson at mit.edu>
Date: Wed Jun 27 16:04:32 2012 -0400
Rename gss-krb5 cred tgt_expire field
The tgt_expire field is used to store non-TGT expiry times in a couple
of cases: when the ccache has no TGT, and after we've obtained a cred
for the target service. Rename it to just "expire" to be less
misleading.
src/lib/gssapi/krb5/accept_sec_context.c | 2 +-
src/lib/gssapi/krb5/acquire_cred.c | 4 ++--
src/lib/gssapi/krb5/gssapiP_krb5.h | 2 +-
src/lib/gssapi/krb5/iakerb.c | 4 ++--
src/lib/gssapi/krb5/init_sec_context.c | 2 +-
src/lib/gssapi/krb5/inq_cred.c | 4 ++--
src/lib/gssapi/krb5/s4u_gss_glue.c | 4 ++--
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c
index 72b5201..957f860 100644
--- a/src/lib/gssapi/krb5/accept_sec_context.c
+++ b/src/lib/gssapi/krb5/accept_sec_context.c
@@ -251,7 +251,7 @@ rd_and_store_for_creds(context, auth_context, inbuf, out_cred)
cred->usage = GSS_C_INITIATE; /* we can't accept with this */
/* cred->name already set */
cred->keytab = NULL; /* no keytab associated with this... */
- cred->tgt_expire = creds[0]->times.endtime; /* store the end time */
+ cred->expire = creds[0]->times.endtime; /* store the end time */
cred->ccache = ccache; /* the ccache containing the credential */
cred->destroy_ccache = 1;
ccache = NULL; /* cred takes ownership so don't destroy */
diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c
index ef3f1df..8b31990 100644
--- a/src/lib/gssapi/krb5/acquire_cred.c
+++ b/src/lib/gssapi/krb5/acquire_cred.c
@@ -458,7 +458,7 @@ scan_ccache(krb5_context context, krb5_gss_cred_id_rec *cred,
endtime = creds.times.endtime;
krb5_free_cred_contents(context, &creds);
if (is_tgt || !got_endtime)
- cred->tgt_expire = creds.times.endtime;
+ cred->expire = creds.times.endtime;
got_endtime = 1;
}
krb5_cc_end_seq_get(context, ccache, &cursor);
@@ -657,7 +657,7 @@ acquire_cred(OM_uint32 *minor_status, gss_name_t desired_name,
goto krb_error_out;
if (time_rec)
- *time_rec = (cred->tgt_expire > now) ? (cred->tgt_expire - now) : 0;
+ *time_rec = (cred->expire > now) ? (cred->expire - now) : 0;
}
*minor_status = 0;
diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h
index e263a2b..5621dbd 100644
--- a/src/lib/gssapi/krb5/gssapiP_krb5.h
+++ b/src/lib/gssapi/krb5/gssapiP_krb5.h
@@ -183,7 +183,7 @@ typedef struct _krb5_gss_cred_id_rec {
/* ccache (init) data */
krb5_ccache ccache;
- krb5_timestamp tgt_expire;
+ krb5_timestamp expire;
krb5_enctype *req_enctypes; /* limit negotiated enctypes to this list */
char *password;
} krb5_gss_cred_id_rec, *krb5_gss_cred_id_t;
diff --git a/src/lib/gssapi/krb5/iakerb.c b/src/lib/gssapi/krb5/iakerb.c
index 6081931..31fd190 100644
--- a/src/lib/gssapi/krb5/iakerb.c
+++ b/src/lib/gssapi/krb5/iakerb.c
@@ -549,7 +549,7 @@ iakerb_initiator_step(iakerb_ctx_id_t ctx,
goto cleanup;
if (!(flags & KRB5_INIT_CREDS_STEP_FLAG_CONTINUE)) {
krb5_init_creds_get_times(ctx->k5c, ctx->icc, ×);
- cred->tgt_expire = times.endtime;
+ cred->expire = times.endtime;
krb5_init_creds_free(ctx->k5c, ctx->icc);
ctx->icc = NULL;
@@ -571,7 +571,7 @@ iakerb_initiator_step(iakerb_ctx_id_t ctx,
goto cleanup;
if (!(flags & KRB5_TKT_CREDS_STEP_FLAG_CONTINUE)) {
krb5_tkt_creds_get_times(ctx->k5c, ctx->tcc, ×);
- cred->tgt_expire = times.endtime;
+ cred->expire = times.endtime;
krb5_tkt_creds_free(ctx->k5c, ctx->tcc);
ctx->tcc = NULL;
diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c
index 1091d06..6451a6d 100644
--- a/src/lib/gssapi/krb5/init_sec_context.c
+++ b/src/lib/gssapi/krb5/init_sec_context.c
@@ -212,7 +212,7 @@ static krb5_error_code get_credentials(context, cred, server, now,
krb5_free_cred_contents(context, &tgt_creds);
goto cleanup;
}
- cred->tgt_expire = tgt_creds.times.endtime;
+ cred->expire = tgt_creds.times.endtime;
krb5_free_cred_contents(context, &tgt_creds);
code = krb5_get_credentials(context, flags, cred->ccache,
diff --git a/src/lib/gssapi/krb5/inq_cred.c b/src/lib/gssapi/krb5/inq_cred.c
index 78685db..4e35a05 100644
--- a/src/lib/gssapi/krb5/inq_cred.c
+++ b/src/lib/gssapi/krb5/inq_cred.c
@@ -130,8 +130,8 @@ krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret,
goto fail;
}
- if (cred->tgt_expire > 0) {
- if ((lifetime = cred->tgt_expire - now) < 0)
+ if (cred->expire > 0) {
+ if ((lifetime = cred->expire - now) < 0)
lifetime = 0;
}
else
diff --git a/src/lib/gssapi/krb5/s4u_gss_glue.c b/src/lib/gssapi/krb5/s4u_gss_glue.c
index 4b37c5a..79d83ee 100644
--- a/src/lib/gssapi/krb5/s4u_gss_glue.c
+++ b/src/lib/gssapi/krb5/s4u_gss_glue.c
@@ -243,7 +243,7 @@ kg_compose_deleg_cred(OM_uint32 *minor_status,
cred->usage = GSS_C_INITIATE;
- cred->tgt_expire = subject_creds->times.endtime;
+ cred->expire = subject_creds->times.endtime;
code = kg_init_name(context, subject_creds->client, NULL, NULL, NULL, 0,
&cred->name);
@@ -282,7 +282,7 @@ kg_compose_deleg_cred(OM_uint32 *minor_status,
if (code != 0)
goto cleanup;
- *time_rec = cred->tgt_expire - now;
+ *time_rec = cred->expire - now;
}
major_status = GSS_S_COMPLETE;
More information about the cvs-krb5
mailing list