rpms/hplip/FC-6 hplip-subprocess-replacement.patch, NONE, 1.1 hplip.spec, 1.113, 1.114
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Oct 12 08:08:57 UTC 2007
Author: twaugh
Update of /cvs/dist/rpms/hplip/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv13306
Modified Files:
hplip.spec
Added Files:
hplip-subprocess-replacement.patch
Log Message:
* Fri Oct 12 2007 Tim Waugh <twaugh at redhat.com> 1.7.4a-3
- Build requires openssl-devel.
- Applied patch to fix CVE-2007-5208 (bug #320021).
- Resolves: rhbz#320021
hplip-subprocess-replacement.patch:
hpssd.py | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
--- NEW FILE hplip-subprocess-replacement.patch ---
diff -up hplip-1.7.4a/hpssd.py.subprocess-replacement hplip-1.7.4a/hpssd.py
--- hplip-1.7.4a/hpssd.py.subprocess-replacement 2007-10-12 09:01:43.000000000 +0100
+++ hplip-1.7.4a/hpssd.py 2007-10-12 09:03:23.000000000 +0100
@@ -53,7 +53,7 @@ __doc__ = "Provides persistent data and
# Std Lib
import sys, socket, os, os.path, signal, getopt, glob, time, select
-import popen2, threading, re, fcntl, pwd, tempfile
+import subprocess, threading, re, fcntl, pwd, tempfile
#from asyncore import dispatcher, loop
from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \
@@ -562,21 +562,23 @@ class MailThread(threading.Thread):
if sendmail:
sendmail = os.path.join(sendmail, 'sendmail')
- sendmail += ' -t -r %s' % self.from_address
-
- log.debug(sendmail)
- std_out, std_in, std_err = popen2.popen3(sendmail)
- log.debug(repr(self.message))
- std_in.write(self.message)
- std_in.close()
-
- r, w, e = select.select([std_err], [], [], 2.0)
-
- if r:
- err = std_err.read()
- if err:
- log.error(repr(err))
- self.result = ERROR_TEST_EMAIL_FAILED
+ cmd = [sendmail,'-t','-r',self.from_address]
+
+ log.debug(repr(cmd))
+ err = None
+ try:
+ sp = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ std_out, std_err = sp.communicate(self.message)
+ log.debug(repr(self.message))
+ if std_err != '':
+ err = std_err
+
+ except OSError, e:
+ err = str(e)
+
+ if err:
+ log.error(repr(err))
+ self.result = ERROR_TEST_EMAIL_FAILED
else:
log.error("Mail send failed. sendmail not found.")
Index: hplip.spec
===================================================================
RCS file: /cvs/dist/rpms/hplip/FC-6/hplip.spec,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- hplip.spec 16 Jul 2007 17:26:11 -0000 1.113
+++ hplip.spec 12 Oct 2007 08:08:55 -0000 1.114
@@ -23,6 +23,7 @@
Patch8: hplip-unload-traceback.patch
Patch9: hplip-no-root-config.patch
Patch10: hplip-marker-supply.patch
+Patch11: hplip-subprocess-replacement.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: desktop-file-utils >= 0.2.92
@@ -41,6 +42,7 @@
BuildRequires: libjpeg-devel
BuildRequires: desktop-file-utils
BuildRequires: libusb-devel
+BuildRequires: openssl-devel
BuildRequires: autoconf
BuildRequires: sane-backends-devel
@@ -105,6 +107,9 @@
# Low ink is a warning condition, not an error.
%patch10 -p1 -b .marker-supply
+# Applied patch to fix CVE-2007-5208 (bug #320021).
+%patch11 -p1 -b .subprocess-replacement
+
autoconf # for patch4
%build
@@ -207,6 +212,10 @@
exit 0
%changelog
+* Fri Oct 12 2007 Tim Waugh <twaugh at redhat.com> 1.7.4a-3
+- Build requires openssl-devel.
+- Applied patch to fix CVE-2007-5208 (bug #320021).
+
* Mon Jul 16 2007 Tim Waugh <twaugh at redhat.com> 1.7.4a-2
- Low ink is a warning condition, not an error.
More information about the fedora-cvs-commits
mailing list