X-Recipient: archive-cygwin@delorie.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 <Christian.Franke@t-online.de>
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@cygwin.com
Subject: Re: [PATCH] rsync without --perms may set bogus permissions
References: <4CEEB112.3030503@t-online.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

