summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap_async_sudo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap_async_sudo.c')
-rw-r--r--src/providers/ldap/sdap_async_sudo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
index 9a7dc857..92200aa7 100644
--- a/src/providers/ldap/sdap_async_sudo.c
+++ b/src/providers/ldap/sdap_async_sudo.c
@@ -48,6 +48,7 @@ struct sdap_sudo_refresh_state {
int dp_error;
int error;
char *highest_usn;
+ size_t num_rules;
};
struct sdap_sudo_load_sudoers_state {
@@ -165,7 +166,8 @@ int sdap_sudo_refresh_recv(TALLOC_CTX *mem_ctx,
struct tevent_req *req,
int *dp_error,
int *error,
- char **usn)
+ char **usn,
+ size_t *num_rules)
{
struct sdap_sudo_refresh_state *state = NULL;
@@ -180,6 +182,10 @@ int sdap_sudo_refresh_recv(TALLOC_CTX *mem_ctx,
*usn = talloc_steal(mem_ctx, state->highest_usn);
}
+ if (num_rules != NULL) {
+ *num_rules = state->num_rules;
+ }
+
return EOK;
}
@@ -503,6 +509,7 @@ static void sdap_sudo_load_sudoers_done(struct tevent_req *subreq)
DEBUG(SSSDBG_TRACE_FUNC, ("Sudoers is successfuly stored in cache\n"));
ret = EOK;
+ state->num_rules = rules_count;
done:
if (in_transaction) {