- fix several legacy options handling

- fix internal message output (#478612)
This commit is contained in:
Tomas Heinrich 2009-01-07 12:08:38 +00:00
parent 0af59d7c93
commit 5fb5ea619e
3 changed files with 52 additions and 3 deletions

View File

@ -0,0 +1,17 @@
diff -up rsyslog-3.21.9/tools/syslogd.c.dodie rsyslog-3.21.9/tools/syslogd.c
--- rsyslog-3.21.9/tools/syslogd.c.dodie 2009-01-05 17:20:33.000000000 +0100
+++ rsyslog-3.21.9/tools/syslogd.c 2009-01-05 17:25:19.000000000 +0100
@@ -1877,9 +1877,11 @@ static void doDie(int sig)
# define MSG1 "DoDie called.\n"
# define MSG2 "DoDie called 5 times - unconditional exit\n"
static int iRetries = 0; /* debug aid */
- write(1, MSG1, sizeof(MSG1));
+ if(Debug || NoFork)
+ write(1, MSG1, sizeof(MSG1) - 1);
if(iRetries++ == 4) {
- write(1, MSG2, sizeof(MSG2));
+ if(Debug || NoFork)
+ write(1, MSG2, sizeof(MSG2) - 1);
abort();
}
bFinished = sig;

24
rsyslog-3.21.9-opts.patch Normal file
View File

@ -0,0 +1,24 @@
diff -up rsyslog-3.21.9/tools/syslogd.c.opts rsyslog-3.21.9/tools/syslogd.c
--- rsyslog-3.21.9/tools/syslogd.c.opts 2008-12-09 10:36:02.000000000 +0100
+++ rsyslog-3.21.9/tools/syslogd.c 2008-12-09 10:57:03.000000000 +0100
@@ -391,8 +391,9 @@ static void processImInternal(void);
static int usage(void)
{
- fprintf(stderr, "usage: rsyslogd [-cversion] [-46AdnqQvwx] [-lhostlist] [-sdomainlist]\n"
- " [-fconffile] [-ipidfile] [-Nlevel]\n"
+ fprintf(stderr, "usage: rsyslogd [-c<version>] [-46AdnqQvwx] [-l<hostlist>] [-s<domainlist>]\n"
+ " [-f<conffile>] [-i<pidfile>] [-N<level>] [-M<module load path>]\n"
+ " [-u<number>]\n"
"To run rsyslogd in native mode, use \"rsyslogd -c3 <other options>\"\n\n"
"For further information see http://www.rsyslog.com/doc\n");
exit(1); /* "good" exit - done to terminate usage() */
@@ -3164,7 +3165,7 @@ int realMain(int argc, char **argv)
* only when actually neeeded.
* rgerhards, 2008-04-04
*/
- while((ch = getopt(argc, argv, "46aAc:def:g:hi:l:m:M:nN:opqQr::s:t:u:vwx")) != EOF) {
+ while((ch = getopt(argc, argv, "46a:Ac:def:g:hi:l:m:M:nN:op:qQr::s:t:u:vwx")) != EOF) {
switch((char)ch) {
case '4':
case '6':

View File

@ -3,7 +3,7 @@
Summary: Enhanced system logging and kernel message trapping daemons
Name: rsyslog
Version: 3.21.9
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+
Group: System Environment/Daemons
URL: http://www.rsyslog.com/
@ -12,6 +12,8 @@ Source1: rsyslog.init
Source2: rsyslog.conf
Source3: rsyslog.sysconfig
Source4: rsyslog.log
Patch0: rsyslog-3.21.9-opts.patch
Patch1: rsyslog-3.21.9-dodie.patch
BuildRequires: zlib-devel
BuildRequires: autoconf automake
Requires: logrotate >= 3.5.2
@ -87,6 +89,8 @@ IETF standard protocol.
%prep
%setup -q
%patch0 -p1 -b .opts
%patch1 -p1 -b .dodie
%build
export CFLAGS="$RPM_OPT_FLAGS -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\""
@ -192,6 +196,10 @@ fi
%{_libdir}/rsyslog/lmnsd_gtls.so
%changelog
* Tue Jan 07 2009 Tomas Heinrich <theinric@redhat.com> 3.21.9-2
- fix several legacy options handling
- fix internal message output (#478612)
* Mon Dec 15 2008 Peter Vrabec <pvrabec@redhat.com> 3.21.9-1
- update is fixing $AllowedSender security issue