Skip to content

Commit

Permalink
iprop: handle case where master sends nothing new
Browse files Browse the repository at this point in the history
  • Loading branch information
nicowilliams committed Jan 26, 2017
1 parent ed46a9b commit 656e4c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/kadm5/ipropd_slave.c
Expand Up @@ -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.
Expand All @@ -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, &timestamp) != 0 ||
if (ret || krb5_ret_uint32(sp, &timestamp) != 0 ||
krb5_ret_uint32(sp, &op) != 0 ||
krb5_ret_uint32(sp, &len) != 0) {

Expand Down

0 comments on commit 656e4c4

Please sign in to comment.