summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-04-08 13:27:47 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-04-08 11:32:24 -0400
commit18f3210e95bec4f23e5cac85813f54bab99cd41c (patch)
treea882ed83562f93a42a6b64369ea3d55e8c5b67bf
parentdf33bc1ede96f57f2b8be1fa6f8a1f7451bf051f (diff)
downloadsssd-18f3210e95bec4f23e5cac85813f54bab99cd41c.tar.gz
sssd-18f3210e95bec4f23e5cac85813f54bab99cd41c.tar.bz2
sssd-18f3210e95bec4f23e5cac85813f54bab99cd41c.zip
Read only rootDSE data if rootDSE is available
-rw-r--r--src/providers/ldap/sdap_async_connection.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index b6b0dd25..bdd2b0e0 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -1265,28 +1265,30 @@ static void sdap_cli_rootdse_done(struct tevent_req *subreq)
}
}
- /* save rootdse data about supported features */
- ret = sdap_set_rootdse_supported_lists(rootdse, state->sh);
- if (ret) {
- tevent_req_error(req, ret);
- return;
- }
+ if (state->use_rootdse) {
+ /* save rootdse data about supported features */
+ ret = sdap_set_rootdse_supported_lists(rootdse, state->sh);
+ if (ret) {
+ tevent_req_error(req, ret);
+ return;
+ }
- ret = sdap_set_config_options_with_rootdse(rootdse, state->sh,
- state->opts);
- if (ret) {
- DEBUG(1, ("sdap_set_config_options_with_rootdse failed.\n"));
- tevent_req_error(req, ret);
- return;
- }
+ ret = sdap_set_config_options_with_rootdse(rootdse, state->sh,
+ state->opts);
+ if (ret) {
+ DEBUG(1, ("sdap_set_config_options_with_rootdse failed.\n"));
+ tevent_req_error(req, ret);
+ return;
+ }
- ret = sdap_get_server_opts_from_rootdse(state,
- state->service->uri, rootdse,
- state->opts, &state->srv_opts);
- if (ret) {
- DEBUG(1, ("sdap_get_server_opts_from_rootdse failed.\n"));
- tevent_req_error(req, ret);
- return;
+ ret = sdap_get_server_opts_from_rootdse(state,
+ state->service->uri, rootdse,
+ state->opts, &state->srv_opts);
+ if (ret) {
+ DEBUG(1, ("sdap_get_server_opts_from_rootdse failed.\n"));
+ tevent_req_error(req, ret);
+ return;
+ }
}
sasl_mech = dp_opt_get_string(state->opts->basic, SDAP_SASL_MECH);