1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00
Stefan Metzmacher 1a53c1dc92 r13346: use private proto header files for the torture tests
metze
(This used to be commit 67837dbd2bcff8ec1917ba02884ee2eaa0776b46)
2007-10-10 13:51:47 -05:00

44 lines
855 B
C

#include "includes.h"
#include "libnet/libnet.h"
#include "torture/rpc/proto.h"
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
BOOL torture_rpc_join(void)
{
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;
}