[Pkg-cups-devel] r414 - in cupsys/branches/cups-1.2/debian: . patches

Kenshi Muto kmuto at alioth.debian.org
Sat Dec 9 15:25:16 CET 2006


Author: kmuto
Date: Sat Dec  9 15:25:15 2006
New Revision: 414

Added:
   cupsys/branches/cups-1.2/debian/patches/00_r6149.dpatch   (contents, props changed)
   cupsys/branches/cups-1.2/debian/patches/66_setegid.dpatch   (contents, props changed)
Modified:
   cupsys/branches/cups-1.2/debian/changelog
   cupsys/branches/cups-1.2/debian/patches/00list
Log:
I still don't make sure why backends run with lp:root... but at least disabling 06_disable_backend_setuid and doing setegid(66_setegid) seem solve that problem. r6149 solves some other problems.

Modified: cupsys/branches/cups-1.2/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2/debian/changelog	(original)
+++ cupsys/branches/cups-1.2/debian/changelog	Sat Dec  9 15:25:15 2006
@@ -1,3 +1,14 @@
+cupsys (1.2.7-2) UNRELEASED; urgency=low
+
+  [ Kenshi Muto ]
+  * Apply upstream r6149. Fixed some bugs around raster handling,
+    printer status, IPv6 and so on.
+  * Trying to revert seteuid way of upstream. (disabled 06_disable
+   _backend_setuid patch to let backend works as upstream imagined)
+    Put 66_setegid.dpatch to set GID.
+
+ -- Kenshi Muto <kmuto at debian.org>  Wed,  6 Dec 2006 22:42:34 +0000
+
 cupsys (1.2.7-1) unstable; urgency=low
 
   * New upstream release

Added: cupsys/branches/cups-1.2/debian/patches/00_r6149.dpatch
==============================================================================
--- (empty file)
+++ cupsys/branches/cups-1.2/debian/patches/00_r6149.dpatch	Sat Dec  9 15:25:15 2006
@@ -0,0 +1,869 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 00_r6149.dpatch by Kenshi Muto <kmuto at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cupsys-1.2.7~/CHANGES.txt cupsys-1.2.7/CHANGES.txt
+--- cupsys-1.2.7~/CHANGES.txt	2006-11-16 13:38:38.000000000 +0000
++++ cupsys-1.2.7/CHANGES.txt	2006-12-06 22:41:32.000000000 +0000
+@@ -1,6 +1,37 @@
+-CHANGES.txt - 2006-11-16
++CHANGES.txt - 2006-12-06
+ ------------------------
+ 
++CHANGES IN CUPS V1.2.8
++
++	- Some types of Sun raster files did not print correctly
++	  (STR #2107)
++	- Raw PBM files did not print correctly (STR #2106)
++	- The SNMP backend no longer uses IPP with HP printers,
++	  as some recent firmware versions appear to not work
++	  (STR #2055)
++	- cupsMarkOptions() did not handle the
++	  multiple-document-handling option (STR #2135)
++	- lpstat did not show the local job ID of active printers
++	  (STR #2125)
++	- The backends incorrectly used STATUS:
++	  media-tray-empty-error messages for out-of-paper
++	  conditions (STR #2123, STR #2124)
++	- cupsGetPPD2() returned the wrong error when the PPD
++	  file did not exist (STR #2122)
++	- cupsDoAuthentication() did not translate the password
++	  prompt (STR #2121)
++	- httpGetLength2() did not handle error messages without
++	  content correctly (STR #2133)
++	- Added support for 32/64-bit libraries on HP-UX Itanium
++	  systems (STR #2115)
++	- Fixed a configure script problem with the 32/64-bit
++	  library support (STR #2114)
++	- The PostScript filter did not properly output document
++	  setup commands for reversed output (STR #2111)
++	- The scheduler did not parse IPv6 netmasks properly (STR
++	  #2117)
++
++
+ CHANGES IN CUPS V1.2.7
+ 
+ 	- Documentation updates (STR #2089)
+diff -urNad cupsys-1.2.7~/Makefile cupsys-1.2.7/Makefile
+--- cupsys-1.2.7~/Makefile	2006-12-06 22:41:01.000000000 +0000
++++ cupsys-1.2.7/Makefile	2006-12-06 22:41:32.000000000 +0000
+@@ -237,7 +237,7 @@
+ 
+ EPMFLAGS	=	-v --output-dir dist $(EPMARCH)
+ 
+-aix bsd deb depot inst pkg rpm setld slackware swinstall tardist:
++aix bsd deb depot inst pkg setld slackware swinstall tardist:
+ 	epm $(EPMFLAGS) -f $@ cups packaging/cups.list
+ 
+ epm:
+@@ -246,6 +246,9 @@
+ osx:
+ 	epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list
+ 
++rpm:
++	epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
++
+ .PHONEY:	dist
+ dist:	all
+ 	$(RM) -r dist
+diff -urNad cupsys-1.2.7~/backend/runloop.c cupsys-1.2.7/backend/runloop.c
+--- cupsys-1.2.7~/backend/runloop.c	2006-07-26 20:55:13.000000000 +0000
++++ cupsys-1.2.7/backend/runloop.c	2006-12-06 22:41:32.000000000 +0000
+@@ -206,7 +206,7 @@
+ 	  if (!paperout)
+ 	  {
+ 	    fputs("ERROR: Out of paper!\n", stderr);
+-	    fputs("STATUS: +media-tray-empty-error\n", stderr);
++	    fputs("STATE: +media-empty-error\n", stderr);
+ 	    paperout = 1;
+ 	  }
+         }
+@@ -229,7 +229,7 @@
+       {
+         if (paperout)
+ 	{
+-	  fputs("STATUS: -media-tray-empty-error\n", stderr);
++	  fputs("STATE: -media-empty-error\n", stderr);
+ 	  paperout = 0;
+ 	}
+ 
+diff -urNad cupsys-1.2.7~/backend/snmp.c cupsys-1.2.7/backend/snmp.c
+--- cupsys-1.2.7~/backend/snmp.c	2006-11-14 16:35:27.000000000 +0000
++++ cupsys-1.2.7/backend/snmp.c	2006-12-06 22:41:32.000000000 +0000
+@@ -1729,14 +1729,16 @@
+ 
+   if (device->make_and_model &&
+       (!strncasecmp(device->make_and_model, "Epson", 5) ||
++       !strncasecmp(device->make_and_model, "HP ", 3) ||
++       !strncasecmp(device->make_and_model, "Hewlett", 7) ||
+        !strncasecmp(device->make_and_model, "Kyocera", 7) ||
+        !strncasecmp(device->make_and_model, "Lexmark", 7) ||
+        !strncasecmp(device->make_and_model, "Tektronix", 9) ||
+        !strncasecmp(device->make_and_model, "Xerox", 5)))
+   {
+    /*
+-    * Epson, Kyocera, Lexmark, Tektronix, and Xerox printers often lock up on
+-    * IPP probes, so exclude them from the IPP connection test...
++    * Epson, HP, Kyocera, Lexmark, Tektronix, and Xerox printers often lock
++    * up on IPP probes, so exclude them from the IPP connection test...
+     */
+ 
+     http = NULL;
+@@ -1769,9 +1771,9 @@
+     static const char * const resources[] =
+ 			{		/* Common resource paths for IPP */
+ 			  "/ipp",
+-			  "/ipp/port2",
+-			  "/ipp/port3",
+-			  "/EPSON_IPP_Printer",
++			  /*"/ipp/port2",*/
++			  /*"/ipp/port3",*/
++			  /*"/EPSON_IPP_Printer",*/
+ 			  "/LPT1",
+ 			  "/LPT2",
+ 			  "/COM1",
+diff -urNad cupsys-1.2.7~/config-scripts/cups-3264.m4 cupsys-1.2.7/config-scripts/cups-3264.m4
+--- cupsys-1.2.7~/config-scripts/cups-3264.m4	1970-01-01 00:00:00.000000000 +0000
++++ cupsys-1.2.7/config-scripts/cups-3264.m4	2006-12-06 22:41:32.000000000 +0000
+@@ -0,0 +1,149 @@
++dnl
++dnl "$Id$"
++dnl
++dnl   32/64-bit library support stuff for the Common UNIX Printing System (CUPS).
++dnl
++dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
++dnl
++dnl   These coded instructions, statements, and computer programs are the
++dnl   property of Easy Software Products and are protected by Federal
++dnl   copyright law.  Distribution and use rights are outlined in the file
++dnl   "LICENSE.txt" which should have been included with this file.  If this
++dnl   file is missing or damaged please contact Easy Software Products
++dnl   at:
++dnl
++dnl       Attn: CUPS Licensing Information
++dnl       Easy Software Products
++dnl       44141 Airport View Drive, Suite 204
++dnl       Hollywood, Maryland 20636 USA
++dnl
++dnl       Voice: (301) 373-9600
++dnl       EMail: cups-info at cups.org
++dnl         WWW: http://www.cups.org
++dnl
++
++dnl Setup support for separate 32/64-bit library generation...
++AC_ARG_ENABLE(32bit, [  --enable-32bit          generate 32-bit libraries on 32/64-bit systems, default=no])
++
++INSTALL32=""
++LIB32CUPS=""
++LIB32CUPSIMAGE=""
++LIB32DIR=""
++UNINSTALL32=""
++
++AC_SUBST(INSTALL32)
++AC_SUBST(LIB32CUPS)
++AC_SUBST(LIB32CUPSIMAGE)
++AC_SUBST(LIB32DIR)
++AC_SUBST(UNINSTALL32)
++
++AC_ARG_ENABLE(64bit, [  --enable-64bit          generate 64-bit libraries on 32/64-bit systems, default=no])
++
++INSTALL64=""
++LIB64CUPS=""
++LIB64CUPSIMAGE=""
++LIB64DIR=""
++UNINSTALL64=""
++
++AC_SUBST(INSTALL64)
++AC_SUBST(LIB64CUPS)
++AC_SUBST(LIB64CUPSIMAGE)
++AC_SUBST(LIB64DIR)
++AC_SUBST(UNINSTALL64)
++
++case "$uname" in
++	HP-UX*)
++		if test "x$enable_32bit" = xyes; then
++			# Build 32-bit libraries, 64-bit base...
++			INSTALL32="install32bit"
++			LIB32CUPS="32bit/libcups.so.2"
++			LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
++			LIB32DIR="$exec_prefix/lib"
++			if test -d /usr/lib/hpux32; then
++				LIB32DIR="${LIB32DIR}/hpux32"
++			fi
++			UNINSTALL32="uninstall32bit"
++		fi
++
++		if test "x$enable_64bit" = xyes; then
++			# Build 64-bit libraries, 32-bit base...
++			INSTALL64="install64bit"
++			LIB64CUPS="64bit/libcups.so.2"
++			LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
++			LIB64DIR="$exec_prefix/lib"
++			if test -d /usr/lib/hpux64; then
++				LIB64DIR="${LIB64DIR}/hpux64"
++			fi
++			UNINSTALL64="uninstall64bit"
++		fi
++		;;
++
++	IRIX)
++		if test "x$enable_32bit" = xyes; then
++			INSTALL32="install32bit"
++			LIB32CUPS="32bit/libcups.so.2"
++			LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
++			LIB32DIR="$prefix/lib32"
++			UNINSTALL32="uninstall32bit"
++		fi
++
++		if test "x$enable_64bit" = xyes; then
++			# Build 64-bit libraries, 32-bit base...
++			INSTALL64="install64bit"
++			LIB64CUPS="64bit/libcups.so.2"
++			LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
++			LIB64DIR="$prefix/lib64"
++			UNINSTALL64="uninstall64bit"
++		fi
++		;;
++
++	Linux*)
++		if test "x$enable_32bit" = xyes; then
++			# Build 32-bit libraries, 64-bit base...
++			INSTALL32="install32bit"
++			LIB32CUPS="32bit/libcups.so.2"
++			LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
++			LIB32DIR="$exec_prefix/lib"
++			if test -d /usr/lib32; then
++				LIB32DIR="${LIB32DIR}32"
++			fi
++			UNINSTALL32="uninstall32bit"
++		fi
++
++		if test "x$enable_64bit" = xyes; then
++			# Build 64-bit libraries, 32-bit base...
++			INSTALL64="install64bit"
++			LIB64CUPS="64bit/libcups.so.2"
++			LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
++			LIB64DIR="$exec_prefix/lib"
++			if test -d /usr/lib64; then
++				LIB64DIR="${LIB64DIR}64"
++			fi
++			UNINSTALL64="uninstall64bit"
++		fi
++		;;
++
++	SunOS*)
++		if test "x$enable_32bit" = xyes; then
++			# Build 32-bit libraries, 64-bit base...
++			INSTALL32="install32bit"
++			LIB32CUPS="32bit/libcups.so.2"
++			LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
++			LIB32DIR="$exec_prefix/lib/32"
++			UNINSTALL32="uninstall32bit"
++		fi
++
++		if test "x$enable_64bit" = xyes; then
++			# Build 64-bit libraries, 32-bit base...
++			INSTALL64="install64bit"
++			LIB64CUPS="64bit/libcups.so.2"
++			LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
++			LIB64DIR="$exec_prefix/lib/64"
++			UNINSTALL64="uninstall64bit"
++		fi
++		;;
++esac
++
++dnl
++dnl End of "$Id$".
++dnl
+diff -urNad cupsys-1.2.7~/config-scripts/cups-common.m4 cupsys-1.2.7/config-scripts/cups-common.m4
+--- cupsys-1.2.7~/config-scripts/cups-common.m4	2006-11-16 14:51:53.000000000 +0000
++++ cupsys-1.2.7/config-scripts/cups-common.m4	2006-12-06 22:41:55.000000000 +0000
+@@ -1,5 +1,5 @@
+ dnl
+-dnl "$Id: cups-common.m4 6092 2006-11-14 16:36:36Z mike $"
++dnl "$Id: cups-common.m4 6145 2006-12-06 20:10:16Z mike $"
+ dnl
+ dnl   Common configuration stuff for the Common UNIX Printing System (CUPS).
+ dnl
+@@ -29,8 +29,8 @@
+ AC_CONFIG_HEADER(config.h)
+ 
+ dnl Version number information...
+-CUPS_VERSION=1.2.7
+-CUPS_REVISION=
++CUPS_VERSION="1.2.8"
++CUPS_REVISION=""
+ 
+ AC_SUBST(CUPS_VERSION)
+ AC_SUBST(CUPS_REVISION)
+@@ -264,5 +264,5 @@
+ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
+ 
+ dnl
+-dnl End of "$Id: cups-common.m4 6092 2006-11-14 16:36:36Z mike $".
++dnl End of "$Id: cups-common.m4 6145 2006-12-06 20:10:16Z mike $".
+ dnl
+diff -urNad cupsys-1.2.7~/config-scripts/cups-compiler.m4 cupsys-1.2.7/config-scripts/cups-compiler.m4
+--- cupsys-1.2.7~/config-scripts/cups-compiler.m4	2006-10-20 15:07:21.000000000 +0000
++++ cupsys-1.2.7/config-scripts/cups-compiler.m4	2006-12-06 22:41:32.000000000 +0000
+@@ -46,41 +46,15 @@
+ AC_SUBST(ARCHFLAGS)
+ 
+ dnl Setup support for separate 32/64-bit library generation...
+-AC_ARG_ENABLE(32bit, [  --enable-32bit          generate 32-bit libraries on 32/64-bit systems, default=no])
+ AC_ARG_WITH(arch32flags, [  --with-arch32flags="flags"
+                           specifies 32-bit architecture flags])
+-
+ ARCH32FLAGS=""
+-INSTALL32=""
+-LIB32CUPS=""
+-LIB32CUPSIMAGE=""
+-LIB32DIR=""
+-UNINSTALL32=""
+-
+ AC_SUBST(ARCH32FLAGS)
+-AC_SUBST(INSTALL32)
+-AC_SUBST(LIB32CUPS)
+-AC_SUBST(LIB32CUPSIMAGE)
+-AC_SUBST(LIB32DIR)
+-AC_SUBST(UNINSTALL32)
+ 
+-AC_ARG_ENABLE(64bit, [  --enable-64bit          generate 64-bit libraries on 32/64-bit systems, default=no])
+ AC_ARG_WITH(arch64flags, [  --with-arch64flags="flags"
+                           specifies 64-bit architecture flags])
+-
+ ARCH64FLAGS=""
+-INSTALL64=""
+-LIB64CUPS=""
+-LIB64CUPSIMAGE=""
+-LIB64DIR=""
+-UNINSTALL64=""
+-
+ AC_SUBST(ARCH64FLAGS)
+-AC_SUBST(INSTALL64)
+-AC_SUBST(LIB64CUPS)
+-AC_SUBST(LIB64CUPSIMAGE)
+-AC_SUBST(LIB64DIR)
+-AC_SUBST(UNINSTALL64)
+ 
+ dnl Position-Independent Executable support on Linux and *BSD...
+ AC_ARG_ENABLE(pie, [  --enable-pie            use GCC -fPIE option, default=no])
+@@ -129,6 +103,42 @@
+ 	fi
+ 
+ 	case "$uname" in
++		HP-UX*)
++			if test "x$enable_32bit" = xyes; then
++				# Build 32-bit libraries, 64-bit base...
++				if test -z "$with_arch32flags"; then
++					ARCH32FLAGS="-milp32"
++				else
++					ARCH32FLAGS="$with_arch32flags"
++				fi
++
++				if test -z "$with_archflags"; then
++					if test -z "$with_arch64flags"; then
++						ARCHFLAGS="-mlp64"
++					else
++						ARCHFLAGS="$with_arch64flags"
++					fi
++				fi
++			fi
++
++			if test "x$enable_64bit" = xyes; then
++				# Build 64-bit libraries, 32-bit base...
++				if test -z "$with_arch64flags"; then
++					ARCH64FLAGS="-mlp64"
++				else
++					ARCH64FLAGS="$with_arch64flags"
++				fi
++
++				if test -z "$with_archflags"; then
++					if test -z "$with_arch32flags"; then
++						ARCHFLAGS="-milp32"
++					else
++						ARCHFLAGS="$with_arch32flags"
++					fi
++				fi
++			fi
++			;;
++
+ 		IRIX)
+ 			if test "x$enable_32bit" = xyes; then
+ 				# Build 32-bit libraries, 64-bit base...
+@@ -137,11 +147,6 @@
+ 				else
+ 					ARCH32FLAGS="$with_arch32flags"
+ 				fi
+-				INSTALL32="install32bit"
+-				LIB32CUPS="32bit/libcups.so.2"
+-				LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
+-				LIB32DIR="$prefix/lib32"
+-				UNINSTALL32="uninstall32bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch64flags"; then
+@@ -159,11 +164,6 @@
+ 				else
+ 					ARCH64FLAGS="$with_arch64flags"
+ 				fi
+-				INSTALL64="install64bit"
+-				LIB64CUPS="64bit/libcups.so.2"
+-				LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
+-				LIB64DIR="$prefix/lib64"
+-				UNINSTALL64="uninstall64bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch32flags"; then
+@@ -183,14 +183,6 @@
+ 				else
+ 					ARCH32FLAGS="$with_arch32flags"
+ 				fi
+-				INSTALL32="install32bit"
+-				LIB32CUPS="32bit/libcups.so.2"
+-				LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
+-				LIB32DIR="$exec_prefix/lib"
+-				if test -d /usr/lib32; then
+-					LIB32DIR="${LIB32DIR}32"
+-				fi
+-				UNINSTALL32="uninstall32bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch64flags"; then
+@@ -208,14 +200,6 @@
+ 				else
+ 					ARCH64FLAGS="$with_arch64flags"
+ 				fi
+-				INSTALL64="install64bit"
+-				LIB64CUPS="64bit/libcups.so.2"
+-				LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
+-				LIB64DIR="$exec_prefix/lib"
+-				if test -d /usr/lib64; then
+-					LIB64DIR="${LIB64DIR}64"
+-				fi
+-				UNINSTALL64="uninstall64bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch32flags"; then
+@@ -235,11 +219,6 @@
+ 				else
+ 					ARCH32FLAGS="$with_arch32flags"
+ 				fi
+-				INSTALL32="install32bit"
+-				LIB32CUPS="32bit/libcups.so.2"
+-				LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
+-				LIB32DIR="$exec_prefix/lib/32"
+-				UNINSTALL32="uninstall32bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch64flags"; then
+@@ -257,11 +236,6 @@
+ 				else
+ 					ARCH64FLAGS="$with_arch64flags"
+ 				fi
+-				INSTALL64="install64bit"
+-				LIB64CUPS="64bit/libcups.so.2"
+-				LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
+-				LIB64DIR="$exec_prefix/lib/64"
+-				UNINSTALL64="uninstall64bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch32flags"; then
+@@ -323,11 +297,6 @@
+ 				else
+ 					ARCH32FLAGS="$with_arch32flags"
+ 				fi
+-				INSTALL32="install32bit"
+-				LIB32CUPS="32bit/libcups.so.2"
+-				LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
+-				LIB32DIR="$prefix/lib32"
+-				UNINSTALL32="uninstall32bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch64flags"; then
+@@ -345,11 +314,6 @@
+ 				else
+ 					ARCH64FLAGS="$with_arch64flags"
+ 				fi
+-				INSTALL64="install64bit"
+-				LIB64CUPS="64bit/libcups.so.2"
+-				LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
+-				LIB64DIR="$prefix/lib64"
+-				UNINSTALL64="uninstall64bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch32flags"; then
+@@ -388,11 +352,6 @@
+ 				# Compiling on a Solaris system, build 64-bit
+ 				# binaries with separate 32-bit libraries...
+ 				ARCH32FLAGS="-xarch=generic"
+-				INSTALL32="install32bit"
+-				LIB32CUPS="32bit/libcups.so.2"
+-				LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
+-				LIB32DIR="$exec_prefix/lib/32"
+-				UNINSTALL32="uninstall32bit"
+ 
+ 				if test "x$with_optim" = x; then
+ 					# Suppress all of Sun's questionable
+@@ -412,11 +371,6 @@
+ 				if test "x$enable_64bit" = xyes; then
+ 					# Build 64-bit libraries...
+ 					ARCH64FLAGS="-xarch=generic64"
+-					INSTALL64="install64bit"
+-					LIB64CUPS="64bit/libcups.so.2"
+-					LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
+-					LIB64DIR="$exec_prefix/lib/64"
+-					UNINSTALL64="uninstall64bit"
+ 				fi
+ 
+ 				if test "x$with_optim" = x; then
+diff -urNad cupsys-1.2.7~/config-scripts/cups-opsys.m4 cupsys-1.2.7/config-scripts/cups-opsys.m4
+--- cupsys-1.2.7~/config-scripts/cups-opsys.m4	2006-04-26 19:52:27.000000000 +0000
++++ cupsys-1.2.7/config-scripts/cups-opsys.m4	2006-12-06 22:41:32.000000000 +0000
+@@ -22,9 +22,10 @@
+ dnl         WWW: http://www.cups.org
+ dnl
+ 
+-dnl Get the operating system and version number...
++dnl Get the operating system, version number, and architecture...
+ uname=`uname`
+ uversion=`uname -r | sed -e '1,$s/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/'`
++uarch=`uname -m`
+ 
+ case "$uname" in
+ 	GNU* | GNU/*)
+diff -urNad cupsys-1.2.7~/config-scripts/cups-sharedlibs.m4 cupsys-1.2.7/config-scripts/cups-sharedlibs.m4
+--- cupsys-1.2.7~/config-scripts/cups-sharedlibs.m4	2006-05-24 01:00:35.000000000 +0000
++++ cupsys-1.2.7/config-scripts/cups-sharedlibs.m4	2006-12-06 22:41:32.000000000 +0000
+@@ -36,10 +36,20 @@
+ 			DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
+ 			;;
+ 		HP-UX*)
+-			LIBCUPS="libcups.sl.2"
+-			LIBCUPSIMAGE="libcupsimage.sl.2"
+-			DSO="\$(LD)"
+-			DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
++			case "$uarch" in
++				ia64)
++					LIBCUPS="libcups.so.2"
++					LIBCUPSIMAGE="libcupsimage.so.2"
++					DSO="\$(CC)"
++					DSOFLAGS="$DSOFLAGS -Wl,-b,-z,+h,\`basename \$@\`"
++					;;
++				*)
++					LIBCUPS="libcups.sl.2"
++					LIBCUPSIMAGE="libcupsimage.sl.2"
++					DSO="\$(LD)"
++					DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
++					;;
++			esac
+ 			;;
+ 		IRIX)
+ 			LIBCUPS="libcups.so.2"
+@@ -126,9 +136,18 @@
+ 	case $uname in
+                 HP-UX*)
+ 			# HP-UX needs the path, even for /usr/lib...
+-                	DSOFLAGS="+s +b $libdir $DSOFLAGS"
+-                	DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
+-                	DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
++			case "$uarch" in
++				ia64)
++					DSOFLAGS="-Wl,+s,+b,$libdir $DSOFLAGS"
++					DSO32FLAGS="-Wl,+s,+b,$LIB32DIR $DSO32FLAGS"
++					DSO64FLAGS="-Wl,+s,+b,$LIB64DIR $DSO64FLAGS"
++					;;
++				*)
++                			DSOFLAGS="+s +b $libdir $DSOFLAGS"
++                			DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
++                			DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
++					;;
++			esac
+                 	LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
+                 	EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
+ 			;;
+diff -urNad cupsys-1.2.7~/configure.in cupsys-1.2.7/configure.in
+--- cupsys-1.2.7~/configure.in	2006-08-04 16:51:58.000000000 +0000
++++ cupsys-1.2.7/configure.in	2006-12-06 22:41:32.000000000 +0000
+@@ -29,6 +29,7 @@
+ sinclude(config-scripts/cups-directories.m4)
+ sinclude(config-scripts/cups-manpages.m4)
+ 
++sinclude(config-scripts/cups-3264.m4)
+ sinclude(config-scripts/cups-sharedlibs.m4)
+ sinclude(config-scripts/cups-libtool.m4)
+ sinclude(config-scripts/cups-compiler.m4)
+diff -urNad cupsys-1.2.7~/cups/auth.c cupsys-1.2.7/cups/auth.c
+--- cupsys-1.2.7~/cups/auth.c	2006-09-16 19:08:36.000000000 +0000
++++ cupsys-1.2.7/cups/auth.c	2006-12-06 22:41:32.000000000 +0000
+@@ -75,6 +75,7 @@
+ 		realm[HTTP_MAX_VALUE],	/* realm="xyz" string */
+ 		nonce[HTTP_MAX_VALUE],	/* nonce="xyz" string */
+ 		encode[512];		/* Encoded username:password */
++  _cups_globals_t *cg;			/* Global data */
+ 
+ 
+   DEBUG_printf(("cupsDoAuthentication(http=%p, method=\"%s\", resource=\"%s\")\n",
+@@ -114,8 +115,15 @@
+     * Nope - get a new password from the user...
+     */
+ 
+-    snprintf(prompt, sizeof(prompt), _("Password for %s on %s? "), cupsUser(),
+-             http->hostname[0] == '/' ? "localhost" : http->hostname);
++    cg = _cupsGlobals();
++
++    if (!cg->lang_default)
++      cg->lang_default = cupsLangDefault();
++
++    snprintf(prompt, sizeof(prompt),
++             _cupsLangString(cg->lang_default, _("Password for %s on %s? ")),
++	     cupsUser(),
++	     http->hostname[0] == '/' ? "localhost" : http->hostname);
+ 
+     http->digest_tries  = strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE],
+                                       "Digest", 5) != 0;
+diff -urNad cupsys-1.2.7~/cups/cups.h cupsys-1.2.7/cups/cups.h
+--- cupsys-1.2.7~/cups/cups.h	2006-11-14 16:36:36.000000000 +0000
++++ cupsys-1.2.7/cups/cups.h	2006-12-06 22:41:32.000000000 +0000
+@@ -61,10 +61,10 @@
+  * Constants...
+  */
+ 
+-#  define CUPS_VERSION		1.0207
++#  define CUPS_VERSION		1.0208
+ #  define CUPS_VERSION_MAJOR	1
+ #  define CUPS_VERSION_MINOR	2
+-#  define CUPS_VERSION_PATCH	7
++#  define CUPS_VERSION_PATCH	8
+ #  define CUPS_DATE_ANY		-1
+ 
+ 
+diff -urNad cupsys-1.2.7~/cups/http.c cupsys-1.2.7/cups/http.c
+--- cupsys-1.2.7~/cups/http.c	2006-11-15 20:28:39.000000000 +0000
++++ cupsys-1.2.7/cups/http.c	2006-12-06 22:41:32.000000000 +0000
+@@ -694,8 +694,18 @@
+     * after the transfer is complete...
+     */
+ 
+-    if (http->fields[HTTP_FIELD_CONTENT_LENGTH][0] == '\0')
+-      http->data_remaining = 2147483647;
++    if (!http->fields[HTTP_FIELD_CONTENT_LENGTH][0])
++    {
++     /*
++      * Default content length is 0 for errors and 2^31-1 for other
++      * successful requests...
++      */
++
++      if (http->status >= HTTP_MULTIPLE_CHOICES)
++        http->data_remaining = 0;
++      else
++        http->data_remaining = 2147483647;
++    }
+     else
+       http->data_remaining = strtoll(http->fields[HTTP_FIELD_CONTENT_LENGTH],
+                                      NULL, 10);
+@@ -2730,43 +2740,30 @@
+   * encryption on the link...
+   */
+ 
+-  httpClearFields(&myhttp);
+-  httpSetField(&myhttp, HTTP_FIELD_CONNECTION, "upgrade");
+-  httpSetField(&myhttp, HTTP_FIELD_UPGRADE, "TLS/1.0, SSL/2.0, SSL/3.0");
++  httpClearFields(http);
++  httpSetField(http, HTTP_FIELD_CONNECTION, "upgrade");
++  httpSetField(http, HTTP_FIELD_UPGRADE, "TLS/1.0, SSL/2.0, SSL/3.0");
+ 
+-  if ((ret = httpOptions(&myhttp, "*")) == 0)
++  if ((ret = httpOptions(http, "*")) == 0)
+   {
+    /*
+     * Wait for the secure connection...
+     */
+ 
+-    while (httpUpdate(&myhttp) == HTTP_CONTINUE);
++    while (httpUpdate(http) == HTTP_CONTINUE);
+   }
+ 
+-  httpFlush(&myhttp);
++  httpFlush(http);
+ 
+  /*
+-  * Copy the HTTP data back over, if any...
++  * Restore the HTTP request data...
+   */
+ 
+-  http->fd         = myhttp.fd;
+-  http->error      = myhttp.error;
+-  http->activity   = myhttp.activity;
+-  http->status     = myhttp.status;
+-  http->version    = myhttp.version;
+-  http->keep_alive = myhttp.keep_alive;
+-  http->used       = myhttp.used;
+-
+-  if (http->used)
+-    memcpy(http->buffer, myhttp.buffer, http->used);
+-
+-  http->auth_type   = myhttp.auth_type;
+-  http->nonce_count = myhttp.nonce_count;
+-
+-  memcpy(http->nonce, myhttp.nonce, sizeof(http->nonce));
+-
+-  http->tls        = myhttp.tls;
+-  http->encryption = myhttp.encryption;
++  memcpy(http->fields, myhttp.fields, sizeof(http->fields));
++  http->data_encoding   = myhttp.data_encoding;
++  http->data_remaining  = myhttp.data_remaining;
++  http->_data_remaining = myhttp._data_remaining;
++  http->expect          = myhttp.expect;
+ 
+  /*
+   * See if we actually went secure...
+diff -urNad cupsys-1.2.7~/cups/util.c cupsys-1.2.7/cups/util.c
+--- cupsys-1.2.7~/cups/util.c	2006-07-11 17:56:57.000000000 +0000
++++ cupsys-1.2.7/cups/util.c	2006-12-06 22:41:32.000000000 +0000
+@@ -1649,7 +1649,8 @@
+     ippDelete(response);
+   }
+ 
+-  _cupsSetError(IPP_INTERNAL_ERROR, "No printer-uri found!");
++  if (cupsLastError() != IPP_NOT_FOUND)
++    _cupsSetError(IPP_INTERNAL_ERROR, "No printer-uri found!");
+ 
+   *host     = '\0';
+   *resource = '\0';
+diff -urNad cupsys-1.2.7~/filter/image-pnm.c cupsys-1.2.7/filter/image-pnm.c
+--- cupsys-1.2.7~/filter/image-pnm.c	2006-05-11 11:41:36.000000000 +0000
++++ cupsys-1.2.7/filter/image-pnm.c	2006-12-06 22:41:32.000000000 +0000
+@@ -202,7 +202,7 @@
+             else
+             {
+               bit = 128;
+-              inptr ++;
++              outptr ++;
+             }
+           }
+           break;
+diff -urNad cupsys-1.2.7~/filter/image-sun.c cupsys-1.2.7/filter/image-sun.c
+--- cupsys-1.2.7~/filter/image-sun.c	2006-05-11 11:41:36.000000000 +0000
++++ cupsys-1.2.7/filter/image-sun.c	2006-12-06 22:41:32.000000000 +0000
+@@ -171,7 +171,7 @@
+ 
+   for (y = 0; y < img->ysize; y ++)
+   {
+-    if (ras_depth != 8 || ras_maplength > 0)
++    if ((ras_depth != 8 && ras_depth != 24) || ras_maplength > 0)
+       p = scanline;
+     else
+       p = in;
+@@ -221,12 +221,12 @@
+           *p = 0;
+ 
+ 	if (bit > 1)
++          bit >>= 1;
++	else
+ 	{
+           bit = 128;
+           scanptr ++;
+ 	}
+-	else
+-          bit >>= 1;
+       }
+     }
+     else if (ras_depth == 1)
+@@ -253,12 +253,12 @@
+ 	}
+ 
+ 	if (bit > 1)
++          bit >>= 1;
++	else
+ 	{
+           bit = 128;
+           scanptr ++;
+ 	}
+-	else
+-          bit >>= 1;
+       }
+     }
+     else if (ras_depth == 8 && ras_maplength > 0)
+diff -urNad cupsys-1.2.7~/filter/pstops.c cupsys-1.2.7/filter/pstops.c
+--- cupsys-1.2.7~/filter/pstops.c	2006-11-14 16:54:50.000000000 +0000
++++ cupsys-1.2.7/filter/pstops.c	2006-12-06 22:41:32.000000000 +0000
+@@ -909,23 +909,26 @@
+       * for the JCL options...
+       */
+ 
+-      if (!doc->saw_eof)
+-	puts("%%EOF");
+-
+-      if (doc->emit_jcl)
++      if (number)
+       {
+-	if (ppd && ppd->jcl_end)
+-	  ppdEmitJCLEnd(ppd, stdout);
+-	else
+-	  putchar(0x04);
++	if (!doc->saw_eof)
++	  puts("%%EOF");
+ 
+-        ppdEmitJCL(ppd, stdout, doc->job_id, doc->user, doc->title);
+-      }
++	if (doc->emit_jcl)
++	{
++	  if (ppd && ppd->jcl_end)
++	    ppdEmitJCLEnd(ppd, stdout);
++	  else
++	    putchar(0x04);
+ 
+-      puts("%!PS-Adobe-3.0");
+-      puts("%%Pages: (atend)");
+-      puts("%%BoundingBox: (atend)");
+-      puts("%%EndComments");
++          ppdEmitJCL(ppd, stdout, doc->job_id, doc->user, doc->title);
++	}
++
++	puts("%!PS-Adobe-3.0");
++	puts("%%Pages: (atend)");
++	puts("%%BoundingBox: (atend)");
++	puts("%%EndComments");
++      }
+ 
+      /*
+       * Then copy all of the pages...
+diff -urNad cupsys-1.2.7~/scheduler/conf.c cupsys-1.2.7/scheduler/conf.c
+--- cupsys-1.2.7~/scheduler/conf.c	2006-12-06 22:41:01.000000000 +0000
++++ cupsys-1.2.7/scheduler/conf.c	2006-12-06 22:41:32.000000000 +0000
+@@ -1316,7 +1316,7 @@
+   * Get the address...
+   */
+ 
+-  ip[0]   = ip[1]   = ip[2]   = ip[2]   = 0x00000000;
++  ip[0]   = ip[1]   = ip[2]   = ip[3]   = 0x00000000;
+   mask[0] = mask[1] = mask[2] = mask[3] = 0xffffffff;
+ 
+   if ((maskval = strchr(value, '/')) != NULL)
+@@ -1501,7 +1501,7 @@
+ 
+   cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                   "get_addr_and_mask(value=\"%s\", "
+-                  "ip=[%08x:%08x:%08x:%08x], mask=[%08x:%08x:%08x:%08x]",
++                  "ip=[%08x:%08x:%08x:%08x], mask=[%08x:%08x:%08x:%08x])",
+              value, ip[0], ip[1], ip[2], ip[3], mask[0], mask[1], mask[2],
+ 	     mask[3]);
+ 
+diff -urNad cupsys-1.2.7~/scheduler/ipp.c cupsys-1.2.7/scheduler/ipp.c
+--- cupsys-1.2.7~/scheduler/ipp.c	2006-10-20 20:35:41.000000000 +0000
++++ cupsys-1.2.7/scheduler/ipp.c	2006-12-06 22:41:32.000000000 +0000
+@@ -5372,7 +5372,10 @@
+     return;
+   }
+   else
++  {
++    dtype &= CUPS_PRINTER_CLASS;
+     dmask = CUPS_PRINTER_CLASS;
++  }
+ 
+  /*
+   * Check policy...

Modified: cupsys/branches/cups-1.2/debian/patches/00list
==============================================================================
--- cupsys/branches/cups-1.2/debian/patches/00list	(original)
+++ cupsys/branches/cups-1.2/debian/patches/00list	Sat Dec  9 15:25:15 2006
@@ -1,9 +1,10 @@
+00_r6149.dpatch
 02_configure.dpatch
 #03_manext.dpatch
 03_clean.dpatch
 04_freebsd.dpatch
 #05_avoidunknowngroup.dpatch
-06_disable_backend_setuid.dpatch
+#06_disable_backend_setuid.dpatch
 07_removecvstag.dpatch
 #08_cupsd.conf.conf.d.dpatch
 09_runasuser.dpatch
@@ -27,3 +28,4 @@
 62_classes_crash.dpatch
 #64_driverfolder.dpatch
 65_detect_http_shutdown.dpatch
+66_setegid.dpatch

Added: cupsys/branches/cups-1.2/debian/patches/66_setegid.dpatch
==============================================================================
--- (empty file)
+++ cupsys/branches/cups-1.2/debian/patches/66_setegid.dpatch	Sat Dec  9 15:25:15 2006
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 66_setegid.dpatch by Kenshi Muto <kmuto at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cupsys-1.2.7~/scheduler/cups-deviced.c cupsys-1.2.7/scheduler/cups-deviced.c
+--- cupsys-1.2.7~/scheduler/cups-deviced.c	2006-12-09 14:08:02.000000000 +0000
++++ cupsys-1.2.7/scheduler/cups-deviced.c	2006-12-09 14:08:48.000000000 +0000
+@@ -37,6 +37,7 @@
+ #include "util.h"
+ #include <cups/array.h>
+ #include <cups/dir.h>
++#include <grp.h>
+ 
+ #ifdef __hpux
+ #  define seteuid(uid) setresuid(-1, (uid), -1)
+@@ -118,6 +119,7 @@
+ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+   struct sigaction action;		/* Actions for POSIX signals */
+ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
++  struct group *group;
+ 
+ 
+   setbuf(stderr, NULL);
+@@ -224,7 +226,17 @@
+       if (!(dent->fileinfo.st_mode & (S_IRWXG | S_IRWXO)))
+         seteuid(0);
+       else
++      {
++        /* Find the default group ... */
++        group = getgrnam(CUPS_DEFAULT_GROUP);
++        endgrent();
++        if (group) {
++          setegid(group->gr_gid);
++        } else {
++          setegid(65534); /* nobody */
++        }
+         seteuid(normal_user);
++      }
+     }
+ 
+    /*



More information about the Pkg-cups-devel mailing list