diff options
author | Sumit Bose <sbose@redhat.com> | 2010-01-20 11:21:50 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-02-02 14:41:40 -0500 |
commit | 0d85b37ab0ede884408e68246ec21092c3718610 (patch) | |
tree | 5588fe771a798ce02633233c795d34a773debc1f /server/providers/ldap/sdap_async_connection.c | |
parent | 7c8f422495347e6ff829246ebf5d7faad9f6d160 (diff) | |
download | sssd-0d85b37ab0ede884408e68246ec21092c3718610.tar.gz sssd-0d85b37ab0ede884408e68246ec21092c3718610.tar.xz sssd-0d85b37ab0ede884408e68246ec21092c3718610.zip |
Add new option ldap_referrals
Diffstat (limited to 'server/providers/ldap/sdap_async_connection.c')
-rw-r--r-- | server/providers/ldap/sdap_async_connection.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/providers/ldap/sdap_async_connection.c b/server/providers/ldap/sdap_async_connection.c index 99cb3754f..1ed6b3f8f 100644 --- a/server/providers/ldap/sdap_async_connection.c +++ b/server/providers/ldap/sdap_async_connection.c @@ -57,6 +57,7 @@ struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx, int ret = EOK; int msgid; struct ldap_cb_data *cb_data; + bool ldap_referrals; req = tevent_req_create(memctx, &state, struct sdap_connect_state); if (!req) return NULL; @@ -109,6 +110,16 @@ struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx, goto fail; } + /* Set Referral chasing */ + ldap_referrals = dp_opt_get_bool(opts->basic, SDAP_REFERRALS); + lret = ldap_set_option(state->sh->ldap, LDAP_OPT_REFERRALS, + (ldap_referrals ? LDAP_OPT_ON : LDAP_OPT_OFF)); + if (lret != LDAP_OPT_SUCCESS) { + DEBUG(1, ("Failed to set referral chasing to %s\n", + (ldap_referrals ? "LDAP_OPT_ON" : "LDAP_OPT_OFF"))); + goto fail; + } + /* add connection callback */ state->sh->conncb = talloc_zero(state->sh, struct ldap_conncb); if (state->sh->conncb == NULL) { |