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: Problems with Cygwin symlinks on a TrueCrypt volume


On Dec  6 17:33, Corinna Vinschen wrote:
> On Dec  6 15:18, Dr Rainer Woitok wrote:
> > Greetings,
> > 
> > I just happened to stumble over the problem described below.
> > 
> > Additional information:
> > 
> >   - Windows Vista, patched this week.
> > 
> >   - Cygwin updated this week.
> > 
> >   - TrueCrypt downloaded and installed this week.
> > [...]
> > $ cd /g
> > $ ln -s . xx
> > $ ls -nl xx
> > lrwxrwxrwx 1 1002 513 1 2013-12-06 11:38 xx -> .
> > $ rm xx*
> > rm: cannot remove `xx': Permission denied
> > $ rm -f xx*
> > rm: cannot remove `xx': Permission denied
> > $ ls -nl xx*
> > lrwxrwxrwx 1 1002 513 1 2013-12-06 11:38 xx -> .
> > [...]
> > $ attrib -r 'g:\xx.lnk'
> > $ rm xx.lnk
> > $ ls -nl xx*
> > ls: cannot access xx*: No such file or directory
> > $ 
> > [...]
> > I really dont't know whether Windows  or TrueCrypt is incorrectly inter-
> > preting  the DOS ReadOnly attribute,  and thus  whose  fault this is.  I
> > would simply  suggest to change the code  of the  "rm" command so it ex-
> > plicitly removes  the DOS ReadOnly  attribute  before it unlinks any ob-
> > ject.
> 
> Cygwin's unlink function already removes the R/O attribute if it exists,
> because the OS equivalent to the POSIX unlink function refuses to remove
> files with the R/O attribute set.  I assume there's some weirdness in the
> handling of the R/O attribute in TrueCrypt, but that's just speculation.
> 
> What you can do to help this issue along:  The same as above, but run
> rm under strace:
> 
>   $ strace -o rm.trace rm -f xx
> 
> The -f flag drops the interactive prompt.  I added lots of debug output
> to the unlink functionality over time, so the rm.trace file should
> contain a lot of interesting details as to what's going wrong here.
> Just appand the rm.trace file to your next reply.

Per the strace your sent via PM (NtOpenFile after RtlSetCurrentTransaction
returns with STATUS_RM_NOT_ACTIVE), I created a patch which stops the
transaction if the following NtOpenFile returns with a certain set of
status codes and tries to call NtOpenFile again, outside of a
transaction.

I created a new snapshot with this patch.  Please give the latest
snapshot from http://cygwin.com/snapshots/ a try and report back.

Apart from that, there's a chance that this is a problem not related
to Cygwin's usage of a transaction on a TrueCrypt volume in the first
place.  Can you try the workaround from
http://support.microsoft.com/kb/948252 and see if that fixes the issue
with the release Cygwin DLL 1.7.27?



Thanks,
Corinna


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

Attachment: pgpvRqbOwUYYy.pgp
Description: PGP signature


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