summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-01-06 18:26:18 +0000
committerGerald Carter <jerry@samba.org>2004-01-06 18:26:18 +0000
commit29b4959815d9cb5ad0d300a4eb41c4d06f9653dc (patch)
treeda7f2e39dbcbeb183f91665e039bde60183e9b3c
parent67da3026a4d4681a904db09a6b713cbad047e7c7 (diff)
downloadsamba-29b4959815d9cb5ad0d300a4eb41c4d06f9653dc.tar.gz
samba-29b4959815d9cb5ad0d300a4eb41c4d06f9653dc.tar.bz2
samba-29b4959815d9cb5ad0d300a4eb41c4d06f9653dc.zip
isolate ldap debug messages to the common smbldap_XXX() functions
(This used to be commit 7d7a262f45182e67daecdca49df85445c2b9700a)
-rw-r--r--source3/lib/smbldap.c13
-rw-r--r--source3/passdb/pdb_ldap.c3
-rw-r--r--source3/sam/idmap_ldap.c5
3 files changed, 9 insertions, 12 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index e66724a361..b8ce4236e4 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);
}
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 1f44f5ab60..6e8ff83507 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1639,9 +1639,6 @@ static int ldapsam_search_one_group (struct ldapsam_privates *ldap_state,
int rc;
char **attr_list;
- DEBUG(2, ("ldapsam_search_one_group: searching for:[%s]\n", filter));
-
-
attr_list = get_attr_list(groupmap_attr_list);
rc = smbldap_search(ldap_state->smbldap_state,
lp_ldap_group_suffix (), scope,
diff --git a/source3/sam/idmap_ldap.c b/source3/sam/idmap_ldap.c
index db1bb74de5..a2afd7d424 100644
--- a/source3/sam/idmap_ldap.c
+++ b/source3/sam/idmap_ldap.c
@@ -507,9 +507,6 @@ static NTSTATUS ldap_get_sid_from_id(DOM_SID *sid, unid_t id, int id_type)
LDAP_OBJ_IDMAP_ENTRY, type,
((id_type & ID_USERID) ? (unsigned long)id.uid : (unsigned long)id.gid));
-
- DEBUG(5,("ldap_get_sid_from_id: Searching \"%s\"\n", filter ));
-
attr_list = get_attr_list( sidmap_attr_list );
rc = smbldap_search(ldap_state.smbldap_state, suffix, LDAP_SCOPE_SUBTREE,
filter, attr_list, 0, &result);
@@ -580,8 +577,6 @@ static NTSTATUS ldap_get_id_from_sid(unid_t *id, int *id_type, const DOM_SID *si
else
type = get_attr_key2string( sidmap_attr_list, LDAP_ATTR_UIDNUMBER );
- DEBUG(10,("ldap_get_id_from_sid: Searching for \"%s\"\n", filter));
-
/* do the search and check for errors */
attr_list = get_attr_list( sidmap_attr_list );