Subject: bin/5878: argument processing in tar (gtar)
To: None <gnats-bugs@gnats.netbsd.org, current-users@NetBSD.ORG>
From: Zdenek Salvet <salvet@ics.muni.cz>
List: netbsd-bugs
Date: 07/30/1998 16:02:28
>Number:         5878
>Category:       bin
>Synopsis:       gtar processes backslash in filenames incorrectly
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 30 07:05:00 1998
>Last-Modified:
>Originator:     Zdenek Salvet
>Organization:
Masaryk University, Brno, Czech Republic
>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
      
>Audit-Trail:
>Unformatted: