Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 608927

Summary: "busybox grep -Fi" doesn't work as expected
Product: Red Hat Enterprise Linux 5 Reporter: Bryan Mason <bmason>
Component: busyboxAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: azelinka, cww, jbastian, kvolny, rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The grep applet was ignoring the "-i" command line option if the "-F" option was also used. Consequent to this, the "grep -iF" command incorrectly performed a case sensitive search instead of the case insensitive one. This update applies a patch to ensure that this combination of command line options works as expected.
Story Points: ---
Clone Of:
: 752134 (view as bug list) Environment:
Last Closed: 2011-05-18 14:59:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 752134    
Attachments:
Description Flags
Proposed patch none

Description Bryan Mason 2010-06-28 23:08:10 UTC
Description of problem:

    The grep implementation in busybox does not support the "-F"
    option and the "-i" option at the same time.

Version-Release number of selected component (if applicable):

    busybox-1.2.0-7.el5

How reproducible:

    100%

Steps to Reproduce:

    echo "Red Hat" | busybox grep -Fi "hat"
  
Actual results:

    Nothing

Expected results:

    "Red Hat"

Already fixed upstream:
  
http://git.busybox.net/busybox/commit/?id=0a2c793bd61540629d5686adb5afd2ada19d624f

Comment 1 Bryan Mason 2010-06-29 00:18:22 UTC
Created attachment 427531 [details]
Proposed patch

Based on upstream.  Verified that it implements -Fi correctly.  Committed to private-bz608927-branch.

Comment 3 Denys Vlasenko 2010-07-15 15:10:32 UTC
The patch is trivially correct.

Comment 8 Denys Vlasenko 2011-04-05 12:25:09 UTC
New build with the fix:

https://brewweb.devel.redhat.com/taskinfo?taskID=3230167

Comment 11 Jaromir Hradilek 2011-05-18 11:17:12 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The grep applet was ignoring the "-i" command line option if the "-F" option was also used. Consequent to this, the "grep -iF" command incorrectly performed a case sensitive search instead of the case insensitive one. This update applies a patch to ensure that this combination of command line options works as expected.

Comment 12 errata-xmlrpc 2011-05-18 14:59:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0815.html