From 1b0f75ddfb8ed296ca0166f0606bfc108584b833 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 23 Feb 2005 19:26:32 +0000 Subject: r5520: fix last remaining dfs issues with smbclient. * all the unix extension commands should work * send the correct TRANS2_FINDFIRST format to 2k to get a listing from a msdfs root share (tested against smbd as well). * mkdir, rmdir, etc... all seem ok. I'm sure bugs will pop up so keep testing. Last thing I plan on doing is to clean up the horrible mess with connection management in smbclient and global variables (so i can move the cli_cm_xx() routines to a separate file). (This used to be commit 53d6a5f9d16aef4afc60b4b37b296b256da00dfd) --- source3/libsmb/clilist.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 8ab5854c8f..532fb3a772 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -171,8 +171,14 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, /* NT uses 260, OS/2 uses 2. Both accept 1. */ info_level = (cli->capabilities&CAP_NT_SMBS)?260:1; - - pstrcpy(mask,Mask); + + /* when getting a directory listing from a 2k dfs root share, + we have to include the full path (\server\share\mask) here */ + + if ( cli->dfsroot ) + pstr_sprintf( mask, "\\%s\\%s\\%s", cli->desthost, cli->share, Mask ); + else + pstrcpy(mask,Mask); while (ff_eos == 0) { loop_count++; -- cgit