Bug 13122 - Space in log file name.
Space in log file name.
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
Depends On:
  Show dependency treegraph
Reported: 2000-06-27 12:46 EDT by mal
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-06-27 13:13:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mal 2000-06-27 12:46:36 EDT
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 
        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 13:13:44 EDT
Also the proposed solution is better
than the patch posted in
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 12:32:52 EDT
fixed in logrotate-3.4

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