diff options
author | Jeremy Allison <jra@samba.org> | 2009-03-18 20:54:13 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-03-27 13:06:54 +0100 |
commit | af87220d07ba0c558443d4d69351a7f5bab5546e (patch) | |
tree | 0f99d0204719e1ed26de210dcad8cdffb7c90347 | |
parent | c1014f371297d3405f32f13c0819e1584dcbba6f (diff) | |
download | samba-af87220d07ba0c558443d4d69351a7f5bab5546e.tar.gz samba-af87220d07ba0c558443d4d69351a7f5bab5546e.tar.xz samba-af87220d07ba0c558443d4d69351a7f5bab5546e.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 0c11c2deee7ab9d281df6df91b793b7f1c1764a4)
-rw-r--r-- | source/libsmb/clidfs.c | 14 |
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); } /******************************************************************** |