Subject: argument processing in tar (gtar)
To: None <gnats-bugs@gnats.netbsd.org, current-users@NetBSD.ORG>
From: Zdenek Salvet <salvet@ics.muni.cz>
List: current-users
Date: 07/30/1998 16:02:28
>Submitter-Id: net
>Originator: Zdenek Salvet
>Organization: Masaryk University, Brno, Czech Republic
>Confidential: no
>Synopsis: gtar processes backslash in filenames incorrectly
>Severity: critical
>Priority: high
>Category: bin
>Class: sw-bug
>Release: 1.3
>Environment:
System: NetBSD horn.ics.muni.cz 1.3E NetBSD 1.3E (HORN_13) #0: Mon Mar 16 11:06:02 MET 1998 salvet@minea.ics.muni.cz:/home/salvet/src/sys/arch/i386/compile/HORN_13 i386
>Description:
Our tar interprets backslashes in filenames in create or append mode
incorrectly and fails to add files to the archive.
>How-To-Repeat:
$ > jedna\\dve
$ > tri\\ctyri
$ tar cvf test *
$ echo $?
0
$ tar tvf test
$ tar tvf test |od -c
$ ls
jedna\dve test tri\ctyri
$ ls -l
total 10
-rw-r--r-- 1 salvet wheel 0 Jul 30 14:25 jedna\dve
-rw-r--r-- 1 salvet wheel 10240 Jul 30 14:26 test
-rw-r--r-- 1 salvet wheel 0 Jul 30 14:25 tri\ctyri
$ pax -w >test.pax [jt]*
$ pax -v <test.pax
-rw-r--r-- 1 salvet wheel 0 Jul 30 14:25 jedna\dve
-rw-r--r-- 1 salvet wheel 10240 Jul 30 14:26 test
-rw-r--r-- 1 salvet wheel 0 Jul 30 14:25 tri\ctyri
pax: ustar vol 1, 3 files, 20480 bytes read, 0 bytes written.
>Fix:
delete un_quote_string() calls from appropriate places