Mailinglist Archive: opensuse-commit (1855 mails)
| < Previous | Next > |
commit logrotate for openSUSE:Factory
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Tue, 13 Sep 2011 12:37:56 +0200
- Message-id: <20110913103757.02FE2202CC@hilbert.suse.de>
Hello community,
here is the log from the commit of package logrotate for openSUSE:Factory
checked in at Tue Sep 13 12:37:56 CEST 2011.
--------
--- logrotate/logrotate.changes 2011-09-07 14:54:02.000000000 +0200
+++ /mounts/work_src_done/STABLE/logrotate/logrotate.changes 2011-09-08
12:16:40.000000000 +0200
@@ -1,0 +2,24 @@
+Wed Sep 7 14:30:29 UTC 2011 - vcizek@xxxxxxxx
+
+- update to 3.8.1
+- dropped CVE patches as they were merged to upstream
+- changelog
+ - fixed 1 memory leak in prerotateSingleLog
+ - do not redirect logrotate errors to /dev/null in cron script
+ - fixed "size" directive parsing
+ - handle situation when acl_get_fd is supported, but acl_set_fd is not
+ - added "maxsize" directive (see man page)
+ - added "dateyesterday" option (see man page)
+ - fixed crash when config file had exactly 4096*N bytes
+ - added WITH_ACL make option to link against -lacl and preserve ACLs
+ during rotation
+ - added "su" option to define user/group for rotation. Logrotate now
+ skips directories which are world writable or writable by group
+ which is not "root" unless "su" directive is used.
+ - fixed CVE-2011-1098: race condition by creation of new files
+ - fixed possible shell injection when using "shred" directive (CVE-2011-1154)
+ - fixed escaping of file names within 'write state' action (CVE-2011-1155)
+ - better 'size' directive description
+ - fixed possible buffer-overflow when reading config files
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
logrotate-3.7.9.tar.bz2
logrotate-CVE-2011-1098.patch
logrotate-CVE-2011-1155.patch
logrotate-shred-CVE-2011-1154.patch
New:
----
logrotate-3.8.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ logrotate.spec ++++++
--- /var/tmp/diff_new_pack.77ERtE/_old 2011-09-13 12:37:52.000000000 +0200
+++ /var/tmp/diff_new_pack.77ERtE/_new 2011-09-13 12:37:52.000000000 +0200
@@ -19,21 +19,19 @@
Url: https://fedorahosted.org/releases/l/o/logrotate
Name: logrotate
-Version: 3.7.9
-Release: 12
+Version: 3.8.1
+Release: 1
License: GPLv2+
Summary: Rotate, compress, remove, and mail system log files
Group: System/Base
-Source: %{name}-%{version}.tar.bz2
+Source: %{name}-%{version}.tar.gz
Source100: %{name}-rpmlintrc
Patch0: logrotate-3.7.8-suse.patch
Patch1: logrotate-3.7.8-conf.patch
Patch2: logrotate-3.7.8-autoext.patch
Patch3: logrotate-3.7.8-addextension.patch
Patch4: logrotate-3.7.8-mess_err.patch
-Patch5: logrotate-CVE-2011-1098.patch
-Patch6: logrotate-shred-CVE-2011-1154.patch
-Patch7: logrotate-CVE-2011-1155.patch
+# PATCH-FIX-UPSTREAM allow separated compressoptions (bnc#711780)
Patch8: logrotate-3.7.9-compressoptions.patch
BuildRequires: libselinux-devel
BuildRequires: popt-devel
@@ -59,9 +57,6 @@
%patch2
%patch3
%patch4
-%patch5 -p1
-%patch6
-%patch7
%patch8 -p1
%build
@@ -81,7 +76,7 @@
%post
%{remove_and_set MAX_DAYS_FOR_LOG_FILES}
if [ -f /etc/logrotate.d/aaa_base ] ; then
- echo "Saving old logrotate system confguration"
+ echo "Saving old logrotate system configuration"
mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save
fi
++++++ logrotate-3.7.8-addextension.patch ++++++
--- /var/tmp/diff_new_pack.77ERtE/_old 2011-09-13 12:37:52.000000000 +0200
+++ /var/tmp/diff_new_pack.77ERtE/_new 2011-09-13 12:37:52.000000000 +0200
@@ -1,17 +1,16 @@
Index: test/test
===================================================================
---- test/test.orig 2008-05-14 12:31:35.000000000 +0200
-+++ test/test 2009-03-06 15:15:00.000000000 +0100
-@@ -369,4 +369,27 @@
+--- test/test.orig
++++ test/test
+@@ -427,4 +427,26 @@ test.log 0
+ test.log.1 0 zero
EOF
- rm -rf testdir
-+
+# check rotation with extension appended to the filename
-+cleanup 15
++cleanup 17
+
-+preptest test.log 15 1 0
-+$RLR test-config.15 --force
++preptest test.log 17 1 0
++$RLR test-config.17 --force
+
+checkoutput <<EOF
+test.log 0
@@ -19,48 +18,22 @@
+EOF
+
+# check rotation with extension moved after the number
-+cleanup 16
++cleanup 18
+
-+preptest test.log 16 1 0
-+$RLR test-config.16 --force
++preptest test.log 18 1 0
++$RLR test-config.18 --force
+
+checkoutput <<EOF
+test.log 0
+test.1.log 0 zero
+EOF
+
- cleanup
-Index: test/test-config.16.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ test/test-config.16.in 2009-03-06 15:15:00.000000000 +0100
-@@ -0,0 +1,8 @@
-+create
-+
-+&DIR&/test.log {
-+ monthly
-+ rotate 1
-+ addextension .log
-+}
-+
-Index: test/test-config.15.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ test/test-config.15.in 2009-03-06 15:15:00.000000000 +0100
-@@ -0,0 +1,8 @@
-+create
-+
-+&DIR&/test.log {
-+ monthly
-+ rotate 1
-+ addextension .newext
-+}
-+
+ # cleanup
Index: config.c
===================================================================
---- config.c.orig 2009-03-06 15:07:06.000000000 +0100
-+++ config.c 2009-03-06 15:17:38.000000000 +0100
-@@ -428,6 +428,7 @@
+--- config.c.orig
++++ config.c
+@@ -519,6 +519,7 @@ int readAllConfigPaths(const char **path
.last = NULL,
.logAddress = NULL,
.extension = NULL,
@@ -68,37 +41,32 @@
.compress_prog = NULL,
.uncompress_prog = NULL,
.compress_ext = NULL,
-@@ -1158,6 +1159,24 @@
- message(MESS_DEBUG, "extension is now %s\n",
- newlog->extension);
-
-+ } else if (!strcmp(start, "addextension")) {
-+ *endtag = oldchar, start = endtag;
+@@ -1177,6 +1178,19 @@ static int readConfigFile(const char *co
+ message(MESS_DEBUG, "extension is now
%s\n",
+ newlog->extension);
+
++ } else if (!strcmp(key, "addextension")) {
++ if ((key = isolateValue
++ (configFile, lineNum,
"addextension name", &start,
++ &buf, length)) != NULL)
{
++ freeLogItem (addextension);
++ newlog->addextension = key;
++ key = NULL;
++ }
++ else continue;
+
-+ freeLogItem (addextension);
++ message(MESS_DEBUG, "addextension is
now %s\n",
++ newlog->addextension);
+
-+ if (!isolateValue
-+ (configFile, lineNum, "addextension name", &start,
-+ &endtag)) {
-+ oldchar = *endtag, *endtag = '\0';
-+
-+ newlog->addextension = strdup(start);
-+
-+ *endtag = oldchar, start = endtag;
-+ }
-+
-+ message(MESS_DEBUG, "addextension is now %s\n",
-+ newlog->addextension);
-+
- } else if (!strcmp(start, "compresscmd")) {
- *endtag = oldchar, start = endtag;
+ } else if (!strcmp(key, "compresscmd")) {
+ freeLogItem (compress_prog);
Index: logrotate.8
===================================================================
---- logrotate.8.orig 2008-12-06 15:05:40.000000000 +0100
-+++ logrotate.8 2009-03-06 15:15:00.000000000 +0100
-@@ -144,6 +144,15 @@
- a \fBlogrotate\fR configuration file:
+--- logrotate.8.orig
++++ logrotate.8
+@@ -248,6 +248,15 @@ appears after \fIext\fR. For example you
+ and want to rotate it to mylog.1.foo.gz instead of mylog.foo.1.gz.
.TP
+\fBaddextension \fIext\fR
@@ -110,14 +78,14 @@
+appears after \fIext\fR.
+
+.TP
- \fBcompress\fR
- Old versions of log files are compressed with \fBgzip\fR(1) by default. See
also
- \fBnocompress\fR.
+ \fBifempty\fR
+ Rotate the log file even if it is empty, overriding the \fBnotifempty\fR
+ option (\fBifempty\fR is the default).
Index: logrotate.c
===================================================================
---- logrotate.c.orig 2009-03-06 15:07:06.000000000 +0100
-+++ logrotate.c 2009-03-06 15:15:00.000000000 +0100
-@@ -671,6 +671,24 @@
+--- logrotate.c.orig
++++ logrotate.c
+@@ -867,6 +867,24 @@ int prerotateSingleLog(struct logInfo *l
rotNames->baseName = strdup(ourBaseName(log->files[logNum]));
@@ -139,14 +107,14 @@
+ }
+ }
+
- oldName = alloca(PATH_MAX);
- newName = alloca(PATH_MAX);
- rotNames->disposeName = malloc(PATH_MAX);
+ if (log->extension &&
+ strncmp(&
+ (rotNames->
Index: logrotate.h
===================================================================
---- logrotate.h.orig 2009-03-06 15:07:06.000000000 +0100
-+++ logrotate.h 2009-03-06 15:15:00.000000000 +0100
-@@ -41,6 +41,7 @@
+--- logrotate.h.orig
++++ logrotate.h
+@@ -44,6 +44,7 @@ struct logInfo {
char *pre, *post, *first, *last;
char *logAddress;
char *extension;
@@ -154,3 +122,27 @@
char *compress_prog;
char *uncompress_prog;
char *compress_ext;
+Index: test/test-config.17.in
+===================================================================
+--- /dev/null
++++ test/test-config.17.in
+@@ -0,0 +1,7 @@
++create
++
++&DIR&/test.log {
++ monthly
++ rotate 1
++ addextension .newext
++}
+Index: test/test-config.18.in
+===================================================================
+--- /dev/null
++++ test/test-config.18.in
+@@ -0,0 +1,7 @@
++create
++
++&DIR&/test.log {
++ monthly
++ rotate 1
++ addextension .log
++}
++++++ logrotate-3.7.8-autoext.patch ++++++
--- /var/tmp/diff_new_pack.77ERtE/_old 2011-09-13 12:37:52.000000000 +0200
+++ /var/tmp/diff_new_pack.77ERtE/_new 2011-09-13 12:37:52.000000000 +0200
@@ -1,40 +1,39 @@
Index: config.c
===================================================================
---- config.c.orig 2008-06-02 12:26:14.000000000 +0200
-+++ config.c 2009-03-06 14:21:45.000000000 +0100
-@@ -483,7 +483,7 @@
- static int readConfigFile(const char *configFile, struct logInfo *defConfig)
- {
- int fd;
-- char *buf, *endtag;
-+ char *buf, *endtag, *compresscmd_base;
- char oldchar, foo;
- off_t length;
- int lineNum = 1;
-@@ -1189,6 +1189,18 @@
- message(MESS_DEBUG, "compress_prog is now %s\n",
- newlog->compress_prog);
+--- config.c.orig
++++ config.c
+@@ -583,6 +583,7 @@ static int readConfigFile(const char *co
+ char **scriptDest = NULL;
+ struct logInfo *newlog = defConfig;
+ char *start, *chptr;
++ char *compresscmd_base;
+ char *dirName;
+ struct group *group;
+ struct passwd *pw = NULL;
+@@ -1205,6 +1206,18 @@ static int readConfigFile(const char *co
+ message(MESS_DEBUG, "compress_prog is
now %s\n",
+ newlog->compress_prog);
-+ compresscmd_base=strdup(basename(newlog->compress_prog));
-+ i=0; /* have to check whether we may do this! */
-+ /* we check whether we changed the compress_cmd. In case we use
the apropriate extension
-+ as listed in compress_cmd_list */
-+ while ((i>=0)&&(strcmp(compress_cmd_list[i][0], "EOLIST"))){
-+ if (0==strcmp(compress_cmd_list[i][0], compresscmd_base)){
-+ newlog->compress_ext=strdup((char
*)compress_cmd_list[i][1]);
-+ message(MESS_DEBUG, "compress_ext was changed to %s\n",
newlog->compress_ext);
-+ i=-10; /* terminate loop! */
-+ }
-+ i++;
-+ }
- } else if (!strcmp(start, "uncompresscmd")) {
- *endtag = oldchar, start = endtag;
++
compresscmd_base=strdup(basename(newlog->compress_prog));
++ i=0; /* have to check whether we may do
this! */
++ /* we check whether we changed the
compress_cmd. In case we use the apropriate extension
++ as listed in compress_cmd_list */
++ while
((i>=0)&&(strcmp(compress_cmd_list[i][0], "EOLIST"))){
++ if
(0==strcmp(compress_cmd_list[i][0], compresscmd_base)){
++
newlog->compress_ext=strdup((char *)compress_cmd_list[i][1]);
++ message(MESS_DEBUG,
"compress_ext was changed to %s\n", newlog->compress_ext);
++ i=-10; /* terminate loop! */
++ }
++ i++;
++ }
+ } else if (!strcmp(key, "uncompresscmd")) {
+ freeLogItem (uncompress_prog);
Index: logrotate.c
===================================================================
---- logrotate.c.orig 2008-10-15 15:07:43.000000000 +0200
-+++ logrotate.c 2009-03-06 14:21:45.000000000 +0100
-@@ -54,6 +54,16 @@
+--- logrotate.c.orig
++++ logrotate.c
+@@ -76,6 +76,16 @@ unsigned int hashSize;
int numLogs = 0;
int debug = 0;
char *mailCommand = DEFAULT_MAIL_COMMAND;
@@ -49,13 +48,13 @@
+};
+
time_t nowSecs = 0;
-
- static int shred_file(char *filename, struct logInfo *log);
+ static uid_t save_euid;
+ static gid_t save_egid;
Index: logrotate.h
===================================================================
---- logrotate.h.orig 2008-05-09 09:28:59.000000000 +0200
-+++ logrotate.h 2009-03-06 14:21:45.000000000 +0100
-@@ -61,6 +61,9 @@
+--- logrotate.h.orig
++++ logrotate.h
+@@ -66,6 +66,9 @@ TAILQ_HEAD(logInfoHead, logInfo) logs;
extern int numLogs;
extern int debug;
@@ -63,5 +62,5 @@
+extern const char * compress_cmd_list[][2];
+
int readAllConfigPaths(const char **paths);
-
- #endif
+ #if !defined(asprintf)
+ int asprintf(char **string_ptr, const char *format, ...);
++++++ logrotate-3.7.8-mess_err.patch ++++++
--- /var/tmp/diff_new_pack.77ERtE/_old 2011-09-13 12:37:52.000000000 +0200
+++ /var/tmp/diff_new_pack.77ERtE/_new 2011-09-13 12:37:52.000000000 +0200
@@ -1,10 +1,10 @@
Index: logrotate.c
===================================================================
---- logrotate.c.orig 2009-03-06 15:20:25.000000000 +0100
-+++ logrotate.c 2009-03-06 15:24:07.000000000 +0100
-@@ -997,7 +997,7 @@
+--- logrotate.c.orig
++++ logrotate.c
+@@ -1206,7 +1206,7 @@ int prerotateSingleLog(struct logInfo *l
}
- snprintf(destFile, PATH_MAX, "%s%s", rotNames->finalName,
compext);
+ asprintf(&destFile, "%s%s", rotNames->finalName, compext);
if (!stat(destFile, &fst_buf)) {
- message(MESS_DEBUG,
+ message(MESS_ERROR,
++++++ logrotate-3.7.8-suse.patch ++++++
--- /var/tmp/diff_new_pack.77ERtE/_old 2011-09-13 12:37:52.000000000 +0200
+++ /var/tmp/diff_new_pack.77ERtE/_new 2011-09-13 12:37:52.000000000 +0200
@@ -2,12 +2,12 @@
===================================================================
--- Makefile.orig
+++ Makefile
-@@ -63,7 +63,7 @@ ifneq ($(STATEFILE),)
+@@ -81,7 +81,7 @@ ifneq ($(STATEFILE),)
endif
BINDIR = $(BASEDIR)/sbin
--MANDIR = $(BASEDIR)/man
-+MANDIR = $(BASEDIR)/share/man
+-MANDIR ?= $(BASEDIR)/man
++MANDIR ?= $(BASEDIR)/share/man
#--------------------------------------------------------------------------
@@ -18,27 +18,28 @@
@@ -1,8 +1,23 @@
#!/bin/sh
--/usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1
+-/usr/sbin/logrotate /etc/logrotate.conf
-EXITVALUE=$?
+-if [ $EXITVALUE != 0 ]; then
+- /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
+# exit immediately if there is another instance running
+if checkproc /usr/sbin/logrotate; then
+ /bin/logger -p cron.warning -t logrotate "ALERT another instance of
logrotate is running - exiting"
-+ exit 1;
-+fi;
++ exit 1
+ fi
+
+TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX`
+
+/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF
+EXITVALUE=${PIPESTATUS[0]}
+
- if [ $EXITVALUE != 0 ]; then
-- /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
++if [ $EXITVALUE != 0 ]; then
+ # wait a sec, we might just have restarted syslog
+ sleep 1
+ # tell what went wrong
+ /bin/logger -p cron.warning -t logrotate "ALERT exited abnormally with
[$EXITVALUE]"
+ /bin/logger -p cron.warning -t logrotate -f $TMPF
- fi
++ fi
+
+rm -f $TMPF
exit 0
++++++ logrotate-3.7.9-compressoptions.patch ++++++
--- /var/tmp/diff_new_pack.77ERtE/_old 2011-09-13 12:37:52.000000000 +0200
+++ /var/tmp/diff_new_pack.77ERtE/_new 2011-09-13 12:37:52.000000000 +0200
@@ -1,8 +1,8 @@
-Index: logrotate-3.7.9/config.c
+Index: logrotate-3.8.1/config.c
===================================================================
---- logrotate-3.7.9.orig/config.c
-+++ logrotate-3.7.9/config.c
-@@ -101,7 +139,9 @@ static char *readPath(const char *config
+--- logrotate-3.8.1.orig/config.c
++++ logrotate-3.8.1/config.c
+@@ -192,7 +192,9 @@ static char *readPath(const char *config
chptr = start;
while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |