[Bug-tar] Cannot: extract a member reliably with possible leading dot-slash

2018-12-11 Thread Viktor Sergiienko
Hello, I've had this problem multiple times, and now I have a confirmation other people had it too: https://serverfault.com/questions/803831/tar-extract-a-member-reliably-with-possible-leading-dot-slash I'll quote andrewsh's problem description: > $ tar tvf archive1.tar > -rw-r--r-- root/root 56

Re: [Bug-tar] Cannot: extract a member reliably with possible leading dot-slash

2018-12-11 Thread Sergey Poznyakoff
Viktor Sergiienko ha escrit: > > $ tar tvf archive1.tar > > -rw-r--r-- root/root 567 2016-09-18 14:28 member1 > > -rw-r--r-- root/root 1696 2016-09-18 14:28 member2 > > $ tar tvf archive2.tar > > -rw-r--r-- root/root 567 2016-09-18 14:28 ./member1 > > -rw-r--r-- root/root 1696 2016-09-18 14:28 ./

Re: [Bug-tar] Cannot: extract a member reliably with possible leading dot-slash

2018-12-11 Thread Viktor Sergiienko
Thanks, but this is exactly the case that introduces subtle problems. It doesn't help if there is another file in the archive, with the same name but in a different directory. Like here: === mkdir -p dir echo member1 > member1 echo member2 > member2 echo "member1 in directory" > dir/member1 gnut