summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_netlogon.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient/cmd_netlogon.c')
-rw-r--r--source3/rpcclient/cmd_netlogon.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index ed30a3122a..c255ff5370 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -63,7 +63,10 @@ void cmd_netlogon_login_test(struct client_info *info, int argc, char *argv[])
new_mach_pwd[0] = 0;
#endif
- if (!next_token(NULL, nt_user_name, NULL, sizeof(nt_user_name)))
+ argc--;
+ argv++;
+
+ if (argc < 1)
{
fstrcpy(nt_user_name, smb_cli->user_name);
if (nt_user_name[0] == 0)
@@ -72,10 +75,17 @@ void cmd_netlogon_login_test(struct client_info *info, int argc, char *argv[])
return;
}
}
+ else
+ {
+ fstrcpy(nt_user_name, argv[0]);
+ }
+
+ argc--;
+ argv++;
- if (next_token(NULL, password, NULL, sizeof(password)))
+ if (argc < 2)
{
- nt_password = password;
+ nt_password = argv[0];
}
else
{
@@ -146,17 +156,19 @@ void cmd_netlogon_domain_test(struct client_info *info, int argc, char *argv[])
{
uint16 nt_pipe_fnum;
- fstring nt_trust_dom;
+ char *nt_trust_dom;
BOOL res = True;
unsigned char trust_passwd[16];
fstring inter_dom_acct;
- if (!next_token(NULL, nt_trust_dom, NULL, sizeof(nt_trust_dom)))
+ if (argc < 2)
{
report(out_hnd,"domtest: must specify domain name\n");
return;
}
+ nt_trust_dom = argv[1];
+
DEBUG(5,("do_nt_login_test: domain %s\n", nt_trust_dom));
fstrcpy(inter_dom_acct, nt_trust_dom);