diff options
-rw-r--r-- | src/providers/ldap/sdap_sudo.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c index f81fa673..ebbc95d1 100644 --- a/src/providers/ldap/sdap_sudo.c +++ b/src/providers/ldap/sdap_sudo.c @@ -949,10 +949,16 @@ static void sdap_sudo_periodical_first_refresh_done(struct tevent_req *req) } ret = sdap_sudo_full_refresh_recv(subreq, &dp_error, &error); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, ("Periodical full refresh of sudo rules " + "failed [%d]: %s)\n", ret, strerror(ret))); + goto schedule; + } + if (dp_error != DP_ERR_OK || error != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Periodical full refresh of sudo rules " - "failed [dp_error: %d] ([%d]: %s)\n", - dp_error, error, strerror(error))); + "failed [dp_error: %d] ([%d]: %s)\n", + dp_error, error, strerror(error))); goto schedule; } @@ -996,8 +1002,8 @@ static void sdap_sudo_periodical_full_refresh_done(struct tevent_req *req) struct tevent_req *subreq = NULL; /* req from sdap_sudo_full_refresh_send() */ struct sdap_sudo_ctx *sudo_ctx = NULL; time_t delay; - int dp_error = DP_ERR_OK; - int error = EOK; + int dp_error; + int error; int ret; ret = sdap_sudo_timer_recv(req, req, &subreq); @@ -1008,10 +1014,16 @@ static void sdap_sudo_periodical_full_refresh_done(struct tevent_req *req) } ret = sdap_sudo_full_refresh_recv(subreq, &dp_error, &error); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, ("Periodical full refresh of sudo rules " + "failed [%d]: %s)\n", ret, strerror(ret))); + goto schedule; + } + if (dp_error != DP_ERR_OK || error != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Periodical full refresh of sudo rules " - "failed [dp_error: %d] ([%d]: %s)\n", - dp_error, error, strerror(error))); + "failed [dp_error: %d] ([%d]: %s)\n", + dp_error, error, strerror(error))); goto schedule; } @@ -1051,10 +1063,15 @@ static void sdap_sudo_periodical_smart_refresh_done(struct tevent_req *req) } ret = sdap_sudo_smart_refresh_recv(subreq, &dp_error, &error); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, ("Periodical smart refresh of sudo rules " + "failed [%d]: %s\n", ret, strerror(ret))); + } + if (dp_error != DP_ERR_OK || error != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Periodical smart refresh of sudo rules " - "failed [dp_error: %d] ([%d]: %s)\n", - dp_error, error, strerror(error))); + "failed [dp_error: %d] ([%d]: %s)\n", + dp_error, error, strerror(error))); goto schedule; } |