[Bug 6116] Cannot access files in exposed shadow drive in version 3.0.5

leonv12 leonv at vaultnow.com
Sun May 8 11:15:00 MDT 2011

After some further effort, I discovered that 6116 does appear to be real bug,
and I have developed a fix that works on my systems.  I have no idea how to
go any further to have this checked in and merged.

Please feel free to contact me with questions or issues.


--- Comment #10 from Leon V. <leonv at vaultnow.com> 2011-04-22 22:11:40
UTC ---
I may have figured it out, but I don't have any idea how to "Check-in" a
The problem is in util.c, function change_dir.  Version 3.0.8:

line number 1027 appends a slash to the curr_dir (current directory)
1027    curr_dir[curr_dir_len] = '/';
line number 1028 then appends the dir (new directory)
1028    memcpy(curr_dir + curr_dir_len + 1, dir, len + 1);

The problem is, if you are in the root directory ("/"), line 1027 adds a
slash ("//").

The fix I compiled and tested on my system (granted this is limited testing)
to replace 1027 and 1028 with:

    // if in root, don't add a slash and don't add 
    // one to the current directory length
    if ( ( curr_dir_len == 1 ) && ( curr_dir[0] == '/' ) ) {
        memcpy(curr_dir + curr_dir_len, dir, len + 1);
    else { // add the slash and add one to len curr_dir_len to
           // account for the slash that was added
    curr_dir[curr_dir_len] = '/';
    memcpy(curr_dir + curr_dir_len + 1, dir, len + 1);

Accessing the shadow drive now works fine!


Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options:
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

View this message in context: http://samba.2283325.n4.nabble.com/DO-NOT-REPLY-Bug-6116-New-Cannot-access-files-in-exposed-shadow-drive-in-version-3-0-5-tp2509847p3507396.html
Sent from the Samba - rsync mailing list archive at Nabble.com.

More information about the rsync mailing list