summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-08-25 14:31:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:23 -0500
commit8aa051c7b2fa651d284321715f16d94215128abf (patch)
tree91cd43baacfdd5a08ddd345189fef4eecdf307a7 /source4/torture/rpc
parent7eb820d31b39cda74b56c4c2dc66daa768f5216f (diff)
downloadsamba-8aa051c7b2fa651d284321715f16d94215128abf.tar.gz
samba-8aa051c7b2fa651d284321715f16d94215128abf.tar.bz2
samba-8aa051c7b2fa651d284321715f16d94215128abf.zip
r2071: - change smbtorture to use the popt_common stuff
this means -U DOM\\user is know allowed - torture:userdomain is a new smb.conf parameter because lp_workgroup is not the domain of the user - we use torture:userdomain now in the tests instad of lp_workgroup - for backward compat the userdomain is lp_workgroup() by default and not lp_netbios_name(), which my change later to match 'net' and 'smbclient'.. - we now have dublicate options e.g. -N -s ... tridge: can we change this? metze (This used to be commit 4733dcbf5f17422a8a4c9f99664270b3aa66c586)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/bind.c2
-rw-r--r--source4/torture/rpc/netlogon.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index 3402e3b707..6602a9bcfd 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -36,7 +36,7 @@
BOOL torture_multi_bind(int dummy)
{
struct dcerpc_pipe *p;
- const char *domain = lp_workgroup();
+ const char *domain = lp_parm_string(-1, "torture", "userdomain");
const char *username = lp_parm_string(-1, "torture", "username");
const char *password = lp_parm_string(-1, "torture", "password");
const char *pipe_uuid = DCERPC_LSARPC_UUID;
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 205ff1e610..1dec1f5109 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -272,6 +272,7 @@ enum ntlm_break {
struct samlogon_state {
TALLOC_CTX *mem_ctx;
const char *account_name;
+ const char *account_domain;
const char *password;
struct dcerpc_pipe *p;
struct netr_LogonSamLogon r;
@@ -307,7 +308,7 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
samlogon_state->r.in.logon_level = levels[i];
samlogon_state->r.in.logon.network = &ninfo;
- ninfo.identity_info.domain_name.string = lp_workgroup();
+ ninfo.identity_info.domain_name.string = samlogon_state->account_domain;
ninfo.identity_info.parameter_control = 0;
ninfo.identity_info.logon_id_low = 0;
ninfo.identity_info.logon_id_high = 0;
@@ -663,7 +664,7 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum
ZERO_STRUCT(user_session_key);
/* TODO - test with various domain cases, and without domain */
- if (!SMBNTLMv2encrypt(samlogon_state->account_name, lp_workgroup(),
+ if (!SMBNTLMv2encrypt(samlogon_state->account_name, samlogon_state->account_domain,
samlogon_state->password, &samlogon_state->chall,
&names_blob,
&lmv2_response, &ntlmv2_response,
@@ -888,6 +889,7 @@ static BOOL test_SamLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
samlogon_state.mem_ctx = mem_ctx;
samlogon_state.account_name = lp_parm_string(-1, "torture", "username");
+ samlogon_state.account_domain = lp_parm_string(-1, "torture", "userdomain");
samlogon_state.password = lp_parm_string(-1, "torture", "password");
samlogon_state.p = p;
@@ -1534,7 +1536,7 @@ static BOOL test_InteractiveLogin(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.validation_level = 6;
r.in.flags = 0;
- pinfo.identity_info.domain_name.string = lp_workgroup();
+ pinfo.identity_info.domain_name.string = lp_parm_string(-1, "torture", "userdomain");
pinfo.identity_info.parameter_control = 0;
pinfo.identity_info.logon_id_low = 0;
pinfo.identity_info.logon_id_high = 0;