summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2017-03-24 15:18:46 +1300
committerAndrew Bartlett <abartlet@samba.org>2017-03-29 02:37:28 +0200
commitd0041960363c981224552d4ce7ac3092679ee2c6 (patch)
tree8c76050e625360ea4955f537e73022944ac01725 /source3/auth
parent631f1bcce68062e1c8e653024999b79589a80eaf (diff)
downloadsamba-d0041960363c981224552d4ce7ac3092679ee2c6.tar.gz
auth: Add hooks for notification of authentication events over the message bus
This will allow tests to be written to confirm the correct events are triggered. We pass in a messaging context from the callers Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth.c5
-rw-r--r--source3/auth/auth_generic.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 45bcabd2721..28d0955c327 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -299,7 +299,8 @@ NTSTATUS auth_check_ntlm_password(TALLOC_CTX *mem_ctx,
sid = (struct dom_sid) {0};
}
- log_authentication_event(user_info, nt_status,
+ log_authentication_event(NULL, NULL,
+ user_info, nt_status,
server_info->info3->base.logon_domain.string,
server_info->info3->base.account_name.string,
unix_username, &sid);
@@ -330,7 +331,7 @@ fail:
user_info->client.account_name, user_info->mapped.account_name,
nt_errstr(nt_status), *pauthoritative));
- log_authentication_event(user_info, nt_status, NULL, NULL, NULL, NULL);
+ log_authentication_event(NULL, NULL, user_info, nt_status, NULL, NULL, NULL, NULL);
ZERO_STRUCTP(pserver_info);
diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c
index c18b5435ac4..6dedeedd302 100644
--- a/source3/auth/auth_generic.c
+++ b/source3/auth/auth_generic.c
@@ -443,7 +443,9 @@ NTSTATUS auth_check_password_session_info(struct auth4_context *auth_context,
* log all authorizations consistently (be they NLTM, NTLMSSP
* or krb5) we log this info again as an authorization.
*/
- log_successful_authz_event(user_info->remote_host,
+ log_successful_authz_event(auth_context->msg_ctx,
+ auth_context->lp_ctx,
+ user_info->remote_host,
user_info->local_host,
user_info->service_description,
user_info->auth_description,