summaryrefslogtreecommitdiff
path: root/source3/libsmb/clilist.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-02-23 19:26:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:44 -0500
commit1b0f75ddfb8ed296ca0166f0606bfc108584b833 (patch)
tree6930b12ad0111e588294b89fb1a436a80c43de9b /source3/libsmb/clilist.c
parent9cc7c62942f2c791e28d71c65ec61f1921b14576 (diff)
downloadsamba-1b0f75ddfb8ed296ca0166f0606bfc108584b833.tar.gz
samba-1b0f75ddfb8ed296ca0166f0606bfc108584b833.tar.bz2
samba-1b0f75ddfb8ed296ca0166f0606bfc108584b833.zip
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)
Diffstat (limited to 'source3/libsmb/clilist.c')
-rw-r--r--source3/libsmb/clilist.c10
1 files changed, 8 insertions, 2 deletions
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++;