Add support for setting and getting kdc offset

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24910 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-03-22 17:21:50 +00:00
parent 3bbe9c48e1
commit 83595c6202

View File

@@ -491,12 +491,21 @@ acc_resolve(krb5_context context, krb5_ccache *id, const char *res)
error = (*a->context->func->open_ccache)(a->context, res, &a->ccache);
if (error == ccNoError) {
cc_time_t offset;
error = get_cc_name(a);
if (error != ccNoError) {
acc_close(context, *id);
*id = NULL;
return translate_cc_error(context, error);
}
error = (*a->ccache->func->get_kdc_time_offset)(a->ccache,
cc_credentials_v5,
&offset);
if (error == 0)
context->kdc_sec_offset = offset;
error = 0;
} else if (error == ccErrCCacheNotFound) {
a->ccache = NULL;
a->cache_name = NULL;
@@ -572,6 +581,11 @@ acc_initialize(krb5_context context,
name);
}
if (error == 0 && context->kdc_sec_offset)
error = (*a->ccache->func->set_kdc_time_offset)(a->ccache,
cc_credentials_v5,
context->kdc_sec_offset);
return translate_cc_error(context, error);
}