summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-09 01:07:39 +0200
committerGünther Deschner <gd@samba.org>2010-04-09 13:57:17 +0200
commitbc9289995a4d338644aec8a504e284ac65d73c53 (patch)
tree4e484c9ab0258cde12d5e2cf4dfb11f99c745cc8 /source4/torture/rpc
parent92a051ef2fffe7e141531a15c0a8b39cb26e0908 (diff)
downloadsamba-bc9289995a4d338644aec8a504e284ac65d73c53.tar.gz
samba-bc9289995a4d338644aec8a504e284ac65d73c53.tar.bz2
samba-bc9289995a4d338644aec8a504e284ac65d73c53.zip
s4-smbtorture: more work on registry REG_LINK (in-registry symlinks) test.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/winreg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 8b57dd8cf7..4ae3631f7b 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -2205,6 +2205,9 @@ static bool test_symlink_keys(struct torture_context *tctx,
{
struct policy_handle new_handle;
enum winreg_CreateAction action_taken;
+ DATA_BLOB blob;
+ /* symlink destination needs to be a kernel mode registry path */
+ const char *dest = "\\Registry\\MACHINE\\SOFTWARE\\foo";
/* disable until we know how to *not* screw up a windows registry */
torture_skip(tctx, "symlink test disabled");
@@ -2226,6 +2229,17 @@ static bool test_symlink_keys(struct torture_context *tctx,
torture_assert_int_equal(tctx, action_taken, REG_CREATED_NEW_KEY, "unexpected action");
torture_assert(tctx,
+ convert_string_talloc(tctx, CH_UNIX, CH_UTF16,
+ dest, strlen(dest), /* not NULL terminated */
+ &blob.data, &blob.length,
+ false),
+ "failed to convert");
+
+ torture_assert(tctx,
+ test_SetValue(b, tctx, &new_handle, "SymbolicLinkValue", REG_LINK, blob.data, blob.length),
+ "failed to create SymbolicLinkValue value");
+
+ torture_assert(tctx,
test_CloseKey(b, tctx, &new_handle),
"failed to close");