Author: gd
Date: 2005-01-10 10:23:57 +0000 (Mon, 10 Jan 2005)
New Revision: 4633

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4633

Log:
Finally give rpcclient a port-command.

Guenther

Modified:
   branches/SAMBA_3_0/source/rpcclient/rpcclient.c
   trunk/source/rpcclient/rpcclient.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/rpcclient.c
===================================================================
--- branches/SAMBA_3_0/source/rpcclient/rpcclient.c     2005-01-10 08:58:53 UTC 
(rev 4632)
+++ branches/SAMBA_3_0/source/rpcclient/rpcclient.c     2005-01-10 10:23:57 UTC 
(rev 4633)
@@ -658,6 +658,7 @@
        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 @@
                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 @@
        }
        
        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(),

Modified: trunk/source/rpcclient/rpcclient.c
===================================================================
--- trunk/source/rpcclient/rpcclient.c  2005-01-10 08:58:53 UTC (rev 4632)
+++ trunk/source/rpcclient/rpcclient.c  2005-01-10 10:23:57 UTC (rev 4633)
@@ -660,6 +660,7 @@
        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 */
@@ -668,6 +669,7 @@
                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
@@ -741,7 +743,7 @@
        }
        
        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(),

Reply via email to