[logrotate] - fix #671926 - fixed crash when tabooext is used in config file
Jan Kaluža
jkaluza at fedoraproject.org
Wed Feb 2 10:10:21 UTC 2011
commit 870b1ae9da38b29e0ab6b529f294b7ad7cbd3276
Author: Jan Kaluza <hanzz.k at gmail.com>
Date: Wed Feb 2 11:10:13 2011 +0100
- fix #671926 - fixed crash when tabooext is used in config file
logrotate-3.7.9-tabooext.patch | 28 ++++++++++++++++++++++++++++
logrotate.spec | 7 ++++++-
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/logrotate-3.7.9-tabooext.patch b/logrotate-3.7.9-tabooext.patch
new file mode 100644
index 0000000..4ba8331
--- /dev/null
+++ b/logrotate-3.7.9-tabooext.patch
@@ -0,0 +1,28 @@
+diff --git a/config.c b/config.c
+index 76c0df6..399fdf4 100644
+--- a/config.c
++++ b/config.c
+@@ -956,18 +956,17 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+ free(key);
+ if ((key = isolateValue(configFile, lineNum, "tabooext", &start,
+ &buf, length)) != NULL) {
+-
+- if (*key == '+') {
+- key++;
+- while (isspace(*key) && *key)
+- key++;
++ endtag = key;
++ if (*endtag == '+') {
++ endtag++;
++ while (isspace(*endtag) && *endtag)
++ endtag++;
+ } else {
+ free_2d_array(tabooExts, tabooCount);
+ tabooCount = 0;
+ tabooExts = malloc(1);
+ }
+
+- endtag = key;
+ while (*endtag) {
+ chptr = endtag;
+ while (!isspace(*chptr) && *chptr != ',' && *chptr)
diff --git a/logrotate.spec b/logrotate.spec
index 9f28658..1903806 100644
--- a/logrotate.spec
+++ b/logrotate.spec
@@ -1,7 +1,7 @@
Summary: Rotates, compresses, removes and mails system log files
Name: logrotate
Version: 3.7.9
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPL+
Group: System Environment/Base
Source: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz
@@ -10,6 +10,7 @@ Patch2: logrotate-3.7.9-man-size.patch
Patch3: logrotate-3.7.9-man-page.patch
Patch4: logrotate-3.7.9-config.patch
Patch5: logrotate-3.7.9-acl.patch
+Patch6: logrotate-3.7.9-tabooext.patch
Requires: coreutils >= 5.92 libsepol libselinux popt libacl
BuildRequires: libselinux-devel popt-devel libacl-devel
@@ -33,6 +34,7 @@ log files on your system.
%patch3 -p1
%patch4
%patch5 -p2
+%patch6 -p1
%build
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes WITH_ACL=yes
@@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status
%changelog
+* Wed Feb 02 2011 Jan Kaluza <jkaluza at redhat.com> 3.7.9-6
+- fix #671926 - fixed crash when tabooext is used in config file
+
* Wed Dec 15 2010 Jan Kaluza <jkaluza at redhat.com> 3.7.9-5
- fix #661181 - fixed SIGBUS when config file is empty or 4096 bytes
- fix #666677 - preserve ACLs when rotating files
More information about the scm-commits
mailing list