[Patch] s3:rpc_server: wrap make_auth4_context() into, {become,unbecome}_root() (bug #12850)
Stefan Metzmacher
metze at samba.org
Sun Jul 2 22:07:35 UTC 2017
Hi,
here's a tested fix for
https://bugzilla.samba.org/show_bug.cgi?id=12850
"RPC calls failing due to imessaging_init (likely introduced with auth
logging)"
Please review and push:-)
This we really need this to be fixed in 4.7.0rc1.
Thanks!
metze
-------------- next part --------------
From 975bee627763b7f2328ba24fe4fa5a2b5752d393 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 30 Jun 2017 13:26:17 +0200
Subject: [PATCH] s3:rpc_server: wrap make_auth4_context() into
{become,unbecome}_root()
This need to create a temporary messaging context in order to do
the auth logging. This can only be done as root.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12850
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
source3/rpc_server/srv_pipe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index f79fbe2..4534200 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -844,7 +844,9 @@ static bool api_pipe_bind_req(struct pipes_struct *p,
p->auth.auth_level = DCERPC_AUTH_LEVEL_NONE;
p->auth.auth_context_id = 0;
+ become_root();
status = make_auth4_context(frame, &auth4_context);
+ unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Unable to make auth context for authz log.\n"));
TALLOC_FREE(frame);
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170703/81249634/signature.sig>
More information about the samba-technical
mailing list