Rename cred handle lifetime to endtime
And change type from OM_uint32 to time_t.
This commit is contained in:

committed by
Nicolas Williams

parent
3bb33fa6e8
commit
dee03d9bee
@@ -100,6 +100,7 @@ static OM_uint32 acquire_initiator_cred
|
|||||||
krb5_error_code kret;
|
krb5_error_code kret;
|
||||||
int try_get_init_creds = 0;
|
int try_get_init_creds = 0;
|
||||||
time_t now;
|
time_t now;
|
||||||
|
OM_uint32 left;
|
||||||
|
|
||||||
keytab = NULL;
|
keytab = NULL;
|
||||||
ccache = NULL;
|
ccache = NULL;
|
||||||
@@ -218,11 +219,7 @@ found:
|
|||||||
krb5_cc_close(context, ccache);
|
krb5_cc_close(context, ccache);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
/*
|
handle->endtime = now + left;
|
||||||
* XXX: This is persistent state, and needs to be absolute not
|
|
||||||
* relative time, and so the field name is wrong!
|
|
||||||
*/
|
|
||||||
handle->lifetime = now + left;
|
|
||||||
handle->ccache = ccache;
|
handle->ccache = ccache;
|
||||||
ret = GSS_S_COMPLETE;
|
ret = GSS_S_COMPLETE;
|
||||||
kret = 0;
|
kret = 0;
|
||||||
|
@@ -134,7 +134,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_add_cred (
|
|||||||
}
|
}
|
||||||
|
|
||||||
handle->usage = cred_usage;
|
handle->usage = cred_usage;
|
||||||
handle->lifetime = cred->lifetime;
|
handle->endtime = cred->endtime;
|
||||||
handle->principal = NULL;
|
handle->principal = NULL;
|
||||||
handle->keytab = NULL;
|
handle->keytab = NULL;
|
||||||
handle->ccache = NULL;
|
handle->ccache = NULL;
|
||||||
|
@@ -129,11 +129,7 @@ _gsskrb5_krb5_import_cred(OM_uint32 *minor_status,
|
|||||||
free(handle);
|
free(handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/*
|
handle->endtime = now + left;
|
||||||
* XXX: This is a stored value, hence an absolute time, and the field
|
|
||||||
* name is misleading.
|
|
||||||
*/
|
|
||||||
handle->lifetime = now + left;
|
|
||||||
|
|
||||||
kret = krb5_cc_get_full_name(context, id, &str);
|
kret = krb5_cc_get_full_name(context, id, &str);
|
||||||
if (kret)
|
if (kret)
|
||||||
|
@@ -95,7 +95,7 @@ typedef struct {
|
|||||||
#define GSS_CF_DESTROY_CRED_ON_RELEASE 1
|
#define GSS_CF_DESTROY_CRED_ON_RELEASE 1
|
||||||
#define GSS_CF_NO_CI_FLAGS 2
|
#define GSS_CF_NO_CI_FLAGS 2
|
||||||
struct krb5_keytab_data *keytab;
|
struct krb5_keytab_data *keytab;
|
||||||
OM_uint32 lifetime;
|
time_t endtime;
|
||||||
gss_cred_usage_t usage;
|
gss_cred_usage_t usage;
|
||||||
gss_OID_set mechanisms;
|
gss_OID_set mechanisms;
|
||||||
struct krb5_ccache_data *ccache;
|
struct krb5_ccache_data *ccache;
|
||||||
|
@@ -198,7 +198,7 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_cred
|
|||||||
if (lifetime != NULL) {
|
if (lifetime != NULL) {
|
||||||
ret = _gsskrb5_lifetime_left(minor_status,
|
ret = _gsskrb5_lifetime_left(minor_status,
|
||||||
context,
|
context,
|
||||||
cred->lifetime,
|
cred->endtime,
|
||||||
lifetime);
|
lifetime);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
Reference in New Issue
Block a user