From b96025eb15e3648e77e0e6aa343e23ca2f1156da Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 5 Apr 2004 20:44:33 +0000 Subject: r61: - Implement first call in the winreg rpc server - Add some initial implementation of the ldb backend - More checks in the winreg torture test (This used to be commit ae2b63b6f1821bc4f693cb8e2a5f78718c483c24) --- source4/torture/rpc/winreg.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 23e3d2e779..41804d3302 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -80,6 +80,11 @@ static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } + if (!W_ERROR_IS_OK(r.out.result)) { + printf("CreateKey failed - %s\n", win_errstr(r.out.result)); + return False; + } + return True; } @@ -166,6 +171,11 @@ static BOOL test_DeleteKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } + if (!W_ERROR_IS_OK(r.out.result)) { + printf("DeleteKey failed - %s\n", win_errstr(r.out.result)); + return False; + } + return True; } @@ -413,7 +423,7 @@ typedef BOOL winreg_open_fn(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, void *fn) { - struct policy_handle handle; + struct policy_handle handle, newhandle; BOOL ret = True; winreg_open_fn *open_fn = (winreg_open_fn *)fn; @@ -435,11 +445,22 @@ static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, void *fn) ret = False; } + if (!test_OpenKey(p, mem_ctx, &handle, "spottyfoot", &newhandle)) { + printf("CreateKey failed (OpenKey after Create didn't work)\n"); + ret = False; + } + if (!test_DeleteKey(p, mem_ctx, &handle, "spottyfoot")) { printf("DeleteKey failed\n"); ret = False; } + if (test_OpenKey(p, mem_ctx, &handle, "spottyfoot", &newhandle)) { + printf("DeleteKey failed (OpenKey after Delete didn't work)\n"); + ret = False; + } + + /* The HKCR hive has a very large fanout */ if (open_fn == test_OpenHKCR) { -- cgit