ipa_common.c revision be0a90dcb8ef938b4be07d85466284f8cb6126ca
/*
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"
#include "providers/ldap/sdap_async_private.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 */
/* Do not include ldap_auth_disable_tls_never_use_in_production in the
* manpages or SSSDConfig API
*/
};
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;
}
}
#if 0
goto done;
}
#else
/* We don't yet have support for the native representation
* of netgroups in IPA. For now, we need to point at the
* compat tree
*/
if (!value) {
goto done;
}
value);
goto done;
}
#endif
}
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 */
}
}
const char *servers,
struct ipa_options *options,
struct ipa_service **_service)
{
struct ipa_service *service;
char *realm;
const char *domain;
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;
}
/* First check whether the realm has been manually specified */
if (realm) {
/* krb5_realm exists in the configuration, use it */
goto done;
}
} else {
/* No explicit krb5_realm, use the IPA domain */
if (!domain) {
DEBUG(0, ("Missing ipa_domain option!\n"));
goto done;
}
goto done;
}
/* Use the upper-case IPA domain for the kerberos realm */
}
}
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])) {
BE_FO_PROTO_TCP, false, 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;
}