Bug 13122 - Space in log file name.
Summary: Space in log file name.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-06-27 16:46 UTC by mal
Modified: 2008-05-01 15:37 UTC (History)
0 users

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

Attachments (Terms of Use)

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 
        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
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

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