summaryrefslogtreecommitdiffstats
path: root/source/torture/rpc/winreg.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-05 20:44:33 +0000
committerJelmer Vernooij <jelmer@samba.org>2004-04-05 20:44:33 +0000
commit067c888cfbacad86e2d5dbde029e7e23bfa045f7 (patch)
tree93f8b9b66c206a535770f9e80e6828d30853219e /source/torture/rpc/winreg.c
parentfad5fb35a4e7be0a91e8fe8eb37eeb2cb679f1ed (diff)
downloadsamba-067c888cfbacad86e2d5dbde029e7e23bfa045f7.tar.gz
samba-067c888cfbacad86e2d5dbde029e7e23bfa045f7.tar.xz
samba-067c888cfbacad86e2d5dbde029e7e23bfa045f7.zip
r61: - Implement first call in the winreg rpc server
- Add some initial implementation of the ldb backend - More checks in the winreg torture test
Diffstat (limited to 'source/torture/rpc/winreg.c')
-rw-r--r--source/torture/rpc/winreg.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/source/torture/rpc/winreg.c b/source/torture/rpc/winreg.c
index 23e3d2e7794..41804d3302c 100644
--- a/source/torture/rpc/winreg.c
+++ b/source/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) {