X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 17 Sep 2007 18:54:15 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cross-device mv regression in latest snapshot Message-ID: <20070917165415.GE22259@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Aug 31 14:18, Eric Blake wrote: > Eric Blake byu.net> writes: > > > I'm trying to track down a breakage in cross-device moves in the latest > cygwin > > CVS code, whether it is in coreutils-9.6-5 or due to a recent cygwin change, > > although my current suspect is Corinna's changes. > > I've ruled out my changes in coreutils-9.6-5, as a fresh CVS coreutils build > exhibits the same problem. Rather, via a gdb trace, it appears this call is > the problem: > > open("file2", O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0600); > > It is creating the file on the samba share, then returning -1 as the fd. This is weird behaviour. It turned out that this was a result of always creating a file with a valid security descriptor instead of just a default descriptor when creating a file on a Samba share. The security descriptor has the local user SID in it's ACL, but Samba maintains another user SID. There's still no solution for a transparent mapping between these two SIDs. Anyway, the behaviour of the NtCreateFile call is rather strange. Apparently Samba creates the file first, and then, afterwards, checks the security descriptor when it should return the file handle. It finds that the permissions don't match and *bing* returns STATUS_ACCESS_DENIED and a NULL handle. That's not helpful. I have reverted the patch from last month for now. Thanks for the report, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/