summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-01-10 10:23:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:49 -0500
commitc28a0992fdf5a5dc48a5797f52edf879f07142df (patch)
tree562cb120915e290fa580d44921c8b28a1a031792 /source3/rpcclient
parent0ac4cc4caec6e55ef92ce40e2defcaa8479faa9a (diff)
downloadsamba-c28a0992fdf5a5dc48a5797f52edf879f07142df.tar.gz
samba-c28a0992fdf5a5dc48a5797f52edf879f07142df.tar.bz2
samba-c28a0992fdf5a5dc48a5797f52edf879f07142df.zip
r4633: Finally give rpcclient a port-command.
Guenther (This used to be commit c39c447a5de75d15d17bb65227ebc5eb1355e4e1)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 4d35b6d8a9..acb65b7f7c 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -658,6 +658,7 @@ out_free:
struct cmd_set **cmd_set;
struct in_addr server_ip;
NTSTATUS nt_status;
+ static int opt_port = 0;
/* make sure the vars that get altered (4th field) are in
a fixed location or certain compilers complain */
@@ -666,6 +667,7 @@ out_free:
POPT_AUTOHELP
{"command", 'c', POPT_ARG_STRING, &cmdstr, 'c', "Execute semicolon separated cmds", "COMMANDS"},
{"dest-ip", 'I', POPT_ARG_STRING, &opt_ipaddr, 'I', "Specify destination IP address", "IP"},
+ {"port", 'p', POPT_ARG_INT, &opt_port, 'p', "Specify port number", "PORT"},
POPT_COMMON_SAMBA
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
@@ -739,7 +741,7 @@ out_free:
}
nt_status = cli_full_connection(&cli, global_myname(), server,
- opt_ipaddr ? &server_ip : NULL, 0,
+ opt_ipaddr ? &server_ip : NULL, opt_port,
"IPC$", "IPC",
cmdline_auth_info.username,
lp_workgroup(),