summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-04-05 20:44:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:50:41 -0500
commitb96025eb15e3648e77e0e6aa343e23ca2f1156da (patch)
treede172e59aa322f1f015f941ca6cc8c5ff596777d /source4/torture
parent220ea5b6e6e4d049cb80c1c206ead6021b807283 (diff)
downloadsamba-b96025eb15e3648e77e0e6aa343e23ca2f1156da.tar.gz
samba-b96025eb15e3648e77e0e6aa343e23ca2f1156da.tar.bz2
samba-b96025eb15e3648e77e0e6aa343e23ca2f1156da.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 (This used to be commit ae2b63b6f1821bc4f693cb8e2a5f78718c483c24)
Diffstat (limited to 'source4/torture')
-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) {