diff options
Diffstat (limited to 'source4/torture/dcom')
-rw-r--r-- | source4/torture/dcom/simple.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source4/torture/dcom/simple.c b/source4/torture/dcom/simple.c index 9dd750baad..102a3f0dab 100644 --- a/source4/torture/dcom/simple.c +++ b/source4/torture/dcom/simple.c @@ -26,11 +26,10 @@ #define CLSID_SIMPLE "5e9ddec7-5767-11cf-beab-00aa006c3606" #define DEFAULT_TRANS 4096 -BOOL torture_dcom_simple(void) +static BOOL test_readwrite(TALLOC_CTX *mem_ctx, const char *host) { NTSTATUS status; struct dcerpc_pipe *p = NULL; - TALLOC_CTX *mem_ctx; BOOL ret = True; struct GUID IID[2]; struct GUID clsid; @@ -45,18 +44,15 @@ BOOL torture_dcom_simple(void) extern NTSTATUS dcom_IUnknown_init(void); extern NTSTATUS dcom_IStream_init(void); - mem_ctx = talloc_init("torture_dcom_simple"); - torture_dcom_init(&ctx); GUID_from_string(DCERPC_ISTREAM_UUID, &IID[0]); GUID_from_string(DCERPC_IUNKNOWN_UUID, &IID[1]); GUID_from_string(CLSID_SIMPLE, &clsid); error = dcom_create_object(ctx, &clsid, - lp_parm_string(-1, "torture", "dcomhost"), 2, IID, + host, 2, IID, &interfaces, results); - if (!W_ERROR_IS_OK(error)) { printf("dcom_create_object failed - %s\n", win_errstr(error)); @@ -102,5 +98,17 @@ BOOL torture_dcom_simple(void) talloc_destroy(mem_ctx); torture_rpc_close(p); + + return True; +} + +BOOL torture_dcom_simple(void) +{ + BOOL ret = True; + TALLOC_CTX *mem_ctx = talloc_init("torture_dcom_simple"); + + ret &= test_readwrite(mem_ctx, NULL); + ret &= test_readwrite(mem_ctx, lp_parm_string(-1, "torture", "dcomhost")); + return ret; } |