summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-12-13 02:04:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:21 -0500
commit1971d529b44c8ab7301d824a2add04abc57b72c3 (patch)
tree299d6525d343db304bdfed56c2d3ad359ee83bfa /source4/torture
parent4c202a20fa7008264ad676ffb2238424bd27baf8 (diff)
downloadsamba-1971d529b44c8ab7301d824a2add04abc57b72c3.tar.gz
samba-1971d529b44c8ab7301d824a2add04abc57b72c3.tar.bz2
samba-1971d529b44c8ab7301d824a2add04abc57b72c3.zip
r4168: Implement QueryValue in the server
IDL for NotifyChangeKeyValue (This used to be commit a40214243136ed5208a1bec494ad1fbf821524ba)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/winreg.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index f842175328..97bf091d51 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -60,6 +60,36 @@ static BOOL test_GetVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return True;
}
+static BOOL test_NotifyChangeKeyValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle)
+{
+ struct winreg_NotifyChangeKeyValue r;
+ NTSTATUS status;
+
+ printf("\ntesting NotifyChangeKeyValue\n");
+
+ r.in.handle = handle;
+ r.in.watch_subtree = 1;
+ r.in.notify_filter = 0;
+ r.in.unknown = r.in.unknown2 = 0;
+ init_winreg_String(&r.in.string1, NULL);
+ init_winreg_String(&r.in.string2, NULL);
+
+ status = dcerpc_winreg_NotifyChangeKeyValue(p, mem_ctx, &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("NotifyChangeKeyValue failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
+ if (!W_ERROR_IS_OK(r.out.result)) {
+ printf("NotifyChangeKeyValue failed - %s\n", win_errstr(r.out.result));
+ return False;
+ }
+
+ return True;
+}
+
static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle, const char *name,
const char *class)
@@ -609,6 +639,9 @@ static BOOL test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
+ if (!test_NotifyChangeKeyValue(p, mem_ctx, handle)) {
+ }
+
if (!test_GetKeySecurity(p, mem_ctx, handle)) {
}