diff mbox

[3/8] libnsdb: Pass correct search scope to ldap_search_ext_s(3)

Message ID 20131113215358.23593.45463.stgit@seurat.1015granger.net
State Accepted
Headers show

Commit Message

Chuck Lever Nov. 13, 2013, 9:53 p.m. UTC
Commit 5e94ae03 "libnsdb: Add debugging message near
ldap_search_ext_s(3) call sites" Wed Nov 28 20:35:24 2012 adds
a wrapper around ldap_search_ext_s(3), but always seems to pass
LDAP_SCOPE_SUBTREE to the ldap library.

nsdb_search_nsdb_all_s() should pass its "scope" argument, not the
constant LDAP_SCOPE_SUBTREE.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 src/libnsdb/fileserver.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/src/libnsdb/fileserver.c b/src/libnsdb/fileserver.c
index 9c80521..814bce3 100644
--- a/src/libnsdb/fileserver.c
+++ b/src/libnsdb/fileserver.c
@@ -75,7 +75,7 @@  __nsdb_search_nsdb_all_s(const char *func, LDAP *ld, const char *base,
 			func, base, nsdb_printable_scope(scope), filter);
 	}
 
-	return ldap_search_ext_s(ld, (char *)base, LDAP_SCOPE_SUBTREE, filter,
+	return ldap_search_ext_s(ld, (char *)base, scope, filter,
 					attrs, 0, NULL, NULL, &timeout,
 					LDAP_NO_LIMIT, response);
 }
@@ -1573,7 +1573,7 @@  nsdb_parse_fsn_entry(LDAP *ld, LDAPMessage *entry, char ***fsns)
  *
  * @verbatim
 
-   ldapsearch -b "nce" (objectClass=fedfsFsn)
+   ldapsearch -b "nce" -s one (objectClass=fedfsFsn)
    @endverbatim
  */
 static FedFsStatus