rpms/cups/F-11 cups-str3413.patch,NONE,1.1 cups.spec,1.539,1.540

Tim Waugh twaugh at fedoraproject.org
Thu Dec 3 23:08:23 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/cups/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25704

Modified Files:
	cups.spec 
Added Files:
	cups-str3413.patch 
Log Message:
* Thu Dec  3 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-11
- Fixes for SNMP scanning with Lexmark printers (bug #542857, STR #3413).


cups-str3413.patch:
 snmp.c |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

--- NEW FILE cups-str3413.patch ---
diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c
--- cups-1.4.2/backend/snmp.c.str3413	2009-01-14 22:40:58.000000000 +0000
+++ cups-1.4.2/backend/snmp.c	2009-12-03 10:01:27.933335209 +0000
@@ -999,7 +999,7 @@ read_snmp_response(int fd)		/* I - SNMP 
 		       DEVICE_PRODUCT, LexmarkProductOID2);
 	_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
 	               packet.community, CUPS_ASN1_GET_REQUEST,
-		       DEVICE_URI, LexmarkDeviceIdOID);
+		       DEVICE_ID, LexmarkDeviceIdOID);
 	_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
 	               packet.community, CUPS_ASN1_GET_REQUEST,
 		       DEVICE_PRODUCT, XeroxProductOID);
@@ -1064,7 +1064,19 @@ read_snmp_response(int fd)		/* I - SNMP 
 
 
 	  if (device->id)
+	  {
+	    if (strlen (device->id) >
+		strlen ((char *)packet.object_value.string.bytes))
+	    {
+	     /*
+	      * The Device ID we already saw was more complete.
+	      */
+
+	      break;
+	    }
+
 	    free(device->id);
+	  }
 
 	  device->id = strdup((char *)packet.object_value.string.bytes);
 
@@ -1107,7 +1119,8 @@ read_snmp_response(int fd)		/* I - SNMP 
 
     case DEVICE_URI :
 	if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&
-	    !device->uri)
+	    !device->uri &&
+	    (char *)packet.object_value.string.bytes[0] != '\0')
 	{
 	 /*
 	  * Update an existing cache entry...


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-11/cups.spec,v
retrieving revision 1.539
retrieving revision 1.540
diff -u -p -r1.539 -r1.540
--- cups.spec	23 Nov 2009 13:11:17 -0000	1.539
+++ cups.spec	3 Dec 2009 23:08:23 -0000	1.540
@@ -9,7 +9,7 @@
 Summary: Common Unix Printing System
 Name: cups
 Version: 1.4.2
-Release: 10%{?dist}
+Release: 11%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@@ -61,6 +61,7 @@ Patch47: cups-str3407.patch
 Patch48: cups-str3418.patch
 Patch49: cups-CVE-2009-3553.patch
 Patch50: cups-str3422.patch
+Patch51: cups-str3413.patch
 
 Patch100: cups-lspp.patch
 Epoch: 1
@@ -226,6 +227,7 @@ module. 
 %patch48 -p1 -b .str3418
 %patch49 -p1 -b .CVE-2009-3553
 %patch50 -p1 -b .str3422
+%patch51 -p1 -b .str3413
 
 %if %lspp
 %patch100 -p1 -b .lspp
@@ -519,6 +521,9 @@ rm -rf $RPM_BUILD_ROOT
 %{php_extdir}/phpcups.so
 
 %changelog
+* Thu Dec  3 2009 Tim Waugh <twaugh at redhat.com> - 1:1.4.2-11
+- Fixes for SNMP scanning with Lexmark printers (bug #542857, STR #3413).
+
 * Mon Nov 23 2009 Tim Waugh <twaugh at redhat.com> 1:1.4.2-10
 - Undo last change as it was incorrect.
 




More information about the fedora-extras-commits mailing list