diff options
author | Jeremy Allison <jra@samba.org> | 2009-03-18 20:56:48 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-03-18 20:57:47 -0700 |
commit | 28e03f2011b331ab01b99f9ff6e049f938ec1a00 (patch) | |
tree | 080a5c25c41b92777a19fba95ebe9eaad40662b9 /source3 | |
parent | add8163c3b301ff153e7b492265fc2dc72784c7e (diff) | |
download | samba-28e03f2011b331ab01b99f9ff6e049f938ec1a00.tar.gz samba-28e03f2011b331ab01b99f9ff6e049f938ec1a00.tar.bz2 samba-28e03f2011b331ab01b99f9ff6e049f938ec1a00.zip |
Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clidfs.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 18e7ab1dec..430807eb7f 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -551,13 +551,23 @@ static char *cli_dfs_make_full_path(TALLOC_CTX *ctx, struct cli_state *cli, const char *dir) { + char path_sep = '\\'; + /* Ensure the extrapath doesn't start with a separator. */ while (IS_DIRECTORY_SEP(*dir)) { dir++; } - return talloc_asprintf(ctx, "\\%s\\%s\\%s", - cli->desthost, cli->share, dir); + if (cli->posix_capabilities & CIFS_UNIX_POSIX_PATHNAMES_CAP) { + path_sep = '/'; + } + return talloc_asprintf(ctx, "%c%s%c%s%c%s", + path_sep, + cli->desthost, + path_sep, + cli->share, + path_sep, + dir); } /******************************************************************** |