Permalink
Browse files

adjusting Ldap search scope

  • Loading branch information...
1 parent 73606a3 commit 4259fb88f87174f6d97cea595a59c46dc56db71b @guedes committed Jul 31, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/ldap_fdw.c
View
@@ -252,10 +252,10 @@ ldap_begin(ForeignScanState *node, int eflags)
));
query = (char *) palloc(1024);
- snprintf(query, 1024, "(&(objectClass=*)(uid=*))");
+ snprintf(query, 1024, "(&(objectClass=*))");
get_str_attributes(&attributes, node->ss.ss_currentRelation);
- ldap_result = ldap_search_s(ldap_connection, srv_base_dn, LDAP_SCOPE_SUBTREE, query, attributes, 0, &ldap_answer);
+ ldap_result = ldap_search_s(ldap_connection, srv_base_dn, LDAP_SCOPE_ONELEVEL, query, attributes, 0, &ldap_answer);
if (ldap_result != LDAP_SUCCESS)
ereport(ERROR,

0 comments on commit 4259fb8

Please sign in to comment.