summaryrefslogtreecommitdiff
path: root/source3/libsmb/clirap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-08 23:54:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:30 -0500
commit540911001d1bf25d9534b72b90a32fc7e5efc4b0 (patch)
treee9ed5f9507e4d8b4980aadcc12a71796a1a93192 /source3/libsmb/clirap.c
parenta39f08eec29235d9b09c169e3a95eba0484c7847 (diff)
downloadsamba-540911001d1bf25d9534b72b90a32fc7e5efc4b0.tar.gz
samba-540911001d1bf25d9534b72b90a32fc7e5efc4b0.tar.bz2
samba-540911001d1bf25d9534b72b90a32fc7e5efc4b0.zip
r21768: Fix the client dfs code such that smbclient can
process deep dfs links (ie. links that go to non root parts of a share). Make the directory handling conanonical in POSIX and Windows pathname processing. dfs should not be fully working in client tools. Please bug me if not. Jeremy. (This used to be commit 1c9e10569cd97ee41de39f9f012bea4e4c932b5d)
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r--source3/libsmb/clirap.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 61cdd79f36..ba4305dd0a 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -749,10 +749,10 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
return True;
}
-
/****************************************************************************
-send a qpathinfo BASIC_INFO call
+ Send a qpathinfo BASIC_INFO call.
****************************************************************************/
+
BOOL cli_qpathinfo_basic( struct cli_state *cli, const char *name,
SMB_STRUCT_STAT *sbuf, uint32 *attributes )
{
@@ -765,18 +765,12 @@ BOOL cli_qpathinfo_basic( struct cli_state *cli, const char *name,
pstring path;
int len;
- /* send full paths to dfs root shares */
-
- if ( cli->dfsroot )
- pstr_sprintf(path, "\\%s\\%s\\%s", cli->desthost, cli->share, name );
- else
- pstrcpy( path, name );
-
+ pstrcpy( path, name );
/* cleanup */
len = strlen( path );
- if ( path[len] == '\\' )
- path[len] = '\0';
+ if ( path[len-1] == '\\' || path[len-1] == '/')
+ path[len-1] = '\0';
p = param;
memset(p, 0, 6);