From 656e4c4f42bcf3840e405e76110110dc9f3c36df Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Wed, 25 Jan 2017 18:50:03 -0600 Subject: [PATCH] iprop: handle case where master sends nothing new --- lib/kadm5/ipropd_slave.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/kadm5/ipropd_slave.c b/lib/kadm5/ipropd_slave.c index aed2f1ca9..15ab7b647 100644 --- a/lib/kadm5/ipropd_slave.c +++ b/lib/kadm5/ipropd_slave.c @@ -317,6 +317,11 @@ receive_loop (krb5_context context, uint32_t timestamp; uint32_t op; + if ((ret = krb5_ret_uint32(sp, &vers)) == HEIM_ERR_EOF) { + krb5_warnx(context, "master sent no new iprop entries"); + return 0; + } + /* * TODO We could do more to validate the entries from the master * here. And we could use/reuse more kadm5_log_*() code here. @@ -325,8 +330,7 @@ receive_loop (krb5_context context, * what we needed and just write this to the log file and let * kadm5_log_recover() do the rest. */ - if (krb5_ret_uint32(sp, &vers) != 0 || - krb5_ret_uint32(sp, ×tamp) != 0 || + if (ret || krb5_ret_uint32(sp, ×tamp) != 0 || krb5_ret_uint32(sp, &op) != 0 || krb5_ret_uint32(sp, &len) != 0) {