This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rsync without --perms may set bogus permissions


Christian Franke wrote:
Rsync may set bogus permissions if --perms is not specified and ACLs are enabled. This happens if the destination directory was not created by Cygwin itself. Testcase:
[...]



For some (security?) reason rsync (without --perms) does not rely on permissions set by open(., O_CREAT, .). The permissions are set later based on the default ACL of the parent dir.


The problem is that the rsync function acls.c:rsync_acl_get_perms() expects that the default ACL has an "other" entry and that the "mask" entry has only 3 rwx-bits.

The default ACL returned by Cygwin does not contain an "other" entry in this case. The default "mask" is 0777 (OK or Cygwin bug?):


The ACL issues are now fixed in Cygwin CVS. The rsync problem should no longer occur with future cygwin1.dll releases.


Christian


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]