r9727: A simplier test I can aim at passing when I get the cracknames code done.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 29 Aug 2005 04:15:08 +0000 (04:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:53 +0000 (13:34 -0500)
Andrew Bartlett
(This used to be commit b1b0e26e537677793a92af02464ff1e83fce9610)

source4/torture/rpc/drsuapi.c
source4/torture/torture.c

index f4c608eb8c7a28aed8df4e546a9ddb5e0543731c..4e72a0f9b35003c753ff7748ab19b776c8cf5f13 100644 (file)
@@ -1306,3 +1306,40 @@ BOOL torture_rpc_drsuapi(void)
 
        return ret;
 }
+
+BOOL torture_rpc_drsuapi_cracknames(void)
+{
+        NTSTATUS status;
+        struct dcerpc_pipe *p;
+       TALLOC_CTX *mem_ctx;
+       BOOL ret = True;
+       struct DsPrivate priv;
+
+       mem_ctx = talloc_init("torture_rpc_drsuapi");
+
+       status = torture_rpc_connection(mem_ctx, 
+                                       &p, 
+                                       DCERPC_DRSUAPI_NAME,
+                                       DCERPC_DRSUAPI_UUID,
+                                       DCERPC_DRSUAPI_VERSION);
+       if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
+               return False;
+       }
+
+       printf("Connected to DRAUAPI pipe\n");
+
+       ZERO_STRUCT(priv);
+
+       ret &= test_DsBind(p, mem_ctx, &priv);
+
+       ret &= test_DsGetDCInfo(p, mem_ctx, &priv);
+
+       ret &= test_DsCrackNames(p, mem_ctx, &priv);
+
+       ret &= test_DsUnbind(p, mem_ctx, &priv);
+
+       talloc_free(mem_ctx);
+
+       return ret;
+}
index dde3c7bd5be145d0398a4ed4d813b7fab3ffc3e0..601888a483d84aafef544e25e5a7a73381bc890d 100644 (file)
@@ -2308,6 +2308,7 @@ static struct {
         {"RPC-COUNTCALLS", torture_rpc_countcalls, 0},
        {"RPC-MULTIBIND", torture_multi_bind, 0},
        {"RPC-DRSUAPI", torture_rpc_drsuapi, 0},
+       {"RPC-CRACKNAMES", torture_rpc_drsuapi_cracknames, 0},
        {"RPC-LOGIN", torture_rpc_login, 0},
        {"RPC-ROT", torture_rpc_rot, 0},
        {"RPC-DSSETUP", torture_rpc_dssetup, 0},