summaryrefslogtreecommitdiff
path: root/usr.sbin/ldapd/ldape.c
diff options
context:
space:
mode:
authorMartin Hedenfal <martinh@cvs.openbsd.org>2010-11-10 08:00:55 +0000
committerMartin Hedenfal <martinh@cvs.openbsd.org>2010-11-10 08:00:55 +0000
commitebfaac69617548d3e4845c8b32ce70f01731065d (patch)
tree26ebc3f004c9a5780a0fc11e8e714aa44aa0d3ea /usr.sbin/ldapd/ldape.c
parent408354608ae943f836f74405593828f81d0bdf3b (diff)
Make -dvv flags produce debug traces of decoded BER messages on stderr.
Also shows a hexdump of the input buffer if BER decoding fails. Useful when debugging protocol issues.
Diffstat (limited to 'usr.sbin/ldapd/ldape.c')
-rw-r--r--usr.sbin/ldapd/ldape.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ldapd/ldape.c b/usr.sbin/ldapd/ldape.c
index 81eaac32f74..4cc157d904c 100644
--- a/usr.sbin/ldapd/ldape.c
+++ b/usr.sbin/ldapd/ldape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldape.c,v 1.13 2010/09/01 17:34:15 martinh Exp $ */
+/* $OpenBSD: ldape.c,v 1.14 2010/11/10 08:00:54 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -88,6 +88,8 @@ send_ldap_extended_response(struct conn *conn, int msgid, unsigned long type,
if (ber_add_string(elm, extended_oid) == NULL)
goto fail;
+ ldap_debug_elements(root, type, "sending response on fd %d", conn->fd);
+
rc = ber_write_elements(&conn->ber, root);
ber_free_elements(root);