auth: For NTLM and KDC authentication, log the authentication duration
[samba.git] / source4 / auth / ntlm / auth_simple.c
index d7811b9e5b215f86865505ca6efd4396cba7be42..fcd9050979d0c015b7226b797e427db35266cb3d 100644 (file)
@@ -27,6 +27,9 @@
 #include "auth/auth.h"
 #include "dsdb/samdb/samdb.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_AUTH
+
 struct authenticate_ldap_simple_bind_state {
        bool using_tls;
        struct auth4_context *auth_context;
@@ -109,6 +112,7 @@ _PUBLIC_ struct tevent_req *authenticate_ldap_simple_bind_send(TALLOC_CTX *mem_c
                                             dn, &nt4_domain, &nt4_username);
        if (!NT_STATUS_IS_OK(status)) {
                log_authentication_event(msg, lp_ctx,
+                                        &state->auth_context->start_time,
                                         user_info, status,
                                         NULL, NULL, NULL, NULL);
        }