rpms/hplip/F-7 hplip-subprocess-replacement.patch, NONE, 1.1 hplip.spec, 1.142, 1.143

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Fri Oct 12 08:16:39 UTC 2007


Author: twaugh

Update of /cvs/pkgs/rpms/hplip/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv558

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-6
- Build requires openssl-devel.
- Applied patch to fix CVE-2007-5208 (bug #329111).


hplip-subprocess-replacement.patch:

--- 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/pkgs/rpms/hplip/F-7/hplip.spec,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- hplip.spec	9 Oct 2007 16:36:41 -0000	1.142
+++ hplip.spec	12 Oct 2007 08:16:04 -0000	1.143
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 1.7.4a
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPL/MIT/BSD
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -27,6 +27,7 @@
 Patch12: hplip-no-root-config.patch
 Patch13: hplip-ui-optional.patch
 Patch14: hplip-ljdot4.patch
+Patch15: hplip-subprocess-replacement.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot
 
 Requires(post): /sbin/service
@@ -43,6 +44,7 @@
 BuildRequires: libjpeg-devel
 BuildRequires: desktop-file-utils
 BuildRequires: libusb-devel
+BuildRequires: openssl-devel
 BuildRequires: autoconf
 BuildRequires: sane-backends-devel
 
@@ -128,6 +130,9 @@
 # Use raw instead of 1284.4 communication for LJ4000 series (bug #249191).
 %patch14 -p1 -b .ljdot4
 
+# Applied patch to fix CVE-2007-5208 (bug #329111).
+%patch15 -p1 -b .subprocess-replacement
+
 autoconf # for patch4
 
 %build
@@ -300,6 +305,10 @@
 exit 0
 
 %changelog
+* Fri Oct 12 2007 Tim Waugh <twaugh at redhat.com> 1.7.4a-6
+- Build requires openssl-devel.
+- Applied patch to fix CVE-2007-5208 (bug #329111).
+
 * Tue Oct  9 2007 Tim Waugh <twaugh at redhat.com> 1.7.4a-5
 - Use raw instead of 1284.4 communication for LJ4000 series (bug #249191).
 




More information about the fedora-extras-commits mailing list