ipa_common.c revision 7051a30300d12163e890e4ec4b9a765567679a8b
/*
SSSD
IPA Provider Common 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 <netdb.h>
#include <ctype.h>
#include "providers/ipa/ipa_common.h"
struct dp_option ipa_basic_opts[] = {
};
struct dp_option ipa_def_ldap_opts[] = {
/* use the same parm name as the krb5 module so we set it only once */
};
struct sdap_attr_map ipa_attr_map[] = {
};
struct sdap_attr_map ipa_user_map[] = {
};
struct sdap_attr_map ipa_group_map[] = {
};
struct sdap_attr_map ipa_netgroup_map[] = {
};
struct dp_option ipa_def_krb5_opts[] = {
};
struct confdb_ctx *cdb,
const char *conf_path,
struct sss_domain_info *dom,
struct ipa_options **_opts)
{
struct ipa_options *opts;
char *domain;
char *server;
char *ipa_hostname;
int ret;
goto done;
}
if (!domain) {
goto done;
}
}
if (!server) {
}
if (ipa_hostname == NULL) {
goto done;
}
goto done;
}
}
done:
}
return ret;
}
struct confdb_ctx *cdb,
const char *conf_path,
struct sdap_options **_opts)
{
char *hostname;
char *basedn;
char *realm;
char *value;
int ret;
int i;
/* self check test, this should never fail, unless someone forgot
* to properly update the code after new ldap options have been added */
if (SDAP_OPTS_BASIC != IPA_OPTS_BASIC_TEST) {
DEBUG(0, ("Option numbers do not match (%d != %d)\n",
abort();
}
if (!tmpctx) {
return ENOMEM;
}
goto done;
}
/* get sdap options */
goto done;
}
&basedn);
goto done;
}
/* FIXME: get values by querying IPA */
/* set search base */
if (!value) {
goto done;
}
goto done;
}
}
/* set the ldap_sasl_authid if the ipa_hostname override was specified */
if (hostname) {
if (!value) {
goto done;
}
goto done;
}
}
}
/* set krb realm */
goto done;
}
for (i = 0; value[i]; i++) {
}
goto done;
}
}
/* fix schema to IPAv1 for now */
goto done;
}
}
goto done;
}
}
goto done;
}
}
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
return ret;
}
struct confdb_ctx *cdb,
const char *conf_path,
{
char *value;
int ret;
int i;
/* self check test, this should never fail, unless someone forgot
* to properly update the code after new ldap options have been added */
if (KRB5_OPTS != IPA_KRB5_OPTS_TEST) {
DEBUG(0, ("Option numbers do not match (%d != %d)\n",
abort();
}
goto done;
}
/* get krb5 options */
goto done;
}
/* If there is no KDC, try the deprecated krb5_kdcip option, too */
/* FIXME - this can be removed in a future version */
goto done;
}
/* set krb realm */
if (!value) {
goto done;
}
goto done;
}
for (i = 0; copy[i]; i++) {
}
goto done;
}
}
done:
}
return ret;
}
{
struct ipa_service *service;
char *address;
char *new_uri;
int ret;
if (!service) {
return;
}
if (!srvaddr) {
return;
}
return;
}
return;
}
if (!new_uri) {
return;
}
/* free old one and replace with new one */
}
}
struct ipa_service **_service)
{
struct ipa_service *service;
char *realm;
int ret;
int i;
if (!tmp_ctx) {
return ENOMEM;
}
if (!service) {
goto done;
}
goto done;
}
if (!service->krb5_service) {
goto done;
}
goto done;
}
goto done;
}
goto done;
}
if (!realm) {
goto done;
}
for (i = 0; realm[i]; i++) {
}
if (!servers) {
}
/* split server parm into a list */
goto done;
}
/* now for each one add a new server to the failover service */
for (i = 0; list[i]; i++) {
if (be_fo_is_srv_identifier(list[i])) {
FO_PROTO_TCP, NULL);
if (ret) {
DEBUG(0, ("Failed to add server\n"));
goto done;
}
continue;
}
DEBUG(0, ("Failed to add server\n"));
goto done;
}
}
goto done;
}
done:
}
return ret;
}