diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-03-14 11:01:54 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-03-29 02:37:28 +0200 |
commit | 7cbe1c844ea359b6d5386b3986aa16152e975f3d (patch) | |
tree | f0258453d2127430f2e5ae7477e417b883639884 /source3 | |
parent | e9611b4bd0ab11184ee11f7d134ffd01633093f7 (diff) | |
download | samba-7cbe1c844ea359b6d5386b3986aa16152e975f3d.tar.gz |
s3-rpc_server: Provide hooks required for JSON message logging for the no-auth case
This is triggered in the ncacn_np pass-though case in particular
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 95e2cebee8b..251f8991a60 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -822,6 +822,8 @@ static bool api_pipe_bind_req(struct pipes_struct *p, goto err_exit; } } else { + TALLOC_CTX *frame = talloc_stackframe(); + struct auth4_context *auth4_context; const char *transport_protection = AUTHZ_TRANSPORT_PROTECTION_NONE; if (p->transport == NCACN_NP) { transport_protection = AUTHZ_TRANSPORT_PROTECTION_SMB; @@ -831,18 +833,27 @@ static bool api_pipe_bind_req(struct pipes_struct *p, p->auth.auth_level = DCERPC_AUTH_LEVEL_NONE; p->auth.auth_context_id = 0; + status = make_auth4_context(frame, &auth4_context); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("Unable to make auth context for authz log.\n")); + TALLOC_FREE(frame); + goto err_exit; + } + /* * Log the authorization to this RPC interface. This * covered ncacn_np pass-through auth, and anonymous * DCE/RPC (eg epmapper, netlogon etc) */ - log_successful_authz_event(NULL, NULL, + log_successful_authz_event(auth4_context->msg_ctx, + auth4_context->lp_ctx, p->remote_address, p->local_address, table->name, derpc_transport_string_by_transport(p->transport), transport_protection, p->session_info); + TALLOC_FREE(frame); } ZERO_STRUCT(u.bind_ack); |