ldap_common.c revision 507521d5a753aaa800bd0ca25beb509c0f20b9b4
132N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
132N/A#include "providers/ldap/ldap_common.h"
1215N/A#include "providers/fail_over.h"
1215N/A#include "providers/ldap/sdap_async_private.h"
1318N/A#include "providers/krb5/krb5_common.h"
1176N/A#include "db/sysdb_sudo.h"
132N/A#include "db/sysdb_services.h"
132N/A#include "db/sysdb_autofs.h"
132N/A#include "util/sss_krb5.h"
132N/A#include "util/crypto/sss_crypto.h"
132N/A#include "providers/ldap/ldap_opts.h"
132N/A#include "providers/ldap/sdap_idmap.h"
132N/A const char *search_base;
132N/A const char *pwd_policy;
132N/A const char *ldap_deref;
132N/A int ldap_deref_val;
132N/A const char *authtok_type;
1176N/A search_base_options[o])));
230N/A#ifndef HAVE_LDAP_CONNCB
935N/A bool ldap_referrals;
230N/A if (ldap_referrals) {
219N/A bool *use_host_filter,
219N/A bool *include_regexp,
1215N/A bool *include_netgroups)
1215N/A const char *search_base;
341N/A const char *search_base;
339N/A case SDAP_SCHEMA_RFC2307:
379N/A case SDAP_SCHEMA_RFC2307BIS:
379N/A case SDAP_SCHEMA_IPA_V1:
379N/A case SDAP_SCHEMA_AD:
463N/A const char *class_name;
411N/A char *unparsed_base;
1215N/A case SDAP_SEARCH_BASE:
1215N/A case SDAP_USER_SEARCH_BASE:
996N/A case SDAP_SUDO_SEARCH_BASE:
336N/A const char *unparsed_base,
301N/A const char *class_name,
301N/A const char *old_filter,
691N/A char **split_bases;
1215N/A if (!search_bases) {
1215N/A if (!search_bases[0]) {
741N/A if (!search_bases) {
336N/A struct sdap_search_base);
301N/A if (!search_bases[i]) {
624N/A split_bases[c]));
624N/A split_bases[c]);
1215N/A bool has_enumerated;
1176N/A if (has_enumerated) {
return ret;
const char *tmp;
const char *srv_name;
char *new_uri;
if (!service) {
if (!srvaddr) {
if (!tmp) {
if (!new_uri) {
int signum,
int count,
void *siginfo,
void *private_data)
int ret;
const char *realm)
char *sig_realm;
return ENOMEM;
return ENOMEM;
return EOK;
int ret;
struct remove_info_files_ctx);
const char *realm,
const char *service_name)
int ret;
return ENOMEM;
goto done;
goto done;
done:
return ret;
if (krberr) {
goto done;
if (krberr) {
goto done;
if (!realm) {
goto done;
done:
return realm;
int ret;
const char *krb5_servers;
const char *krb5_backup_servers;
const char *krb5_realm;
const char *krb5_opt_realm;
goto done;
goto done;
goto done;
goto done;
goto done;
goto done;
done:
return ret;
const char *service_name,
const char *dns_service_name,
const char *urls,
bool primary)
char *srv_user_data;
if (!tmp_ctx) {
return ENOMEM;
goto done;
for (i = 0; list[i]; i++) {
if (!primary) {
list[i]));
if (!dns_service_name) {
service_name));
goto done;
if (!srv_user_data) {
goto done;
if (ret) {
goto done;
goto done;
list[i]));
goto done;
if (ret) {
goto done;
done:
return ret;
int ret;
if (!tmp_ctx) {
return ENOMEM;
if (!service) {
goto done;
goto done;
goto done;
if (!urls) {
urls, true);
goto done;
if (backup_urls) {
backup_urls, false);
goto done;
goto done;
done:
return ret;
char *endptr;
return EOK;
errno = 0;
if (errno != 0) {
return errno;
return EINVAL;
return EINVAL;
return EOK;
const char *ldap_name,
char **sysdb_name)
size_t i;
for (i = 0; i < map_size; i++) {
if (i < map_size) {
if (!*sysdb_name) {
return ENOMEM;
return EOK;
char ***missing_attrs)
size_t i, j, k;
const char **expected_attrs;
char *sysdb_name;
return EINVAL;
if (!tmp_ctx) {
return ENOMEM;
goto done;
if (!missing) {
goto done;
for (i = 0; i < attr_count; i++) {
expected_attrs[i],
&sysdb_name);
goto done;
done:
return ret;
const char *base_filter,
const char *extra_filter)
if (!extra_filter) {
const char *sid_attr,
char **_sid_str)
char *sid_str;
return ret;
&sid_str);
return EIO;
return EOK;