Bug 27257 - rotatelogs with getopt and setuid
Summary: rotatelogs with getopt and setuid
Status: ASSIGNED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: support (show other bugs)
Version: 2.0.48
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2004-02-26 15:24 UTC by Sven Goldt
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
more features for rotatelogs and using getopt. (3.92 KB, patch)
2004-02-26 15:25 UTC, Sven Goldt
Details | Diff
New patch with apr_getopt instead of getopt and #ifdef APR_HAS_USER (4.83 KB, patch)
2004-02-27 09:39 UTC, Sven Goldt
Details | Diff
Sorry. Don't know how to remove the other attachement. apr_getopt is not quite compatble to getopt so additional error checkings included. (4.89 KB, patch)
2004-02-27 10:11 UTC, Sven Goldt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Goldt 2004-02-26 15:24:45 UTC
This will be a place to submit a patch for rotatelogs. The main problem with
rotatelogs was to write over NFS to a logfile and this is not always good as root.
While at it it showed to be a good idea to use getopt to make it extendable.
This also means a change in how rotatelogs has to be called. See source code for
details.
Comment 1 Sven Goldt 2004-02-26 15:25:47 UTC
Created attachment 10569 [details]
more features for rotatelogs and using getopt.
Comment 2 Sven Goldt 2004-02-27 09:39:41 UTC
Created attachment 10585 [details]
New patch with apr_getopt instead of getopt and #ifdef APR_HAS_USER
Comment 3 Sven Goldt 2004-02-27 10:11:27 UTC
Created attachment 10586 [details]
Sorry. Don't know how to remove the other attachement. apr_getopt is not quite compatble to getopt so additional error checkings included.
Comment 4 Sven Goldt 2004-02-27 12:47:10 UTC
Well, i don't want to add a new patch for this... i think i don't see the deeper
sense in apt_getlog. You can fool it very easy. So please as another check use
if (argc < 3) instead of if (argc == 1) to display usage instead of starting.
If you run this patched rotatelog with just a dash '-' as option it will not
recognize it as a wrong option !