]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2021-3738 s4:torture/drsuapi: maintain priv->admin_credentials
authorStefan Metzmacher <metze@samba.org>
Thu, 5 Aug 2021 08:34:06 +0000 (10:34 +0200)
committerJule Anger <janger@samba.org>
Tue, 9 Nov 2021 19:45:34 +0000 (19:45 +0000)
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>
source4/torture/rpc/drsuapi.c
source4/torture/rpc/drsuapi.h

index 1cd595e5d8e9a40308cab46471eed9e06eda0f72..799a641dbb94ce299d314d385c97a57142018201 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "lib/cmdline/cmdline.h"
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
 #include "torture/rpc/torture_rpc.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");
 
+       priv->admin_credentials = samba_cmdline_get_creds();
+
        torture_comment(tctx, "Create DRSUAPI pipe\n");
        status = torture_rpc_connection(tctx,
                                        &priv->drs_pipe,
index f327c54cda4476e328118eb69c4fd013c270f4b1..3cc4be49d9991a7772178d9c4d0a18734e6bb823 100644 (file)
@@ -27,6 +27,7 @@
  * Data structure common for most of DRSUAPI tests
  */
 struct DsPrivate {
+       struct cli_credentials *admin_credentials;
        struct dcerpc_pipe *drs_pipe;
        struct policy_handle bind_handle;
        struct drsuapi_DsBindInfo28 srv_bind_info;