[PATCH] Re: fruit_rename() prepend ._ again if fruit:ressource=file
jonessyue at qnap.com
Tue Jun 27 07:46:40 UTC 2017
Please help review attached patch v2,
1. fix bad strncmp() in earlier patch: too few arguments to function
2. add comment.
Jones Syue | 薛懷宗
QNAP Systems, Inc.
On Tue, Jun 27, 2017 at 3:02 PM, Jones Syue <jonessyue at qnap.com> wrote:
> Hello list,
> Test master (4.7.0pre1-GIT-bcfa12c) also has this symptom,
> refer to attach gdb log,
> 1st rename() and 2nd rename() are came from fruit_rename(),
> which call SMB_VFS_NEXT_RENAME() twice.
> Attached patch could address this issue,
> this patch checks if the source appledouble basname matched
> the destination basename; if they are matched,
> would goto done and avoid 2nd rename().
> Please help review and any suggestions are appreciated,
> thank you.
> For example,
> a text file called "newfile.txt",
> and win8.1 windows explorer renamed it to "._newfile.txt".
> In fruit_rename(),
> 1. The 1st SMB_VFS_NEXT_RENAME() do rename:
> ./newfile.txt -> ./_.newfile.txt
> 2. Then this patch check and found that the source appbledouble
> basename (._newfile.txt) matched the destination basename
> (._newfile.txt), would goto done.
> Hence the 2nd SMB_VFS_NEXT_RENAME() is not called.
> Here is the smb.conf
> fruit:nfs_aces = no
> fruit:veto_appledouble = no
> vfs objects = shadow_copy2 catia fruit streams_depot aio_pthread
> Jones Syue | 薛懷宗
> QNAP Systems, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2847 bytes
Desc: not available
More information about the samba-technical