diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-05-08 14:49:09 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-15 17:32:43 +0200 |
commit | 1f2fc55ecf7b5e170b2c0752304d1a2ecebc5259 (patch) | |
tree | 036d47c3870844e7da3a8e840c1dff25131dfa87 /src/providers/ldap/sdap_async.h | |
parent | 5b2ca5cc0e22dd184e3eba84af2c00d7065c59c7 (diff) | |
download | sssd-1f2fc55ecf7b5e170b2c0752304d1a2ecebc5259.tar.gz sssd-1f2fc55ecf7b5e170b2c0752304d1a2ecebc5259.tar.xz sssd-1f2fc55ecf7b5e170b2c0752304d1a2ecebc5259.zip |
LDAP: Add sdap_lookup_type enum
Related:
https://fedorahosted.org/sssd/ticket/2553
Change the boolan parameter of sdap_get_users_send and sdap_get_groups_send
to a tri-state that controls whether we expect only a single entry
(ie don't use the paging control), multiple entries with a search limit
(wildcard request) or multiple entries with no limit (enumeration).
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/providers/ldap/sdap_async.h')
-rw-r--r-- | src/providers/ldap/sdap_async.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_async.h b/src/providers/ldap/sdap_async.h index b23dfc313..09bc0d654 100644 --- a/src/providers/ldap/sdap_async.h +++ b/src/providers/ldap/sdap_async.h @@ -59,6 +59,12 @@ errno_t sdap_connect_host_recv(TALLOC_CTX *mem_ctx, struct sdap_handle **_sh); /* Search users in LDAP, return them as attrs */ +enum sdap_entry_lookup_type { + SDAP_LOOKUP_SINGLE, /* Direct single-user/group lookup */ + SDAP_LOOKUP_WILDCARD, /* Multiple entries with a limit */ + SDAP_LOOKUP_ENUMERATE, /* Fetch all entries from the server */ +}; + struct tevent_req *sdap_search_user_send(TALLOC_CTX *memctx, struct tevent_context *ev, struct sss_domain_info *dom, @@ -68,7 +74,7 @@ struct tevent_req *sdap_search_user_send(TALLOC_CTX *memctx, const char **attrs, const char *filter, int timeout, - bool enumeration); + enum sdap_entry_lookup_type lookup_type); int sdap_search_user_recv(TALLOC_CTX *memctx, struct tevent_req *req, char **higher_usn, struct sysdb_attrs ***users, size_t *count); @@ -84,7 +90,7 @@ struct tevent_req *sdap_get_users_send(TALLOC_CTX *memctx, const char **attrs, const char *filter, int timeout, - bool enumeration); + enum sdap_entry_lookup_type lookup_type); int sdap_get_users_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, char **timestamp); @@ -96,7 +102,7 @@ struct tevent_req *sdap_get_groups_send(TALLOC_CTX *memctx, const char **attrs, const char *filter, int timeout, - bool enumeration, + enum sdap_entry_lookup_type lookup_type, bool no_members); int sdap_get_groups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, char **timestamp); |