summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobbie Harwood <rharwood@redhat.com>2019-08-14 13:52:27 -0400
committerGreg Hudson <ghudson@mit.edu>2019-12-09 17:02:52 -0500
commit3a32b06e10088ce6ef862cf454fa3e8f8b32db7d (patch)
tree8a42a83ce072a281529becb4cdf805d54dd5eff7
parentec12007a9b0c048e304715cbe07b13338cbfac11 (diff)
downloadkrb5-3a32b06e10088ce6ef862cf454fa3e8f8b32db7d.tar.gz
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. (cherry picked from commit 323abb6d1ebe5469d6c2167c29aa5d696d099b90) ticket: 8826 version_fixed: 1.17.1
-rw-r--r--src/lib/krb5/ccache/cc_kcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/krb5/ccache/cc_kcm.c b/src/lib/krb5/ccache/cc_kcm.c
index 092ab7daf..fe93ca3dc 100644
--- a/src/lib/krb5/ccache/cc_kcm.c
+++ b/src/lib/krb5/ccache/cc_kcm.c
@@ -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;