summaryrefslogtreecommitdiffstats
path: root/source/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-03-18 20:54:13 -0700
committerKarolin Seeger <kseeger@samba.org>2009-03-27 14:15:35 +0100
commitbe929d030bd5845aa05f940fd20035dc6e08fdad (patch)
tree0a8f5a65208921f66620c223459df58e2c5fc1da /source/libsmb
parent4d33970f5d071fd971a75918edb672e4f33b1687 (diff)
downloadsamba-be929d030bd5845aa05f940fd20035dc6e08fdad.tar.gz
samba-be929d030bd5845aa05f940fd20035dc6e08fdad.tar.xz
samba-be929d030bd5845aa05f940fd20035dc6e08fdad.zip
Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this). Jeremy. (cherry picked from commit bf1474aee37976f0d7e3cece8f39b0046ee54209)
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/clidfs.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/libsmb/clidfs.c b/source/libsmb/clidfs.c
index 9fdc239c365..5379ff9893a 100644
--- a/source/libsmb/clidfs.c
+++ b/source/libsmb/clidfs.c
@@ -665,13 +665,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);
}
/********************************************************************