Bug 65937 - Config file parsing errors with =
Summary: Config file parsing errors with =
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logwatch
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-04 15:44 UTC by Benjamin Gordon
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-06-04 15:44:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Benjamin Gordon 2002-06-04 15:44:13 UTC
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 11:09:22 UTC
Applied in 2.6-5


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