Bug 11606 - incorrect log rotation in samba-2.0.7-4.i386.rpm
incorrect log rotation in samba-2.0.7-4.i386.rpm
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
6.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-23 12:03 EDT by mal
Modified: 2016-11-08 20:05 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-07-13 12:30:27 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 mal 2000-05-23 12:03:08 EDT
Hi, the package samba-2.0.7-4.i386.rpm
from Redhat 6.2 updates still does not solve
a problem with log rotation.
Currently it:
1. Rotates files which are the result of log
   rotatin (*.1 *.2, etc).
2. fails on log files produced by a host
	whith a space in its NETBIOS name.
This is precisely what I previosly reported on March 1, 2000 in
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=9909

There is, from my point of view,
a serios problem with how RedHat bug tracking is organized.
Usually, after a bug is reported,
somebody from RedHat gives a short response
(often without proper evaluation)
and marks the bug resolved.
Once the bug is marked as resolved all futher information
about it is just ignored.
This happened many times with many different bugs.
My proposal is to change the procdure, i.e.
bug may be marked as resolved only after
it was confirmed as fixed by a reporter.
Comment 1 Neil Darlow 2000-06-24 06:31:11 EDT
Caused, I think, by the use of log.* in /etc/logrotate.d/samba.

Log files either need to be specified explicitly or some means of preventing
generation of successive .N extensions by logrotate needs to be found.
Comment 2 Bill Nottingham 2000-06-27 11:31:33 EDT
With these problems, is there any reason that logrotate should
be used instead of samba to rotate the logs (I'm not seeing
any...)
Comment 3 mal 2000-06-27 12:10:41 EDT
Logrotate is perfectly OK if you:

1. Set samba log files pattern to *.log
2. Fix logrotate to work with files which has spaces and other 
	special symbols in it. You will need to fix this 
	anyway for the other programs. Many programs can generate
	log files with strange names.
Comment 4 mal 2000-06-27 12:18:56 EDT
In addition to mentioned above reasons 
there are the following other reasons:
1. Samba rotates logs quite inconsistently in accordance 
	with its own strange algorithm.
	Using logrotate you have common framework for all log files rotation.
2. You can get it to work fine with very minor changes
	and one fix to logrotate (which should be done anyway).
	I posted the changes required in my previos posting.
Comment 5 Bill Nottingham 2000-06-27 12:24:26 EDT
samba changes are in 2.0.7-10. Reassigned to logrotate
for the rest of the fixes.
Comment 6 mal 2000-06-27 12:39:32 EDT
Also,
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 as 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 7 Erik Troan 2000-07-13 12:30:25 EDT
Logrotate support white problems now -- tthe * matching .1 needs to be fixed in
it's
config file.
Comment 8 Bill Nottingham 2000-07-15 14:46:09 EDT
OK, with the combination of samba-2.0.7-10 or higher, and logrotate-3.4
or higher, this should be fixed.
Comment 9 openshift-github-bot 2016-11-08 20:05:45 EST
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/d26759937d1840d0a726e5509af89c9a4e03a7ac
Merge pull request #11807 from jim-minter/issue11606

Merged by openshift-bot

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