summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_common.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-10-21 10:13:46 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-10-22 07:21:49 -0400
commit4534c103b193b74452ea81bf12ffaceb1901728a (patch)
tree7719850dbeaa3a3358c031f8f0b8397e424aae7c /src/providers/ipa/ipa_common.c
parent3fd2f20f23c909f7d3d4dfd1b8b1c0f8cc87dfe1 (diff)
downloadsssd-4534c103b193b74452ea81bf12ffaceb1901728a.tar.gz
sssd-4534c103b193b74452ea81bf12ffaceb1901728a.tar.xz
sssd-4534c103b193b74452ea81bf12ffaceb1901728a.zip
Add ldap_deref option
Diffstat (limited to 'src/providers/ipa/ipa_common.c')
-rw-r--r--src/providers/ipa/ipa_common.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_common.c b/src/providers/ipa/ipa_common.c
index 758bf9de9..aee8b65f4 100644
--- a/src/providers/ipa/ipa_common.c
+++ b/src/providers/ipa/ipa_common.c
@@ -27,6 +27,7 @@
#include <arpa/inet.h>
#include "providers/ipa/ipa_common.h"
+#include "providers/ldap/sdap_async_private.h"
struct dp_option ipa_basic_opts[] = {
{ "ipa_domain", DP_OPT_STRING, NULL_STRING, NULL_STRING },
@@ -75,7 +76,8 @@ struct dp_option ipa_def_ldap_opts[] = {
{ "ldap_krb5_ticket_lifetime", DP_OPT_NUMBER, { .number = (24 * 60 * 60) }, NULL_NUMBER },
{ "ldap_access_filter", DP_OPT_STRING, NULL_STRING, NULL_STRING },
{ "ldap_netgroup_search_base", DP_OPT_STRING, NULL_STRING, NULL_STRING },
- { "ldap_group_nesting_level", DP_OPT_NUMBER, { .number = 2 }, NULL_NUMBER }
+ { "ldap_group_nesting_level", DP_OPT_NUMBER, { .number = 2 }, NULL_NUMBER },
+ { "ldap_deref", DP_OPT_STRING, NULL_STRING, NULL_STRING }
};
struct sdap_attr_map ipa_attr_map[] = {
@@ -359,6 +361,15 @@ int ipa_get_id_options(struct ipa_options *ipa_opts,
SDAP_NETGROUP_SEARCH_BASE)));
}
+ value = dp_opt_get_string(ipa_opts->id->basic, SDAP_DEREF);
+ if (value != NULL) {
+ ret = deref_string_to_val(value, &i);
+ if (ret != EOK) {
+ DEBUG(1, ("Failed to verify ldap_deref option.\n"));
+ goto done;
+ }
+ }
+
ret = sdap_get_map(ipa_opts->id, cdb, conf_path,
ipa_attr_map,
SDAP_AT_GENERAL,