ldap_common.c revision af81aaa57f82eab78647113c391bd84247f96150
/*
SSSD
LDAP Provider Common Functions
Authors:
Simo Sorce <ssorce@redhat.com>
Copyright (C) 2008-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 "providers/ldap/ldap_common.h"
#include "providers/fail_over.h"
#include "util/sss_krb5.h"
/* a fd the child process would log into */
int ldap_child_debug_fd = -1;
struct dp_option default_basic_opts[] = {
/* use the same parm name as the krb5 module so we set it only once */
};
struct sdap_attr_map generic_attr_map[] = {
};
struct sdap_attr_map gen_ipa_attr_map[] = {
};
struct sdap_attr_map gen_ad_attr_map[] = {
};
struct sdap_attr_map rfc2307_user_map[] = {
};
struct sdap_attr_map rfc2307_group_map[] = {
};
struct sdap_attr_map rfc2307bis_user_map[] = {
/* FIXME: this is 389ds specific */
};
struct sdap_attr_map rfc2307bis_group_map[] = {
/* FIXME: this is 389ds specific */
};
struct confdb_ctx *cdb,
const char *conf_path,
struct sdap_options **_opts)
{
struct sdap_attr_map *default_attr_map;
struct sdap_attr_map *default_user_map;
struct sdap_attr_map *default_group_map;
struct sdap_options *opts;
char *schema;
const char *pwd_policy;
int ret;
goto done;
}
goto done;
}
}
goto done;
}
}
if (pwd_policy == NULL) {
goto done;
}
goto done;
}
/* account_cache_expiration must be >= than offline_credentials_expiration */
goto done;
}
/* account cache_expiration must not be smaller than
* offline_credentials_expiration to prevent deleting entries that
* still contain credentials valid for offline login.
*
* offline_credentials_expiration == 0 is a special case that says
* that the cached credentials are valid forever. Therefore, the cached
* entries must not be purged from cache.
*/
"and %s (%d)\n",
goto done;
}
"than value of %s (now %d)\n",
goto done;
}
#ifndef HAVE_LDAP_CONNCB
bool ldap_referrals;
if (ldap_referrals) {
"is too old, see sssd-ldap(5) for details.\n"));
}
#endif
/* schema type */
} else
} else
} else
} else {
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
return ret;
}
{
}
{
}
return false;
}
{
/* make sure we mark the connection as gone when we go offline so that
* we do not try to reuse a bad connection by mistale later */
}
}
{
int ret;
bool result = false;
const char *mech;
const char *realm;
char *server_name = NULL;
char *client_princ_str = NULL;
char *full_princ = NULL;
char hostname[512];
int l_errno;
return false;
}
return false;
}
return false;
}
goto done;
}
if (krberr) {
goto done;
}
if (krberr != 0) {
goto done;
}
if (server_name == NULL) {
goto done;
}
if (krberr != 0) {
goto done;
}
if (client_princ_str) {
realm);
} else {
}
} else {
if (ret == -1) {
goto done;
}
}
if (!full_princ) {
goto done;
}
if (krberr != 0) {
goto done;
}
if (krberr != 0) {
goto done;
}
result = true;
}
done:
if (client_principal != NULL) {
}
if (server_principal != NULL) {
}
if (result) {
} else {
}
}
return result;
}
{
/* set up enumeration task */
/* run the first one in a couple of seconds so that we have time to
* finish initializations first*/
} else {
/* the enumeration task, runs the cleanup process by itself,
* but if enumeration is not runnig we need to schedule it */
/* run the first one in a couple of seconds so that we have time to
* finish initializations first*/
}
return ret;
}
{
struct sdap_service *service;
const char *tmp;
char *new_uri;
if (!service) return;
} else {
}
if (!new_uri) {
return;
}
/* free old one and replace with new one */
}
const char *service_name, const char *urls,
struct sdap_service **_service)
{
struct sdap_service *service;
int ret;
int i;
if (!tmp_ctx) {
return ENOMEM;
}
if (!service) {
goto done;
}
goto done;
}
goto done;
}
/* split server parm into a list */
goto done;
}
/* now for each URI add a new server to the failover service */
for (i = 0; list[i]; i++) {
if (ret != LDAP_SUCCESS) {
goto done;
}
if (ret) {
goto done;
}
}
goto done;
}
done:
}
return ret;
}