Line data Source code
1 : /*
2 : SSSD
3 :
4 : IPA Provider Initialization functions
5 :
6 : Authors:
7 : Simo Sorce <ssorce@redhat.com>
8 :
9 : Copyright (C) 2009 Red Hat
10 :
11 : This program is free software; you can redistribute it and/or modify
12 : it under the terms of the GNU General Public License as published by
13 : the Free Software Foundation; either version 3 of the License, or
14 : (at your option) any later version.
15 :
16 : This program is distributed in the hope that it will be useful,
17 : but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : GNU General Public License for more details.
20 :
21 : You should have received a copy of the GNU General Public License
22 : along with this program. If not, see <http://www.gnu.org/licenses/>.
23 : */
24 :
25 : #include "util/child_common.h"
26 : #include "providers/ipa/ipa_common.h"
27 : #include "providers/krb5/krb5_auth.h"
28 : #include "providers/ipa/ipa_id.h"
29 : #include "providers/ipa/ipa_auth.h"
30 : #include "providers/ipa/ipa_access.h"
31 : #include "providers/ipa/ipa_dyndns.h"
32 : #include "providers/ipa/ipa_selinux.h"
33 :
34 0 : errno_t ipa_autofs_init(TALLOC_CTX *mem_ctx,
35 : struct be_ctx *be_ctx,
36 : struct ipa_id_ctx *id_ctx,
37 : struct dp_method *dp_methods)
38 : {
39 : int ret;
40 :
41 0 : DEBUG(SSSDBG_TRACE_INTERNAL, "Initializing autofs IPA back end\n");
42 :
43 0 : ret = ipa_get_autofs_options(id_ctx->ipa_options, be_ctx->cdb,
44 0 : be_ctx->conf_path, &id_ctx->sdap_id_ctx->opts);
45 0 : if (ret != EOK) {
46 0 : DEBUG(SSSDBG_CRIT_FAILURE, "Cannot get IPA autofs options\n");
47 0 : return ret;
48 : }
49 :
50 0 : dp_set_method(dp_methods, DPM_AUTOFS_HANDLER,
51 : sdap_autofs_handler_send, sdap_autofs_handler_recv, id_ctx->sdap_id_ctx,
52 : struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
53 :
54 0 : return ret;
55 : }
|