1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

CVE-2021-3738 s4:torture/drsuapi: maintain priv->admin_credentials

This will be used in the next commits.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14468

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2021-08-05 10:34:06 +02:00 committed by Jule Anger
parent 73b6ed864e
commit 45315f2284
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@
*/ */
#include "includes.h" #include "includes.h"
#include "lib/cmdline/cmdline.h"
#include "librpc/gen_ndr/ndr_drsuapi_c.h" #include "librpc/gen_ndr/ndr_drsuapi_c.h"
#include "torture/rpc/torture_rpc.h" #include "torture/rpc/torture_rpc.h"
#include "param/param.h" #include "param/param.h"
@ -777,6 +778,8 @@ bool torture_drsuapi_tcase_setup_common(struct torture_context *tctx, struct DsP
torture_assert(tctx, priv, "Invalid argument"); torture_assert(tctx, priv, "Invalid argument");
priv->admin_credentials = samba_cmdline_get_creds();
torture_comment(tctx, "Create DRSUAPI pipe\n"); torture_comment(tctx, "Create DRSUAPI pipe\n");
status = torture_rpc_connection(tctx, status = torture_rpc_connection(tctx,
&priv->drs_pipe, &priv->drs_pipe,

View File

@ -27,6 +27,7 @@
* Data structure common for most of DRSUAPI tests * Data structure common for most of DRSUAPI tests
*/ */
struct DsPrivate { struct DsPrivate {
struct cli_credentials *admin_credentials;
struct dcerpc_pipe *drs_pipe; struct dcerpc_pipe *drs_pipe;
struct policy_handle bind_handle; struct policy_handle bind_handle;
struct drsuapi_DsBindInfo28 srv_bind_info; struct drsuapi_DsBindInfo28 srv_bind_info;