mirror of
https://github.com/samba-team/samba.git
synced 2025-01-06 13:18:07 +03:00
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>
This commit is contained in:
parent
a8fbaf0c96
commit
61c8272b27
@ -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,
|
||||
|
@ -37,6 +37,7 @@ struct DsPrivate {
|
||||
struct GUID domain_guid;
|
||||
struct drsuapi_DsGetDCInfo2 dcinfo;
|
||||
struct test_join *join;
|
||||
struct cli_credentials *dc_credentials;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user