ipa_init.c revision 264be69c7615a1f65a21805b95a9dbd2736d1fb4
/*
SSSD
IPA Provider Initialization functions
Authors:
Simo Sorce <ssorce@redhat.com>
Copyright (C) 2009 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <unistd.h>
#include <fcntl.h>
#include "providers/child_common.h"
#include "providers/ipa/ipa_common.h"
#include "providers/krb5/krb5_auth.h"
#include "providers/ipa/ipa_auth.h"
#include "providers/ipa/ipa_access.h"
#include "providers/ipa/ipa_timerules.h"
/* Id Handler */
struct bet_ops ipa_id_ops = {
};
struct bet_ops ipa_auth_ops = {
};
struct bet_ops ipa_chpass_ops = {
};
struct bet_ops ipa_access_ops = {
};
{
const char *ipa_servers;
const char *ipa_domain;
int ret;
return ret;
}
if (!ipa_servers) {
DEBUG(0, ("Missing ipa_server option!\n"));
return EINVAL;
}
if (!ipa_domain) {
DEBUG(0, ("Missing ipa_domain option!\n"));
return EINVAL;
}
&ipa_options->service);
DEBUG(0, ("Failed to init IPA failover service!\n"));
return ret;
}
return EOK;
}
void **pvt_data)
{
struct sdap_id_ctx *ctx;
int ret;
if (!ipa_options) {
return ret;
}
}
if (ipa_options->id_ctx) {
/* already initialized */
*ops = &ipa_id_ops;
return EOK;
}
if (!ctx) {
return ENOMEM;
}
goto done;
}
goto done;
}
goto done;
}
goto done;
}
*ops = &ipa_id_ops;
done:
}
return ret;
}
void **pvt_data)
{
struct tevent_signal *sige;
unsigned v;
int ret;
if (!ipa_options) {
return ret;
}
}
if (ipa_options->auth_ctx) {
/* already initialized */
*ops = &ipa_auth_ops;
return EOK;
}
if (!ctx) {
return ENOMEM;
}
goto done;
}
goto done;
}
goto done;
}
if (debug_to_file != 0) {
DEBUG(0, ("Error setting up logging (%d) [%s]\n",
goto done;
}
goto done;
}
}
*ops = &ipa_auth_ops;
done:
}
return ret;
}
void **pvt_data)
{
int ret;
*ops = &ipa_chpass_ops;
return ret;
}
void **pvt_data)
{
int ret;
struct ipa_access_ctx *ipa_access_ctx;
if (ipa_access_ctx == NULL) {
return ENOMEM;
}
goto done;
}
goto done;
}
goto done;
}
*ops = &ipa_access_ops;
done:
}
return ret;
}