213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny IPA Backend Module -- configuration retrieval
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny Jan Zeleny <jzeleny@redhat.com>
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny Copyright (C) 2012 Red Hat
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny This program is free software; you can redistribute it and/or modify
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny it under the terms of the GNU General Public License as published by
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny the Free Software Foundation; either version 3 of the License, or
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny (at your option) any later version.
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny This program is distributed in the hope that it will be useful,
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny but WITHOUT ANY WARRANTY; without even the implied warranty of
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny GNU General Public License for more details.
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny You should have received a copy of the GNU General Public License
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny along with this program. If not, see <http://www.gnu.org/licenses/>.
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zelenystatic void ipa_get_config_done(struct tevent_req *subreq);
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny const char *domain,
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny const char **attrs)
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny req = tevent_req_create(mem_ctx, &state, struct ipa_get_config_state);
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny state->attrs = talloc_zero_array(state, const char *, 4);
fa0dba8f5536537a69d47218f2372d0f2582c12eJakub Hrozek state->attrs[1] = IPA_CONFIG_SELINUX_DEFAULT_USER_CTX;
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny ret = domain_to_basedn(state, domain, &ldap_basedn);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "domain_to_basedn failed.\n");
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny state->base = talloc_asprintf(state, IPA_CONFIG_SEARCH_BASE_TEMPLATE,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "talloc_asprintf failed.\n");
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny tevent_req_set_callback(subreq, ipa_get_config_done, req);
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zelenystatic void ipa_get_config_done(struct tevent_req *subreq)
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny struct tevent_req *req = tevent_req_callback_data(subreq,
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny struct ipa_get_config_state *state = tevent_req_data(req,
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zeleny ret = sdap_get_generic_recv(subreq, state, &reply_count, &reply);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "Unexpected number of results, expected 1, "
213ce2a78b1abe3921d8dc13c949a28130d00aecJan Zelenyerrno_t ipa_get_config_recv(struct tevent_req *req,