summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2021-08-05 09:58:37 +0200
committerJule Anger <janger@samba.org>2021-11-08 10:52:13 +0100
commit3db47b076d06e2f21f61a6fd1645b1ccb54869c6 (patch)
tree9caf42cdd104a75b205db9864fa61fe968f326fd
parentf7636fb7215f83a5d8cc501ff46eed0954e10040 (diff)
downloadsamba-3db47b076d06e2f21f61a6fd1645b1ccb54869c6.tar.gz
CVE-2021-3738 s4:torture/drsuapi: maintain priv->dc_credentials
We want to use the credentials of the joined dc account in future tests. 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>
-rw-r--r--source4/torture/rpc/drsuapi.c3
-rw-r--r--source4/torture/rpc/drsuapi.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 862c5f592b7..1cd595e5d8e 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -774,7 +774,6 @@ bool torture_drsuapi_tcase_setup_common(struct torture_context *tctx, struct DsP
NTSTATUS status;
int rnd = rand() % 1000;
char *name = talloc_asprintf(tctx, "%s%d", TEST_MACHINE_NAME, rnd);
- struct cli_credentials *machine_credentials;
torture_assert(tctx, priv, "Invalid argument");
@@ -786,7 +785,7 @@ bool torture_drsuapi_tcase_setup_common(struct torture_context *tctx, struct DsP
torture_comment(tctx, "About to join domain with name %s\n", name);
priv->join = torture_join_domain(tctx, name, ACB_SVRTRUST,
- &machine_credentials);
+ &priv->dc_credentials);
torture_assert(tctx, priv->join, "Failed to join as BDC");
if (!test_DsBind(priv->drs_pipe, tctx,
diff --git a/source4/torture/rpc/drsuapi.h b/source4/torture/rpc/drsuapi.h
index e81b2fe3746..f327c54cda4 100644
--- a/source4/torture/rpc/drsuapi.h
+++ b/source4/torture/rpc/drsuapi.h
@@ -37,6 +37,7 @@ struct DsPrivate {
struct GUID domain_guid;
struct drsuapi_DsGetDCInfo2 dcinfo;
struct test_join *join;
+ struct cli_credentials *dc_credentials;
};
/**