Index: source/libsmb/clikrb5.c =================================================================== --- source/libsmb/clikrb5.c (revision 409) +++ source/libsmb/clikrb5.c (working copy) @@ -315,13 +321,11 @@ goto cleanup_creds; } - /* cope with ticket being in the future due to clock skew */ - if ((unsigned)credsp->times.starttime > time(NULL)) { - time_t t = time(NULL); - int time_offset =(unsigned)credsp->times.starttime-t; - DEBUG(4,("Advancing clock by %d seconds to cope with clock skew\n", time_offset)); - krb5_set_real_time(context, t + time_offset + 1, 0); - } + /* we always should adjust to the time of our kdc to avoid expiry-loops */ + time_t t = time(NULL); + int time_offset =(unsigned)credsp->times.starttime-t; + DEBUG(4,("Adjusting clock by %d seconds to cope with clock skew\n", time_offset)); + krb5_set_real_time(context, t + time_offset + 1, 0); if (!ads_cleanup_expired_creds(context, ccache, credsp)) creds_ready = True;