The Samba-Bugzilla – Attachment 6439 Details for
Bug 6116
Cannot access files in exposed shadow drive in version 3.0.5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix change_dir() to avoid turning "/" into "//subdir".
avoid-double-slash.patch (text/plain), 684 bytes, created by
Wayne Davison
on 2011-05-08 21:27:12 UTC
(
hide
)
Description:
Fix change_dir() to avoid turning "/" into "//subdir".
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2011-05-08 21:27:12 UTC
Size:
684 bytes
patch
obsolete
>commit 3ef38b0d1b5efcd857b9e2f7608f288bd0439785 >Author: Wayne Davison <wayned@samba.org> >Date: Fri Apr 22 15:51:55 2011 -0700 > > Avoid adding a slash to path '/'. > >diff --git a/util.c b/util.c >index a694fde..2991fd2 100644 >--- a/util.c >+++ b/util.c >@@ -1024,8 +1024,9 @@ int change_dir(const char *dir, int set_path_only) > errno = ENAMETOOLONG; > return 0; > } >- curr_dir[curr_dir_len] = '/'; >- memcpy(curr_dir + curr_dir_len + 1, dir, len + 1); >+ if (!(curr_dir_len && curr_dir[curr_dir_len-1] == '/')) >+ curr_dir[curr_dir_len++] = '/'; >+ memcpy(curr_dir + curr_dir_len, dir, len + 1); > > if (!set_path_only && chdir(curr_dir)) { > curr_dir[curr_dir_len] = '\0';
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6116
:
6419
| 6439