changeset 7202:ace71babd1ec HEAD

auth_debug: If LDAP server returned no fields, log it.
author Timo Sirainen <tss@iki.fi>
date Thu, 31 Jan 2008 17:06:18 +0200
parents 52639b885d87
children 0269d0c563ea
files src/auth/db-ldap.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/db-ldap.c	Wed Jan 30 18:41:37 2008 +0200
+++ b/src/auth/db-ldap.c	Thu Jan 31 17:06:18 2008 +0200
@@ -968,9 +968,14 @@
 static void
 db_ldap_result_iterate_finish(struct db_ldap_result_iterate_context *ctx)
 {
-	if (ctx->debug != NULL && str_len(ctx->debug) > 0) {
-		auth_request_log_debug(ctx->auth_request, "ldap",
-				       "result: %s", str_c(ctx->debug) + 1);
+	if (ctx->debug != NULL) {
+		if (str_len(ctx->debug) > 0) {
+			auth_request_log_debug(ctx->auth_request, "ldap",
+				"result: %s", str_c(ctx->debug) + 1);
+		} else {
+			auth_request_log_debug(ctx->auth_request, "ldap",
+				"no fields returned by the server");
+		}
 	}
 
 	ber_free(ctx->ber, 0);