diff options
author | Derrell Lipman <derrell@samba.org> | 2006-09-03 01:37:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:39:48 -0500 |
commit | fc5b6e4bd8a67994b0c56d1223c74d064164420f (patch) | |
tree | 42b677728a64aee9dbac4360a72b957c19740c1d /source/libsmb | |
parent | fa664b24b829f973156486896575c1007b6d7b01 (diff) | |
download | samba-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.c | 10 |
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); |