summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-12 06:15:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:59:24 -0500
commit4955b21f68699826dfa9158681943673bbb10f6b (patch)
tree802332c1f3178f5048d46c0bfd938905aa654995 /source4/ldap_server
parenta21ea3351af893618c0356c49b5033bf7509044d (diff)
downloadsamba-4955b21f68699826dfa9158681943673bbb10f6b.tar.gz
samba-4955b21f68699826dfa9158681943673bbb10f6b.tar.bz2
samba-4955b21f68699826dfa9158681943673bbb10f6b.zip
r23849: ldap_server: Provide more info in debug traces
blackbox tests: increase test coverage by running more options. Andrew Bartlett (This used to be commit 46abf82675ea0ce06a162be5d733da0c236880c2)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_backend.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c
index 2f5e4348e1..c8ae293a2a 100644
--- a/source4/ldap_server/ldap_backend.c
+++ b/source4/ldap_server/ldap_backend.c
@@ -155,7 +155,7 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
struct ldb_request *lreq;
enum ldb_scope scope = LDB_SCOPE_DEFAULT;
const char **attrs = NULL;
- const char *errstr = NULL;
+ const char *scope_str, *errstr = NULL;
int success_limit = 1;
int result = -1;
int ldb_ret = -1;
@@ -176,25 +176,26 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
switch (req->scope) {
case LDAP_SEARCH_SCOPE_BASE:
- DEBUG(10,("SearchRequest: scope: [BASE]\n"));
+ scope_str = "BASE";
scope = LDB_SCOPE_BASE;
success_limit = 0;
break;
case LDAP_SEARCH_SCOPE_SINGLE:
- DEBUG(10,("SearchRequest: scope: [ONE]\n"));
+ scope_str = "ONE";
scope = LDB_SCOPE_ONELEVEL;
success_limit = 0;
break;
case LDAP_SEARCH_SCOPE_SUB:
- DEBUG(10,("SearchRequest: scope: [SUB]\n"));
+ scope_str = "SUB";
scope = LDB_SCOPE_SUBTREE;
success_limit = 0;
break;
default:
result = LDAP_PROTOCOL_ERROR;
errstr = "Invalid scope";
- break;
+ goto reply;
}
+ DEBUG(10,("SearchRequest: scope: [%s]\n", scope_str));
if (req->num_attributes >= 1) {
attrs = talloc_array(local_ctx, const char *, req->num_attributes+1);
@@ -207,8 +208,8 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
attrs[i] = NULL;
}
- DEBUG(5,("ldb_request dn=%s filter=%s\n",
- req->basedn, ldb_filter_from_tree(call, req->tree)));
+ DEBUG(5,("ldb_request %s dn=%s filter=%s\n",
+ scope_str, req->basedn, ldb_filter_from_tree(call, req->tree)));
lreq = talloc(local_ctx, struct ldb_request);
NT_STATUS_HAVE_NO_MEMORY(lreq);