summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-06-26 10:31:18 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-27 13:51:55 +0200
commitec7fbcd9a666d4cb7cc40627586ca88bbb0f17be (patch)
tree56b518709acd39d46f3518ce3bc3619b087c5578 /src/responder
parente7769aa7ec5dc0efd8aa8e71504f680adc2517cf (diff)
downloadsssd-ec7fbcd9a666d4cb7cc40627586ca88bbb0f17be.tar.gz
sssd-ec7fbcd9a666d4cb7cc40627586ca88bbb0f17be.tar.xz
sssd-ec7fbcd9a666d4cb7cc40627586ca88bbb0f17be.zip
sudo responder: use different callback for oob refresh
https://fedorahosted.org/sssd/ticket/1693 Since we don't care about returned values from out of band refresh, we do not need to set callback data. However, this caused talloc to abort as it considers it as type mismatch when called from tevent_req_callback_data().
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index 9f36e6c74..ad119dbb5 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -491,11 +491,6 @@ sudosrv_dp_req_done(struct tevent_req *req)
dbus_uint32_t err_min;
char *err_msg;
- if (cb_ctx == NULL) {
- /* we are not interested in returned values */
- talloc_free(req);
- return;
- }
cli_ctx = talloc_get_type(cb_ctx->cctx, struct cli_ctx);
ret = sss_dp_get_sudoers_recv(cb_ctx->mem_ctx, req,
@@ -512,6 +507,13 @@ sudosrv_dp_req_done(struct tevent_req *req)
}
static void
+sudosrv_dp_oob_req_done(struct tevent_req *req)
+{
+ DEBUG(SSSDBG_TRACE_FUNC, ("Out of band refresh finished\n"));
+ talloc_free(req);
+}
+
+static void
sudosrv_get_sudorules_dp_callback(uint16_t err_maj, uint32_t err_min,
const char *err_msg, void *ptr)
{
@@ -553,7 +555,7 @@ sudosrv_get_sudorules_dp_callback(uint16_t err_maj, uint32_t err_min,
DEBUG(SSSDBG_CRIT_FAILURE,
("Cannot issue DP request.\n"));
} else {
- tevent_req_set_callback(dpreq, sudosrv_dp_req_done, NULL);
+ tevent_req_set_callback(dpreq, sudosrv_dp_oob_req_done, NULL);
}
}