diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-08-19 18:06:41 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-09-06 14:25:36 -0400 |
commit | 9b5c5f041e92802aa074037d283674cb6eca1a23 (patch) | |
tree | 1b9a8b2e2d0a2bee3cf66554d2fef83116dd91bd /src/providers/ldap/sdap_async.c | |
parent | f1828234a850dd28465425248a83a993f262918f (diff) | |
download | sssd-9b5c5f041e92802aa074037d283674cb6eca1a23.tar.gz sssd-9b5c5f041e92802aa074037d283674cb6eca1a23.tar.bz2 sssd-9b5c5f041e92802aa074037d283674cb6eca1a23.zip |
Allow turning dereference off by setting the threshold to 0
Diffstat (limited to 'src/providers/ldap/sdap_async.c')
-rw-r--r-- | src/providers/ldap/sdap_async.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c index c3fe2ac5..2edc7597 100644 --- a/src/providers/ldap/sdap_async.c +++ b/src/providers/ldap/sdap_async.c @@ -1819,13 +1819,19 @@ int sdap_deref_search_recv(struct tevent_req *req, return EOK; } -bool sdap_has_deref_support(struct sdap_handle *sh) +bool sdap_has_deref_support(struct sdap_handle *sh, struct sdap_options *opts) { const char *deref_oids[][2] = { { LDAP_SERVER_ASQ_OID, "ASQ" }, { LDAP_CONTROL_X_DEREF, "OpenLDAP" }, { NULL, NULL } }; int i; + int deref_threshold; + + deref_threshold = dp_opt_get_int(opts->basic, SDAP_DEREF_THRESHOLD); + if (deref_threshold == 0) { + return false; + } for (i=0; deref_oids[i][0]; i++) { if (sdap_is_control_supported(sh, deref_oids[i][0])) { |