X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 2 Mar 2010 18:55:45 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin's svn appends unwanted .exe to file name on checkout
Message-ID: <20100302175545.GB1425@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <B7FD2A676FED46478FC330F30AD8D78D4BB7C574E6@RDW083V001RVA1.domain1.systemhost.net>  <4B8BFD4A.6060609@acm.org>  <20100302100035.GO8799@trikaliotis.net>  <4B8CE986.2040805@Gymel.com>  <20100302115813.GJ5683@calimero.vinschen.de>  <4B8D47F7.7050000@acm.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B8D47F7.7050000@acm.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On Mar  2 09:16, David Rothenberger wrote:
> On 3/2/2010 3:58 AM, Corinna Vinschen wrote:
> >The .exe suffix is added if all of the below is true:
> >
> >- The file is renamed via the rename(2) function.
> >- The name does not only change by case on a caseinsensitive mount.
> >- The file is a binary checked with the Win32 function GetBinaryType,
> >   and the returned type is SCS_32BIT_BINARY or SCS_64BIT_BINARY.
> >- The source filename has none of the following suffixes:
> >     .com
> >     .dll
> >     .exe
> >     .scr
> >     .sys
> >- The destination filename has none of the aforementioned suffixes.
> 
> All these conditions are true in the svn test case. svn is renaming
> tst/tempfile.tmp to tst/notepad.xxx using libapr1, which is using
> rename(2).
> 
> It does seem that the ACLs on the directory and file play a role,
> too. I've attached a reproduction script along with a simple
> rename(2) driver program. The script explicitly removes the default
> group ACLs from a directory before doing a rename(2) in that
> directory. In that case, no .exe suffix is added. If you modify the
> top of the script to set "SETACLS=set", it will add default group
> ACLs of rwx and the .exe suffix is added.
> 
> I'm not sure if this points to a bug in Cygwin or not. It does
> explain why Alan and I were seeing different behavior.

The rename(2) function does not check at all for the ACL.  The weird
outcome must have something to do with the way the GetBinaryType
function works.  I don't understand what the default permissions of the
parent dir have to do with that, though.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

