summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_id.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2015-05-08 14:49:09 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-07-15 17:32:43 +0200
commit1f2fc55ecf7b5e170b2c0752304d1a2ecebc5259 (patch)
tree036d47c3870844e7da3a8e840c1dff25131dfa87 /src/providers/ldap/ldap_id.c
parent5b2ca5cc0e22dd184e3eba84af2c00d7065c59c7 (diff)
downloadsssd-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/ldap_id.c')
-rw-r--r--src/providers/ldap/ldap_id.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index 61f09fc41..73840d288 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -396,12 +396,12 @@ static void users_get_search(struct tevent_req *req)
struct users_get_state *state = tevent_req_data(req,
struct users_get_state);
struct tevent_req *subreq;
- bool multiple_results;
+ enum sdap_entry_lookup_type lookup_type;
if (state->filter_type == BE_FILTER_WILDCARD) {
- multiple_results = true;
+ lookup_type = SDAP_LOOKUP_WILDCARD;
} else {
- multiple_results = false;
+ lookup_type = SDAP_LOOKUP_SINGLE;
}
subreq = sdap_get_users_send(state, state->ev,
@@ -412,7 +412,7 @@ static void users_get_search(struct tevent_req *req)
state->attrs, state->filter,
dp_opt_get_int(state->ctx->opts->basic,
SDAP_SEARCH_TIMEOUT),
- multiple_results);
+ lookup_type);
if (!subreq) {
tevent_req_error(req, ENOMEM);
return;
@@ -901,12 +901,12 @@ static void groups_get_search(struct tevent_req *req)
struct groups_get_state *state = tevent_req_data(req,
struct groups_get_state);
struct tevent_req *subreq;
- bool multiple_results;
+ enum sdap_entry_lookup_type lookup_type;
if (state->filter_type == BE_FILTER_WILDCARD) {
- multiple_results = true;
+ lookup_type = SDAP_LOOKUP_WILDCARD;
} else {
- multiple_results = false;
+ lookup_type = SDAP_LOOKUP_SINGLE;
}
subreq = sdap_get_groups_send(state, state->ev,
@@ -916,7 +916,7 @@ static void groups_get_search(struct tevent_req *req)
state->attrs, state->filter,
dp_opt_get_int(state->ctx->opts->basic,
SDAP_SEARCH_TIMEOUT),
- multiple_results,
+ lookup_type,
state->no_members);
if (!subreq) {
tevent_req_error(req, ENOMEM);