X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_RW,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Message-ID: <4D093C6B.5060802@t-online.de> Date: Wed, 15 Dec 2010 23:08:43 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.15) Gecko/20101027 SeaMonkey/2.0.10 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [PATCH] rsync without --perms may set bogus permissions References: <4CEEB112 DOT 3030503 AT t-online DOT de> In-Reply-To: <4CEEB112.3030503@t-online.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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