CVE-2021-3670 ldap_server: Clearly log LDAP queries and timeouts
authorAndrew Bartlett <abartlet@samba.org>
Thu, 18 Nov 2021 03:09:47 +0000 (16:09 +1300)
committerJule Anger <janger@samba.org>
Thu, 2 Dec 2021 10:34:10 +0000 (10:34 +0000)
commit9aa03f402b7af97384e44dd4417587ccf98e138d
tree442f88f1b3976304e4998d9974bb68d9b5d0b1f8
parent9f4c89d0d3f530f7729f28b3183ade581e76f37a
CVE-2021-3670 ldap_server: Clearly log LDAP queries and timeouts

This puts all the detail on one line so it can be searched
by IP address and connecting SID.

This relies on the anr handling as otherwise this log
becomes the expanded query, not the original one.

RN: Provide clear logs of the LDAP search and who made it, including
a warning (at log level 3) for queries that are 1/4 of the hard timeout.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Nov 25 02:30:42 UTC 2021 on sn-devel-184

(cherry picked from commit 3507e96b3dcf0c0b8eff7b2c08ffccaf0812a393)
source4/ldap_server/ldap_backend.c