s3:rpc_server: wrap make_auth4_context() into {become,unbecome}_root()
[nivanova/samba-autobuild/.git] / source3 / rpc_server / srv_pipe.c
index f79fbe26abff1e3a2b3f3a21480196afc09d13b1..4534200f75cd5f161882b5e61ce0711ddcb2f8a1 100644 (file)
@@ -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);