summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-10-20 06:31:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:02 -0500
commit20685ca815336e64fd5f7e0681c443951d9dcbf2 (patch)
tree4e1ea991e7428db0efc7cec0b086d92ecbd5b945 /source4
parentb5e734b4ca8d0181ed9e868cd4f763fb572efa40 (diff)
downloadsamba-20685ca815336e64fd5f7e0681c443951d9dcbf2.tar.gz
samba-20685ca815336e64fd5f7e0681c443951d9dcbf2.tar.bz2
samba-20685ca815336e64fd5f7e0681c443951d9dcbf2.zip
r11210: Log registry open function name when starting hive tests.
(This used to be commit 3416a6d78f205f9d3fd73161cbed6dcd9c2bfdf8)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/winreg.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index bf183ee972..a784337fb9 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -686,13 +686,16 @@ static BOOL test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
typedef NTSTATUS (*winreg_open_fn)(struct dcerpc_pipe *, TALLOC_CTX *, void *);
-static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, winreg_open_fn open_fn)
+static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ const char *name, winreg_open_fn open_fn)
{
struct policy_handle handle, newhandle;
BOOL ret = True, created = False, deleted = False;
struct winreg_OpenHKLM r;
NTSTATUS status;
+ printf("Testing %s\n", name);
+
r.in.system_name = 0;
r.in.access_required = SEC_FLAG_MAXIMUM_ALLOWED;
r.out.handle = &handle;
@@ -791,10 +794,13 @@ BOOL torture_rpc_winreg(void)
struct dcerpc_pipe *p;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
- winreg_open_fn open_fns[] = { (winreg_open_fn)dcerpc_winreg_OpenHKLM,
- (winreg_open_fn)dcerpc_winreg_OpenHKU,
- (winreg_open_fn)dcerpc_winreg_OpenHKCR,
- (winreg_open_fn)dcerpc_winreg_OpenHKCU };
+ struct {
+ const char *name;
+ winreg_open_fn fn;
+ } open_fns[] = {{"OpenHKLM", (winreg_open_fn)dcerpc_winreg_OpenHKLM },
+ {"OpenHKU", (winreg_open_fn)dcerpc_winreg_OpenHKU },
+ {"OpenHKCR", (winreg_open_fn)dcerpc_winreg_OpenHKCR },
+ {"OpenHKCU", (winreg_open_fn)dcerpc_winreg_OpenHKCU }};
int i;
mem_ctx = talloc_init("torture_rpc_winreg");
@@ -819,7 +825,7 @@ BOOL torture_rpc_winreg(void)
}
for (i = 0; i < ARRAY_SIZE(open_fns); i++) {
- if (!test_Open(p, mem_ctx, open_fns[i]))
+ if (!test_Open(p, mem_ctx, open_fns[i].name, open_fns[i].fn))
ret = False;
}