diff options
author | Jeremy Allison <jra@samba.org> | 2003-01-19 22:25:34 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-01-19 22:25:34 +0000 |
commit | a45db02a82a42d6ac616c3a1efe73272ccbd69b5 (patch) | |
tree | 8096328fbebc576fc187d612111b1b217daaa94e /source3/libsmb | |
parent | 52b65f70caa1c6ac3f978cd3a349de921fe1eea7 (diff) | |
download | samba-a45db02a82a42d6ac616c3a1efe73272ccbd69b5.tar.gz samba-a45db02a82a42d6ac616c3a1efe73272ccbd69b5.tar.bz2 samba-a45db02a82a42d6ac616c3a1efe73272ccbd69b5.zip |
Merge in more of the SuSE patches for Heimdal. These changes show how
to add a function without an explicit #ifdef HEIMDAL which I'm trying
to avoid.
Jeremy.
(This used to be commit 77aeb262ef7c7cd3d206afe2d5445caaca943dfd)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clikrb5.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index cca2a9cd3a..20d0906e71 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -2,6 +2,7 @@ Unix SMB/CIFS implementation. simple kerberos5 routines for active directory Copyright (C) Andrew Tridgell 2001 + Copyright (C) Luke Howard 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +22,34 @@ #include "includes.h" #ifdef HAVE_KRB5 + +#ifndef KRB5_SET_REAL_TIME +/* + * This function is not in the Heimdal mainline. + */ +krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds) +{ + krb5_error_code ret; + int32_t sec, usec; + + ret = krb5_us_timeofday(context, &sec, &usec); + if (ret) + return ret; + + context->kdc_sec_offset = seconds - sec; + context->kdc_usec_offset = microseconds - usec; + + return 0; +} +#endif + +#if defined(HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES) && !defined(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES) +krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc) +{ + return krb5_set_default_in_tkt_etypes(ctx, enc); +} +#endif + /* we can't use krb5_mk_req because w2k wants the service to be in a particular format */ |