summaryrefslogtreecommitdiff
path: root/src/providers/ldap/sdap.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-06-12 20:29:26 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-06-13 10:01:12 -0400
commit2c62da337e31217d03f5bf0f768b574d166bb2fe (patch)
tree3742677f8ebcf242543590122494152c919b3f5f /src/providers/ldap/sdap.c
parentd42d371c00c83ae44b9d1c3e88ecbe0e01b112e6 (diff)
downloadsssd-2c62da337e31217d03f5bf0f768b574d166bb2fe.tar.gz
sssd-2c62da337e31217d03f5bf0f768b574d166bb2fe.tar.bz2
sssd-2c62da337e31217d03f5bf0f768b574d166bb2fe.zip
LDAP: Auto-detect support for the ldap match rule
This patch extends the RootDSE lookup so that we will perform a second request to test whether the match rule syntax can be used. If both groups and initgroups are disabled in the configuration, this lookup request can be skipped.
Diffstat (limited to 'src/providers/ldap/sdap.c')
-rw-r--r--src/providers/ldap/sdap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index cb02f4a5..325825e2 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -179,8 +179,11 @@ int sdap_parse_entry(TALLOC_CTX *memctx,
str = ldap_first_attribute(sh->ldap, sm->msg, &ber);
if (!str) {
ldap_get_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno);
- DEBUG(1, ("Entry has no attributes [%d(%s)]!?\n",
- lerrno, sss_ldap_err2string(lerrno)));
+ DEBUG(lerrno == LDAP_SUCCESS
+ ? SSSDBG_TRACE_INTERNAL
+ : SSSDBG_MINOR_FAILURE,
+ ("Entry has no attributes [%d(%s)]!?\n",
+ lerrno, sss_ldap_err2string(lerrno)));
if (map) {
ret = EINVAL;
goto done;