From bc9289995a4d338644aec8a504e284ac65d73c53 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 9 Apr 2010 01:07:39 +0200 Subject: s4-smbtorture: more work on registry REG_LINK (in-registry symlinks) test. Guenther --- source4/torture/rpc/winreg.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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"); @@ -2225,6 +2228,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"); -- cgit