diff options
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 99cb3754..1ed6b3f8 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) { |