summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/netlogon.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc/netlogon.c')
-rw-r--r--source4/torture/rpc/netlogon.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 66c344bb26..92f06c4396 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -41,6 +41,11 @@ static BOOL test_LogonUasLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_LogonUasLogon r;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping LogonUasLogon test against Samba4\n");
+ return True;
+ }
+
r.in.server_name = NULL;
r.in.account_name = cli_credentials_get_username(cmdline_credentials);
r.in.workstation = TEST_MACHINE_NAME;
@@ -62,6 +67,11 @@ static BOOL test_LogonUasLogoff(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_LogonUasLogoff r;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping LogonUasLogoff test against Samba4\n");
+ return True;
+ }
+
r.in.server_name = NULL;
r.in.account_name = cli_credentials_get_username(cmdline_credentials);
r.in.workstation = TEST_MACHINE_NAME;
@@ -619,6 +629,11 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
BOOL ret = True;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping DatabaseSync test against Samba4\n");
+ return True;
+ }
+
if (!test_SetupCredentials(p, mem_ctx, TEST_MACHINE_NAME, machine_password, &creds)) {
return False;
}
@@ -680,6 +695,11 @@ static BOOL test_DatabaseDeltas(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
BOOL ret = True;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping DatabaseDeltas test against Samba4\n");
+ return True;
+ }
+
if (!test_SetupCredentials(p, mem_ctx, TEST_MACHINE_NAME, machine_password, &creds)) {
return False;
}
@@ -808,6 +828,12 @@ static BOOL test_GetDcName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_GetDcName r;
+
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping GetDCName test against Samba4\n");
+ return True;
+ }
+
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.domainname = lp_workgroup();
@@ -834,6 +860,11 @@ static BOOL test_LogonControl(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping LogonControl test against Samba4\n");
+ return True;
+ }
+
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.function_code = 1;
@@ -861,6 +892,11 @@ static BOOL test_GetAnyDCName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_GetAnyDCName r;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping GetAnyDCName test against Samba4\n");
+ return True;
+ }
+
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.domainname = lp_workgroup();
@@ -890,6 +926,11 @@ static BOOL test_LogonControl2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping LogonControl2 test against Samba4\n");
+ return True;
+ }
+
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.function_code = NETLOGON_CONTROL_REDISCOVER;
@@ -971,6 +1012,11 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
BOOL ret = True;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping DatabaseSync2 test against Samba4\n");
+ return True;
+ }
+
if (!test_SetupCredentials2(p, mem_ctx, NETLOGON_NEG_AUTH2_FLAGS,
TEST_MACHINE_NAME, machine_password,
SEC_CHAN_BDC, &creds)) {
@@ -1022,6 +1068,11 @@ static BOOL test_LogonControl2Ex(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
BOOL ret = True;
int i;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping DatabaseSync2 test against Samba4\n");
+ return True;
+ }
+
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.function_code = NETLOGON_CONTROL_REDISCOVER;
@@ -1123,6 +1174,11 @@ static BOOL test_netr_DsRGetSiteName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct netr_DsRGetSiteName r;
BOOL ret = True;
+ if (lp_parm_bool(-1, "target", "samba4", False)) {
+ printf("skipping DsRGetSiteName test against Samba4\n");
+ return True;
+ }
+
r.in.computer_name = computer_name;
printf("Testing netr_DsRGetSiteName\n");