[packages/snmptt] patch: Untaint the filename before calling unlink()
jajcus
jajcus at pld-linux.org
Sat Dec 1 17:44:06 CET 2012
commit ec2aa662acc18be17175af85f37019ade94b77ec
Author: Jacek Konieczny <jajcus at jajcus.net>
Date: Sat Dec 1 17:25:46 2012 +0100
patch: Untaint the filename before calling unlink()
Without that snmptt will die when trying to unlink a spool file.
snmptt-unlink.patch | 13 +++++++++++++
snmptt.spec | 2 ++
2 files changed, 15 insertions(+)
---
diff --git a/snmptt.spec b/snmptt.spec
index 8c5edcd..5b6563c 100644
--- a/snmptt.spec
+++ b/snmptt.spec
@@ -14,6 +14,7 @@ Source0: http://dl.sourceforge.net/snmptt/%{name}_%{version}.tgz
Source1: %{name}.init
Source2: %{name}.service
Patch0: %{name}-privileges.patch
+Patch1: %{name}-unlink.patch
URL: http://www.snmptt.org/
BuildRequires: rpmbuild(macros) >= 1.644
BuildRequires: rpm-perlprov
@@ -65,6 +66,7 @@ Pliki i zależności potrzebne do używania SNMPTT jako demona.
%prep
%setup -q -n %{name}_%{version}
%patch0 -p1
+%patch1 -p1
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/snmptt-unlink.patch b/snmptt-unlink.patch
new file mode 100644
index 0000000..ad57bcc
--- /dev/null
+++ b/snmptt-unlink.patch
@@ -0,0 +1,13 @@
+diff -dur snmptt_1.3.orig/snmptt snmptt_1.3/snmptt
+--- snmptt_1.3.orig/snmptt 2012-12-01 17:23:47.000000000 +0100
++++ snmptt_1.3/snmptt 2012-12-01 17:24:27.907432052 +0100
+@@ -993,6 +993,9 @@
+ next if ($file eq ".");
+ next if ($file eq "..");
+
++ $file =~ /([^\/]*)/;
++ $file = $1;
++
+ if (lc($file) eq "!reload")
+ {
+ $timetoreload = 1;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/snmptt.git/commitdiff/581e20d9531c21c50e26c7c81cb787b87a842332
More information about the pld-cvs-commit
mailing list