1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-18 06:04:06 +03:00
Jelmer Vernooij 909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce29108dd82210dc3e1f00414f545949e1d)
2007-10-10 13:59:13 -05:00

45 lines
922 B
C

#include "includes.h"
#include "libnet/libnet.h"
#include "auth/credentials/credentials.h"
#include "torture/rpc/rpc.h"
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
BOOL torture_rpc_join(struct torture_context *torture)
{
struct test_join *tj;
struct cli_credentials *machine_account;
/* Join domain as a member server. */
tj = torture_join_domain(TORTURE_NETBIOS_NAME,
ACB_WSTRUST,
&machine_account);
if (!tj) {
DEBUG(0, ("%s failed to join domain\n",
TORTURE_NETBIOS_NAME));
return False;
}
/* Leave domain. */
torture_leave_domain(tj);
/* Join domain as a domain controller. */
tj = torture_join_domain(TORTURE_NETBIOS_NAME,
ACB_SVRTRUST,
&machine_account);
if (!tj) {
DEBUG(0, ("%s failed to join domain\n",
TORTURE_NETBIOS_NAME));
return False;
}
/* Leave domain. */
torture_leave_domain(tj);
return True;
}