From jr@linwhf.opal.com  Thu Sep 30 14:40:42 2004
Return-Path: <jr@linwhf.opal.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7B2CE16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 Sep 2004 14:40:42 +0000 (GMT)
Received: from linwhf.opal.com (119.79.171.66.subscriber.vzavenue.net [66.171.79.119])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B63E043D45
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 Sep 2004 14:40:41 +0000 (GMT)
	(envelope-from jr@linwhf.opal.com)
Received: from linwhf.opal.com (localhost [127.0.0.1])
	by linwhf.opal.com (8.13.1/8.13.1) with ESMTP id i8UEeeRZ027935
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 Sep 2004 10:40:40 -0400 (EDT)
	(envelope-from jr@linwhf.opal.com)
Received: (from jr@localhost)
	by linwhf.opal.com (8.13.1/8.13.1/Submit) id i8UEee0Z027934;
	Thu, 30 Sep 2004 10:40:40 -0400 (EDT)
	(envelope-from jr)
Message-Id: <200409301440.i8UEee0Z027934@linwhf.opal.com>
Date: Thu, 30 Sep 2004 10:40:40 -0400 (EDT)
From: "J.R. Oldroyd" <fbsd@opal.com>
Reply-To: "J.R. Oldroyd" <fbsd@opal.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bzXgrep fails to detect that its matcher is Xgrep
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         72200
>Category:       gnu
>Synopsis:       bzXgrep fails to detect that its matcher is Xgrep
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jkim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 30 14:50:25 GMT 2004
>Closed-Date:    Wed Oct 26 21:17:53 GMT 2005
>Last-Modified:  Wed Oct 26 21:17:53 GMT 2005
>Originator:     J.R. Oldroyd
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD linwhf.opal.com 6.0-CURRENT FreeBSD 6.0-CURRENT #62: Tue Sep 28 15:27:07 EDT 2004 jr@linwhf.opal.com:/usr/src-current/sys/i386/compile/LINWHF i386


>Description:
	When grep(1) is invoked as bzegrep or bzfgrep, it fails to
	detect that it should use the egrep or fgrep matcher and behaves
	as grep.  Use of the -E or -F flags works, i.e., it is the
	parsing of argv[0] that's broke.

>How-To-Repeat:
	$ bzegrep '^(root|toor):' /etc/passwd
	$

	compare with:

	$ bzegrep -E '^(root|toor):' /etc/passwd
	root:*:0:0:Charlie &:/root:/bin/csh
	toor:*:0:0:Bourne-again Superuser:/root:
	$


>Fix:
	--- grep.origc     Sun Jul  4 12:16:59 2004
	+++ grep.c      Thu Sep 30 10:38:16 2004
	@@ -1413,6 +1413,9 @@
	   if (program_name[0] == 'b') {
	     BZflag = 1;
	     ++program_name;
	+    if (program_name[0] == 'z') {
	+      ++program_name;
	+    }
	   }
	 
	 #if defined(__MSDOS__) || defined(_WIN32)



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: yar 
State-Changed-When: Tue Oct 25 06:36:49 GMT 2005 
State-Changed-Why:  
jkim@ has recently fixed this bug in CURRENT. 


Responsible-Changed-From-To: freebsd-bugs->jkim 
Responsible-Changed-By: yar 
Responsible-Changed-When: Tue Oct 25 06:36:49 GMT 2005 
Responsible-Changed-Why:  
jkim@ has recently fixed this bug in CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72200 
State-Changed-From-To: patched->closed 
State-Changed-By: jkim 
State-Changed-When: Wed Oct 26 21:17:07 GMT 2005 
State-Changed-Why:  
MFC'd to RELENG_6 and RELENG_6_0 

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