Unfortunate results from fake-super

Wayne Davison wayned at samba.org
Mon Feb 5 05:53:11 UTC 2018

On Sat, Feb 3, 2018 at 5:20 AM, Dave Gordon via rsync <rsync at lists.samba.org
> wrote:

> [...fake-super symlink saved as a file...]

This results in the copy being world-writable.

Indeed. The file initially gets created as a mode-600 file, but the code
later tweaks the permissions to match the symlink, which is (as you note) a
bad thing.

My first reaction is to change the code in set_stat_xattr() (in xattrs.c)

       if (fst.st_mode != mode)
               do_chmod(fname, mode);


       if (fst.st_mode != mode && !S_ISLNK(file->mode))
               do_chmod(fname, mode);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20180204/36fa01ab/attachment.html>

More information about the rsync mailing list