diff options
author | Larry Reid <lcreid@jadesystems.ca> | 2011-03-26 15:39:27 -0700 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-04-03 10:33:42 +0200 |
commit | 76f7c2a2541259156f08626f73cb63b6044e4e34 (patch) | |
tree | ba445af2111995c133cdff7975fefae99cf5f379 /source3/libsmb | |
parent | d143bc444c10df99b2dd64f4a0e02c902c3c024e (diff) | |
download | samba-76f7c2a2541259156f08626f73cb63b6044e4e34.tar.gz samba-76f7c2a2541259156f08626f73cb63b6044e4e34.tar.bz2 samba-76f7c2a2541259156f08626f73cb63b6044e4e34.zip |
Fix for servers that don't put a path separator at the end of the service.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Apr 3 10:33:42 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clidfs.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 810943eedc..a0d60482ee 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -920,10 +920,19 @@ bool cli_resolve_path(TALLOC_CTX *ctx, } if (extrapath && strlen(extrapath) > 0) { - *pp_targetpath = talloc_asprintf(ctx, - "%s%s", - extrapath, - *pp_targetpath); + /* EMC Celerra NAS version 5.6.50 (at least) doesn't appear to */ + /* put the trailing \ on the path, so to be save we put one in if needed */ + if (extrapath[strlen(extrapath)-1] != '\\' && **pp_targetpath != '\\') { + *pp_targetpath = talloc_asprintf(ctx, + "%s\\%s", + extrapath, + *pp_targetpath); + } else { + *pp_targetpath = talloc_asprintf(ctx, + "%s%s", + extrapath, + *pp_targetpath); + } if (!*pp_targetpath) { return false; } |