summaryrefslogtreecommitdiff
path: root/source3/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
commit44c1504c032ffa0f0b9cc2333fa0e3a05a03bf48 (patch)
treed08cc47ba502c3d5fb0dba442c5e2b3421fc6725 /source3/libsmb
parent40665edf5e6043ad5a8f46731a79ec1d5835b62a (diff)
downloadsamba-44c1504c032ffa0f0b9cc2333fa0e3a05a03bf48.tar.gz
samba-44c1504c032ffa0f0b9cc2333fa0e3a05a03bf48.tar.bz2
samba-44c1504c032ffa0f0b9cc2333fa0e3a05a03bf48.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. (This used to be commit fc5b6e4bd8a67994b0c56d1223c74d064164420f)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmbclient.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 101cc02211..95a9da8487 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/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);