diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-10 22:58:11 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-10 22:59:15 +1000 |
commit | 27beb7fc7efde5c26917357e6a53e61e4cd7e04a (patch) | |
tree | 003b96b29f2864ca66e1defb1070623b8330f072 /source4/torture/rpc | |
parent | f85e77c43f896c649e139f7aafa43c9afda774a3 (diff) | |
download | samba-27beb7fc7efde5c26917357e6a53e61e4cd7e04a.tar.gz samba-27beb7fc7efde5c26917357e6a53e61e4cd7e04a.tar.bz2 samba-27beb7fc7efde5c26917357e6a53e61e4cd7e04a.zip |
s4/torture: fixed lots of crash bugs in the DRS tests
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/drsuapi.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c index 2075fa7a80..2b4b17adf3 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -728,14 +728,14 @@ bool torture_rpc_drsuapi(struct torture_context *torture) NTSTATUS status; struct dcerpc_pipe *p; bool ret = true; - struct DsPrivate priv; + struct DsPrivate *priv; struct cli_credentials *machine_credentials; - ZERO_STRUCT(priv); + priv = talloc_zero(torture, struct DsPrivate); - priv.join = torture_join_domain(torture, TEST_MACHINE_NAME, ACB_SVRTRUST, + priv->join = torture_join_domain(torture, TEST_MACHINE_NAME, ACB_SVRTRUST, &machine_credentials); - if (!priv.join) { + if (!priv->join) { torture_fail(torture, "Failed to join as BDC"); } @@ -743,34 +743,36 @@ bool torture_rpc_drsuapi(struct torture_context *torture) &p, &ndr_table_drsuapi); if (!NT_STATUS_IS_OK(status)) { - torture_leave_domain(torture, priv.join); + torture_leave_domain(torture, priv->join); torture_fail(torture, "Unable to connect to DRSUAPI pipe"); } /* cache pipe handle */ - priv.pipe = p; + priv->pipe = p; - ret &= test_DsBind(p, torture, &priv); + ret &= test_DsBind(p, torture, priv); #if 0 - ret &= test_QuerySitesByCost(p, torture, &priv); + ret &= test_QuerySitesByCost(p, torture, priv); #endif - ret &= test_DsGetDomainControllerInfo(p, torture, &priv); + ret &= test_DsGetDomainControllerInfo(p, torture, priv); + + ret &= test_DsCrackNames(torture, priv); - ret &= test_DsCrackNames(torture, &priv); + ret &= test_DsWriteAccountSpn(p, torture, priv); - ret &= test_DsWriteAccountSpn(p, torture, &priv); + ret &= test_DsReplicaGetInfo(p, torture, priv); - ret &= test_DsReplicaGetInfo(p, torture, &priv); + ret &= test_DsReplicaSync(p, torture, priv); - ret &= test_DsReplicaSync(p, torture, &priv); + ret &= test_DsReplicaUpdateRefs(p, torture, priv); - ret &= test_DsReplicaUpdateRefs(p, torture, &priv); + ret &= test_DsGetNCChanges(p, torture, priv); - ret &= test_DsGetNCChanges(p, torture, &priv); + ret &= test_DsUnbind(p, torture, priv); - ret &= test_DsUnbind(p, torture, &priv); + torture_leave_domain(torture, priv->join); - torture_leave_domain(torture, priv.join); + talloc_free(priv); return ret; } |