Bug 13122

Summary: Space in log file name.
Product: [Retired] Red Hat Linux Reporter: mal
Component: logrotateAssignee: Erik Troan <ewt>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-06-27 17:13:45 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:

Description mal 2000-06-27 16:46:36 UTC
Logrotate does not work 
with log files containing special
symbols (like space) in filename.
See http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=11606
for example.

        The easiest wy to fix logrotate
        is to use 
        URLEcoded format for file names.
        You can just use two
        C functions which do same thing as
        escape and unescape
        from perl module /usr/lib/perl5/5.00503/CGI.pm.
        when you save to  /var/lib/logrotate.status
        escape file name by using a function
        equivalent to CGI::escape
        and after you read the string from the file
        use a function equivalent to CGI::unescape.
        This way you will fix all the problems 
        with file names containing special symbols in logrotate.
        The mentioned functions escape and unescape 
        are standard and may be found in many reference 
        implementation.
        I recommend to name them 
        like logrotate_escape and logrotate_unescape
        to avoid possible clashes with functions from C library.

Comment 1 mal 2000-06-27 17:13:44 UTC
Also the proposed solution is better
than the patch posted in
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=7999
because it also hanles symbols like \n \r and etc.
Mentioned patch seems to fail on log 
files with \n symbols.
Proposed solution is OK with any special symbols.

Comment 2 Erik Troan 2000-07-13 16:32:52 UTC
fixed in logrotate-3.4