From 6a3a0766d5772a33d888c51ac4d68d2fa3e504ae Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 9 May 2005 22:39:20 +0000 Subject: r6685: smbclient fixes * BUG 2680: copy files from an MSDFS win2k root share * BUG 2688: re-implement support for the -P (--port) option * support connecting to an 'msdfs proxy' share on a Samba server (This used to be commit 9e3e473632fee669eda477d8cbe309b7109552ea) --- source3/client/client.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index 9cb0d15a68..0ada2e3a9a 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -734,9 +734,19 @@ static int do_get(char *rname, char *lname, BOOL reget) return 1; } - GetTimeOfDay(&tp_start); + if ( targetcli->dfsroot ) { + pstring path; + + /* we need to refer to the full \server\share\path format + for dfs shares */ + + pstrcpy( path, targetname ); + cli_dfs_make_full_path( targetname, targetcli->desthost, + targetcli->share, path); + } + fnum = cli_open(targetcli, targetname, O_RDONLY, DENY_NONE); if (fnum == -1) { @@ -3440,8 +3450,11 @@ static int do_message_op(void) poptGetArg(pc); - if ( have_ip ) - + /* check for the -P option */ + + if ( port != 0 ) + cli_cm_set_port( port ); + /* * Don't load debug level from smb.conf. It should be * set by cmdline arg or remain default (0) -- cgit