summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-12-14 12:29:50 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-18 17:15:22 +0100
commite5c9834c45849cbf82ea420fa3e0efdc102cc26e (patch)
tree285928a52a9030b8cdd6986e1c8824e8ebb86e3c
parent260366c37cafab011cf48760eaf04282098ef800 (diff)
downloadsssd-e5c9834c45849cbf82ea420fa3e0efdc102cc26e.tar.gz
sssd-e5c9834c45849cbf82ea420fa3e0efdc102cc26e.tar.bz2
sssd-e5c9834c45849cbf82ea420fa3e0efdc102cc26e.zip
check dp error in sdap_sudo_full_refresh_done()
https://fedorahosted.org/sssd/ticket/1689
-rw-r--r--src/providers/ldap/sdap_sudo.c11
1 files 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);
}