summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Kroeger <andrew@sprocks.gotdns.com>2008-02-19 09:13:14 -0600
committerAndrew Kroeger <andrew@sprocks.gotdns.com>2008-02-26 19:27:15 -0600
commit1aa3d0649f45c6c13e007ad3e4655cb3c99170e8 (patch)
treec256c30f657f68cdf3270220e392e494b7801824 /source4/torture/rpc
parent497b17ac61995f0dd07de7d9d505de5ad3a46618 (diff)
downloadsamba-1aa3d0649f45c6c13e007ad3e4655cb3c99170e8.tar.gz
samba-1aa3d0649f45c6c13e007ad3e4655cb3c99170e8.tar.bz2
samba-1aa3d0649f45c6c13e007ad3e4655cb3c99170e8.zip
torture/rpc-winreg: Modify test cases to work with recursive key deletion.
(This used to be commit 3885acdee6fa3ec33cf4824826c2b8a98721382c)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/winreg.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 96b1fb2174..31b9c2bb56 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -848,7 +848,6 @@ static bool test_SecurityDescriptorInheritance(struct dcerpc_pipe *p,
out:
test_CloseKey(p, tctx, &new_handle);
- test_Cleanup(p, tctx, handle, TEST_SUBSUBKEY_SD);
test_Cleanup(p, tctx, handle, TEST_SUBKEY_SD);
test_RestoreSecurity(p, tctx, handle, key, sd_orig);
@@ -971,7 +970,6 @@ static bool test_SecurityDescriptorBlockInheritance(struct dcerpc_pipe *p,
out:
test_CloseKey(p, tctx, &new_handle);
- test_Cleanup(p, tctx, handle, TEST_SUBSUBKEY_SD);
test_Cleanup(p, tctx, handle, TEST_SUBKEY_SD);
test_RestoreSecurity(p, tctx, handle, key, sd_orig);
@@ -1386,27 +1384,6 @@ static bool test_DeleteKey(struct dcerpc_pipe *p, struct torture_context *tctx,
return true;
}
-/* DeleteKey on a key with subkey(s) should
- * return WERR_ACCESS_DENIED. */
-static bool test_DeleteKeyWithSubkey(struct dcerpc_pipe *p,
- struct torture_context *tctx,
- struct policy_handle *handle,
- const char *key)
-{
- struct winreg_DeleteKey r;
-
- r.in.handle = handle;
- init_winreg_String(&r.in.key, key);
-
- torture_assert_ntstatus_ok(tctx, dcerpc_winreg_DeleteKey(p, tctx, &r),
- "DeleteKeyWithSubkey failed");
-
- torture_assert_werr_equal(tctx, r.out.result, WERR_ACCESS_DENIED,
- "DeleteKeyWithSubkey failed");
-
- return true;
-}
-
static bool test_QueryInfoKey(struct dcerpc_pipe *p,
struct torture_context *tctx,
struct policy_handle *handle, char *class)
@@ -1721,13 +1698,6 @@ static bool test_Open(struct torture_context *tctx, struct dcerpc_pipe *p,
torture_assert_ntstatus_ok(tctx, open_fn(p, tctx, &r),
"open");
- test_Cleanup(p, tctx, &handle, TEST_KEY1);
- test_Cleanup(p, tctx, &handle, TEST_SUBSUBKEY_SD);
- test_Cleanup(p, tctx, &handle, TEST_SUBKEY_SD);
- test_Cleanup(p, tctx, &handle, TEST_KEY4);
- test_Cleanup(p, tctx, &handle, TEST_KEY2);
- test_Cleanup(p, tctx, &handle, TEST_SUBKEY);
- test_Cleanup(p, tctx, &handle, TEST_KEY3);
test_Cleanup(p, tctx, &handle, TEST_KEY_BASE);
if (!test_CreateKey(p, tctx, &handle, TEST_KEY_BASE, NULL)) {
@@ -1826,19 +1796,6 @@ static bool test_Open(struct torture_context *tctx, struct dcerpc_pipe *p,
}
if (created_subkey &&
- !test_DeleteKeyWithSubkey(p, tctx, &handle, TEST_KEY3)) {
- printf("DeleteKeyWithSubkey failed "
- "(DeleteKey didn't return ACCESS_DENIED)\n");
- ret = false;
- }
-
- if (created_subkey &&
- !test_DeleteKey(p, tctx, &handle, TEST_SUBKEY)) {
- printf("DeleteKey failed\n");
- ret = false;
- }
-
- if (created3 &&
!test_DeleteKey(p, tctx, &handle, TEST_KEY3)) {
printf("DeleteKey failed\n");
ret = false;