Patchwork [06/13] libnsdb: Fix nsdb_search_nsdb_attr_s() auditing message

login
register
mail settings
Submitter Chuck Lever
Date Feb. 1, 2013, 5:20 p.m.
Message ID <20130201172036.63192.28217.stgit@seurat.1015granger.net>
Download mbox | patch
Permalink /patch/217533/
State Accepted
Headers show

Comments

Chuck Lever - Feb. 1, 2013, 5:20 p.m.
The xlog() call sites in __nsdb_search_nsdb_attr_s() are missing
an argument.  Neither gcc nor sparse caught this; I discovered it
during operation.

Introduced by commit 5e94ae03 "libnsdb: Add debugging message near
ldap_search_ext_s(3) call sites", Wed Nov 28 20:35:24 2012.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 src/libnsdb/fileserver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/src/libnsdb/fileserver.c b/src/libnsdb/fileserver.c
index b08ce5c..ee339b0 100644
--- a/src/libnsdb/fileserver.c
+++ b/src/libnsdb/fileserver.c
@@ -111,11 +111,11 @@  __nsdb_search_nsdb_attr_s(const char *func, LDAP *ld, const char *base,
 
 	if (ldap_get_option(ld, LDAP_OPT_URI, &uri) == LDAP_OPT_SUCCESS) {
 		xlog(D_CALL, "%s:\n  ldapsearch -H %s -b \"%s\" -s base '%s' %s",
-			func, uri, filter, attr);
+			func, uri, base, filter, attr);
 		ldap_memfree(uri);
 	} else {
 		xlog(D_CALL, "%s:\n  ldapsearch -b \"%s\" -s base '%s' %s",
-			func, filter, attr);
+			func, base, filter, attr);
 	}
 
 	return ldap_search_ext_s(ld, (char *)base, LDAP_SCOPE_BASE, filter,