From nobody@FreeBSD.org  Tue Mar 16 12:32:54 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 55349106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 16 Mar 2010 12:32:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 44CD18FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 16 Mar 2010 12:32:54 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o2GCWrMh051089
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 16 Mar 2010 12:32:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o2GCWrf8051088;
	Tue, 16 Mar 2010 12:32:53 GMT
	(envelope-from nobody)
Message-Id: <201003161232.o2GCWrf8051088@www.freebsd.org>
Date: Tue, 16 Mar 2010 12:32:53 GMT
From: Alexander Best <alexbestms@wwu.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bsdtar(1) missing support for multi line matching
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         144786
>Category:       bin
>Synopsis:       bsdtar(1) missing support for multi line matching
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kientzle
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 16 12:40:01 UTC 2010
>Closed-Date:    Sun Apr 11 19:23:35 UTC 2010
>Last-Modified:  Sun Apr 11 19:23:35 UTC 2010
>Originator:     Alexander Best
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #3 r205121M: Mon Mar 15 01:48:47 CET 2010     root@otaku:/usr/obj/usr/src/sys/ARUNDEL  amd64
>Description:
bsdtar(1) doesn't support multi line matching or it is broken. single line matching works (see example).
>How-To-Repeat:
under "bsdtar 2.7.0 - libarchive 2.7.901a" observe the results of:

`echo "var/tmp" > ./exclude && tar ycvf test.tar.bz -X ./exclude /var/tmp`
and
`echo -n "var/tmp" > ./exclude && tar ycvf test.tar.bz -X ./exclude /var/tmp`
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->kientzle 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Mar 16 23:53:34 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144786 

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/144786: bsdtar(1) line_reader.c interesting code part -
	partial patch
Date: Fri, 19 Mar 2010 21:08:06 -0500

 ----- Forwarded message from Adam PAPAI <wooh@wooh.hu> -----
 
 From: Adam PAPAI <wooh@wooh.hu>
 To: freebsd-current@freebsd.org
 Subject: bsdtar(1) line_reader.c interesting code part - partial patch
 
 Hi,
 
 Bug report says:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/144786
 
 bsdtar(1) doesn't support multi line matching or it is broken.
 
 This patch [1] should solve it but not sure about this line in the  
 original code:
 
 if (lr->nullSeparator) {
 ...
 }
 
 This is  constant '\n' so this code part was never reached. This is why  
 the '\n' separated lines were handled as one long line.
 
 The line_reader.c header comment sais:
 
  * Read lines from file and do something with each one.  If option_null
  * is set, lines are terminated with zero bytes; otherwise, they're
  * terminated with newlines.
 
 But where is the switch to change between \n and zero bytes? :)
 
 [1]: http://www.wooh.hu/freebsd/line_reader.c.patch.txt
 
 -- 
 Adam PAPAI
 _______________________________________________
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
 
 
 ----- End forwarded message -----
State-Changed-From-To: open->closed 
State-Changed-By: kientzle 
State-Changed-When: Sun Apr 11 19:21:47 UTC 2010 
State-Changed-Why:  
Fixed in r206466 and r206487 

http://www.freebsd.org/cgi/query-pr.cgi?pr=144786 
>Unformatted:
