]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix KCM client time offset propagation
authorRobbie Harwood <rharwood@redhat.com>
Wed, 14 Aug 2019 17:52:27 +0000 (13:52 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 9 Dec 2019 22:02:52 +0000 (17:02 -0500)
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.

(cherry picked from commit 323abb6d1ebe5469d6c2167c29aa5d696d099b90)

ticket: 8826
version_fixed: 1.17.1

src/lib/krb5/ccache/cc_kcm.c

index 092ab7dafafc206665a67b47bf4ae6fbf9ad3cb7..fe93ca3dc01d152e730f5da1d108ec5744280a30 100644 (file)
@@ -583,7 +583,7 @@ get_kdc_offset(krb5_context context, krb5_ccache cache)
     if (cache_call(context, cache, &req, FALSE) != 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;