summaryrefslogtreecommitdiff
path: root/source3/lib/smbldap.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-01-06 18:26:53 +0000
committerGerald Carter <jerry@samba.org>2004-01-06 18:26:53 +0000
commitba97fc434ac233179633f6acd3b2cd56cb2b1f86 (patch)
tree61c5745a6d8c99b3402c4c255639c5f2dad750e7 /source3/lib/smbldap.c
parentc93c925a2d563576b7e66f9c2adf41fd1e2a3174 (diff)
downloadsamba-ba97fc434ac233179633f6acd3b2cd56cb2b1f86.tar.gz
samba-ba97fc434ac233179633f6acd3b2cd56cb2b1f86.tar.bz2
samba-ba97fc434ac233179633f6acd3b2cd56cb2b1f86.zip
isolate ldap debug messages to the common smbldap_XXX() functions
(This used to be commit 4c877ccc16bcb69490c4d34d2ef5f727bf98438e)
Diffstat (limited to 'source3/lib/smbldap.c')
-rw-r--r--source3/lib/smbldap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index 2eeec156bd..1156bd6639 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -914,6 +914,9 @@ int smbldap_search(struct smbldap_state *ldap_state,
char *utf8_filter;
SMB_ASSERT(ldap_state);
+
+ DEBUG(5,("smbldap_search: base => [%s], filter => [%s], scope => [%d]\n",
+ base, filter, scope));
if (ldap_state->last_rebind.tv_sec > 0) {
struct timeval tval;
@@ -970,6 +973,8 @@ int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *at
SMB_ASSERT(ldap_state);
+ DEBUG(5,("smbldap_modify: dn => [%s]\n", dn ));
+
if (push_utf8_allocate(&utf8_dn, dn) == (size_t)-1) {
return LDAP_NO_MEMORY;
}
@@ -1001,6 +1006,8 @@ int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs
SMB_ASSERT(ldap_state);
+ DEBUG(5,("smbldap_add: dn => [%s]\n", dn ));
+
if (push_utf8_allocate(&utf8_dn, dn) == (size_t)-1) {
return LDAP_NO_MEMORY;
}
@@ -1032,6 +1039,8 @@ int smbldap_delete(struct smbldap_state *ldap_state, const char *dn)
SMB_ASSERT(ldap_state);
+ DEBUG(5,("smbldap_delete: dn => [%s]\n", dn ));
+
if (push_utf8_allocate(&utf8_dn, dn) == (size_t)-1) {
return LDAP_NO_MEMORY;
}
@@ -1094,8 +1103,6 @@ int smbldap_search_suffix (struct smbldap_state *ldap_state, const char *filter,
int scope = LDAP_SCOPE_SUBTREE;
int rc;
- DEBUG(2, ("smbldap_search_suffix: searching for:[%s]\n", filter));
-
rc = smbldap_search(ldap_state, lp_ldap_suffix(), scope, filter, search_attr, 0, result);
if (rc != LDAP_SUCCESS) {
@@ -1104,8 +1111,6 @@ int smbldap_search_suffix (struct smbldap_state *ldap_state, const char *filter,
&ld_error);
DEBUG(0,("smbldap_search_suffix: Problem during the LDAP search: %s (%s)\n",
ld_error?ld_error:"(unknown)", ldap_err2string (rc)));
- DEBUG(3,("smbldap_search_suffix: Query was: %s, %s\n", lp_ldap_suffix(),
- filter));
SAFE_FREE(ld_error);
}