620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek/*
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek SSSD
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek IPA Provider Initialization functions
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek Authors:
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek Simo Sorce <ssorce@redhat.com>
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek Copyright (C) 2009 Red Hat
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek This program is free software; you can redistribute it and/or modify
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek it under the terms of the GNU General Public License as published by
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek the Free Software Foundation; either version 3 of the License, or
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek (at your option) any later version.
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek This program is distributed in the hope that it will be useful,
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek GNU General Public License for more details.
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek You should have received a copy of the GNU General Public License
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek*/
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "util/child_common.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "providers/ipa/ipa_common.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "providers/krb5/krb5_auth.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "providers/ipa/ipa_id.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "providers/ipa/ipa_auth.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "providers/ipa/ipa_access.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek#include "providers/ipa/ipa_dyndns.h"
38e2ec1c757955ab557fd95807afa58042d09482Jan Zeleny#include "providers/ipa/ipa_selinux.h"
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březinaerrno_t ipa_autofs_init(TALLOC_CTX *mem_ctx,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct be_ctx *be_ctx,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct ipa_id_ctx *id_ctx,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct dp_method *dp_methods)
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek{
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek int ret;
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina DEBUG(SSSDBG_TRACE_INTERNAL, "Initializing autofs IPA back end\n");
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek ret = ipa_get_autofs_options(id_ctx->ipa_options, be_ctx->cdb,
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek be_ctx->conf_path, &id_ctx->sdap_id_ctx->opts);
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek if (ret != EOK) {
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Cannot get IPA autofs options\n");
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek return ret;
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek }
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina dp_set_method(dp_methods, DPM_AUTOFS_HANDLER,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina sdap_autofs_handler_send, sdap_autofs_handler_recv, id_ctx->sdap_id_ctx,
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek return ret;
620033ce66f4827be9d508c77483fab0270d9869Jakub Hrozek}