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: cross-device mv regression in latest snapshot


On Aug 31 14:18, Eric Blake wrote:
> Eric Blake <ebb9 <at> 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/


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