summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2011-11-15 07:39:17 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-11-23 14:19:53 -0500
commit9f761434e5fbc5c033a85fb69d6e360e3ba4db58 (patch)
treee5dee8d40c3e09c13bcb428eefce9ad6681a522b /src
parent7d9f54f5ec7c72336c4f69dbf20d55f1f64b88d2 (diff)
downloadsssd-9f761434e5fbc5c033a85fb69d6e360e3ba4db58.tar.gz
sssd-9f761434e5fbc5c033a85fb69d6e360e3ba4db58.tar.xz
sssd-9f761434e5fbc5c033a85fb69d6e360e3ba4db58.zip
Modified sdap_parse_search_base()
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_common.c8
-rw-r--r--src/providers/ldap/ldap_common.c17
-rw-r--r--src/providers/ldap/ldap_common.h3
-rw-r--r--src/providers/ldap/sdap.c2
4 files changed, 14 insertions, 16 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 8f9d5d779..a06578227 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -339,7 +339,7 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
ipa_opts->id->basic[SDAP_SEARCH_BASE].opt_name,
dp_opt_get_string(ipa_opts->id->basic, SDAP_SEARCH_BASE)));
}
- ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id,
+ ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id->basic,
SDAP_SEARCH_BASE,
&ipa_opts->id->search_bases);
if (ret != EOK) goto done;
@@ -427,7 +427,7 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
dp_opt_get_string(ipa_opts->id->basic,
SDAP_USER_SEARCH_BASE)));
}
- ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id,
+ ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id->basic,
SDAP_USER_SEARCH_BASE,
&ipa_opts->id->user_search_bases);
if (ret != EOK) goto done;
@@ -446,7 +446,7 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
dp_opt_get_string(ipa_opts->id->basic,
SDAP_GROUP_SEARCH_BASE)));
}
- ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id,
+ ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id->basic,
SDAP_GROUP_SEARCH_BASE,
&ipa_opts->id->group_search_bases);
if (ret != EOK) goto done;
@@ -484,7 +484,7 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
dp_opt_get_string(ipa_opts->id->basic,
SDAP_NETGROUP_SEARCH_BASE)));
}
- ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id,
+ ret = sdap_parse_search_base(ipa_opts->id, ipa_opts->id->basic,
SDAP_NETGROUP_SEARCH_BASE,
&ipa_opts->id->netgroup_search_bases);
if (ret != EOK) goto done;
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 9e2c2a4ae..6b4e1b95f 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -273,25 +273,25 @@ int ldap_get_options(TALLOC_CTX *memctx,
}
/* Default search */
- ret = sdap_parse_search_base(opts, opts,
+ ret = sdap_parse_search_base(opts, opts->basic,
SDAP_SEARCH_BASE,
&opts->search_bases);
if (ret != EOK && ret != ENOENT) goto done;
/* User search */
- ret = sdap_parse_search_base(opts, opts,
+ ret = sdap_parse_search_base(opts, opts->basic,
SDAP_USER_SEARCH_BASE,
&opts->user_search_bases);
if (ret != EOK && ret != ENOENT) goto done;
/* Group search base */
- ret = sdap_parse_search_base(opts, opts,
+ ret = sdap_parse_search_base(opts, opts->basic,
SDAP_GROUP_SEARCH_BASE,
&opts->group_search_bases);
if (ret != EOK && ret != ENOENT) goto done;
/* Netgroup search */
- ret = sdap_parse_search_base(opts, opts,
+ ret = sdap_parse_search_base(opts, opts->basic,
SDAP_NETGROUP_SEARCH_BASE,
&opts->netgroup_search_bases);
if (ret != EOK && ret != ENOENT) goto done;
@@ -495,8 +495,7 @@ done:
}
errno_t sdap_parse_search_base(TALLOC_CTX *mem_ctx,
- struct sdap_options *opts,
- enum sdap_basic_opt class,
+ struct dp_option *opts, int class,
struct sdap_search_base ***_search_bases)
{
errno_t ret;
@@ -521,11 +520,11 @@ errno_t sdap_parse_search_base(TALLOC_CTX *mem_ctx,
break;
case SDAP_USER_SEARCH_BASE:
class_name = "USER";
- old_filter = dp_opt_get_string(opts->basic, SDAP_USER_SEARCH_FILTER);
+ old_filter = dp_opt_get_string(opts, SDAP_USER_SEARCH_FILTER);
break;
case SDAP_GROUP_SEARCH_BASE:
class_name = "GROUP";
- old_filter = dp_opt_get_string(opts->basic, SDAP_GROUP_SEARCH_FILTER);
+ old_filter = dp_opt_get_string(opts, SDAP_GROUP_SEARCH_FILTER);
break;
case SDAP_NETGROUP_SEARCH_BASE:
class_name = "NETGROUP";
@@ -537,7 +536,7 @@ errno_t sdap_parse_search_base(TALLOC_CTX *mem_ctx,
/* Non-fatal */
}
- unparsed_base = dp_opt_get_string(opts->basic, class);
+ unparsed_base = dp_opt_get_string(opts, class);
if (!unparsed_base || unparsed_base[0] == '\0') return ENOENT;
tmp_ctx = talloc_new(NULL);
diff --git a/src/providers/ldap/ldap_common.h b/src/providers/ldap/ldap_common.h
index 770ffc8f5..2c77846e9 100644
--- a/src/providers/ldap/ldap_common.h
+++ b/src/providers/ldap/ldap_common.h
@@ -171,8 +171,7 @@ errno_t msgs2attrs_array(TALLOC_CTX *mem_ctx, size_t count,
struct sysdb_attrs ***attrs);
errno_t sdap_parse_search_base(TALLOC_CTX *mem_ctx,
- struct sdap_options *opts,
- enum sdap_basic_opt class,
+ struct dp_option *opts, int class,
struct sdap_search_base ***_search_bases);
#endif /* _LDAP_COMMON_H_ */
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index 373bd4d22..afaa87f5f 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -723,7 +723,7 @@ static errno_t sdap_set_search_base(struct sdap_options *opts,
goto done;
}
- ret = sdap_parse_search_base(opts, opts, class, bases);
+ ret = sdap_parse_search_base(opts, opts->basic, class, bases);
if (ret != EOK) goto done;
ret = EOK;