diff options
author | Pavel Březina <pbrezina@redhat.com> | 2012-06-26 09:51:52 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-06-29 11:37:18 -0400 |
commit | 7b74632f498dd1edf69294b597a4d92ec6d73b9f (patch) | |
tree | 5a798df68e2121fa93452353dbf877143c11e6dc /src/providers/ldap/sdap_sudo.h | |
parent | cfd539e2ebbe035cbc69aa3000c6b61a9fd36645 (diff) | |
download | sssd-7b74632f498dd1edf69294b597a4d92ec6d73b9f.tar.gz sssd-7b74632f498dd1edf69294b597a4d92ec6d73b9f.tar.bz2 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_sudo.h')
-rw-r--r-- | src/providers/ldap/sdap_sudo.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_sudo.h b/src/providers/ldap/sdap_sudo.h index 3eab74f2..25277271 100644 --- a/src/providers/ldap/sdap_sudo.h +++ b/src/providers/ldap/sdap_sudo.h @@ -21,6 +21,16 @@ #ifndef _SDAP_SUDO_H_ #define _SDAP_SUDO_H_ +struct sdap_sudo_ctx { + struct sdap_id_ctx *id_ctx; + + char **hostnames; + char **ip_addr; + bool include_netgroups; + bool include_regexp; + bool use_host_filter; +}; + /* Common functions from ldap_sudo.c */ void sdap_sudo_handler(struct be_req *breq); int sdap_sudo_init(struct be_ctx *be_ctx, @@ -46,11 +56,11 @@ int sdap_sudo_refresh_recv(TALLOC_CTX *mem_ctx, /* timer */ typedef struct tevent_req * (*sdap_sudo_timer_fn_t)(TALLOC_CTX *mem_ctx, - struct sdap_id_ctx *id_ctx); + struct sdap_sudo_ctx *sudo_ctx); 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); |