summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/winreg.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc/winreg.c')
-rw-r--r--source4/torture/rpc/winreg.c23
1 files changed, 22 insertions, 1 deletions
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) {