summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_netlogon.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-22 19:46:26 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-22 19:46:26 +0000
commit1ed8653112f8b26cb107e2c1e872565675ba1465 (patch)
treec8ed0f37b5a83aa59a5f2d24ba12adee1a21f465 /source3/rpcclient/cmd_netlogon.c
parent288a5059a24b1b28bef1c28bc831c775977c5876 (diff)
downloadsamba-1ed8653112f8b26cb107e2c1e872565675ba1465.tar.gz
samba-1ed8653112f8b26cb107e2c1e872565675ba1465.tar.bz2
samba-1ed8653112f8b26cb107e2c1e872565675ba1465.zip
another four next_token() removals (using getopt instead)
(This used to be commit 3e76ca9b172e1a6886e714d6a36453f30ff3e771)
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);