]> git.netwichtig.de Git - user/henk/code/inspircd.git/commit
Improve logging for the m_ldap and m_ldapauth modules (#1757).
authorJoel Sing <joel@sing.id.au>
Thu, 12 Mar 2020 05:20:46 +0000 (16:20 +1100)
committerGitHub <noreply@github.com>
Thu, 12 Mar 2020 05:20:46 +0000 (05:20 +0000)
commit1a7b4bac42c0c0f4dc9d0081c462d62f193e0da8
tree884bbbe1e8aa10376529ee3ff08f08c706934db4
parent0a67b8861adfca7b09e59d9639e26b6bf71859a5
Improve logging for the m_ldap and m_ldapauth modules (#1757).

Currently, it is difficult to diagnose LDAP authentication failures,
since the logs do not provide sufficient information about what is
actually being queried and what actually failed.

This increases logging details so that information about the LDAP query
is included, for example:

  Fri Mar 06 2020 08:02:59 ANNOUNCEMENT: Error binding as manager to LDAP
  server: Invalid credentials (bind dn=cn=adminz,dc=nodomain)

Rather than:

  Fri Mar 06 2020 08:02:59 ANNOUNCEMENT: Error binding as manager to LDAP
  server: Invalid credentials

Same with connection logging:

  Fri Mar 06 2020 07:59:53 CONNECT: Forbidden connection from
  jsing!jsing@192.168.200.1 (Invalid credentials (bind
  dn=uid=jsing,dc=nodomain))

  Fri Mar 06 2020 08:01:19 CONNECT: Successful connection from
  jsing!jsing@192.168.200.1 (dn=uid=jsing,dc=nodomain)
src/modules/extra/m_ldap.cpp
src/modules/m_ldapauth.cpp