summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-29 01:10:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:58 -0500
commit7ce7137ad4edb03acf6189568d4c3c4f6d8798fe (patch)
treec4df8f4525c7cfc671e336bed7ede0bbc7704808 /source4/torture/rpc
parent10ae6167651bc4fe3169c6c4086eef4920b0d739 (diff)
downloadsamba-7ce7137ad4edb03acf6189568d4c3c4f6d8798fe.tar.gz
samba-7ce7137ad4edb03acf6189568d4c3c4f6d8798fe.tar.bz2
samba-7ce7137ad4edb03acf6189568d4c3c4f6d8798fe.zip
r3348: More registry fixes and additions. The following functions work right now against samba 4, at least with a ldb backend:
winreg_Open* winreg_OpenKey winreg_EnumKey winreg_DeleteKey winreg_CreateKey (This used to be commit a71d51dd3b136a1bcde1704fe9830985e06bb01b)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/winreg.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 1ca5768622..fa08d1a69e 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -167,7 +167,6 @@ static BOOL test_OpenKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
if (!W_ERROR_IS_OK(r.out.result)) {
- printf("OpenKey failed - %s\n", win_errstr(r.out.result));
return False;
}
@@ -258,24 +257,35 @@ static BOOL test_EnumKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
if (NT_STATUS_IS_OK(status) && W_ERROR_IS_OK(r.out.result)) {
struct policy_handle key_handle;
+ printf("EnumKey: %d: %s\n", r.in.enum_index, r.out.out_name->name);
+
if (!test_OpenKey(
p, mem_ctx, handle, r.out.out_name->name,
&key_handle)) {
printf("OpenKey(%s) failed - %s\n",
r.out.out_name->name,
win_errstr(r.out.result));
- goto next_key;
+ } else {
+ test_key(p, mem_ctx, &key_handle, depth + 1);
}
-
- test_key(p, mem_ctx, &key_handle, depth + 1);
}
- next_key:
-
r.in.enum_index++;
} while (NT_STATUS_IS_OK(status) && W_ERROR_IS_OK(r.out.result));
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("EnumKey failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
+ if (!W_ERROR_IS_OK(r.out.result) && !W_ERROR_EQUAL(r.out.result, WERR_NO_MORE_ITEMS)) {
+ printf("EnumKey failed - %s\n", win_errstr(r.out.result));
+ return False;
+ }
+
+
+
return True;
}