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:
@@ -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);
|
error = (*a->context->func->open_ccache)(a->context, res, &a->ccache);
|
||||||
if (error == ccNoError) {
|
if (error == ccNoError) {
|
||||||
|
cc_time_t offset;
|
||||||
error = get_cc_name(a);
|
error = get_cc_name(a);
|
||||||
if (error != ccNoError) {
|
if (error != ccNoError) {
|
||||||
acc_close(context, *id);
|
acc_close(context, *id);
|
||||||
*id = NULL;
|
*id = NULL;
|
||||||
return translate_cc_error(context, error);
|
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) {
|
} else if (error == ccErrCCacheNotFound) {
|
||||||
a->ccache = NULL;
|
a->ccache = NULL;
|
||||||
a->cache_name = NULL;
|
a->cache_name = NULL;
|
||||||
@@ -572,6 +581,11 @@ acc_initialize(krb5_context context,
|
|||||||
name);
|
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);
|
return translate_cc_error(context, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user