summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_sudo_timer.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-06-26 09:51:52 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-29 11:37:18 -0400
commit7b74632f498dd1edf69294b597a4d92ec6d73b9f (patch)
tree5a798df68e2121fa93452353dbf877143c11e6dc /src/providers/ldap/sdap_async_sudo_timer.c
parentcfd539e2ebbe035cbc69aa3000c6b61a9fd36645 (diff)
downloadsssd-7b74632f498dd1edf69294b597a4d92ec6d73b9f.tar.gz
sssd-7b74632f498dd1edf69294b597a4d92ec6d73b9f.tar.xz
sssd-7b74632f498dd1edf69294b597a4d92ec6d73b9f.zip
sudo ldap provider: pass sudo_ctx instead of id_ctx
I had to create a new context structure to store additional information such as ip addresses and hostnames.
Diffstat (limited to 'src/providers/ldap/sdap_async_sudo_timer.c')
-rw-r--r--src/providers/ldap/sdap_async_sudo_timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/providers/ldap/sdap_async_sudo_timer.c b/src/providers/ldap/sdap_async_sudo_timer.c
index 3e24b6ed5..ed32cd901 100644
--- a/src/providers/ldap/sdap_async_sudo_timer.c
+++ b/src/providers/ldap/sdap_async_sudo_timer.c
@@ -29,7 +29,7 @@
struct sdap_sudo_timer_state {
struct tevent_context *ev;
- struct sdap_id_ctx *id_ctx;
+ struct sdap_sudo_ctx *sudo_ctx;
time_t timeout; /* relative time how many seconds wait before
canceling fn request */
sdap_sudo_timer_fn_t fn; /* request executed on 'when' */
@@ -50,7 +50,7 @@ static void sdap_sudo_timer_timeout(struct tevent_context *ev,
struct tevent_req * sdap_sudo_timer_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct sdap_id_ctx *id_ctx,
+ struct sdap_sudo_ctx *sudo_ctx,
struct timeval when,
time_t timeout,
sdap_sudo_timer_fn_t fn)
@@ -68,7 +68,7 @@ struct tevent_req * sdap_sudo_timer_send(TALLOC_CTX *mem_ctx,
}
state->ev = ev;
- state->id_ctx = id_ctx;
+ state->sudo_ctx = sudo_ctx;
state->timeout = timeout;
state->fn = fn;
@@ -118,7 +118,7 @@ static void sdap_sudo_timer(struct tevent_context *ev,
state = tevent_req_data(req, struct sdap_sudo_timer_state);
/* issue request */
- state->subreq = state->fn(state, state->id_ctx);
+ state->subreq = state->fn(state, state->sudo_ctx);
if (state->subreq == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Unable to issue timed request!\n"));
tevent_req_error(req, ENOMEM);