summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/rpc/winreg.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 98398b7f2f..ac9100cb1d 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -2258,6 +2258,28 @@ static bool test_volatile_keys(struct torture_context *tctx,
return true;
}
+static const char *kernel_mode_registry_path(struct torture_context *tctx,
+ int hkey,
+ const char *sid_string,
+ const char *path)
+{
+ switch (hkey) {
+ case HKEY_LOCAL_MACHINE:
+ return talloc_asprintf(tctx, "\\Registry\\MACHINE\\%s", path);
+ case HKEY_CURRENT_USER:
+ return talloc_asprintf(tctx, "\\Registry\\USER\\%s\\%s", sid_string, path);
+ case HKEY_USERS:
+ return talloc_asprintf(tctx, "\\Registry\\USER\\%s", path);
+ case HKEY_CLASSES_ROOT:
+ return talloc_asprintf(tctx, "\\Registry\\MACHINE\\Software\\Classes\\%s", path);
+ default:
+ torture_warning(tctx, "unsupported hkey: 0x%08x\n", hkey);
+ return NULL;
+ }
+
+ return NULL;
+}
+
static bool test_symlink_keys(struct torture_context *tctx,
struct dcerpc_binding_handle *b,
struct policy_handle *handle,