From: Robbie Harwood Date: Wed, 14 Aug 2019 17:52:27 +0000 (-0400) Subject: Fix KCM client time offset propagation X-Git-Tag: krb5-1.18-beta1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F969%2Fhead;p=thirdparty%2Fkrb5.git Fix KCM client time offset propagation An inverted status check in get_kdc_offset() would cause querying the offset time from the ccache to always fail (silently) on KCM. Fix the status check so that KCM can properly handle desync. ticket: 8826 (new) tags: pullup target_version: 1.17-next target_verison: 1.16-next --- diff --git a/src/lib/krb5/ccache/cc_kcm.c b/src/lib/krb5/ccache/cc_kcm.c index 103cd98ac1..1f5d6c8345 100644 --- a/src/lib/krb5/ccache/cc_kcm.c +++ b/src/lib/krb5/ccache/cc_kcm.c @@ -577,7 +577,7 @@ get_kdc_offset(krb5_context context, krb5_ccache cache) if (cache_call(context, cache, &req) != 0) goto cleanup; time_offset = k5_input_get_uint32_be(&req.reply); - if (!req.reply.status) + if (req.reply.status) goto cleanup; context->os_context.time_offset = time_offset; context->os_context.usec_offset = 0;