summaryrefslogtreecommitdiffstats
path: root/source/libsmb
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-09-03 01:37:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:39:48 -0500
commitfc5b6e4bd8a67994b0c56d1223c74d064164420f (patch)
tree42b677728a64aee9dbac4360a72b957c19740c1d /source/libsmb
parentfa664b24b829f973156486896575c1007b6d7b01 (diff)
downloadsamba-fc5b6e4bd8a67994b0c56d1223c74d064164420f.tar.gz
samba-fc5b6e4bd8a67994b0c56d1223c74d064164420f.tar.xz
samba-fc5b6e4bd8a67994b0c56d1223c74d064164420f.zip
r18012: Should fix bug 4018.
NetApp filers expect paths in Open AndX Request to have a leading slash. Windows clients send the leading slash, so we should too.
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/libsmbclient.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c
index 101cc022110..95a9da8487a 100644
--- a/source/libsmb/libsmbclient.c
+++ b/source/libsmb/libsmbclient.c
@@ -414,7 +414,15 @@ smbc_parse_path(SMBCCTX *context,
}
- safe_strcpy(path, p, path_len - 1);
+ /*
+ * Prepend a leading slash if there's a file path, as required by
+ * NetApp filers.
+ */
+ *path = '\0';
+ if (*p != '\0') {
+ *path = '/';
+ safe_strcpy(path + 1, p, path_len - 2);
+ }
all_string_sub(path, "/", "\\", 0);