From dc8ab63dc532fcfe370e73fee48b78358eb3d655 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 30 Jun 2017 13:26:17 +0200 Subject: [PATCH] TODO test 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 --- 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