bug in cygwin tar reading unexpected input(s)...

L A Walsh cygwin@tlinx.org
Sat Jul 3 23:36:40 GMT 2021


On 2021/06/16 10:22, Achim Gratz wrote:
> L A Walsh writes:
>   
>> 2019/02/07  22:53    <SYMLINK>      DiskView [SI\DiskView.exe]
>>
>> and stems from the use of the --xattrs switch.
>>     
> Hmm.  Looks like some of the symlink / attrs content is taking a route
> that doesn't deal correctly with '\' as a path separator.  Which isn't
> too terribly surprising in a way, but it would still be useful to find
> out where.  Can you run (a pared down) example in strace and show the
> result?
>   
=====
This is rather "weird".  I looked over the dir I'd been using
and went to create a test case.  Decided to create symlink to
one of the tools in the sysinternals toolbox.

cd'd to the dir to pick up the path in 'T':

/progd/Microsoft/Windows/Start Menu/Programs/Menus/Tools/Sysinternals/SI
/progd/Microsoft/../Sysinternals/SI> T=$PWD

made test dir and put a link in it to a tool in the dir:

/tmp> cd test
/tmp/test> ln -s "$T/Desktops" .
/tmp/test> ll
total 0
lrwxrwxrwx 1 81 Jul  3 13:48 Desktops -> /progd/Microsoft/Windows/Start 
Menu/Programs/Menus/Tools/Sysinternals/SI/Desktops

test it...

C:\tmp\test>tar cf /dev/null --acls --xattrs --sparse "-b 2048" 
--one-file-system .
tar: Desktops: Warning: Cannot llistxattrat: Permission denied
--
looks similar, strace output attached.

I don't know if this is an instance of the same error or a different one --
I say that because when I look at the link I created in /tmp/test
using cmd /c dir, I get:
...
 Directory of C:\tmp\test

2021/07/03  13:48    <JUNCTION>     Desktops [...]


....it's a junction??  (That wasn't the case before -- ahh
it was because the target didn't exist...).  Trying again but
adding .lnk, so dir shows:
2021/07/03  14:53    <SYMLINK>      Desktops 
[C:\progd\Microsoft\Windows\Start 
Menu\Programs\Menus\Tools\Sysinternals\SI\Desktops.lnk]

Maybe the strace will confirm, but I think if a symlink target isn't 
accessible
when tar archiving the symlink, maybe that's when the problem pops up.

Accessibility has to mean not only present, but possibly allowed by
perm settings -- which aren't set right by cygwin even for cygwin's own
use...(separate email to come)...


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strace.out
URL: <https://cygwin.com/pipermail/cygwin/attachments/20210703/414a0cc0/attachment-0001.ksh>


More information about the Cygwin mailing list