From e5c9834c45849cbf82ea420fa3e0efdc102cc26e Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Fri, 14 Dec 2012 12:29:50 +0100 Subject: check dp error in sdap_sudo_full_refresh_done() https://fedorahosted.org/sssd/ticket/1689 --- src/providers/ldap/sdap_sudo.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c index 2c6c7712..c4f422ed 100644 --- a/src/providers/ldap/sdap_sudo.c +++ b/src/providers/ldap/sdap_sudo.c @@ -615,9 +615,8 @@ static void sdap_sudo_full_refresh_done(struct tevent_req *subreq) ret = sdap_sudo_refresh_recv(state, subreq, &state->dp_error, &state->error, &highest_usn, NULL); talloc_zfree(subreq); - if (ret != EOK) { - tevent_req_error(req, ret); - return; + if (ret != EOK || state->dp_error != DP_ERR_OK || state->error != EOK) { + goto done; } state->sudo_ctx->full_refresh_done = true; @@ -639,6 +638,12 @@ static void sdap_sudo_full_refresh_done(struct tevent_req *subreq) sdap_sudo_set_usn(state->id_ctx->srv_opts, highest_usn); } +done: + if (ret != EOK) { + tevent_req_error(req, ret); + return; + } + tevent_req_done(req); } -- cgit