Bug 65937 - Config file parsing errors with =
Config file parsing errors with =
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: logwatch (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-04 11:44 EDT by Benjamin Gordon
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-06-04 11:44:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Benjamin Gordon 2002-06-04 11:44:13 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.3 (X11; Linux i686; U;) Gecko/20020523

Description of problem:
When logwatch reads its config files, it does a split on =, so if the value
contains an =, then it splits into too many fields and loses part of the value.
 This patch fixes this problem:

--- /etc/cron.daily/00-logwatch.old     Tue Jun  4 09:37:11 2002
+++ /etc/cron.daily/00-logwatch Tue Jun  4 09:37:16 2002
@@ -150,7 +150,7 @@
        $ThisLine =~ s/#.*$//;
        if ( $ThisLine =~ /=/ ) {
            chomp ($ThisLine);
-           ($ThisName,$ThisValue) = split /=/,$ThisLine;
+           ($ThisName,$ThisValue) = split /=/,$ThisLine,2;
            $ThisName =~ s/^\s+//;
            $ThisName =~ s/\s+$//;
            $ThisValue =~ s/^\s+//;

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


How reproducible:
Always

Steps to Reproduce:
1.Add a line such as *Remove='.*reject=451.*'
2.
3.
	

Actual Results:  *Remove gets the value '.*reject


Expected Results:  *Remove should have gotten '.*reject=451.*'

Additional info:
Comment 1 Elliot Lee 2002-06-27 07:09:22 EDT
Applied in 2.6-5

Note You need to log in before you can comment on or make changes to this bug.