summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/testjoin.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-11-11 04:32:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:43 -0500
commita8db4dcf03bccb2e1b954d097e758d6c7780db9e (patch)
tree6f91b3623b76da1da8194efd04fcce048fcfaf33 /source4/torture/rpc/testjoin.c
parent5afda90c95e2e120f1121afb6b9fe7f5222ffa1e (diff)
downloadsamba-a8db4dcf03bccb2e1b954d097e758d6c7780db9e.tar.gz
samba-a8db4dcf03bccb2e1b954d097e758d6c7780db9e.tar.bz2
samba-a8db4dcf03bccb2e1b954d097e758d6c7780db9e.zip
r3677: Seperate the SamLogon tests from the main RPC-NETLOGON test into a
RPC-SAMLOGON of their own. I have expanded the tests to validate the use of various flags, which change some of the crypto behaviour. Andrew Bartlett (This used to be commit 3a140a3691ce49ebf4d1efcb99cfffd26c68a28f)
Diffstat (limited to 'source4/torture/rpc/testjoin.c')
-rw-r--r--source4/torture/rpc/testjoin.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index e592af3c5e..55f508941d 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -85,10 +85,10 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
an opaque pointer is returned. Pass it to torture_leave_domain()
when finished
*/
-void *torture_join_domain(const char *machine_name,
- const char *domain,
- uint16 acct_flags,
- const char **machine_password)
+struct test_join *torture_join_domain(const char *machine_name,
+ const char *domain,
+ uint16 acct_flags,
+ const char **machine_password)
{
NTSTATUS status;
struct samr_Connect c;
@@ -209,7 +209,7 @@ again:
if (!NT_STATUS_IS_OK(status)) {
printf("SetUserInfo level %u - no session key - %s\n",
s.in.level, nt_errstr(status));
- torture_leave_domain(&join);
+ torture_leave_domain(join);
goto failed;
}
@@ -235,8 +235,9 @@ again:
goto failed;
}
- *machine_password = join->machine_password;
-
+ if (machine_password) {
+ *machine_password = join->machine_password;
+ }
return join;
failed:
@@ -248,9 +249,8 @@ failed:
/*
leave the domain, deleting the machine acct
*/
-void torture_leave_domain(void *join_ctx)
+void torture_leave_domain(struct test_join *join)
{
- struct test_join *join = join_ctx;
struct samr_DeleteUser d;
NTSTATUS status;
@@ -276,9 +276,9 @@ struct test_join_ads_dc {
struct test_join *join;
};
-void *torture_join_domain_ads_dc(const char *machine_name,
- const char *domain,
- const char **machine_password)
+struct test_join_ads_dc *torture_join_domain_ads_dc(const char *machine_name,
+ const char *domain,
+ const char **machine_password)
{
struct test_join_ads_dc *join;
@@ -354,9 +354,8 @@ void *torture_join_domain_ads_dc(const char *machine_name,
return join;
}
-void torture_leave_domain_ads_dc(void *join_ctx)
+void torture_leave_domain_ads_dc(struct test_join_ads_dc *join)
{
- struct test_join_ads_dc *join = join_ctx;
if (join->join) {
torture_leave_domain(join->join);