diff options
author | Stefan Metzmacher <metze@samba.org> | 2021-08-05 09:58:37 +0200 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2021-11-08 10:46:45 +0100 |
commit | 61c8272b27c533482b85dd902f4d237d0cc0ca89 (patch) | |
tree | d5fb0705ee72c6d75b2b3c360ea91fa138e59ac6 | |
parent | a8fbaf0c96dddad39b8fc7a46fa5bb2fa6806f34 (diff) | |
download | samba-61c8272b27c533482b85dd902f4d237d0cc0ca89.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.c | 3 | ||||
-rw-r--r-- | source4/torture/rpc/drsuapi.h | 1 |
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; }; /** |