summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/rpc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-02 17:14:55 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-02 22:00:54 +1100
commit41999761f1bd018dd039421e2cfe498e173e2f79 (patch)
tree3b518ad4a84af0b4f1a46981df51085482d828f0 /source4/torture/rpc/rpc.c
parentb8a0eb749fff7c462f4841b12c3977108fba3925 (diff)
downloadsamba-41999761f1bd018dd039421e2cfe498e173e2f79.tar.gz
samba-41999761f1bd018dd039421e2cfe498e173e2f79.tar.bz2
samba-41999761f1bd018dd039421e2cfe498e173e2f79.zip
s4-torture Add tests for DES-only accounts PAC behaviour/validation.
Previously we didn't support DES-only in a Samba4 domain. This is important for some legacy systems that have not yet migrated from this weak crypto. Andrew Bartlett
Diffstat (limited to 'source4/torture/rpc/rpc.c')
-rw-r--r--source4/torture/rpc/rpc.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c
index 8d7c51aff9..7f3ae06d3a 100644
--- a/source4/torture/rpc/rpc.c
+++ b/source4/torture/rpc/rpc.c
@@ -352,6 +352,19 @@ static bool torture_rpc_wrap_test_creds(struct torture_context *tctx,
return fn(tctx, tcase_data->pipe, tcase_data->credentials);
}
+static bool torture_rpc_wrap_test_join(struct torture_context *tctx,
+ struct torture_tcase *tcase,
+ struct torture_test *test)
+{
+ bool (*fn) (struct torture_context *, struct dcerpc_pipe *, struct cli_credentials *, struct test_join *);
+ struct torture_rpc_tcase_data *tcase_data =
+ (struct torture_rpc_tcase_data *)tcase->data;
+
+ fn = test->fn;
+
+ return fn(tctx, tcase_data->pipe, tcase_data->credentials, tcase_data->join_ctx);
+}
+
_PUBLIC_ struct torture_test *torture_rpc_tcase_add_test(
struct torture_rpc_tcase *tcase,
const char *name,
@@ -394,6 +407,28 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_creds(
return test;
}
+_PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_join(
+ struct torture_rpc_tcase *tcase,
+ const char *name,
+ bool (*fn) (struct torture_context *, struct dcerpc_pipe *,
+ struct cli_credentials *, struct test_join *))
+{
+ struct torture_test *test;
+
+ test = talloc(tcase, struct torture_test);
+
+ test->name = talloc_strdup(test, name);
+ test->description = NULL;
+ test->run = torture_rpc_wrap_test_join;
+ test->dangerous = false;
+ test->data = NULL;
+ test->fn = fn;
+
+ DLIST_ADD(tcase->tcase.tests, test);
+
+ return test;
+}
+
_PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_ex(
struct torture_rpc_tcase *tcase,
const char *name,