--- cupsys-1.2.2.orig/debian/libcupsys2.postinst
+++ cupsys-1.2.2/debian/libcupsys2.postinst
@@ -0,0 +1,45 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys-bsd.config
+++ cupsys-1.2.2/debian/cupsys-bsd.config
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+# Debconf library
+. /usr/share/debconf/confmodule
+
+db_input medium cupsys-bsd/setuplpd || true
+db_go
--- cupsys-1.2.2.orig/debian/cupsys.logrotate
+++ cupsys-1.2.2/debian/cupsys.logrotate
@@ -0,0 +1,15 @@
+/var/log/cups/*log {
+ daily
+ missingok
+ rotate 7
+ sharedscripts
+ postrotate
+ if [ -e /var/run/cups/cupsd.pid ]; then
+ invoke-rc.d --quiet cupsys force-reload > /dev/null
+ sleep 10
+ fi
+ endscript
+ compress
+ notifempty
+ create 640 cupsys lpadmin
+}
--- cupsys-1.2.2.orig/debian/libcupsys2.files
+++ cupsys-1.2.2/debian/libcupsys2.files
@@ -0,0 +1,2 @@
+usr/lib/libcups.so.*
+usr/lib64/libcups.so.*
--- cupsys-1.2.2.orig/debian/HOWTO_BUGREPORT.txt
+++ cupsys-1.2.2/debian/HOWTO_BUGREPORT.txt
@@ -0,0 +1,28 @@
+Debian users,
+
+For making clear your printing problem, I need some information.
+
+1. Please describe your CUPS version/revision. This will be written
+ automatically if you use Debian bug system tools.
+2. Please describe Your printer vendor and model, and how to connect (usb,
+ parallel, serial, lpd, ipp, http, socket, smb).
+3. Please attach your /etc/cups/printers.conf (only about problematic printer)
+4. Set LogLeveld as "debug" in your /etc/cups/cupsd.conf and reload by
+ /etc/init.d/cupsys reload. After you do something causes a problem,
+ please attach gzippped your /var/log/cups/error_log.
+5. Please attach gzipped PPD file in /etc/cups/ppd/.
+
+Before you report...
+1. If you use gs as filter, please check /usr/bin/gs indicates gs-esp.
+ gs-gnu doesn't support some drivers. If gs indicates gs-gnu, please
+ change by 'update-alternatives --config gs'.
+2. Please don't set severity to 'grave' or 'critical' if you couldn't success
+ to print out. I usually test by my printer, then upload. (it means at
+ least I can success to print out)
+ I promise to look over your report. Please use 'important' for
+ "I can't print out by my printer!".
+
+Thanks,
+--
+Kenshi Muto
+kmuto@debian.org
--- cupsys-1.2.2.orig/debian/libcupsimage2-dev.preinst
+++ cupsys-1.2.2/debian/libcupsimage2-dev.preinst
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for libcupsimage2-dev
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if [ ! -L /usr/share/doc/libcupsimage2-dev ]; then
+ rm -rf /usr/share/doc/libcupsimage2-dev
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/pam
+++ cupsys-1.2.2/debian/pam
@@ -0,0 +1,3 @@
+@include common-auth
+@include common-account
+@include common-session
--- cupsys-1.2.2.orig/debian/cupsys.examples
+++ cupsys-1.2.2/debian/cupsys.examples
@@ -0,0 +1 @@
+debian/filters
--- cupsys-1.2.2.orig/debian/cupsys.files
+++ cupsys-1.2.2/debian/cupsys.files
@@ -0,0 +1,43 @@
+var/log/cups
+var/spool/cups
+etc/cups/cupsd.conf
+etc/cups/ppd
+etc/cups/mime.*
+usr/lib/cups/backend
+usr/lib/cups/cgi-bin
+usr/lib/cups/monitor
+usr/lib/cups/daemon/cups-polld
+usr/lib/cups/daemon/cups-deviced
+usr/lib/cups/daemon/cups-driverd
+usr/lib/cups/filter/gziptoany
+usr/lib/cups/filter/hpgltops
+usr/lib/cups/filter/imagetops
+usr/lib/cups/filter/imagetoraster
+usr/lib/cups/filter/pstops
+usr/lib/cups/filter/rastertodymo
+usr/lib/cups/filter/rastertoepson
+usr/lib/cups/filter/rastertohp
+usr/lib/cups/filter/texttops
+usr/lib/cups/filter/rastertolabel
+usr/lib/cups/notifier
+usr/sbin/cupsd
+usr/share/cups/banners
+usr/share/cups/charsets
+usr/share/cups/charmaps
+usr/share/cups/data
+usr/share/cups/doc-root
+usr/share/cups/fonts
+usr/share/cups/model
+usr/share/cups/templates
+usr/share/locale
+usr/share/man/man7/backend.7.gz
+usr/share/man/man7/filter.7.gz
+usr/share/man/man5/classes.conf.5.gz
+usr/share/man/man5/cupsd.conf.5.gz
+usr/share/man/man5/mime.convs.5.gz
+usr/share/man/man5/mime.types.5.gz
+usr/share/man/man5/printers.conf.5.gz
+usr/share/man/man8/cups-polld.8.gz
+usr/share/man/man8/cupsd.8.gz
+usr/share/man/man8/cups-deviced.8.gz
+usr/share/man/man8/cups-driverd.8.gz
--- cupsys-1.2.2.orig/debian/cupsys-bsd.postrm
+++ cupsys-1.2.2/debian/cupsys-bsd.postrm
@@ -0,0 +1,41 @@
+#! /bin/sh
+# postrm script for cupsys-bsd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `purge'
+# * `upgrade'
+# * `failed-upgrade'
+# * `abort-install'
+# * `abort-install'
+# * `abort-upgrade'
+# * `disappear' overwrit>r>
+# for details, see /usr/doc/packaging-manual/
+
+case "$1" in
+ purge)
+ # Remove inetd entry
+ update-inetd --pattern cups-lpd --remove printer 2>/dev/null || true
+
+ ;;
+
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- cupsys-1.2.2.orig/debian/cupsys-bsd.files
+++ cupsys-1.2.2/debian/cupsys-bsd.files
@@ -0,0 +1,10 @@
+usr/sbin/lpc
+usr/bin/lpq
+usr/bin/lpr
+usr/bin/lprm
+usr/lib/cups/daemon/cups-lpd
+usr/share/man/man1/lpr.1.gz
+usr/share/man/man1/lprm.1.gz
+usr/share/man/man1/lpq.1.gz
+usr/share/man/man8/cups-lpd.8.gz
+usr/share/man/man8/lpc.8.gz
--- cupsys-1.2.2.orig/debian/libcupsys2.dirs
+++ cupsys-1.2.2/debian/libcupsys2.dirs
@@ -0,0 +1 @@
+/var/spool/cups/tmp
--- cupsys-1.2.2.orig/debian/cupsys-client.links
+++ cupsys-1.2.2/debian/cupsys-client.links
@@ -0,0 +1,7 @@
+usr/sbin/accept usr/sbin/cupsaccept
+usr/sbin/accept usr/sbin/cupsreject
+usr/sbin/accept usr/bin/cupsenable
+usr/sbin/accept usr/bin/cupsdisable
+usr/share/man/man8/accept.8.gz usr/share/man/man8/cupsaccept.8.gz
+usr/share/man/man8/accept.8.gz usr/share/man/man8/cupsreject.8.gz
+usr/share/man/man8/cupsenable.8.gz usr/share/man/man8/cupsdisable.8.gz
--- cupsys-1.2.2.orig/debian/libcupsys2.shlibs
+++ cupsys-1.2.2/debian/libcupsys2.shlibs
@@ -0,0 +1 @@
+libcups 2 libcupsys2 (>= 1.2.1)
--- cupsys-1.2.2.orig/debian/patches/ipptags-corruption-fix.dpatch
+++ cupsys-1.2.2/debian/patches/ipptags-corruption-fix.dpatch
@@ -0,0 +1,159 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ipptags-corruption-fix.dpatch by Kees Cook
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/cups/ipp.c cupsys-1.2.2/cups/ipp.c
+--- cupsys-1.2.2~/cups/ipp.c 2006-06-02 08:15:23.000000000 -0700
++++ cupsys-1.2.2/cups/ipp.c 2007-11-01 07:27:35.000000000 -0700
+@@ -1312,6 +1312,12 @@
+ {
+ case IPP_TAG_INTEGER :
+ case IPP_TAG_ENUM :
++ if (n != 4)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 4) < 4)
+ {
+ DEBUG_puts("ippReadIO: Unable to read integer value!");
+@@ -1324,6 +1330,12 @@
+ value->integer = n;
+ break;
+ case IPP_TAG_BOOLEAN :
++ if (n != 1)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 1) < 1)
+ {
+ DEBUG_puts("ippReadIO: Unable to read boolean value!");
+@@ -1341,6 +1353,12 @@
+ case IPP_TAG_CHARSET :
+ case IPP_TAG_LANGUAGE :
+ case IPP_TAG_MIMETYPE :
++ if (n >= sizeof(buffer))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, n) < n)
+ {
+ DEBUG_puts("ippReadIO: unable to read name!");
+@@ -1353,6 +1371,12 @@
+ value->string.text));
+ break;
+ case IPP_TAG_DATE :
++ if (n != 11)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, value->date, 11) < 11)
+ {
+ DEBUG_puts("ippReadIO: Unable to date integer value!");
+@@ -1360,6 +1384,12 @@
+ }
+ break;
+ case IPP_TAG_RESOLUTION :
++ if (n != 9)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 9) < 9)
+ {
+ DEBUG_puts("ippReadIO: Unable to read resolution value!");
+@@ -1376,6 +1406,12 @@
+ (ipp_res_t)buffer[8];
+ break;
+ case IPP_TAG_RANGE :
++ if (n != 8)
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, 8) < 8)
+ {
+ DEBUG_puts("ippReadIO: Unable to read range value!");
+@@ -1391,7 +1427,7 @@
+ break;
+ case IPP_TAG_TEXTLANG :
+ case IPP_TAG_NAMELANG :
+- if (n > sizeof(buffer) || n < 4)
++ if (n >= sizeof(buffer) || n < 4)
+ {
+ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
+ return (IPP_ERROR);
+@@ -1417,22 +1453,27 @@
+
+ n = (bufptr[0] << 8) | bufptr[1];
+
+- if (n >= sizeof(string))
++ if ((bufptr + 2 + n) >= (buffer + sizeof(buffer)) ||
++ n >= sizeof(string))
+ {
+- memcpy(string, bufptr + 2, sizeof(string) - 1);
+- string[sizeof(string) - 1] = '\0';
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
+ }
+- else
+- {
+- memcpy(string, bufptr + 2, n);
+- string[n] = '\0';
+- }
++
++ memcpy(string, bufptr + 2, n);
++ string[n] = '\0';
+
+ value->string.charset = _cupsStrAlloc((char *)string);
+
+ bufptr += 2 + n;
+ n = (bufptr[0] << 8) | bufptr[1];
+
++ if ((bufptr + 2 + n) >= (buffer + sizeof(buffer)))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ bufptr[2 + n] = '\0';
+ value->string.text = _cupsStrAlloc((char *)bufptr + 2);
+ break;
+@@ -1474,6 +1515,12 @@
+ * we need to carry over...
+ */
+
++ if (n >= sizeof(buffer))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ if ((*cb)(src, buffer, n) < n)
+ {
+ DEBUG_puts("ippReadIO: Unable to read member name value!");
+@@ -1495,6 +1542,12 @@
+ break;
+
+ default : /* Other unsupported values */
++ if (n > sizeof(buffer))
++ {
++ DEBUG_printf(("ippReadIO: bad value length %d!\n", n));
++ return (IPP_ERROR);
++ }
++
+ value->unknown.length = n;
+ if (n > 0)
+ {
--- cupsys-1.2.2.orig/debian/patches/75_CVE-2008-0053.dpatch
+++ cupsys-1.2.2/debian/patches/75_CVE-2008-0053.dpatch
@@ -0,0 +1,46 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 75_CVE-2008-0053.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/filter/hpgl-input.c cupsys-1.2.4/filter/hpgl-input.c
+--- cupsys-1.2.4~/filter/hpgl-input.c 2006-02-22 14:21:50.000000000 -0500
++++ cupsys-1.2.4/filter/hpgl-input.c 2008-03-26 14:12:04.000000000 -0400
+@@ -56,6 +56,7 @@
+ i; /* Looping var */
+ char buf[262144], /* String buffer */
+ *bufptr; /* Pointer into buffer */
++ float temp; /* Temporary parameter value */
+ static param_t p[MAX_PARAMS]; /* Parameter buffer */
+
+
+@@ -214,10 +215,10 @@
+ case '-' :
+ case '+' :
+ ungetc(ch, fp);
+- fscanf(fp, "%f", &(p[num_params].value.number));
+- if (num_params < MAX_PARAMS)
++ if (fscanf(fp, "%f", &temp) == 1 && num_params < MAX_PARAMS)
+ {
+- p[num_params].type = PARAM_RELATIVE;
++ p[num_params].type = PARAM_RELATIVE;
++ p[num_params].value.number = temp;
+ num_params ++;
+ }
+ break;
+@@ -233,10 +234,10 @@
+ case '9' :
+ case '.' :
+ ungetc(ch, fp);
+- fscanf(fp, "%f", &(p[num_params].value.number));
+- if (num_params < MAX_PARAMS)
++ if (fscanf(fp, "%f", &temp) == 1 && num_params < MAX_PARAMS)
+ {
+- p[num_params].type = PARAM_ABSOLUTE;
++ p[num_params].type = PARAM_ABSOLUTE;
++ p[num_params].value.number = temp;
+ num_params ++;
+ }
+ break;
--- cupsys-1.2.2.orig/debian/patches/72_CVE-2008-0047.dpatch
+++ cupsys-1.2.2/debian/patches/72_CVE-2008-0047.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 72_CVE-2008-0047.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/cgi-bin/search.c cupsys-1.2.4/cgi-bin/search.c
+--- cupsys-1.2.4~/cgi-bin/search.c 2006-09-17 15:01:47.000000000 -0400
++++ cupsys-1.2.4/cgi-bin/search.c 2008-03-26 14:06:28.000000000 -0400
+@@ -171,7 +171,9 @@
+ * string + RE overhead...
+ */
+
+- wlen = (sptr - s) + 4 * wlen + 2 * strlen(prefix) + 4;
++ wlen = (sptr - s) + 2 * 4 * wlen + 2 * strlen(prefix) + 11;
++ if (lword)
++ wlen += strlen(lword);
+
+ if (wlen > slen)
+ {
--- cupsys-1.2.2.orig/debian/patches/00list
+++ cupsys-1.2.2/debian/patches/00list
@@ -0,0 +1,41 @@
+02_configure.dpatch
+#03_manext.dpatch
+03_clean.dpatch
+04_freebsd.dpatch
+05_avoidunknowngroup.dpatch
+06_disable_backend_setuid.dpatch
+07_removecvstag.dpatch
+08_cupsd.conf.conf.d.dpatch
+09_runasuser.dpatch
+09_runasuser_autoconf.dpatch
+11_pam.dpatch
+12_quiesce_ipp_logging.dpatch
+13_default_log_warn.dpatch
+14_dont_force_ssl.dpatch
+19_cupsaccept.dpatch
+26_modprobe.dpatch
+44_fixconfdirperms.dpatch
+47_pid.dpatch
+#48_stdlib.dpatch
+55_ppd_okidata_name.dpatch
+56_dirsvc.dpatch
+58_cupsd.conf-AllowLocal.dpatch
+59_title_escaping.dpatch
+60_ipp_read_busy_loop.dpatch
+ubuntu-nowebadmin.dpatch
+ipptags-corruption-fix.dpatch
+70_CVE-2007-6358.dpatch
+71_CVE-2007-5849.dpatch
+72_CVE-2008-0047.dpatch
+73_CVE-2008-0882.dpatch
+74_pid.dpatch
+75_CVE-2008-0053.dpatch
+76_CVE-2008-1373.dpatch
+77_CVE-2008-1722.dpatch
+78_CVE-2008-3639.dpatch
+79_CVE-2008-3640.dpatch
+80_CVE-2008-3641.dpatch
+81_CVE-2009-0163
+82_CVE-2009-0949
+83_CVE-2009-2820
+84_CVE-2010-0393
--- cupsys-1.2.2.orig/debian/patches/81_CVE-2009-0163.dpatch
+++ cupsys-1.2.2/debian/patches/81_CVE-2009-0163.dpatch
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 81_CVE-2009-0163.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream: STR #3031
+## DP: Description: fix integer overflow via large TIFF file (CVE-2009-0163
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/image-private.h cupsys-1.2.2/filter/image-private.h
+--- cupsys-1.2.2~/filter/image-private.h 2006-02-26 20:47:56.000000000 -0600
++++ cupsys-1.2.2/filter/image-private.h 2009-04-15 09:25:40.000000000 -0500
+@@ -49,8 +49,8 @@
+
+ # define CUPS_IMAGE_MAX_WIDTH 0x07ffffff
+ /* 2^27-1 to allow for 15-channel data */
+-# define CUPS_IMAGE_MAX_HEIGHT 0x7fffffff
+- /* 2^31-1 */
++# define CUPS_IMAGE_MAX_HEIGHT 0x3fffffff
++ /* 2^30-1 */
+
+ # define CUPS_TILE_SIZE 256 /* 256x256 pixel tiles */
+ # define CUPS_TILE_MINIMUM 10 /* Minimum number of tiles */
--- cupsys-1.2.2.orig/debian/patches/78_CVE-2008-3639.dpatch
+++ cupsys-1.2.2/debian/patches/78_CVE-2008-3639.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 77_CVE-2008-3639.dpatch by Jamie Strandboge
+##
+## DP: Upstream: STR #2919
+## DP: fix integer overflow in texttops filter (CVE-2008-3640)
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/image-sgilib.c cupsys-1.2.2/filter/image-sgilib.c
+--- cupsys-1.2.2~/filter/image-sgilib.c 2005-10-01 23:25:52.000000000 -0500
++++ cupsys-1.2.2/filter/image-sgilib.c 2008-10-14 14:01:05.000000000 -0500
+@@ -610,13 +610,14 @@
+ if (ch & 128)
+ {
+ for (i = 0; i < count; i ++, row ++, xsize --, length ++)
+- *row = getc(fp);
++ if (xsize > 0)
++ *row = getc(fp);
+ }
+ else
+ {
+ ch = getc(fp);
+ length ++;
+- for (i = 0; i < count; i ++, row ++, xsize --)
++ for (i = 0; i < count && xsize > 0; i ++, row ++, xsize --)
+ *row = ch;
+ }
+ }
+@@ -655,13 +656,14 @@
+ if (ch & 128)
+ {
+ for (i = 0; i < count; i ++, row ++, xsize --, length ++)
+- *row = getshort(fp);
++ if (xsize > 0)
++ *row = getshort(fp);
+ }
+ else
+ {
+ ch = getshort(fp);
+ length ++;
+- for (i = 0; i < count; i ++, row ++, xsize --)
++ for (i = 0; i < count && xsize > 0; i ++, row ++, xsize --)
+ *row = ch;
+ }
+ }
--- cupsys-1.2.2.orig/debian/patches/11_pam.dpatch
+++ cupsys-1.2.2/debian/patches/11_pam.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_pam.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/scheduler/auth.c cupsys-1.1.99.b1.r4748/scheduler/auth.c
+--- cupsys-1.1.99.b1.r4748~/scheduler/auth.c 2005-11-04 13:35:45.087637554 +0000
++++ cupsys-1.1.99.b1.r4748/scheduler/auth.c 2005-11-04 13:36:32.953633141 +0000
+@@ -478,7 +478,7 @@
+ auth_data = &data;
+ # endif /* __hpux */
+
+- pamerr = pam_start("cups", username, &pamdata, &pamh);
++ pamerr = pam_start("cupsys", username, &pamdata, &pamh);
+ if (pamerr != PAM_SUCCESS)
+ {
+ cupsdLogMessage(CUPSD_LOG_ERROR,
--- cupsys-1.2.2.orig/debian/patches/04_freebsd.dpatch
+++ cupsys-1.2.2/debian/patches/04_freebsd.dpatch
@@ -0,0 +1,93 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_freebsd.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: man extension is handled by dh_installman
+
+@DPATCH@
+diff -urNad cups-1.2~/backend/parallel.c cups-1.2/backend/parallel.c
+--- cups-1.2~/backend/parallel.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/parallel.c 2006-04-25 12:14:51.000000000 +0200
+@@ -693,7 +693,7 @@
+ printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
+ }
+ }
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ int i; /* Looping var */
+ int fd; /* File descriptor */
+ char device[255]; /* Device filename */
+diff -urNad cups-1.2~/backend/serial.c cups-1.2/backend/serial.c
+--- cups-1.2~/backend/serial.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/serial.c 2006-04-25 12:15:44.000000000 +0200
+@@ -666,11 +666,11 @@
+ void
+ list_devices(void)
+ {
+-#if defined(__hpux) || defined(__sgi) || defined(__sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#if defined(__hpux) || defined(__sgi) || defined(__sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ static char *funky_hex = "0123456789abcdefghijklmnopqrstuvwxyz";
+ /* Funky hex numbering used for some *
+ * devices */
+-#endif /* __hpux || __sgi || __sun || __FreeBSD__ || __OpenBSD__ */
++#endif /* __hpux || __sgi || __sun || __FreeBSD__ || __OpenBSD__ || __FreeBSD_kernel__ */
+
+ #ifdef __linux
+ int i, j; /* Looping vars */
+@@ -958,7 +958,7 @@
+ printf("serial serial:%s?baud=38400 \"Unknown\" \"Serial Port #%d\"\n",
+ device, i + 1);
+ }
+-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ int i, j; /* Looping vars */
+ int fd; /* File descriptor */
+ char device[255]; /* Device filename */
+diff -urNad cups-1.2~/backend/usb-unix.c cups-1.2/backend/usb-unix.c
+--- cups-1.2~/backend/usb-unix.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/usb-unix.c 2006-04-25 12:14:51.000000000 +0200
+@@ -401,7 +401,7 @@
+ }
+ #elif defined(__hpux)
+ #elif defined(__osf)
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ int i; /* Looping var */
+ char device[255]; /* Device filename */
+
+diff -urNad cups-1.2~/backend/usb.c cups-1.2/backend/usb.c
+--- cups-1.2~/backend/usb.c 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/backend/usb.c 2006-04-25 12:14:51.000000000 +0200
+@@ -72,7 +72,7 @@
+
+ #ifdef __APPLE__
+ # include "usb-darwin.c"
+-#elif defined(__linux) || defined(__sun) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__linux) || defined(__sun) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ # include "usb-unix.c"
+ #else
+ /*
+diff -urNad cups-1.2~/config-scripts/cups-directories.m4 cups-1.2/config-scripts/cups-directories.m4
+--- cups-1.2~/config-scripts/cups-directories.m4 2006-04-25 12:14:36.000000000 +0200
++++ cups-1.2/config-scripts/cups-directories.m4 2006-04-25 12:14:51.000000000 +0200
+@@ -135,7 +135,7 @@
+ "/System/Library/StartupItems/PrintingServices")
+ ;;
+
+- Linux | GNU)
++ Linux | GNU | GNU/k*BSD*)
+ # Linux/HURD seems to choose an init.d directory at random...
+ if test -d /sbin/init.d; then
+ # SuSE
+diff -urNad cups-1.2~/configure cups-1.2/configure
+--- cups-1.2~/configure 2006-04-25 12:14:50.000000000 +0200
++++ cups-1.2/configure 2006-04-25 12:14:51.000000000 +0200
+@@ -7445,7 +7445,7 @@
+
+ ;;
+
+- Linux | GNU)
++ Linux | GNU | GNU/k*BSD*)
+ # Linux/HURD seems to choose an init.d directory at random...
+ if test -d /sbin/init.d; then
+ # SuSE
--- cupsys-1.2.2.orig/debian/patches/55_ppd_okidata_name.dpatch
+++ cupsys-1.2.2/debian/patches/55_ppd_okidata_name.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 55_ppd_okidata_name.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- ./ppd/okidata9.ppd~ 2005-12-15 17:19:46.000000000 +0100
++++ ./ppd/okidata9.ppd 2006-04-12 20:13:44.240749856 +0200
+@@ -28,7 +28,7 @@
+ *LanguageVersion: English
+ *LanguageEncoding: ISOLatin1
+ *PCFileName: "OKIDATA9.PPD"
+-*Manufacturer: "Oki"
++*Manufacturer: "Okidata"
+ *Product: "(GNU Ghostscript)"
+ *Product: "(ESP Ghostscript)"
+ *cupsVersion: 1.2
+--- ./ppd/okidat24.ppd~ 2005-12-15 17:19:46.000000000 +0100
++++ ./ppd/okidat24.ppd 2006-04-12 20:13:32.764494512 +0200
+@@ -28,7 +28,7 @@
+ *LanguageVersion: English
+ *LanguageEncoding: ISOLatin1
+ *PCFileName: "OKIDAT24.PPD"
+-*Manufacturer: "Oki"
++*Manufacturer: "Okidata"
+ *Product: "(GNU Ghostscript)"
+ *Product: "(ESP Ghostscript)"
+ *cupsVersion: 1.2
--- cupsys-1.2.2.orig/debian/patches/26_modprobe.dpatch
+++ cupsys-1.2.2/debian/patches/26_modprobe.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 26_modprobe.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/backend/parallel.c cupsys-1.1.99.b1.r4748/backend/parallel.c
+--- cupsys-1.1.99.b1.r4748~/backend/parallel.c 2005-09-26 19:33:58.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/backend/parallel.c 2005-10-05 12:33:48.589479144 +0000
+@@ -416,6 +416,10 @@
+ model[IPP_MAX_NAME]; /* Model from file */
+
+
++ /* Load module for unconfigured host */
++ fd = popen("/sbin/modprobe -q lp", "r");
++ pclose(fd);
++
+ for (i = 0; i < 4; i ++)
+ {
+ /*
--- cupsys-1.2.2.orig/debian/patches/44_fixconfdirperms.dpatch
+++ cupsys-1.2.2/debian/patches/44_fixconfdirperms.dpatch
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 44_fixconfdirperms.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.rc2~/scheduler/conf.c cupsys-1.1.99.rc2/scheduler/conf.c
+--- cupsys-1.1.99.rc2~/scheduler/conf.c 2006-04-06 20:03:32.000000000 +0000
++++ cupsys-1.1.99.rc2/scheduler/conf.c 2006-04-11 10:35:14.000000000 +0000
+@@ -531,22 +531,10 @@
+
+ cupsdLogMessage(CUPSD_LOG_NOTICE,
+ "Group and SystemGroup cannot use the same groups!");
+- cupsdLogMessage(CUPSD_LOG_INFO, "Resetting Group to \"nobody\"...");
++ cupsdLogMessage(CUPSD_LOG_INFO, "Resetting Group to \"root\"...");
+
+- group = getgrnam("nobody");
+ endgrent();
+-
+- if (group != NULL)
+- Group = group->gr_gid;
+- else
+- {
+- /*
+- * Use the (historical) NFS nobody group ID (-2 as a 16-bit twos-
+- * complement number...)
+- */
+-
+- Group = 65534;
+- }
++ Group = 0;
+ }
+ }
+
+@@ -630,11 +618,13 @@
+ check_permissions(StateDir, "certs", RunUser ? 0711 : 0511, User,
+ SystemGroupIDs[0], 1, 1);
+
+- check_permissions(ServerRoot, NULL, 0755, RunUser, Group, 1, 0);
++ check_permissions(ServerRoot, NULL, 03755, RunUser, Group, 1, 0);
+ check_permissions(ServerRoot, "ppd", 0755, RunUser, Group, 1, 1);
+ check_permissions(ServerRoot, "ssl", 0700, RunUser, Group, 1, 0);
++ /* Never alter permissions of central conffile
+ check_permissions(ServerRoot, "cupsd.conf", ConfigFilePerm, RunUser, Group,
+ 0, 0);
++ */
+ check_permissions(ServerRoot, "classes.conf", 0600, RunUser, Group, 0, 0);
+ check_permissions(ServerRoot, "printers.conf", 0600, RunUser, Group, 0, 0);
+ check_permissions(ServerRoot, "passwd.md5", 0600, User, Group, 0, 0);
--- cupsys-1.2.2.orig/debian/patches/83_CVE-2009-2820.dpatch
+++ cupsys-1.2.2/debian/patches/83_CVE-2009-2820.dpatch
@@ -0,0 +1,409 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 83_CVE-2009-2820.dpatch by Marc Deslauriers
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix XSS and CRLF injection in headers
+## DP: Patch: backported from Aaron Sigel's patch
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/cgi-bin/admin.c cupsys-1.2.2/cgi-bin/admin.c
+--- cupsys-1.2.2~/cgi-bin/admin.c 2006-05-22 14:47:09.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/admin.c 2009-10-30 21:39:59.000000000 -0400
+@@ -107,6 +107,7 @@
+ */
+
+ cgiSetVariable("SECTION", "admin");
++ cgiSetVariable("REFRESH_PAGE", "");
+
+ /*
+ * See if we have form data...
+@@ -137,16 +138,61 @@
+
+
+ if (getenv("HTTPS"))
+- snprintf(prefix, sizeof(prefix), "https://%s:%s",
+- getenv("SERVER_NAME"), getenv("SERVER_PORT"));
++ snprintf(prefix, sizeof(prefix), "https://%s:%s",
++ getenv("SERVER_NAME"), getenv("SERVER_PORT"));
+ else
+- snprintf(prefix, sizeof(prefix), "http://%s:%s",
+- getenv("SERVER_NAME"), getenv("SERVER_PORT"));
++ snprintf(prefix, sizeof(prefix), "http://%s:%s",
++ getenv("SERVER_NAME"), getenv("SERVER_PORT"));
++
++ fprintf(stderr, "DEBUG: redirecting with prefix %s!\n", prefix);
+
+ if ((url = cgiGetVariable("URL")) != NULL)
+- printf("Location: %s%s\n\n", prefix, url);
++ {
++ char encoded[1024], /* Encoded URL string */
++ *ptr; /* Pointer into encoded string */
++
++
++ ptr = encoded;
++ if (*url != '/')
++ *ptr++ = '/';
++
++ for (; *url && ptr < (encoded + sizeof(encoded) - 4); url ++)
++ {
++ if (strchr("%@&+ <>#=", *url) || *url < ' ' || *url & 128)
++ {
++ /*
++ * Percent-encode this character; safe because we have at least 4
++ * bytes left in the array...
++ */
++
++ sprintf(ptr, "%%%02X", *url & 255);
++ ptr += 3;
++ }
++ else
++ *ptr++ = *url;
++ }
++
++ *ptr = '\0';
++
++ if (*url)
++ {
++ /*
++ * URL was too long, just redirect to the admin page...
++ */
++
++ printf("Location: %s/admin\n\n", prefix);
++ }
++ else
++ {
++ /*
++ * URL is OK, redirect there...
++ */
++
++ printf("Location: %s%s\n\n", prefix, encoded);
++ }
++ }
+ else
+- printf("Location: %s/admin\n\n", prefix);
++ printf("Location: %s/admin\n\n", prefix);
+ }
+ else if (!strcmp(op, "start-printer"))
+ do_printer_op(http, IPP_RESUME_PRINTER, cgiText(_("Start Printer")));
+@@ -238,6 +284,7 @@
+ ipp_attribute_t *attr; /* member-uris attribute */
+ char uri[HTTP_MAX_URI]; /* Device or printer URI */
+ const char *name, /* Pointer to class name */
++ *op, /* Operation name */
+ *ptr; /* Pointer to CGI variable */
+ const char *title; /* Title of page */
+ static const char * const pattrs[] = /* Requested printer attributes */
+@@ -249,6 +296,7 @@
+
+
+ title = cgiText(modify ? _("Modify Class") : _("Add Class"));
++ op = cgiGetVariable("OP");
+ name = cgiGetVariable("PRINTER_NAME");
+
+ if (cgiGetVariable("PRINTER_LOCATION") == NULL)
+@@ -271,6 +319,12 @@
+ * Do the request and get back a response...
+ */
+
++ cgiClearVariables();
++ if (op)
++ cgiSetVariable("OP", op);
++ if (name)
++ cgiSetVariable("PRINTER_NAME", name);
++
+ if ((response = cupsDoRequest(http, request, "/")) != NULL)
+ {
+ /*
+diff -urNad cupsys-1.2.2~/cgi-bin/cgi.h cupsys-1.2.2/cgi-bin/cgi.h
+--- cupsys-1.2.2~/cgi-bin/cgi.h 2006-01-14 15:37:40.000000000 -0500
++++ cupsys-1.2.2/cgi-bin/cgi.h 2009-10-30 21:39:46.000000000 -0400
+@@ -63,6 +63,7 @@
+ extern void cgiAbort(const char *title, const char *stylesheet,
+ const char *format, ...);
+ extern int cgiCheckVariables(const char *names);
++extern void cgiClearVariables(void);
+ extern void *cgiCompileSearch(const char *query);
+ extern void cgiCopyTemplateFile(FILE *out, const char *tmpl);
+ extern void cgiCopyTemplateLang(const char *tmpl);
+diff -urNad cupsys-1.2.2~/cgi-bin/classes.c cupsys-1.2.2/cgi-bin/classes.c
+--- cupsys-1.2.2~/cgi-bin/classes.c 2006-05-22 14:47:09.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/classes.c 2009-10-30 21:39:46.000000000 -0400
+@@ -78,6 +78,7 @@
+ */
+
+ cgiSetVariable("SECTION", "classes");
++ cgiSetVariable("REFRESH_PAGE", "");
+
+ /*
+ * See if we are displaying a printer or all classes...
+diff -urNad cupsys-1.2.2~/cgi-bin/help.c cupsys-1.2.2/cgi-bin/help.c
+--- cupsys-1.2.2~/cgi-bin/help.c 2006-05-19 15:39:28.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/help.c 2009-10-30 21:39:46.000000000 -0400
+@@ -72,6 +72,7 @@
+ */
+
+ cgiSetVariable("SECTION", "help");
++ cgiSetVariable("REFRESH_PAGE", "");
+
+ /*
+ * Load the help index...
+@@ -111,7 +112,7 @@
+ */
+
+ for (i = 0; i < argc; i ++)
+- fprintf(stderr, "argv[%d]=\"%s\"\n", i, argv[i]);
++ fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
+
+ if ((helpfile = getenv("PATH_INFO")) != NULL)
+ {
+@@ -187,6 +188,12 @@
+ topic = cgiGetVariable("TOPIC");
+ si = helpSearchIndex(hi, query, topic, helpfile);
+
++ cgiClearVariables();
++ if (query)
++ cgiSetVariable("QUERY", query);
++ if (topic)
++ cgiSetVariable("TOPIC", topic);
++
+ fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",
+ query ? query : "(null)", topic ? topic : "(null)");
+
+diff -urNad cupsys-1.2.2~/cgi-bin/ipp-var.c cupsys-1.2.2/cgi-bin/ipp-var.c
+--- cupsys-1.2.2~/cgi-bin/ipp-var.c 2006-05-22 14:47:09.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/ipp-var.c 2009-10-30 21:39:46.000000000 -0400
+@@ -1075,7 +1075,9 @@
+ int ascending, /* Order of jobs (0 = descending) */
+ first, /* First job to show */
+ count; /* Number of jobs */
+- const char *var; /* Form variable */
++ const char *var, /* Form variable */
++ *query, /* Query string */
++ *section; /* Section in web interface */
+ void *search; /* Search data */
+ char url[1024], /* URL for prev/next/this */
+ *urlptr, /* Position in URL */
+@@ -1120,10 +1122,13 @@
+ * Get a list of matching job objects.
+ */
+
+- if ((var = cgiGetVariable("QUERY")) != NULL)
+- search = cgiCompileSearch(var);
++ if ((query = cgiGetVariable("QUERY")) != NULL)
++ search = cgiCompileSearch(query);
+ else
++ {
++ query = NULL;
+ search = NULL;
++ }
+
+ jobs = cgiGetIPPObjects(response, search);
+ count = cupsArrayCount(jobs);
+@@ -1148,16 +1153,27 @@
+ if (first < 0)
+ first = 0;
+
+- sprintf(url, "%d", count);
+- cgiSetVariable("TOTAL", url);
+-
+ if ((var = cgiGetVariable("ORDER")) != NULL)
+ ascending = !strcasecmp(var, "asc");
+ else
+- {
+ ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
+- cgiSetVariable("ORDER", ascending ? "asc" : "dec");
+- }
++
++ section = cgiGetVariable("SECTION");
++
++ cgiClearVariables();
++
++ if (query)
++ cgiSetVariable("QUERY", query);
++
++ cgiSetVariable("ORDER", ascending ? "asc" : "dec");
++
++ cgiSetVariable("SECTION", section);
++
++ sprintf(url, "%d", count);
++ cgiSetVariable("TOTAL", url);
++
++ if (which_jobs)
++ cgiSetVariable("WHICH_JOBS", which_jobs);
+
+ if (ascending)
+ {
+@@ -1180,11 +1196,10 @@
+
+ urlend = url + sizeof(url);
+
+- if ((var = cgiGetVariable("QUERY")) != NULL)
++ if (query != NULL)
+ {
+ if (dest)
+- snprintf(url, sizeof(url), "/%s/%s?QUERY=", cgiGetVariable("SECTION"),
+- dest);
++ snprintf(url, sizeof(url), "/%s/%s?QUERY=", section, dest);
+ else
+ strlcpy(url, "/jobs/?QUERY=", sizeof(url));
+
+@@ -1199,7 +1214,7 @@
+ else
+ {
+ if (dest)
+- snprintf(url, sizeof(url), "/%s/%s?", cgiGetVariable("SECTION"), dest);
++ snprintf(url, sizeof(url), "/%s/%s?", section, dest);
+ else
+ strlcpy(url, "/jobs/?", sizeof(url));
+
+diff -urNad cupsys-1.2.2~/cgi-bin/jobs.c cupsys-1.2.2/cgi-bin/jobs.c
+--- cupsys-1.2.2~/cgi-bin/jobs.c 2006-02-14 22:21:04.000000000 -0500
++++ cupsys-1.2.2/cgi-bin/jobs.c 2009-10-30 21:39:46.000000000 -0400
+@@ -66,6 +66,7 @@
+ */
+
+ cgiSetVariable("SECTION", "jobs");
++ cgiSetVariable("REFRESH_PAGE", "");
+
+ /*
+ * Connect to the HTTP server...
+diff -urNad cupsys-1.2.2~/cgi-bin/printers.c cupsys-1.2.2/cgi-bin/printers.c
+--- cupsys-1.2.2~/cgi-bin/printers.c 2006-05-22 14:47:09.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/printers.c 2009-10-30 21:39:46.000000000 -0400
+@@ -81,6 +81,7 @@
+ */
+
+ cgiSetVariable("SECTION", "printers");
++ cgiSetVariable("REFRESH_PAGE", "");
+
+ /*
+ * See if we are displaying a printer or all printers...
+diff -urNad cupsys-1.2.2~/cgi-bin/template.c cupsys-1.2.2/cgi-bin/template.c
+--- cupsys-1.2.2~/cgi-bin/template.c 2006-05-19 15:39:28.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/template.c 2009-10-30 21:39:46.000000000 -0400
+@@ -639,6 +639,8 @@
+ fputs(">", out);
+ else if (*s == '\"')
+ fputs(""", out);
++ else if (*s == '\'')
++ fputs("'", out);
+ else if (*s == '&')
+ fputs("&", out);
+ else
+@@ -659,7 +661,7 @@
+ {
+ while (*s)
+ {
+- if (strchr("%&+ <>#=", *s) || *s & 128)
++ if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128)
+ fprintf(out, "%%%02X", *s & 255);
+ else
+ putc(*s, out);
+diff -urNad cupsys-1.2.2~/cgi-bin/var.c cupsys-1.2.2/cgi-bin/var.c
+--- cupsys-1.2.2~/cgi-bin/var.c 2006-05-19 15:39:28.000000000 -0400
++++ cupsys-1.2.2/cgi-bin/var.c 2009-10-30 21:39:46.000000000 -0400
+@@ -24,6 +24,7 @@
+ * Contents:
+ *
+ * cgiCheckVariables() - Check for the presence of "required" variables.
++ * cgiClearVariables() - Clear all form variables.
+ * cgiGetArray() - Get an element from a form array...
+ * cgiGetFile() - Get the file (if any) that was submitted in the form.
+ * cgiGetSize() - Get the size of a form array value.
+@@ -144,6 +145,31 @@
+
+
+ /*
++ * 'cgiClearVariables()' - Clear all form variables.
++ */
++
++void
++cgiClearVariables(void)
++{
++ int i, j; /* Looping vars */
++ _cgi_var_t *v; /* Current variable */
++
++
++ for (v = form_vars, i = form_count; i > 0; v ++, i --)
++ {
++ _cupsStrFree(v->name);
++ for (j = 0; j < v->nvalues; j ++)
++ if (v->values[j])
++ _cupsStrFree(v->values[j]);
++ }
++
++ form_count = 0;
++
++ cgi_unlink_file();
++}
++
++
++/*
+ * 'cgiGetArray()' - Get an element from a form array...
+ */
+
+@@ -163,7 +189,7 @@
+ if (element < 0 || element >= var->nvalues)
+ return (NULL);
+
+- return (var->values[element]);
++ return (_cupsStrAlloc(var->values[element]));
+ }
+
+
+@@ -218,7 +244,7 @@
+ var->values[var->nvalues - 1]);
+ #endif /* DEBUG */
+
+- return ((var == NULL) ? NULL : var->values[var->nvalues - 1]);
++ return ((var == NULL) ? NULL : _cupsStrAlloc(var->values[var->nvalues - 1]));
+ }
+
+
+@@ -344,9 +370,9 @@
+ var->nvalues = element + 1;
+ }
+ else if (var->values[element])
+- free((char *)var->values[element]);
++ _cupsStrFree((char *)var->values[element]);
+
+- var->values[element] = strdup(value);
++ var->values[element] = _cupsStrAlloc(value);
+ }
+ }
+
+@@ -385,7 +411,7 @@
+ {
+ for (i = size; i < var->nvalues; i ++)
+ if (var->values[i])
+- free((void *)(var->values[i]));
++ _cupsStrFree((void *)(var->values[i]));
+ }
+
+ var->nvalues = size;
+@@ -418,9 +444,9 @@
+ {
+ for (i = 0; i < var->nvalues; i ++)
+ if (var->values[i])
+- free((char *)var->values[i]);
++ _cupsStrFree((char *)var->values[i]);
+
+- var->values[0] = strdup(value);
++ var->values[0] = _cupsStrAlloc(value);
+ var->nvalues = 1;
+ }
+ }
+@@ -456,11 +482,11 @@
+ }
+
+ var = form_vars + form_count;
+- var->name = strdup(name);
++ var->name = _cupsStrAlloc(name);
+ var->nvalues = element + 1;
+ var->avalues = element + 1;
+ var->values = calloc(element + 1, sizeof(char *));
+- var->values[element] = strdup(value);
++ var->values[element] = _cupsStrAlloc(value);
+
+ form_count ++;
+ }
--- cupsys-1.2.2.orig/debian/patches/02_configure.dpatch
+++ cupsys-1.2.2/debian/patches/02_configure.dpatch
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_configure.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/configure cups-1.2/configure
+--- cups-1.2~/configure 2006-07-21 18:42:52.000000000 +0200
++++ cups-1.2/configure 2006-07-21 18:45:59.000000000 +0200
+@@ -7857,14 +7857,6 @@
+ fi
+ ;;
+ IRIX | Linux | GNU)
+- # IRIX, Linux, and HURD...
+- if test $exec_prefix != /usr; then
+- DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
+- DSO32FLAGS="-Wl,-rpath,$LIB32DIR $DSO32FLAGS"
+- DSO64FLAGS="-Wl,-rpath,$LIB64DIR $DSO64FLAGS"
+- LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
+- EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
+- fi
+ ;;
+ esac
+ else
--- cupsys-1.2.2.orig/debian/patches/14_dont_force_ssl.dpatch
+++ cupsys-1.2.2/debian/patches/14_dont_force_ssl.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_dont_force_ssl.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2-ubuntu~/conf/cupsd.conf.in cups-1.2-ubuntu/conf/cupsd.conf.in
+--- cups-1.2-ubuntu~/conf/cupsd.conf.in 2006-04-25 20:05:27.000000000 +0200
++++ cups-1.2-ubuntu/conf/cupsd.conf.in 2006-04-25 20:09:04.000000000 +0200
+@@ -33,7 +33,6 @@
+
+ # Restrict access to the admin pages...
+
+-@ENCRYPTION_REQUIRED@
+ Order allow,deny
+ Allow localhost
+
--- cupsys-1.2.2.orig/debian/patches/82_CVE-2009-0949.dpatch
+++ cupsys-1.2.2/debian/patches/82_CVE-2009-0949.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 82_CVE-2009-0949.dpatch by Marc Deslauriers
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix remote denial-of-service via IPP_TAG_UNSUPPORTED tags.
+## DP: Patch: svn diff -c 8409 http://svn.easysw.com/public/cups/branches/branch-1.3/
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/scheduler/ipp.c cupsys-1.2.2/scheduler/ipp.c
+--- cupsys-1.2.2~/scheduler/ipp.c 2009-06-01 10:34:17.000000000 -0400
++++ cupsys-1.2.2/scheduler/ipp.c 2009-06-01 10:34:33.000000000 -0400
+@@ -312,7 +312,8 @@
+ */
+
+ attr = con->request->attrs;
+- if (attr && !strcmp(attr->name, "attributes-charset") &&
++ if (attr && attr->name &&
++ !strcmp(attr->name, "attributes-charset") &&
+ (attr->value_tag & IPP_TAG_MASK) == IPP_TAG_CHARSET)
+ charset = attr;
+ else
+@@ -321,7 +322,8 @@
+ if (attr)
+ attr = attr->next;
+
+- if (attr && !strcmp(attr->name, "attributes-natural-language") &&
++ if (attr && attr->name &&
++ !strcmp(attr->name, "attributes-natural-language") &&
+ (attr->value_tag & IPP_TAG_MASK) == IPP_TAG_LANGUAGE)
+ language = attr;
+ else
--- cupsys-1.2.2.orig/debian/patches/58_cupsd.conf-AllowLocal.dpatch
+++ cupsys-1.2.2/debian/patches/58_cupsd.conf-AllowLocal.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 58_cupsd.conf-AllowLocal.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2-ubuntu~/conf/cupsd.conf.in cups-1.2-ubuntu/conf/cupsd.conf.in
+--- cups-1.2-ubuntu~/conf/cupsd.conf.in 2006-05-09 17:52:23.000000000 +0200
++++ cups-1.2-ubuntu/conf/cupsd.conf.in 2006-05-09 17:52:33.000000000 +0200
+@@ -34,6 +34,7 @@
+
+ Order allow,deny
+ Allow localhost
++ Allow @LOCAL
+
+
+ # Restrict access to the admin pages...
--- cupsys-1.2.2.orig/debian/patches/09_runasuser_autoconf.dpatch
+++ cupsys-1.2.2/debian/patches/09_runasuser_autoconf.dpatch
@@ -0,0 +1,62 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 99_autoconf.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/configure cups-1.2/configure
+--- cups-1.2~/configure 2006-07-21 18:43:01.000000000 +0200
++++ cups-1.2/configure 2006-07-21 18:43:41.000000000 +0200
+@@ -309,7 +309,7 @@
+ #endif"
+
+ ac_default_prefix=/
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CUPS_VERSION CUPS_REVISION AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB AR HTMLDOC LD LN MV RM RMDIR SED STRIP INSTALLSTATIC LIBMALLOC LIBPAPER EGREP ARFLAGS PKGCONFIG BACKLIBS CUPSDLIBS DBUSDIR DEFAULT_IPP_PORT INITDIR INITDDIR XINETD CUPS_CACHEDIR CUPS_DATADIR CUPS_DOCROOT CUPS_FONTPATH CUPS_LOCALEDIR CUPS_LOGDIR CUPS_REQUESTS CUPS_SERVERBIN INSTALL_SYSV CUPS_SERVERROOT CUPS_STATEDIR AMANDIR PMANDIR MAN1EXT MAN5EXT MAN7EXT MAN8EXT MAN8DIR DSO DSOFLAGS DSO32FLAGS DSO64FLAGS LIBCUPS LIBCUPSIMAGE LINKCUPS LINKCUPSIMAGE DSOLIBS IMGLIBS EXPORT_LDFLAGS LIBTOOL OPTIM ARCHFLAGS ARCH32FLAGS INSTALL32 LIB32CUPS LIB32CUPSIMAGE LIB32DIR UNINSTALL32 ARCH64FLAGS INSTALL64 LIB64CUPS LIB64CUPSIMAGE LIB64DIR UNINSTALL64 CXXLIBS PIEFLAGS IMGFILTERS LIBJPEG LIBPNG LIBTIFF LIBZ EXPORT_LIBJPEG EXPORT_LIBPNG EXPORT_LIBTIFF EXPORT_LIBZ CUPS_DEFAULT_DOMAINSOCKET CUPS_LISTEN_DOMAINSOCKET LIBSLP LIBLDAP LIBGNUTLSCONFIG SSLFLAGS SSLLIBS ENCRYPTION_REQUIRED EXPORT_SSLLIBS PAMDIR PAMFILE PAMLIBS PAMMOD PTHREAD_FLAGS LARGEFILE DEFAULT_LAUNCHD_CONF LAUNCHDLIBS LANGUAGES CUPS_CONFIG_FILE_PERM CUPS_LOG_FILE_PERM CUPS_BROWSING CUPS_BROWSE_LOCAL_PROTOCOLS CUPS_BROWSE_REMOTE_PROTOCOLS CUPS_BROWSE_SHORT_NAMES CUPS_DEFAULT_SHARED CUPS_IMPLICIT_CLASSES CUPS_USE_NETWORK_DEFAULT CUPS_USER CUPS_GROUP CUPS_SYSTEM_GROUPS CUPS_PRIMARY_SYSTEM_GROUP PAP PDFTOPS JAVA PERL PHP PHPCONFIG PHPDIR PYTHON INSTALL_LANGUAGES UNINSTALL_LANGUAGES LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CUPS_VERSION CUPS_REVISION AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB AR HTMLDOC LD LN MV RM RMDIR SED STRIP INSTALLSTATIC LIBMALLOC LIBPAPER EGREP ARFLAGS PKGCONFIG BACKLIBS CUPSDLIBS DBUSDIR DEFAULT_IPP_PORT INITDIR INITDDIR XINETD CUPS_CACHEDIR CUPS_DATADIR CUPS_DOCROOT CUPS_FONTPATH CUPS_LOCALEDIR CUPS_LOGDIR CUPS_REQUESTS CUPS_SERVERBIN INSTALL_SYSV CUPS_SERVERROOT CUPS_STATEDIR AMANDIR PMANDIR MAN1EXT MAN5EXT MAN7EXT MAN8EXT MAN8DIR DSO DSOFLAGS DSO32FLAGS DSO64FLAGS LIBCUPS LIBCUPSIMAGE LINKCUPS LINKCUPSIMAGE DSOLIBS IMGLIBS EXPORT_LDFLAGS LIBTOOL OPTIM ARCHFLAGS ARCH32FLAGS INSTALL32 LIB32CUPS LIB32CUPSIMAGE LIB32DIR UNINSTALL32 ARCH64FLAGS INSTALL64 LIB64CUPS LIB64CUPSIMAGE LIB64DIR UNINSTALL64 CXXLIBS PIEFLAGS IMGFILTERS LIBJPEG LIBPNG LIBTIFF LIBZ EXPORT_LIBJPEG EXPORT_LIBPNG EXPORT_LIBTIFF EXPORT_LIBZ CUPS_DEFAULT_DOMAINSOCKET CUPS_LISTEN_DOMAINSOCKET LIBSLP LIBLDAP LIBGNUTLSCONFIG SSLFLAGS SSLLIBS ENCRYPTION_REQUIRED EXPORT_SSLLIBS PAMDIR PAMFILE PAMLIBS PAMMOD PTHREAD_FLAGS LARGEFILE DEFAULT_LAUNCHD_CONF LAUNCHDLIBS LANGUAGES CUPS_CONFIG_FILE_PERM CUPS_LOG_FILE_PERM CUPS_BROWSING CUPS_BROWSE_LOCAL_PROTOCOLS CUPS_BROWSE_REMOTE_PROTOCOLS CUPS_BROWSE_SHORT_NAMES CUPS_DEFAULT_SHARED CUPS_IMPLICIT_CLASSES CUPS_USE_NETWORK_DEFAULT CUPS_USER CUPS_GROUP CUPS_SYSTEM_GROUPS CUPS_PRIMARY_SYSTEM_GROUP PAP CUPS_DROP_PRIVILEGES PDFTOPS JAVA PERL PHP PHPCONFIG PHPDIR PYTHON INSTALL_LANGUAGES UNINSTALL_LANGUAGES LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -881,6 +881,7 @@
+ enable ImplicitClasses by default, default=yes
+ --enable-use-network-default
+ enable UseNetworkDefault by default, default=auto
++ --enable-privilege-dropping drop root privileges to normal user, default=no
+ --enable-pdftops build pdftops filter, default=auto
+
+ Optional Packages:
+@@ -13297,6 +13298,26 @@
+ _ACEOF
+
+
++# Check whether --enable-privilege-dropping or --disable-privilege-dropping was given.
++if test "${enable_privilege_dropping+set}" = set; then
++ enableval="$enable_privilege_dropping"
++
++fi;
++if test "x$enable_privilege_dropping" = xyes; then
++ CUPS_DROP_PRIVILEGES=1
++ cat >>confdefs.h <<_ACEOF
++#define CUPS_DROP_PRIVILEGES 1
++_ACEOF
++
++else
++ CUPS_DROP_PRIVILEGES=0
++ cat >>confdefs.h <<_ACEOF
++#define CUPS_DROP_PRIVILEGES 0
++_ACEOF
++
++fi
++
++
+
+ # Check whether --with-printcap or --without-printcap was given.
+ if test "${with_printcap+set}" = set; then
+@@ -14584,6 +14605,7 @@
+ s,@CUPS_GROUP@,$CUPS_GROUP,;t t
+ s,@CUPS_SYSTEM_GROUPS@,$CUPS_SYSTEM_GROUPS,;t t
+ s,@CUPS_PRIMARY_SYSTEM_GROUP@,$CUPS_PRIMARY_SYSTEM_GROUP,;t t
++s,@CUPS_DROP_PRIVILEGES@,$CUPS_DROP_PRIVILEGES,;t t
+ s,@PAP@,$PAP,;t t
+ s,@PDFTOPS@,$PDFTOPS,;t t
+ s,@JAVA@,$JAVA,;t t
--- cupsys-1.2.2.orig/debian/patches/06_disable_backend_setuid.dpatch
+++ cupsys-1.2.2/debian/patches/06_disable_backend_setuid.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_disable_backend_setuid.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys~/scheduler/cups-deviced.c cupsys/scheduler/cups-deviced.c
+--- cupsys~/scheduler/cups-deviced.c 2006-03-08 13:12:12.000000000 +0100
++++ cupsys/scheduler/cups-deviced.c 2006-04-05 14:18:19.000000000 +0200
+@@ -210,23 +210,6 @@
+ continue;
+
+ /*
+- * Change effective users depending on the backend permissions...
+- */
+-
+- if (!getuid())
+- {
+- /*
+- * Backends without permissions for normal users run as root,
+- * all others run as the unprivileged user...
+- */
+-
+- if (!(dent->fileinfo.st_mode & (S_IRWXG | S_IRWXO)))
+- seteuid(0);
+- else
+- seteuid(normal_user);
+- }
+-
+- /*
+ * Run the backend with no arguments and collect the output...
+ */
+
--- cupsys-1.2.2.orig/debian/patches/60_ipp_read_busy_loop.dpatch
+++ cupsys-1.2.2/debian/patches/60_ipp_read_busy_loop.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60_ipp_read_busy_loop.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: - Don't return IPP_IDLE when we can't read the IPP header. (r6177)
+## DP: - Make sure all read timeouts result in the returning of an error. (r6230)
+## DP: - STR #2179, LP #44196
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/cups/ipp.c cupsys-1.2.2/cups/ipp.c
+--- cupsys-1.2.2~/cups/ipp.c 2006-06-02 17:15:23.000000000 +0200
++++ cupsys-1.2.2/cups/ipp.c 2007-11-20 10:05:03.000000000 +0100
+@@ -1054,7 +1054,7 @@
+ if ((n = (*cb)(src, buffer, 8)) < 8)
+ {
+ DEBUG_printf(("ippReadIO: Unable to read header (%d bytes read)!\n", n));
+- return (n == 0 ? IPP_IDLE : IPP_ERROR);
++ return (IPP_ERROR);
+ }
+
+ /*
+@@ -1098,8 +1098,11 @@
+ break;
+
+ case IPP_ATTRIBUTE :
+- while ((*cb)(src, buffer, 1) > 0)
++ for (;;)
+ {
++ if ((*cb)(src, buffer, 1) < 1)
++ return (IPP_ERROR);
++
+ DEBUG_printf(("ippReadIO: ipp->current=%p, ipp->prev=%p\n",
+ ipp->current, ipp->prev));
+
--- cupsys-1.2.2.orig/debian/patches/53_usr_share_ppd_support.dpatch
+++ cupsys-1.2.2/debian/patches/53_usr_share_ppd_support.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 53_usr_share_ppd_support.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4929~/scheduler/cups-driverd.c cupsys-1.1.99.b1.r4929/scheduler/cups-driverd.c
+--- cupsys-1.1.99.b1.r4929~/scheduler/cups-driverd.c 2005-10-25 20:23:10.000000000 +0200
++++ cupsys-1.1.99.b1.r4929/scheduler/cups-driverd.c 2006-04-07 15:43:44.000000000 +0200
+@@ -289,10 +289,7 @@
+ * Try opening the file...
+ */
+
+- if ((datadir = getenv("CUPS_DATADIR")) == NULL)
+- datadir = CUPS_DATADIR;
+-
+- snprintf(line, sizeof(line), "%s/model/%s", datadir, name);
++ snprintf(line, sizeof(line), "/usr/share/ppd/%s", datadir, name);
+ if ((fp = cupsFileOpen(line, "r")) == NULL)
+ {
+ fprintf(stderr, "ERROR: [cups-driverd] Unable to open \"%s\" - %s\n",
+@@ -443,11 +440,7 @@
+
+ SortedPPDs = NumPPDs;
+
+- if ((cups_datadir = getenv("CUPS_DATADIR")) == NULL)
+- cups_datadir = CUPS_DATADIR;
+-
+- snprintf(model, sizeof(model), "%s/model", cups_datadir);
+- load_ppds(model, "");
++ load_ppds("/usr/share/ppd", "");
+
+ /*
+ * Cull PPD files that are no longer present...
--- cupsys-1.2.2.orig/debian/patches/74_pid.dpatch
+++ cupsys-1.2.2/debian/patches/74_pid.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 74_pid.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/test/run-stp-tests.sh cupsys-1.2.4/test/run-stp-tests.sh
+--- cupsys-1.2.4~/test/run-stp-tests.sh 2006-05-05 12:33:57.000000000 -0400
++++ cupsys-1.2.4/test/run-stp-tests.sh 2008-03-26 14:09:57.000000000 -0400
+@@ -305,6 +305,7 @@
+ DocumentRoot $root/doc
+ RequestRoot /tmp/cups-$user/spool
+ TempDir /tmp/cups-$user/spool/temp
++PidFile /tmp/cups-$user/cupsd.pid
+ MaxLogSize 0
+ AccessLog /tmp/cups-$user/log/access_log
+ ErrorLog /tmp/cups-$user/log/error_log
--- cupsys-1.2.2.orig/debian/patches/07_removecvstag.dpatch
+++ cupsys-1.2.2/debian/patches/07_removecvstag.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07_removecvstag.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/conf/Makefile cups-1.2/conf/Makefile
+--- cups-1.2~/conf/Makefile 2006-04-25 12:16:07.000000000 +0200
++++ cups-1.2/conf/Makefile 2006-04-25 12:17:11.000000000 +0200
+@@ -65,6 +65,8 @@
+ chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file.N || true; \
+ else \
+ $(INSTALL_CONFIG) $$file $(SERVERROOT) ; \
++ grep -v "\$$Id:" $(SERVERROOT)/$$file > $(SERVERROOT)/$$file.n ; \
++ mv $(SERVERROOT)/$$file.n $(SERVERROOT)/$$file ; \
+ chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file || true; \
+ fi ; \
+ done
+@@ -75,6 +77,8 @@
+ $(MV) $(SERVERROOT)/$$file $(SERVERROOT)/$$file.O ; \
+ fi ; \
+ $(INSTALL_DATA) $$file $(SERVERROOT) ; \
++ grep -v "\$$Id:" $(SERVERROOT)/$$file > $(SERVERROOT)/$$file.n ; \
++ mv $(SERVERROOT)/$$file.n $(SERVERROOT)/$$file ; \
+ done
+ -if test x$(PAMDIR) != x; then \
+ $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
--- cupsys-1.2.2.orig/debian/patches/48_stdlib.dpatch
+++ cupsys-1.2.2/debian/patches/48_stdlib.dpatch
@@ -0,0 +1,130 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 48_stdlib.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/cups/attr.c cupsys-1.1.99.b1.r4748/cups/attr.c
+--- cupsys-1.1.99.b1.r4748~/cups/attr.c 2005-11-13 05:25:56.280194158 +0000
++++ cupsys-1.1.99.b1.r4748/cups/attr.c 2005-11-13 05:25:57.358029198 +0000
+@@ -34,8 +34,8 @@
+
+ #include "ppd.h"
+ #include "debug.h"
+-#include "string.h"
+ #include
++#include "string.h"
+
+
+ /*
+diff -urNad cupsys-1.1.99.b1.r4748~/cups/dir.c cupsys-1.1.99.b1.r4748/cups/dir.c
+--- cupsys-1.1.99.b1.r4748~/cups/dir.c 2005-11-13 05:25:56.284193546 +0000
++++ cupsys-1.1.99.b1.r4748/cups/dir.c 2005-11-13 05:25:57.409021394 +0000
+@@ -41,9 +41,9 @@
+ */
+
+ #include "dir.h"
++#include
+ #include "string.h"
+ #include "debug.h"
+-#include
+ #include
+
+
+diff -urNad cupsys-1.1.99.b1.r4748~/cups/getputfile.c cupsys-1.1.99.b1.r4748/cups/getputfile.c
+--- cupsys-1.1.99.b1.r4748~/cups/getputfile.c 2005-11-13 05:25:56.289192781 +0000
++++ cupsys-1.1.99.b1.r4748/cups/getputfile.c 2005-11-13 05:25:57.409021394 +0000
+@@ -38,9 +38,9 @@
+ #include "cups.h"
+ #include "ipp.h"
+ #include "language.h"
++#include
+ #include "string.h"
+ #include "debug.h"
+-#include
+ #include
+ #include
+ #include
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/gziptoany.c cupsys-1.1.99.b1.r4748/filter/gziptoany.c
+--- cupsys-1.1.99.b1.r4748~/filter/gziptoany.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/gziptoany.c 2005-11-13 05:25:57.410021241 +0000
+@@ -32,8 +32,8 @@
+ * Include necessary headers...
+ */
+
+-#include
+ #include
++#include
+ #include
+
+ #ifdef HAVE_LIBZ
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/interpret.c cupsys-1.1.99.b1.r4748/filter/interpret.c
+--- cupsys-1.1.99.b1.r4748~/filter/interpret.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/interpret.c 2005-11-13 05:25:57.410021241 +0000
+@@ -35,9 +35,9 @@
+ */
+
+ #include
++#include
+ #include
+ #include "raster.h"
+-#include
+
+
+ /*
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/rastertoepson.c cupsys-1.1.99.b1.r4748/filter/rastertoepson.c
+--- cupsys-1.1.99.b1.r4748~/filter/rastertoepson.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/rastertoepson.c 2005-11-13 05:25:57.411021088 +0000
+@@ -41,9 +41,9 @@
+
+ #include
+ #include
++#include
+ #include
+ #include "raster.h"
+-#include
+ #include
+ #include
+ #include
+diff -urNad cupsys-1.1.99.b1.r4748~/filter/rastertohp.c cupsys-1.1.99.b1.r4748/filter/rastertohp.c
+--- cupsys-1.1.99.b1.r4748~/filter/rastertohp.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/filter/rastertohp.c 2005-11-13 05:25:57.412020935 +0000
+@@ -41,9 +41,9 @@
+ */
+
+ #include
++#include
+ #include
+ #include "raster.h"
+-#include
+ #include
+ #include
+ #include
+diff -urNad cupsys-1.1.99.b1.r4748~/systemv/cupstestppd.c cupsys-1.1.99.b1.r4748/systemv/cupstestppd.c
+--- cupsys-1.1.99.b1.r4748~/systemv/cupstestppd.c 2005-11-13 05:25:56.458166920 +0000
++++ cupsys-1.1.99.b1.r4748/systemv/cupstestppd.c 2005-11-13 05:25:57.413020782 +0000
+@@ -37,9 +37,9 @@
+ */
+
+ #include
++#include
+ #include
+ #include
+-#include
+
+
+ /*
+diff -urNad cupsys-1.1.99.b1.r4748~/systemv/lpoptions.c cupsys-1.1.99.b1.r4748/systemv/lpoptions.c
+--- cupsys-1.1.99.b1.r4748~/systemv/lpoptions.c 2005-11-13 04:59:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/systemv/lpoptions.c 2005-11-13 05:25:57.413020782 +0000
+@@ -34,8 +34,8 @@
+ */
+
+ #include
+-#include
+ #include
++#include
+
+
+ /*
--- cupsys-1.2.2.orig/debian/patches/03_clean.dpatch
+++ cupsys-1.2.2/debian/patches/03_clean.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_clean.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.r5357~/Makefile cupsys-1.1.99.r5357/Makefile
+--- cupsys-1.1.99.r5357~/Makefile 2006-03-20 19:06:50.000000000 +0000
++++ cupsys-1.1.99.r5357/Makefile 2006-03-30 15:18:54.000000000 +0000
+@@ -55,6 +55,7 @@
+ echo Cleaning in $$dir... ;\
+ (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
+ done
++ $(RM) init/cups.sh init/cups-lpd
+
+
+ #
+diff -urNad cupsys-1.1.99.r5357~/doc/Makefile cupsys-1.1.99.r5357/doc/Makefile
+--- cupsys-1.1.99.r5357~/doc/Makefile 2006-03-23 20:23:19.000000000 +0000
++++ cupsys-1.1.99.r5357/doc/Makefile 2006-03-30 15:15:07.000000000 +0000
+@@ -187,6 +187,8 @@
+ #
+
+ clean:
++ $(RM) doc/es/index.html
++ $(RM) doc/ja/index.html
+
+
+ #
+diff -urNad cupsys-1.1.99.r5357~/man/Makefile cupsys-1.1.99.r5357/man/Makefile
+--- cupsys-1.1.99.r5357~/man/Makefile 2006-03-21 02:35:37.000000000 +0000
++++ cupsys-1.1.99.r5357/man/Makefile 2006-03-30 15:17:26.000000000 +0000
+@@ -88,6 +88,7 @@
+ for file in $(MAN8); do \
+ $(RM) ../doc/help/man-`basename $$file .$(MAN8EXT)`.html; \
+ done
++ $(RM) client.conf.man cups-deviced.man cups-driverd.man cups-lpd.man cupsaddsmb.man cupsd.man cupsd.conf.man lpoptions.man
+
+
+ #
+diff -urNad cupsys-1.1.99.r5357~/templates/Makefile cupsys-1.1.99.r5357/templates/Makefile
+--- cupsys-1.1.99.r5357~/templates/Makefile 2006-03-18 13:18:18.000000000 +0000
++++ cupsys-1.1.99.r5357/templates/Makefile 2006-03-30 15:18:07.000000000 +0000
+@@ -105,6 +105,7 @@
+ #
+
+ clean:
++ $(RM) ja/header.tmpl es/header.tmpl header.tmpl
+
+
+ #
--- cupsys-1.2.2.orig/debian/patches/71_CVE-2007-5849.dpatch
+++ cupsys-1.2.2/debian/patches/71_CVE-2007-5849.dpatch
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 71_CVE-2007-5849.dpatch by Kees Cook
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/backend/snmp.c cupsys-1.2.2/backend/snmp.c
+--- cupsys-1.2.2~/backend/snmp.c 2006-07-13 12:59:36.000000000 -0700
++++ cupsys-1.2.2/backend/snmp.c 2008-01-07 16:18:28.000000000 -0800
+@@ -940,10 +940,24 @@
+ char *string, /* I - String buffer */
+ int strsize) /* I - String buffer size */
+ {
+- if (length < strsize)
++ if (length < 0)
+ {
+- memcpy(string, *buffer, length);
+- string[length] = '\0';
++ /*
++ * Disallow negative lengths!
++ */
++
++ fprintf(stderr, "ERROR: Bad ASN1 string length %d!\n", length);
++ *string = '\0';
++ }
++ else if (length < strsize)
++ {
++ /*
++ * String is smaller than the buffer...
++ */
++
++ if (length > 0)
++ memcpy(string, *buffer, length);
++ string[length] = '\0';
+ }
+ else
+ {
+@@ -951,7 +965,8 @@
+ string[strsize - 1] = '\0';
+ }
+
+- (*buffer) += length;
++ if (length > 0)
++ (*buffer) += length;
+
+ return (string);
+ }
--- cupsys-1.2.2.orig/debian/patches/70_CVE-2007-6358.dpatch
+++ cupsys-1.2.2/debian/patches/70_CVE-2007-6358.dpatch
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70_CVE-2007-6358.dpatch by Kees Cook
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/debian/pdftops cupsys-1.2.2/debian/pdftops
+--- cupsys-1.2.2~/debian/pdftops 2008-01-07 16:03:13.000000000 -0800
++++ cupsys-1.2.2/debian/pdftops 2008-01-07 16:18:11.000000000 -0800
+@@ -68,6 +68,7 @@
+ # ------------------------------------------------------------------------------
+
+ use File::Copy;
++use File::Temp qw( tempfile );
+
+ #
+ # Check the arguments
+@@ -87,15 +88,21 @@
+
+ if (! defined $pdffile)
+ {
+- my $tmpfile = $ENV{TMPDIR} . "pdfin.$$.tmp";
+- open (TEMP, ">$tmpfile") || die ("ERROR: pdftops wrapper: $tmpfile: $!\n");
+- if (! copy (\*STDIN, \*TEMP))
++ my $template = "pdfinXXXXXX";
++ my $tmpdir = $ENV{TMPDIR};
++ my ($bytes, $buffer);
++ my ($tmpfh, $tmpfile) = tempfile ($template, OPEN => 1, DIR => $tmpdir, UNLINK => 0, SUFFIX => '.tmp');
++ while (($bytes = read (STDIN, $buffer, 1024)) > 0)
+ {
+- close (TEMP);
++ print $tmpfh "$buffer";
++ }
++ if ($bytes < 0)
++ {
++ close ($tmpfh);
+ unlink $tmpfile;
+ die ("ERROR: pdftops wrapper: $tmpfile: $!\n");
+ }
+- close (TEMP);
++ close ($tmpfh);
+ $pdffile = $tmpfile;
+ $delete_input = 1; # for deleting the temp file after converting
+ }
--- cupsys-1.2.2.orig/debian/patches/12_quiesce_ipp_logging.dpatch
+++ cupsys-1.2.2/debian/patches/12_quiesce_ipp_logging.dpatch
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_quiesce_ipp_logging.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys~/scheduler/ipp.c cupsys/scheduler/ipp.c
+--- cupsys~/scheduler/ipp.c 2006-04-07 17:36:10.000000000 +0200
++++ cupsys/scheduler/ipp.c 2006-04-12 16:44:34.000000000 +0200
+@@ -8057,13 +8057,13 @@
+ _cupsLangString(con->language, message), ap);
+ va_end(ap);
+
+- cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_ERROR : CUPSD_LOG_INFO,
++ cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_INFO : CUPSD_LOG_DEBUG,
+ "%s %s: %s",
+ ippOpString(con->request->request.op.operation_id),
+ ippErrorString(status), formatted);
+ }
+ else
+- cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_ERROR : CUPSD_LOG_INFO,
++ cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_INFO : CUPSD_LOG_DEBUG,
+ "%s %s",
+ ippOpString(con->request->request.op.operation_id),
+ ippErrorString(status));
+diff -urNad cupsys~/scheduler/log.c cupsys/scheduler/log.c
+--- cupsys~/scheduler/log.c 2006-02-27 21:57:07.000000000 +0100
++++ cupsys/scheduler/log.c 2006-04-12 16:43:26.000000000 +0200
+@@ -354,6 +354,12 @@
+ "STATUS"
+ };
+
++ /* Do not flood the log with CUPS-Get-Printers requests */
++ if (con->request && code == HTTP_OK && (
++ con->request->request.op.operation_id == CUPS_GET_PRINTERS ||
++ con->request->request.op.operation_id == CUPS_GET_DEFAULT ||
++ con->request->request.op.operation_id == IPP_GET_PRINTER_ATTRIBUTES))
++ return (1);
+
+ #ifdef HAVE_VSYSLOG
+ /*
--- cupsys-1.2.2.orig/debian/patches/09_runasuser.dpatch
+++ cupsys-1.2.2/debian/patches/09_runasuser.dpatch
@@ -0,0 +1,132 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 09_runasuser.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2~/config-scripts/cups-defaults.m4 cups-1.2/config-scripts/cups-defaults.m4
+--- cups-1.2~/config-scripts/cups-defaults.m4 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/config-scripts/cups-defaults.m4 2006-04-25 12:18:56.000000000 +0200
+@@ -218,6 +218,17 @@
+ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
+ AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS")
+
++dnl Privilege dropping
++AC_ARG_ENABLE(privilege-dropping, [ --enable-privilege-dropping drop root privileges to normal user, default=no])
++if test "x$enable_privilege_dropping" = xyes; then
++ CUPS_DROP_PRIVILEGES=1
++ AC_DEFINE_UNQUOTED(CUPS_DROP_PRIVILEGES, 1)
++else
++ CUPS_DROP_PRIVILEGES=0
++ AC_DEFINE_UNQUOTED(CUPS_DROP_PRIVILEGES, 0)
++fi
++AC_SUBST(CUPS_DROP_PRIVILEGES)
++
+ dnl Default printcap file...
+ AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
+ default_printcap="$withval",
+diff -urNad cups-1.2~/config.h.in cups-1.2/config.h.in
+--- cups-1.2~/config.h.in 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/config.h.in 2006-04-25 12:18:56.000000000 +0200
+@@ -41,6 +41,11 @@
+ #define CUPS_DEFAULT_GROUP "sys"
+ #define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
+
++/*
++ * Privilege dropping
++ */
++
++#define CUPS_DROP_PRIVILEGES 0
+
+ /*
+ * Default file permissions...
+diff -urNad cups-1.2~/scheduler/cert.c cups-1.2/scheduler/cert.c
+--- cups-1.2~/scheduler/cert.c 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/scheduler/cert.c 2006-04-25 12:18:56.000000000 +0200
+@@ -116,7 +116,7 @@
+ * Root certificate...
+ */
+
+- fchmod(fd, 0440);
++ fchmod(fd, 0240);
+ fchown(fd, RunUser, SystemGroupIDs[0]);
+
+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddCert: NumSystemGroups=%d",
+diff -urNad cups-1.2~/scheduler/conf.c cups-1.2/scheduler/conf.c
+--- cups-1.2~/scheduler/conf.c 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/scheduler/conf.c 2006-04-25 12:18:56.000000000 +0200
+@@ -460,7 +460,11 @@
+ if (!status)
+ return (0);
+
++#if CUPS_DROP_PRIVILEGES == 1
++ RunUser = User;
++#else
+ RunUser = getuid();
++#endif
+
+ /*
+ * Use the default system group if none was supplied in cupsd.conf...
+diff -urNad cups-1.2~/scheduler/main.c cups-1.2/scheduler/main.c
+--- cups-1.2~/scheduler/main.c 2006-04-25 12:17:52.000000000 +0200
++++ cups-1.2/scheduler/main.c 2006-04-25 12:19:17.000000000 +0200
+@@ -56,6 +56,9 @@
+ #include
+ #include
+ #include
++#if CUPS_DROP_PRIVILEGES == 1
++#include
++#endif
+
+ #ifdef HAVE_LAUNCH_H
+ # include
+@@ -515,6 +518,20 @@
+ cupsdStartSystemMonitor();
+ #endif /* __APPLE__ */
+
++#if CUPS_DROP_PRIVILEGES == 1
++ /*
++ * Drop root privileges
++ */
++ struct passwd * pwd = getpwuid(User);
++ if (!pwd) {
++ cupsdLogMessage(CUPSD_LOG_ERROR, "could not get passwd data for user id %i", User);
++ exit(EXIT_FAILURE);
++ }
++ setgid(Group);
++ initgroups(pwd->pw_name, pwd->pw_gid);
++ setuid(User);
++#endif
++
+ /*
+ * Start any pending print jobs...
+ */
+@@ -998,7 +1015,7 @@
+ */
+
+ if ((current_time - RootCertTime) >= RootCertDuration && RootCertDuration &&
+- !RunUser && cupsArrayCount(Clients))
++ cupsArrayCount(Clients))
+ {
+ /*
+ * Update the root certificate...
+diff -urNad cups-1.2-ubuntu~/scheduler/process.c cups-1.2-ubuntu/scheduler/process.c
+--- cups-1.2-ubuntu~/scheduler/process.c 2006-04-06 22:32:07.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/process.c 2006-04-24 19:16:09.000000000 +0200
+@@ -245,15 +245,6 @@
+ if (setuid(User))
+ exit(errno);
+ }
+- else
+- {
+- /*
+- * Reset group membership to just the main one we belong to.
+- */
+-
+- setgid(Group);
+- setgroups(1, &Group);
+- }
+
+ /*
+ * Change umask to restrict permissions on created files...
--- cupsys-1.2.2.orig/debian/patches/84_CVE-2010-0393.dpatch
+++ cupsys-1.2.2/debian/patches/84_CVE-2010-0393.dpatch
@@ -0,0 +1,115 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+# Description: fix privilege escalation via lppasswd tool
+# Author: Michael Sweet
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/cups/globals.c cupsys-1.2.2/cups/globals.c
+--- cupsys-1.2.2~/cups/globals.c 2006-04-06 16:03:32.000000000 -0400
++++ cupsys-1.2.2/cups/globals.c 2010-02-25 11:04:10.000000000 -0500
+@@ -48,20 +48,44 @@
+ static void
+ cups_env_init(_cups_globals_t *g) /* I - Global data */
+ {
+- if ((g->cups_datadir = getenv("CUPS_DATADIR")) == NULL)
+- g->cups_datadir = CUPS_DATADIR;
+-
+- if ((g->cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
+- g->cups_serverbin = CUPS_SERVERBIN;
++#ifdef HAVE_GETEUID
++ if ((geteuid() != getuid() && getuid()) || getegid() != getgid())
++#else
++ if (!getuid())
++#endif /* HAVE_GETEUID */
++ {
++ /*
++ * When running setuid/setgid, don't allow environment variables to override
++ * the directories...
++ */
+
+- if ((g->cups_serverroot = getenv("CUPS_SERVERROOT")) == NULL)
++ g->cups_datadir = CUPS_DATADIR;
++ g->cups_serverbin = CUPS_SERVERBIN;
+ g->cups_serverroot = CUPS_SERVERROOT;
++ g->cups_statedir = CUPS_STATEDIR;
++ g->localedir = CUPS_LOCALEDIR;
++ }
++ else
++ {
++ /*
++ * Allow directories to be overridden by environment variables.
++ */
+
+- if ((g->cups_statedir = getenv("CUPS_STATEDIR")) == NULL)
+- g->cups_statedir = CUPS_STATEDIR;
++ if ((g->cups_datadir = getenv("CUPS_DATADIR")) == NULL)
++ g->cups_datadir = CUPS_DATADIR;
+
+- if ((g->localedir = getenv("LOCALEDIR")) == NULL)
+- g->localedir = CUPS_LOCALEDIR;
++ if ((g->cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
++ g->cups_serverbin = CUPS_SERVERBIN;
++
++ if ((g->cups_serverroot = getenv("CUPS_SERVERROOT")) == NULL)
++ g->cups_serverroot = CUPS_SERVERROOT;
++
++ if ((g->cups_statedir = getenv("CUPS_STATEDIR")) == NULL)
++ g->cups_statedir = CUPS_STATEDIR;
++
++ if ((g->localedir = getenv("LOCALEDIR")) == NULL)
++ g->localedir = CUPS_LOCALEDIR;
++ }
+ }
+
+
+diff -urNad cupsys-1.2.2~/systemv/lppasswd.c cupsys-1.2.2/systemv/lppasswd.c
+--- cupsys-1.2.2~/systemv/lppasswd.c 2006-01-12 20:55:20.000000000 -0500
++++ cupsys-1.2.2/systemv/lppasswd.c 2010-02-25 11:04:10.000000000 -0500
+@@ -40,9 +40,7 @@
+ #include
+ #include
+
+-#include
+-#include
+-#include
++#include
+ #include
+
+ #ifndef WIN32
+@@ -88,7 +86,6 @@
+ groupline[17], /* Group from line */
+ md5line[33], /* MD5-sum from line */
+ md5new[33]; /* New MD5 sum */
+- const char *root; /* CUPS server root directory */
+ char passwdmd5[1024], /* passwd.md5 file */
+ passwdold[1024], /* passwd.old file */
+ passwdnew[1024]; /* passwd.tmp file */
+@@ -97,6 +94,7 @@
+ int flag; /* Password check flags... */
+ int fd; /* Password file descriptor */
+ int error; /* Write error */
++ _cups_globals_t *cg = _cupsGlobals(); /* Global data */
+ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+ struct sigaction action; /* Signal action */
+ #endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
+@@ -120,18 +118,11 @@
+
+ /*
+ * Find the server directory...
+- *
+- * We use the CUPS_SERVERROOT environment variable when we are running
+- * as root or when lppasswd is not setuid...
+ */
+
+- if ((root = getenv("CUPS_SERVERROOT")) == NULL ||
+- (getuid() != geteuid() && getuid()))
+- root = CUPS_SERVERROOT;
+-
+- snprintf(passwdmd5, sizeof(passwdmd5), "%s/passwd.md5", root);
+- snprintf(passwdold, sizeof(passwdold), "%s/passwd.old", root);
+- snprintf(passwdnew, sizeof(passwdnew), "%s/passwd.new", root);
++ snprintf(passwdmd5, sizeof(passwdmd5), "%s/passwd.md5", cg->cups_serverroot);
++ snprintf(passwdold, sizeof(passwdold), "%s/passwd.old", cg->cups_serverroot);
++ snprintf(passwdnew, sizeof(passwdnew), "%s/passwd.new", cg->cups_serverroot);
+
+ /*
+ * Find the default system group...
--- cupsys-1.2.2.orig/debian/patches/79_CVE-2008-3640.dpatch
+++ cupsys-1.2.2/debian/patches/79_CVE-2008-3640.dpatch
@@ -0,0 +1,90 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 78_CVE-2008-3640.dpatch by Jamie Strandboge
+##
+## DP: Upstream: STR #2911, STR #2966
+## DP: fix buffer overflow in HPGL filter. Also fix regression introduced in
+## DP: upstream fix for STR #2911 (CVE-2008-3641)
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/textcommon.c cupsys-1.2.2/filter/textcommon.c
+--- cupsys-1.2.2~/filter/textcommon.c 2005-08-04 13:40:13.000000000 -0500
++++ cupsys-1.2.2/filter/textcommon.c 2008-10-14 14:01:31.000000000 -0500
+@@ -4,6 +4,7 @@
+ * Common text filter routines for the Common UNIX Printing System (CUPS).
+ *
+ * Copyright 1997-2005 by Easy Software Products.
++ * Copyright 2007-2008 by Apple Inc.
+ *
+ * These coded instructions, statements, and computer programs are the
+ * property of Easy Software Products and are protected by Federal
+@@ -613,14 +614,38 @@
+ !strcasecmp(val, "yes");
+
+ if ((val = cupsGetOption("columns", num_options, options)) != NULL)
++ {
+ PageColumns = atoi(val);
+
++ if (PageColumns < 1)
++ {
++ fprintf(stderr, "ERROR: Bad columns value %d!\n", PageColumns);
++ return (1);
++ }
++ }
++
+ if ((val = cupsGetOption("cpi", num_options, options)) != NULL)
++ {
+ CharsPerInch = atof(val);
+
++ if (CharsPerInch <= 0.0)
++ {
++ fprintf(stderr, "ERROR: Bad cpi value %f!\n", CharsPerInch);
++ return (1);
++ }
++ }
++
+ if ((val = cupsGetOption("lpi", num_options, options)) != NULL)
++ {
+ LinesPerInch = atof(val);
+
++ if (LinesPerInch <= 0.0)
++ {
++ fprintf(stderr, "ERROR: Bad lpi value %f!\n", LinesPerInch);
++ return (1);
++ }
++ }
++
+ if (PrettyPrint)
+ PageTop -= 216.0f / LinesPerInch;
+
+diff -urNad cupsys-1.2.2~/filter/texttops.c cupsys-1.2.2/filter/texttops.c
+--- cupsys-1.2.2~/filter/texttops.c 2008-10-14 14:01:23.000000000 -0500
++++ cupsys-1.2.2/filter/texttops.c 2008-10-14 14:01:31.000000000 -0500
+@@ -181,6 +181,14 @@
+ SizeColumns = (PageRight - PageLeft) / 72.0 * CharsPerInch;
+ SizeLines = (PageTop - PageBottom) / 72.0 * LinesPerInch;
+
++ if (SizeColumns <= 0 || SizeColumns > 32767 ||
++ SizeLines <= 0 || SizeLines > 32767)
++ {
++ fprintf(stderr, "ERROR: Unable to print %dx%d text page!\n",
++ SizeColumns, SizeLines);
++ exit(1);
++ }
++
+ Page = calloc(sizeof(lchar_t *), SizeLines);
+ Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines);
+ for (i = 1; i < SizeLines; i ++)
+@@ -195,6 +203,13 @@
+ else
+ ColumnWidth = SizeColumns;
+
++ if (ColumnWidth <= 0)
++ {
++ fprintf(stderr, "ERROR: Unable to print %d text columns!\n",
++ PageColumns);
++ exit(1);
++ }
++
+ /*
+ * Output the DSC header...
+ */
--- cupsys-1.2.2.orig/debian/patches/47_pid.dpatch
+++ cupsys-1.2.2/debian/patches/47_pid.dpatch
@@ -0,0 +1,104 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 47_pid.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b2~/scheduler/conf.c cupsys-1.1.99.b2/scheduler/conf.c
+--- cupsys-1.1.99.b2~/scheduler/conf.c 2006-03-11 13:31:04.000000000 +0000
++++ cupsys-1.1.99.b2/scheduler/conf.c 2006-03-11 13:31:16.000000000 +0000
+@@ -170,7 +170,8 @@
+ { "StateDir", &StateDir, CUPSD_VARTYPE_STRING },
+ { "TempDir", &TempDir, CUPSD_VARTYPE_STRING },
+ { "Timeout", &Timeout, CUPSD_VARTYPE_INTEGER },
+- { "UseNetworkDefault", &UseNetworkDefault, CUPSD_VARTYPE_BOOLEAN }
++ { "UseNetworkDefault", &UseNetworkDefault, CUPSD_VARTYPE_BOOLEAN },
++ { "PidFile", &PidFile, CUPSD_VARTYPE_STRING }
+ };
+ #define NUM_VARS (sizeof(variables) / sizeof(variables[0]))
+
+@@ -287,6 +288,7 @@
+ cupsdSetString(&RemoteRoot, "remroot");
+ cupsdSetString(&ServerHeader, "CUPS/1.2");
+ cupsdSetString(&StateDir, CUPS_STATEDIR);
++ cupsdSetString(&PidFile, "/var/run/cups/cupsd.pid");
+
+ strlcpy(temp, ConfigurationFile, sizeof(temp));
+ if ((slash = strrchr(temp, '/')) != NULL)
+diff -urNad cupsys-1.1.99.b2~/scheduler/conf.h cupsys-1.1.99.b2/scheduler/conf.h
+--- cupsys-1.1.99.b2~/scheduler/conf.h 2006-03-11 13:31:04.000000000 +0000
++++ cupsys-1.1.99.b2/scheduler/conf.h 2006-03-11 13:31:16.000000000 +0000
+@@ -186,6 +186,7 @@
+ /* Server key file */
+ # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
+ #endif /* HAVE_SSL */
++VAR char *PidFile VALUE(NULL); /* Debian CUPS pid file */
+
+ #ifdef HAVE_LAUNCHD
+ VAR int LaunchdTimeout VALUE(DEFAULT_TIMEOUT);
+diff -urNad cupsys-1.1.99.b2~/scheduler/main.c cupsys-1.1.99.b2/scheduler/main.c
+--- cupsys-1.1.99.b2~/scheduler/main.c 2006-03-11 13:31:04.000000000 +0000
++++ cupsys-1.1.99.b2/scheduler/main.c 2006-03-11 13:32:41.000000000 +0000
+@@ -89,7 +89,8 @@
+ static void sigterm_handler(int sig);
+ static long select_timeout(int fds);
+ static void usage(int status);
+-
++int write_pid(void);
++int remvoe_pid(void);
+
+ /*
+ * Local globals...
+@@ -501,6 +502,11 @@
+ kill(i, SIGUSR1);
+ }
+
++ if (write_pid() == 0) {
++ cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to write pid file");
++ return (1);
++ }
++
+ /*
+ * Start power management framework...
+ */
+@@ -1095,9 +1101,39 @@
+ free(input);
+ free(output);
+
++ remove_pid();
++
+ return (!stop_scheduler);
+ }
+
++/* 'write_pid()' - Write PID file.
++ 'remove_pid()' - Delete PID file.
++*/
++int
++write_pid()
++{
++ FILE *f;
++ int fd;
++ int pid;
++ if (((fd = open(PidFile, O_RDWR|O_CREAT, 0644)) == -1)
++ || ((f = fdopen(fd, "r+")) == NULL) ) {
++ return 0;
++ }
++ pid = getpid();
++ if (!fprintf(f, "%d\n", pid)) {
++ close(fd);
++ return 0;
++ }
++ fflush(f);
++ close(fd);
++
++ return pid;
++}
++
++int remove_pid() {
++ return unlink(PidFile);
++}
++
+
+ /*
+ * 'cupsdClosePipe()' - Close a pipe as necessary.
--- cupsys-1.2.2.orig/debian/patches/73_CVE-2008-0882.dpatch
+++ cupsys-1.2.2/debian/patches/73_CVE-2008-0882.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 73_CVE-2008-0882.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/scheduler/dirsvc.c cupsys-1.2.2/scheduler/dirsvc.c
+--- cupsys-1.2.2~/scheduler/dirsvc.c 2008-03-26 14:57:34.000000000 -0400
++++ cupsys-1.2.2/scheduler/dirsvc.c 2008-03-26 14:58:30.000000000 -0400
+@@ -1923,9 +1923,9 @@
+ else
+ return;
+
+- if ((p = cupsdFindClass(name)) == NULL && BrowseShortNames)
++ if ((p = cupsdFindDest(name)) == NULL && BrowseShortNames)
+ {
+- if ((p = cupsdFindClass(resource + 9)) != NULL)
++ if ((p = cupsdFindDest(resource + 9)) != NULL)
+ {
+ if (p->hostname && strcasecmp(p->hostname, host))
+ {
+@@ -2026,9 +2026,9 @@
+ else
+ return;
+
+- if ((p = cupsdFindPrinter(name)) == NULL && BrowseShortNames)
++ if ((p = cupsdFindDest(name)) == NULL && BrowseShortNames)
+ {
+- if ((p = cupsdFindPrinter(resource + 10)) != NULL)
++ if ((p = cupsdFindDest(resource + 10)) != NULL)
+ {
+ if (p->hostname && strcasecmp(p->hostname, host))
+ {
--- cupsys-1.2.2.orig/debian/patches/54_cups-config_modeldir.dpatch
+++ cupsys-1.2.2/debian/patches/54_cups-config_modeldir.dpatch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 54_cups-config_modeldir.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4929~/cups-config.in cupsys-1.1.99.b1.r4929/cups-config.in
+--- cupsys-1.1.99.b1.r4929~/cups-config.in 2005-10-19 15:48:06.000000000 +0200
++++ cupsys-1.1.99.b1.r4929/cups-config.in 2006-04-07 16:04:46.000000000 +0200
+@@ -61,6 +61,7 @@
+ echo " cups-config [--image] [--static] --libs"
+ echo " cups-config --serverbin"
+ echo " cups-config --serverroot"
++ echo " cups-config --modeldir"
+ echo " cups-config --version"
+
+ exit $1
+@@ -118,6 +119,8 @@
+ --static)
+ static=yes
+ ;;
++ --modeldir
++ echo /usr/share/ppd
+ --version)
+ echo $VERSION
+ ;;
--- cupsys-1.2.2.orig/debian/patches/05_avoidunknowngroup.dpatch
+++ cupsys-1.2.2/debian/patches/05_avoidunknowngroup.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05avoidunknowngroup.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.1~/systemv/Makefile cupsys-1.2.1/systemv/Makefile
+--- cupsys-1.2.1~/systemv/Makefile 2006-07-06 16:48:57.000000000 +0000
++++ cupsys-1.2.1/systemv/Makefile 2006-07-06 16:50:44.000000000 +0000
+@@ -78,7 +78,7 @@
+ $(INSTALL_BIN) lp $(BINDIR)
+ $(INSTALL_BIN) lpoptions $(BINDIR)
+ $(INSTALL_BIN) lpstat $(BINDIR)
+- $(INSTALL_BIN) -m 4755 -o root lppasswd $(BINDIR) || $(INSTALL_BIN) lppasswd $(BINDIR)
++ $(INSTALL_BIN) -m 4755 -o lp -g root lppasswd $(BINDIR) || $(INSTALL_BIN) lppasswd $(BINDIR)
+
+
+ #
--- cupsys-1.2.2.orig/debian/patches/76_CVE-2008-1373.dpatch
+++ cupsys-1.2.2/debian/patches/76_CVE-2008-1373.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 76_CVE-2008-1373.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.4~/filter/image-gif.c cupsys-1.2.4/filter/image-gif.c
+--- cupsys-1.2.4~/filter/image-gif.c 2006-05-11 07:41:36.000000000 -0400
++++ cupsys-1.2.4/filter/image-gif.c 2008-03-26 14:12:49.000000000 -0400
+@@ -47,6 +47,8 @@
+ #define GIF_INTERLACE 0x40
+ #define GIF_COLORMAP 0x80
+
++#define MAX_LWZ_BITS 12
++
+ typedef cups_ib_t gif_cmap_t[256][4];
+ typedef short gif_table_t[4096];
+
+@@ -471,6 +473,9 @@
+ pass = 0;
+ code_size = getc(fp);
+
++ if (code_size > MAX_LWZ_BITS)
++ return (-1);
++
+ if (gif_read_lzw(fp, 1, code_size) < 0)
+ return (-1);
+
--- cupsys-1.2.2.orig/debian/patches/59_title_escaping.dpatch
+++ cupsys-1.2.2/debian/patches/59_title_escaping.dpatch
@@ -0,0 +1,167 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 59_title_escaping.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/common.c cupsys-1.2.2/filter/common.c
+--- cupsys-1.2.2~/filter/common.c 2005-02-18 03:18:11.000000000 +0100
++++ cupsys-1.2.2/filter/common.c 2007-08-10 12:47:07.000000000 +0200
+@@ -467,5 +467,76 @@
+
+
+ /*
++ * 'WriteTextComment()' - Write a DSC text comment.
++ */
++
++void
++WriteTextComment(const char *name, /* I - Comment name ("Title", etc.) */
++ const char *value) /* I - Comment value */
++{
++ int len; /* Current line length */
++
++
++ /*
++ * DSC comments are of the form:
++ *
++ * %%name: value
++ *
++ * The name and value must be limited to 7-bit ASCII for most printers,
++ * so we escape all non-ASCII and ASCII control characters as described
++ * in the Adobe Document Structuring Conventions specification.
++ */
++
++ printf("%%%%%s: (", name);
++ len = 5 + strlen(name);
++
++ while (*value)
++ {
++ if (*value < ' ' || *value >= 127)
++ {
++ /*
++ * Escape this character value...
++ */
++
++ if (len >= 251) /* Keep line < 254 chars */
++ break;
++
++ printf("\\%03o", *value & 255);
++ len += 4;
++ }
++ else if (*value == '\\')
++ {
++ /*
++ * Escape the backslash...
++ */
++
++ if (len >= 253) /* Keep line < 254 chars */
++ break;
++
++ putchar('\\');
++ putchar('\\');
++ len += 2;
++ }
++ else
++ {
++ /*
++ * Put this character literally...
++ */
++
++ if (len >= 254) /* Keep line < 254 chars */
++ break;
++
++ putchar(*value);
++ len ++;
++ }
++
++ value ++;
++ }
++
++ puts(")");
++}
++
++
++/*
+ * End of "$Id: common.c 4494 2005-02-18 02:18:11Z mike $".
+ */
+diff -urNad cupsys-1.2.2~/filter/common.h cupsys-1.2.2/filter/common.h
+--- cupsys-1.2.2~/filter/common.h 2005-02-18 03:09:53.000000000 +0100
++++ cupsys-1.2.2/filter/common.h 2007-08-10 12:47:07.000000000 +0200
+@@ -76,6 +76,7 @@
+ extern void WriteLabelProlog(const char *label, float bottom,
+ float top, float width);
+ extern void WriteLabels(int orient);
++extern void WriteTextComment(const char *name, const char *value);
+
+
+ /*
+diff -urNad cupsys-1.2.2~/filter/hpgl-prolog.c cupsys-1.2.2/filter/hpgl-prolog.c
+--- cupsys-1.2.2~/filter/hpgl-prolog.c 2005-09-21 11:28:39.000000000 +0200
++++ cupsys-1.2.2/filter/hpgl-prolog.c 2007-08-10 12:47:07.000000000 +0200
+@@ -70,8 +70,8 @@
+ puts("%%Creator: hpgltops/" CUPS_SVERSION);
+ strftime(line, sizeof(line), "%c", curtm);
+ printf("%%%%CreationDate: %s\n", line);
+- printf("%%%%Title: %s\n", title);
+- printf("%%%%For: %s\n", user);
++ WriteTextComment("Title", title);
++ WriteTextComment("For", user);
+ printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
+ puts("%%EndComments");
+ puts("%%BeginProlog");
+diff -urNad cupsys-1.2.2~/filter/imagetops.c cupsys-1.2.2/filter/imagetops.c
+--- cupsys-1.2.2~/filter/imagetops.c 2006-04-07 15:48:37.000000000 +0200
++++ cupsys-1.2.2/filter/imagetops.c 2007-08-10 12:47:07.000000000 +0200
+@@ -609,8 +609,8 @@
+ puts("%%Creator: imagetops/" CUPS_SVERSION);
+ strftime(curdate, sizeof(curdate), "%c", curtm);
+ printf("%%%%CreationDate: %s\n", curdate);
+- printf("%%%%Title: %s\n", argv[3]);
+- printf("%%%%For: %s\n", argv[2]);
++ WriteTextComment("Title", argv[3]);
++ WriteTextComment("For", argv[2]);
+ if (Orientation & 1)
+ puts("%%Orientation: Landscape");
+ else
+diff -urNad cupsys-1.2.2~/filter/pstops.c cupsys-1.2.2/filter/pstops.c
+--- cupsys-1.2.2~/filter/pstops.c 2006-06-02 01:43:21.000000000 +0200
++++ cupsys-1.2.2/filter/pstops.c 2007-08-10 12:47:07.000000000 +0200
+@@ -666,10 +666,10 @@
+ fputs("ERROR: No %%Pages: comment in header!\n", stderr);
+
+ if (!saw_for)
+- printf("%%%%For: %s\n", doc->user);
++ WriteTextComment("For", doc->user);
+
+ if (!saw_title)
+- printf("%%%%Title: %s\n", doc->title);
++ WriteTextComment("Title", doc->title);
+
+ if (doc->copies != 1 && (!doc->collate || !doc->slow_collate))
+ {
+@@ -946,8 +946,8 @@
+ else
+ puts("%%Pages: 1");
+
+- printf("%%%%For: %s\n", doc->user);
+- printf("%%%%Title: %s\n", doc->title);
++ WriteTextComment("For", doc->user);
++ WriteTextComment("Title", doc->title);
+
+ if (doc->copies != 1 && (!doc->collate || !doc->slow_collate))
+ {
+diff -urNad cupsys-1.2.2~/filter/texttops.c cupsys-1.2.2/filter/texttops.c
+--- cupsys-1.2.2~/filter/texttops.c 2005-09-21 11:28:39.000000000 +0200
++++ cupsys-1.2.2/filter/texttops.c 2007-08-10 12:47:07.000000000 +0200
+@@ -208,8 +208,8 @@
+ printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
+ puts("%%Creator: texttops/" CUPS_SVERSION);
+ printf("%%%%CreationDate: %s\n", curdate);
+- printf("%%%%Title: %s\n", title);
+- printf("%%%%For: %s\n", user);
++ WriteTextComment("Title", title);
++ WriteTextComment("For", user);
+ puts("%%Pages: (atend)");
+
+ /*
--- cupsys-1.2.2.orig/debian/patches/19_cupsaccept.dpatch
+++ cupsys-1.2.2/debian/patches/19_cupsaccept.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 19_cupsaccept.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/systemv/accept.c cupsys-1.1.99.b1.r4748/systemv/accept.c
+--- cupsys-1.1.99.b1.r4748~/systemv/accept.c 2005-02-18 02:18:11.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/systemv/accept.c 2005-10-05 12:14:39.401595086 +0000
+@@ -67,6 +67,9 @@
+ else
+ command = argv[0];
+
++ if (strncmp(command, "cups", 4) == 0)
++ command += 4;
++
+ cancel = 0;
+
+ if (strcmp(command, "accept") == 0)
--- cupsys-1.2.2.orig/debian/patches/80_CVE-2008-3641.dpatch
+++ cupsys-1.2.2/debian/patches/80_CVE-2008-3641.dpatch
@@ -0,0 +1,140 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 79_CVE-2008-3641.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/hpgl-attr.c cupsys-1.2.2/filter/hpgl-attr.c
+--- cupsys-1.2.2~/filter/hpgl-attr.c 2005-02-17 20:18:11.000000000 -0600
++++ cupsys-1.2.2/filter/hpgl-attr.c 2008-10-15 12:27:11.000000000 -0500
+@@ -205,13 +205,23 @@
+
+ if (num_params == 0)
+ PenCount = 8;
+- else if (num_params == 1 && params[0].value.number <= 1024)
+- PenCount = (int)params[0].value.number;
++ else if (num_params == 1)
++ {
++ if (params[0].value.number < 1 || params[0].value.number > MAX_PENS)
++ {
++ fprintf(stderr,
++ "DEBUG: HP-GL/2 \'NP\' command with invalid number of "
++ "pens (%d)!\n", (int)params[0].value.number);
++ PenCount = 8;
++ }
++ else
++ PenCount = (int)params[0].value.number;
++ }
+ else
+ fprintf(stderr, "WARNING: HP-GL/2 \'NP\' command with invalid number of parameters (%d)!\n",
+ num_params);
+
+- for (i = 0; i <= PenCount; i ++)
++ for (i = 0; i < PenCount; i ++)
+ Pens[i].width = PenWidth;
+
+ PC_pen_color(0, NULL);
+@@ -242,7 +252,7 @@
+
+ if (num_params == 0)
+ {
+- for (i = 0; i <= PenCount; i ++)
++ for (i = 0; i < PenCount; i ++)
+ if (i < 8)
+ {
+ Pens[i].rgb[0] = standard_colors[i][0];
+@@ -263,7 +273,14 @@
+ }
+ else if (num_params == 1 || num_params == 4)
+ {
+- i = (int)params[0].value.number;
++ i = (int)params[0].value.number - 1;
++
++ if (i < 0 || i >= PenCount)
++ {
++ fprintf(stderr,
++ "DEBUG: HP-GL/2 \'PC\' command with invalid pen (%d)!\n", i + 1);
++ return;
++ }
+
+ if (num_params == 1)
+ {
+@@ -336,7 +353,15 @@
+
+ if (num_params == 2)
+ {
+- pen = (int)params[1].value.number;
++ pen = (int)params[1].value.number - 1;
++
++ if (pen < 0 || pen >= PenCount)
++ {
++ fprintf(stderr,
++ "DEBUG: HP-GL/2 \'PW\' command with invalid pen (%d)!\n",
++ pen + 1);
++ return;
++ }
+
+ Pens[pen].width = w;
+
+@@ -351,7 +376,7 @@
+ * Set width for all pens...
+ */
+
+- for (pen = 0; pen <= PenCount; pen ++)
++ for (pen = 0; pen < PenCount; pen ++)
+ Pens[pen].width = w;
+
+ if (PageDirty)
+@@ -404,12 +429,15 @@
+ param_t *params) /* I - Parameters */
+ {
+ if (num_params == 0)
+- PenNumber = 1;
+- else if (params[0].value.number <= PenCount)
+- PenNumber = (int)params[0].value.number;
++ PenNumber = 0;
++ else if (num_params > 1)
++ fprintf(stderr, "WARNING: HP-GL/2 \'SP\' command with invalid number of parameters "
++ "(%d)!\n", num_params);
++ else if (params[0].value.number <= 0 || params[0].value.number >= PenCount)
++ fprintf(stderr, "WARNING: HP-GL/2 \'SP\' command with invalid pen (%d)!\n",
++ (int)params[0].value.number);
+ else
+- fprintf(stderr, "WARNING: HP-GL/2 \'SP\' command with invalid number or value of parameters (%d, %d)!\n",
+- num_params, (int)params[0].value.number);
++ PenNumber = (int)params[0].value.number;
+
+ if (PageDirty)
+ printf("%.3f %.3f %.3f %.2f SP\n", Pens[PenNumber].rgb[0],
+diff -urNad cupsys-1.2.2~/filter/hpgltops.h cupsys-1.2.2/filter/hpgltops.h
+--- cupsys-1.2.2~/filter/hpgltops.h 2005-02-17 20:18:11.000000000 -0600
++++ cupsys-1.2.2/filter/hpgltops.h 2008-10-15 12:19:26.000000000 -0500
+@@ -35,6 +35,14 @@
+ # define M_PI 3.14159265358979323846
+ #endif /* M_PI */
+
++
++/*
++ * Maximum number of pens we emulate...
++ */
++
++#define MAX_PENS 1024
++
++
+ /*
+ * Parameter value structure...
+ */
+@@ -117,10 +125,10 @@
+ /* Current pen position */
+ PenScaling VALUE(1.0f), /* Pen width scaling factor */
+ PenWidth VALUE(1.0f); /* Default pen width */
+-VAR pen_t Pens[1024]; /* State of each pen */
++VAR pen_t Pens[MAX_PENS]; /* State of each pen */
+ VAR int PenMotion VALUE(0), /* 0 = absolute, 1 = relative */
+ PenValid VALUE(0), /* 1 = valid position, 0 = undefined */
+- PenNumber VALUE(1), /* Current pen number */
++ PenNumber VALUE(0), /* Current pen number */
+ PenCount VALUE(8), /* Number of pens */
+ PenDown VALUE(0), /* 0 = pen up, 1 = pen down */
+ PolygonMode VALUE(0), /* Drawing polygons? */
--- cupsys-1.2.2.orig/debian/patches/08_cupsd.conf.conf.d.dpatch
+++ cupsys-1.2.2/debian/patches/08_cupsd.conf.conf.d.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08_cupsd.conf.conf.d.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cups-1.2-ubuntu~/conf/cupsd.conf.in cups-1.2-ubuntu/conf/cupsd.conf.in
+--- cups-1.2-ubuntu~/conf/cupsd.conf.in 2006-04-24 19:25:39.000000000 +0200
++++ cups-1.2-ubuntu/conf/cupsd.conf.in 2006-04-25 10:50:24.000000000 +0200
+@@ -14,13 +14,18 @@
+ SystemGroup @CUPS_SYSTEM_GROUPS@
+
+ # Only listen for connections from the local machine.
+-Listen localhost:@DEFAULT_IPP_PORT@
+-@CUPS_LISTEN_DOMAINSOCKET@
++# These settings are configured in /etc/cups/cups.d/ports.conf so that
++# changing them does not require to change this file.
++# Listen localhost:@DEFAULT_IPP_PORT@
++# @CUPS_LISTEN_DOMAINSOCKET@
+
+ # Show shared printers on the local network.
+-Browsing On
++# The 'Browsing' setting is configured in /etc/cups/cups.d/browse.conf
++# so that changing it does not require to change this file.
++# Browsing Off
+ BrowseOrder allow,deny
+ BrowseAllow @LOCAL
++BrowseAddress @LOCAL
+
+ # Default authentication type, when authentication is required...
+ DefaultAuthType Basic
+@@ -71,6 +76,10 @@
+
+
+
++# Include files in /etc/cups/conf.d
++Include /etc/cups/cups.d/ports.conf
++Include /etc/cups/cups.d/browse.conf
++
+ #
+ # End of "$Id: cupsd.conf.in 5114 2006-02-16 12:28:29Z mike $".
+ #
--- cupsys-1.2.2.orig/debian/patches/77_CVE-2008-1722.dpatch
+++ cupsys-1.2.2/debian/patches/77_CVE-2008-1722.dpatch
@@ -0,0 +1,80 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 77_CVE-2008-1722.dpatch by Jamie Strandboge
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+## DP:
+## DP: Revised by Marc Deslauriers as per
+## DP: upstream bug http://www.cups.org/str.php?L2974
+
+@DPATCH@
+diff -urNad cupsys-1.2.2~/filter/image-png.c cupsys-1.2.2/filter/image-png.c
+--- cupsys-1.2.2~/filter/image-png.c 2006-05-11 07:41:36.000000000 -0400
++++ cupsys-1.2.2/filter/image-png.c 2008-04-24 13:02:22.000000000 -0400
+@@ -3,6 +3,7 @@
+ *
+ * PNG image routines for the Common UNIX Printing System (CUPS).
+ *
++ * Copyright 2007-2008 by Apple Inc.
+ * Copyright 1993-2006 by Easy Software Products.
+ *
+ * These coded instructions, statements, and computer programs are the
+@@ -179,16 +180,56 @@
+ * Interlaced images must be loaded all at once...
+ */
+
++ size_t bufsize; /* Size of buffer */
++
++
+ if (color_type == PNG_COLOR_TYPE_GRAY ||
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+- in = malloc(img->xsize * img->ysize);
++ {
++ bufsize = img->xsize * img->ysize;
++
++ if ((bufsize / img->xsize) != img->ysize)
++ {
++ fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
++ (unsigned)width, (unsigned)height);
++ fclose(fp);
++ return (1);
++ }
++ }
+ else
+- in = malloc(img->xsize * img->ysize * 3);
++ {
++ bufsize = img->xsize * img->ysize * 3;
++
++ if ((bufsize / (img->xsize * 3)) != img->ysize)
++ {
++ fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
++ (unsigned)width, (unsigned)height);
++ fclose(fp);
++ return (1);
++ }
++ }
++
++ in = malloc(bufsize);
+ }
+
+ bpp = cupsImageGetDepth(img);
+ out = malloc(img->xsize * bpp);
+
++ if (!in || !out)
++ {
++ fputs("DEBUG: Unable to allocate memory for PNG image!\n", stderr);
++
++ if (in)
++ free(in);
++
++ if (out)
++ free(out);
++
++ fclose(fp);
++
++ return (1);
++ }
++
+ /*
+ * Read the image, interlacing as needed...
+ */
--- cupsys-1.2.2.orig/debian/patches/ubuntu-nowebadmin.dpatch
+++ cupsys-1.2.2/debian/patches/ubuntu-nowebadmin.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ubuntu-nowebadmin.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4892~/doc/index.html.in cupsys-1.1.99.b1.r4892/doc/index.html.in
+--- cupsys-1.1.99.b1.r4892~/doc/index.html.in 2005-12-10 22:20:14.000000000 +0100
++++ cupsys-1.1.99.b1.r4892/doc/index.html.in 2006-01-13 15:23:18.000000000 +0100
+@@ -73,8 +73,10 @@
+
+
+
+-If you are asked for a username and password, enter your login
+-username and password or the "root" username and password.
++Administrative commands are disabled in the web interface for security
++reasons. Please use the GNOME CUPS manager (System > Administration >
++Printing). /usr/share/doc/cupsys/README.Debian.gz
++describes the details and how to reenable it again.
+
+ About CUPS
+
--- cupsys-1.2.2.orig/debian/patches/13_default_log_warn.dpatch
+++ cupsys-1.2.2/debian/patches/13_default_log_warn.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_default_log_warn.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys~/conf/cupsd.conf.in cupsys/conf/cupsd.conf.in
+--- cupsys~/conf/cupsd.conf.in 2006-04-12 16:32:11.000000000 +0200
++++ cupsys/conf/cupsd.conf.in 2006-04-12 17:04:58.000000000 +0200
+@@ -8,7 +8,7 @@
+
+ # Log general information in error_log - change "info" to "debug" for
+ # troubleshooting...
+-LogLevel info
++LogLevel warning
+
+ # Administrator user group...
+ SystemGroup @CUPS_SYSTEM_GROUPS@
--- cupsys-1.2.2.orig/debian/patches/56_dirsvc.dpatch
+++ cupsys-1.2.2/debian/patches/56_dirsvc.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 56_dirsvc.dpatch by Kenshi Muto
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad cupsys-1.2.1~/scheduler/dirsvc.c cupsys-1.2.1/scheduler/dirsvc.c
+--- cupsys-1.2.1~/scheduler/dirsvc.c 2006-06-11 11:41:06.000000000 +0000
++++ cupsys-1.2.1/scheduler/dirsvc.c 2006-06-11 11:50:51.000000000 +0000
+@@ -2521,7 +2521,7 @@
+
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
+ iface->hostname, iface->port,
+- (p->type & CUPS_PRINTER_CLASS) ? "/classes/%s%s" :
++ (p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
+ "/printers/%s",
+ p->name);
+ snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
--- cupsys-1.2.2.orig/debian/docs
+++ cupsys-1.2.2/debian/docs
@@ -0,0 +1,8 @@
+CGI.txt
+CHANGES.txt
+CREDITS.txt
+ENCRYPTION.txt
+INSTALL.txt
+INSTALL_fr.txt
+LICENSE.txt
+README.txt
--- cupsys-1.2.2.orig/debian/README.Debian
+++ cupsys-1.2.2/debian/README.Debian
@@ -0,0 +1,262 @@
+cupsys for Debian
+----------------------
+
+If you found a problem, please read HOWTO_BUGREPORT.txt and report me
+via Debian Bug Tracking System.
+--
+Kenshi Muto
+kmuto@debian.org
+
+---------
+This package contains the Common UNIX Printing System(tm), or CUPS(tm)
+for short. CUPS is a new printing system for Unix that acts as a
+substitute for System V or BSD printing systems; it supports a more
+comprehensive driver model, more protocols, and Web administration,
+among other things. Internally, CUPS uses the new Internet Printing
+Protocol (IPP) described in RFCs 2565 through 2569.
+
+The terms "CUPS" and "Common UNIX Printing System" are trademarks of
+Easy Software Products, the author of the system. This package is a
+derivative of the CUPS system, modified for Debian and possibly
+containing modifications and fixes that are not present in the
+standard CUPS package. For a comprehensive list of changes from the
+original source, see the diff file from the source package. For more
+information about the legal stuff surrounding this package, see the
+Debian copyright file or the CUPS Web site (www.cups.org).
+
+After installation, CUPS is pretty close to being ready to go. The
+last step is to add administrative access; the "lpadmin" group has
+been created and granted administrative rights to CUPS. You may need
+to add users to this group in order to add printers, modify settings,
+etc. By default, the root user has been granted this permission, but
+you should only use the root user on the local system.
+
+The printers can be added with either the lpadmin program or the web
+interface, which is located at http://localhost:631/admin by default.
+
+Backend Configuration
+---------------------
+
+CUPS supports serial, parallel, USB, SCSI, IPP, HTTP, Socket and Samba
+for its backend. But unfortunately, some backends cause a trouble.
+For example, serial backend confuses and won't stop when non printer
+device connects serial port. Parallel backend is more terrible for PPC,
+it may cause kernel crash (kernel bug, sigh).
+So, CUPS setting puts serial and SCSI off from backend by default. And
+if you use PPC, parallel backend is off also.
+
+If you want to use these backends, you can configure by using
+'dpkg-reconfigure cupsys'.
+
+SSL Support
+-----------
+
+CUPS supports SSL via the OpenSSL toolkit, but licensing conflicts
+between OpenSSL's license and the GPL make this combination difficult
+to use, even though the CUPS license itself allows this. A competing
+library, GNU TLS, has an OpenSSL compatibility layer that could work
+with these packages, but the compatibility library is licensed under
+the GNU GPL, which could conflict with the license of certain programs
+that support CUPS. Therefore, the cupsys packages as shipped do not
+support SSL.
+
+It is possible to build the packages yourself with SSL support. You
+can either use the OpenSSL libraries or GNU TLS's OpenSSL
+compatibility library. Just set an environment variable:
+"CUPS_OPENSSL" for OpenSSL support, or "CUPS_GNUTLS" for GNU TLS
+support, and make sure you have the proper development packages
+installed (libssl-dev for OpenSSL or libgnutls7-dev for GNU TLS).
+
+PLEASE NOTE: If you build packages with SSL support and distribute
+them, you are responsible for making sure you do not violate the
+licenses of any of the software you distribute.
+
+Important Security Notes
+------------------------
+
+ - By default, cupsys is configured to only allow connections to
+ printers from localhost, effectively disabling network printing.
+ The previous default was to allow anyone to connect to printers
+ from any location. You can change these defaults by editing
+ /etc/cups/cupsd.conf; the access controls are at the end of the
+ file. Be sure you only allow access from the locations you trust,
+ or require authentication.
+
+ - CUPS used to support a file backend that was handled internally by
+ cupsd. This was only intended to be used for testing filters, and
+ not in production use, as it can be a security risk and will drop
+ jobs under certain circumstances. In keeping with that, the file
+ "backend" has been renamed to "test", and the lpadmin command no
+ longer rewrites bare path URIs (either to "file:" or "test:"). If
+ you need a backend that dumps a completed job to a file on the
+ filesystem, you should write a separate backend and put it in
+ /usr/lib/cups/backend. See the CUPS documentation for information
+ on how to do this.
+
+ - To relieve the burden of local authentication somewhat, CUPS uses
+ special tokens called "certs" that are passed between client and
+ server. In normal CUPS installations, these are stored in
+ /etc/cups/certs. However, this location violates Debian policy, as
+ the certs are generated and not available to edit. Thus, the real
+ certs are now stored in /var/spool/cups/certs, with a symlink at
+ /etc/cups/certs for compatibility.
+
+Drivers
+-------
+
+The CUPS software includes generic drivers for several brands of
+printers. At the moment, this includes HP LaserJets and DeskJets,
+various Epson and Okidata printers, and Dymo label printers.
+
+There are also other packages containing CUPS printer drivers. If any
+of those were written explicitly for your printer, chances are that it
+will support your printer better than the generic drivers that ship
+with CUPS. I try to keep the package Suggestions current regarding
+popular CUPS driver packages; to see this list, run this command:
+
+ apt-cache show cupsys | grep Suggests
+
+PostScript printers often ship with PPD files supplied by the printer
+manufacturer. Any valid PPD for a PostScript printer is a valid CUPS
+driver. To enable them for use with CUPS, copy the PPDs into
+/usr/share/cups/model; they should then be available for use with
+lpadmin -m and the Web interface for adding printers.
+
+If you find a CUPS driver that isn't packaged for Debian and you'd
+like it to be, you can contact me and let me know where the driver is,
+and I'll get to it as soon as I can.
+
+Or, you can package them yourself. See below for details.
+
+Packaging
+---------
+
+There are five packages provided by CUPS: the server, the primary
+command-line client programs, the BSD client and server compatibility
+programs, and the library and development packages.
+
+The CUPS BSD commands and cups-lpd daemon are separated into their own
+package (cupsys-bsd); the hope is to make it possible to run CUPS and
+some other BSD-style printing system (such as lpr) side-by-side for
+testing purposes. If you encounter any trouble doing this, file a
+bug. It's known that CUPS conflicts with LPRng, since LPRng provides
+some System V printing commands as well; this problem will (hopefully)
+be dealt with in time.
+
+Add-ons for CUPS (such as drivers, backends, clients, etc.) should
+depend on the proper packages. If your package is CUPS-specific, you
+should name it so it can be easily identified as a CUPS package, with
+names such as:
+
+ cupsys-driver-foo (for a driver for Foo printers)
+ cupsys-backend-bar (for a backend to print to Bar printers)
+ cupsys-client-baz (for a client module to hook Baz into CUPS)
+
+If you feel your driver/backend/client/whatever package is popular
+enough that most CUPS users would be interested in it, please file a
+wishlist bug against cupsys requesting that it be added to the
+Suggests line for cupsys.
+
+Other Add-Ons
+-------------
+
+I'm also collecting add-ons - filters, backends, etc. - and putting
+them in the "examples" directory with the rest of the cupsys package
+documentation files. Check there for some interesting filters and
+backends.
+
+To install a filter from the filters directory, copy the filter itself
+into /usr/lib/cups/filter and the associated .types and .convs files
+into /etc/cups. Then restart cupsd, and you should be ready to use
+it.
+
+If you have a filter or backend you'd like to contribute, but don't
+think it's big enough to warrant its own package, file a wishlist bug
+and attach your script. If it's a filter, send along a .convs and
+.types file as well.
+
+Integration with Samba
+----------------------
+
+It is possible to configure Samba to share CUPS printers to Microsoft
+clients. There are two ways to do this:
+
+1. Recent versions of Samba have direct CUPS support, including
+Debian's. With this present, you can configure Samba as follows:
+
+[global]
+ printing = cups
+ printcap name = cups
+
+2. If, for some reason, you don't want to use Samba's native CUPS
+support, you can configure Samba to use System V printing. This can
+be done by adding the following information to Samba's smb.conf
+(/etc/samba/smb.conf on Debian):
+
+[global]
+ printing = sysv
+ printcap name = lpstat
+
+[printers]
+ lpq command = /usr/bin/lpstat %p
+ lprm command = /usr/bin/cancel %p-%j
+ print command = /usr/bin/lp -d%p -oraw %s ; /bin/rm -f %s
+
+This method will require installation of the cupsys-client package.
+
+For more tips on integration with Samba, check out the man page for
+cupsaddsmb, which is part of the cupsys-client package.
+
+Miscellaneous Tips
+------------------
+
+ - CUPS has support for browsing, which uses broadcast traffic to
+ auto-discover other CUPS servers and printers and make them
+ available to clients. In the default configuration, cupsd will
+ accept browse packets in the CUPS format from other CUPS servers,
+ but will not send any. If sending browse packets is turned on, it
+ may trigger demand dialers and increase traffic on the network. To
+ help prevent this, set the BrowseAddress parameter to only
+ advertise CUPS printers on specific interfaces. As a potentially
+ more robust option, CUPS also supports SLP (Service Location
+ Protocol).
+
+ - You may encounter some problems using the "enable" command under
+ bash, as "enable" is a builtin there. As a workaround, I've
+ created the "cupsenable" command, which acts exactly as "enable"
+ does. There are also "cupsdisable", "cupsaccept", and "cupsreject"
+ commands for consistency.
+
+ - There is an online database with PPDs for lots of different
+ printers at http://www.linuxprinting.org/. These will often
+ require the "cupsomatic" utility; this can be found in the
+ foomatic-bin package. Another case, some PPDs require the
+ "foomatic-rip" utility; this can be found in the
+ foomatic-filters package (this package will be installed when you
+ install foomatic-filters-ppds package).
+
+ - Default location of pid file is /var/run/cups/cupsd.pid.
+ If you'd like to change this, you can modify by using
+ "PidFile " directive at your /etc/cups/cupsd.conf.
+
+ - Administration over the web interface is disabled by default since it
+ requires the CUPS daemon to be able to read /etc/shadow. If you want to
+ enable web administration with shadow passwords (authentication type
+ 'basic'), put the user cupsys into group shadow by
+
+ adduser cupsys shadow
+
+ as root.
+
+ Only users who are in group 'lpadmin' can administrate printers (using
+ gnome-cups-manager, lpadmin or any other frontend but the web
+ interface). To allow printer administration to user joe, put him into
+ this group by executing
+
+ adduser joe lpadmin
+
+ (again as root).
+
+Enjoy!
+
+ -- Jeff Licquia and Kenshi Muto
--- cupsys-1.2.2.orig/debian/libcupsys2-dev.files
+++ cupsys-1.2.2/debian/libcupsys2-dev.files
@@ -0,0 +1,15 @@
+usr/bin/cups-config
+usr/lib/libcups.so
+usr/include/cups/array.h
+usr/include/cups/cups.h
+usr/include/cups/dir.h
+usr/include/cups/file.h
+usr/include/cups/http.h
+usr/include/cups/ipp.h
+usr/include/cups/language.h
+usr/include/cups/md5.h
+usr/include/cups/ppd.h
+usr/include/cups/transcode.h
+usr/include/cups/adminutil.h
+usr/include/cups/i18n.h
+usr/share/man/man1/cups-config.1.gz
--- cupsys-1.2.2.orig/debian/rules
+++ cupsys-1.2.2/debian/rules
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+
+unpatch: deapply-dpatches
+
+DEB_CONFIGURE_EXTRA_FLAGS := --with-optim=$(DEB_OPTFLAGS) --libdir=/usr/lib --mandir=/usr/share/man --with-docdir=/usr/share/cups/doc-root --enable-slp --enable-libpaper --enable-ssl --enable-gnutls --disable-openssl --enable-threads --enable-static --disable-pdftops --disable-launchd --with-cups-user=cupsys --with-cups-group=lp --with-system-groups=lpadmin --enable-privilege-dropping
+DEB_MAKE_INSTALL_TARGET := install BUILDROOT=$(DEB_DESTDIR)
+#DESTDIR=$(DEB_DESTDIR) BINDIR=$(DEB_DESTDIR)/usr/bin SBINDIR=$(DEB_DESTDIR)/usr/sbin INCLUDEDIR=$(DEB_DESTDIR)/usr/include LIBDIR=$(DEB_DESTDIR)/usr/lib SERVERBIN=$(DEB_DESTDIR)/usr/lib/cups SERVERROOT=$(DEB_DESTDIR)/etc/cups BUILDROOT=$(DEB_DESTDIR)
+DEB_DH_INSTALLINIT_ARGS := -u'defaults 19'
+
+clean::
+ -rm core
+ -$(MAKE) clean
+ -rm man/*.gz man/*.z man/*.1 man/*.5 man/*.8 man/*.o man/mantohtml
+ -rm -f doc/help/man-*.html doc/help/standard.html doc/index.html
+ -rm -f conf/pam.std packaging/cups.list templates/edit-config.tmpl
+ -rm cups/libcups.so
+ -rm cups/libcups.a
+ -rm filter/libcupsimage.so
+ -rm filter/libcupsimage.a
+ -rm pdftops/libxpdf.a
+ -rm scheduler/testdirsvc scheduler/testdirsvc.o
+ -rm cups/testfile cups/testfile.o cups/http-addrlist.o
+ -rm backend/http
+ -rm systemv/disable systemv/enable systemv/reject
+ -rm cups-config cups.list conf/cupsd.conf conf/pam.conf
+ -rm config.log config.h config.cache config.status Makedefs cups.sh
+ -rmdir --ignore-fail-on-non-empty debian/patched
+ -rm -f doc/es/index.html doc/ja/index.html man/client.conf.man man/cups-deviced.man man/cups-driverd.man man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man man/cupsd.conf.man man/lpoptions.man templates/ja/header.tmpl templates/es/header.tmpl templates/header.tmpl init/cups.sh init/cups-lpd
+ -rm backend/*.o
+
+common-install-prehook-impl::
+ (cd fonts && $(MAKE) install BUILDROOT=$(DEB_DESTDIR))
+$(patsubst %,install/%,$(DEB_ALL_PACKAGES)) :: install/%:
+ dh_movefiles -p$(cdbs_curpkg)
+binary-post-install/cupsys::
+ mv debian/cupsys/usr/lib/cups/backend/* debian/cupsys/usr/lib/cups/backend-available
+ install -o root -g root -m 644 doc/favicon.ico debian/cupsys/usr/share/cups/doc-root
+ (cd $(DEB_DESTDIR) && mv var/spool var/log $(DEB_DESTDIR)/../cupsys/var)
+ (cd $(DEB_DESTDIR) && mv etc/cups/interfaces etc/cups/ppd $(DEB_DESTDIR)/../cupsys/etc/cups)
+ (cd $(DEB_DESTDIR)/../cupsys/usr/share/doc/cupsys && ln -sf ../../cups/doc-root online-docs)
+ #(cd $(DEB_DESTDIR)/../cupsys/usr/share/man && mv man1/backend.1 man1/cups-backend.1 && mv man1/filter.1 man1/cups-filter.1)
+ (install -m 755 -o root -g root $(DEB_DESTDIR)/../pdftops $(DEB_DESTDIR)/../cupsys/usr/lib/cups/filter/)
+ install -o root -g root -m 644 debian/cupsys.default debian/cupsys/etc/default/cupsys
+ install -m 755 debian/local/browsing_status debian/local/enable_browsing debian/local/sharing_status debian/local/enable_sharing $(DEB_DESTDIR)/../cupsys/usr/share/cups
+
+ # Install PPDs into /usr/share/ppd/cups-included/, see
+ # http://wiki.debian.org/PpdFileStructureSpecification
+ for i in $(DEB_DESTDIR)/../cupsys/usr/share/cups/model/*.ppd; do \
+ m=$$(sed -n -e '/^\*Manufacturer:/s/.*"\([^"]*\)".*/\1/p' $$i); \
+ mkdir -p "$(DEB_DESTDIR)/../cupsys/usr/share/ppd/cups-included/$$m"; \
+ mv $$i "$(DEB_DESTDIR)/../cupsys/usr/share/ppd/cups-included/$$m/"; \
+ done
+
+ # Compatibility for programs which still look in the old location
+ ln -s ../../ppd/cups-included $(DEB_DESTDIR)/../cupsys/usr/share/cups/model/cups-included
+ ln -s ../../ppd/custom $(DEB_DESTDIR)/../cupsys/usr/share/cups/model/custom
+
+binary-post-install/libcupsimage2-dev::
+ rm -r debian/libcupsimage2-dev/usr/share/doc/libcupsimage2-dev
+ ln -s libcupsimage2 debian/libcupsimage2-dev/usr/share/doc/libcupsimage2-dev
+binary-post-install/libcupsys2-gnutls10::
+ rm -r debian/libcupsys2-gnutls10/usr/share/doc/libcupsys2-gnutls10
+ ln -s libcupsys2 debian/libcupsys2-gnutls10/usr/share/doc/libcupsys2-gnutls10
+binary-post-install/cupsys-bsd::
+ rm -r debian/cupsys-bsd/usr/share/doc/cupsys-bsd
+ ln -s libcupsys2 debian/cupsys-bsd/usr/share/doc/cupsys-bsd
+binary-post-install/libcupsys2-dev::
+ rm -r debian/libcupsys2-dev/usr/share/doc/libcupsys2-dev
+ ln -s libcupsys2 debian/libcupsys2-dev/usr/share/doc/libcupsys2-dev
+binary-post-install/cupsys-client::
+ rm -r debian/cupsys-client/usr/share/doc/cupsys-client
+ ln -s libcupsys2 debian/cupsys-client/usr/share/doc/cupsys-client
--- cupsys-1.2.2.orig/debian/cupsys.prerm
+++ cupsys-1.2.2/debian/cupsys.prerm
@@ -0,0 +1,42 @@
+#! /bin/sh
+# prerm script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `upgrade'
+# * `failed-upgrade'
+# * `remove' `in-favour'
+# * `deconfigure' `in-favour'
+# `removing'
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ -L /usr/lib/cups/backend/smb ]; then
+ rm -f /usr/lib/cups/backend/smb 2>/dev/null || true
+fi
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb)
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/libcupsys2-dev.preinst
+++ cupsys-1.2.2/debian/libcupsys2-dev.preinst
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for libcupsys2-dev
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if [ ! -L /usr/share/doc/libcupsys2-dev ]; then
+ rm -rf /usr/share/doc/libcupsys2-dev
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys-client.files
+++ cupsys-1.2.2/debian/cupsys-client.files
@@ -0,0 +1,31 @@
+usr/bin/cancel
+usr/bin/cupstestppd
+usr/bin/cupstestdsc
+usr/bin/lp
+usr/bin/lpoptions
+usr/bin/lppasswd
+usr/bin/lpstat
+usr/sbin/cupsaddsmb
+usr/sbin/accept
+usr/sbin/lpadmin
+usr/sbin/lpinfo
+usr/sbin/lpmove
+usr/sbin/reject
+usr/sbin/cupsdisable
+usr/sbin/cupsenable
+usr/share/man/man1/cupstestppd.1.gz
+usr/share/man/man1/cupstestdsc.1.gz
+usr/share/man/man1/lp.1.gz
+usr/share/man/man1/lpoptions.1.gz
+usr/share/man/man1/lppasswd.1.gz
+usr/share/man/man1/lpstat.1.gz
+usr/share/man/man1/cancel.1.gz
+usr/share/man/man5/client.conf.5.gz
+usr/share/man/man8/cupsaddsmb.8.gz
+usr/share/man/man8/cupsenable.8.gz
+usr/share/man/man8/lpadmin.8.gz
+usr/share/man/man8/lpinfo.8.gz
+usr/share/man/man8/lpmove.8.gz
+usr/share/man/man8/reject.8.gz
+usr/share/man/man8/cupsdisable.8.gz
+usr/share/man/man8/accept.8.gz
--- cupsys-1.2.2.orig/debian/cupsys.postinst
+++ cupsys-1.2.2/debian/cupsys.postinst
@@ -0,0 +1,226 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+# Debconf
+. /usr/share/debconf/confmodule
+
+# Default Configuration file
+if [ -e /etc/default/cupsys ]; then
+ . /etc/default/cupsys
+fi
+
+case "$1" in
+ configure)
+ [ -f /etc/cups/printers.conf.save ] && mv /etc/cups/printers.conf.save /etc/cups/printers.conf
+ [ -f /etc/cups/classes.conf.save ] && mv /etc/cups/classes.conf.save /etc/cups/classes.conf
+
+ # Set up lpadmin group.
+ if [ -z "`getent group lpadmin`" ]; then
+ addgroup --system lpadmin
+ fi
+ if [ -n "`getent group lpadmin | awk -F: '{ print $4 }' | awk -F, '{ for (i=1; i <= NF; i++ ) print $i }' |grep '^root$'`" ]; then
+ # Bug#214746
+ echo "Deleting root from lpadmin group. If you use NIS/LDAP, change this manually."
+ deluser root lpadmin || true
+ fi
+
+ # Set up cupsys user.
+ if [ -z "`getent passwd cupsys`" ]; then
+ adduser --quiet --system --no-create-home --ingroup lpadmin cupsys
+ fi
+
+ # necessary for access to local parallel and usb printers
+ adduser --quiet cupsys lp
+ # necessary for access to local serial printers
+ adduser --quiet cupsys dialout
+ # necessary for web authentication
+ # disabled by default since lpadmin membership is sufficient
+ # adduser --quiet cupsys shadow
+ # necessary for access to printer/scanner combo devices
+ if [ -z "`getent group scanner`" ]; then
+ addgroup --system scanner
+ fi
+ adduser --quiet cupsys scanner
+
+ if [ -d /etc/cups/certs ]; then
+ rm -rf /etc/cups/certs
+ fi
+ if [ -d /var/spool/cups/certs ]; then
+ mv /var/spool/cups/certs/* /var/run/cups/certs || true
+ rm -rf /var/spool/cups/certs
+ fi
+
+ [ -f /etc/cups/ppds.dat ] && mv /etc/cups/ppds.dat /var/cache/cups/ppd
+
+ # Set up smb backend by symlinking to smbspool.
+ if [ -x /usr/bin/smbspool -a ! -e /usr/lib/cups/backend/smb ]; then
+ ln -sf /usr/bin/smbspool /usr/lib/cups/backend/smb
+ fi
+
+ # Generate raw MIME handling files if they don't already exist.
+ if [ ! -e /etc/cups/raw.types ]; then
+ cat >/etc/cups/raw.types </etc/cups/raw.convs < /etc/cups/raw.convs
+ else
+ sed 's/^application/#application/' \
+ < /etc/cups/raw.convs-convert > /etc/cups/raw.convs
+ fi
+ rm -f /etc/cups/raw.convs-convert
+ db_fset cupsys/raw-print changed false
+ fi
+ # Set up backends
+ (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb)
+ db_get cupsys/backend && SELECTED=$RET
+ list=`echo $SELECTED | sed -e 's/, /,/g'`
+ save_IFS=$IFS
+ IFS=,
+ for module in $list; do
+ ln -s ../backend-available/$module /usr/lib/cups/backend/$module
+ if [ "$module" = "ipp" ]; then
+ ln -s ipp /usr/lib/cups/backend/http
+ fi
+ done
+
+ # Create password file for Digest authentication
+ # (removed: Debian CUPS uses PAM and basic authentication)
+ #db_get cupsys/adminpassword
+ #VAL=$(echo -n "root:CUPS:$RET" | md5sum | cut -d' ' -f1)
+ #if [ -f /etc/cups/passwd.md5 ]; then
+ # if [ "$(grep "^root:" /etc/cups/passwd.md5)" ]; then
+ # sed -e "s/^root:lpadmin:.*/root:lpadmin:$VAL/" /etc/cups/passwd.md5 > /etc/cups/passwd.md5.$$
+ # mv /etc/cups/passwd.md5.$$ /etc/cups/passwd.md5
+ # else
+ # echo "root:lpadmin:$VAL" >> /etc/cups/passwd.md5
+ # fi
+ #else
+ # echo "root:lpadmin:$VAL" > /etc/cups/passwd.md5
+ # chown root:nogroup /etc/cups/passwd.md5
+ # chmod 600 /etc/cups/passwd.md5
+ #fi
+
+ # Create /etc/cups/cups.d/ports.conf and /etc/cups/cups.d/browse.conf
+ db_get cupsys/ports
+ VAL=$(echo "$RET" | perl -e '$ret = ""; while () { chomp;
+ @values = split(/\s+/);
+ foreach(@values) {
+ if (/^\d+$/ && $_ >= 0 && $_ < 65536) {
+ # PORT
+ $ret .= "Port $_\\n";
+ } elsif (/^\d+\.\d+\.\d+\.\d+$/ || /^\d+\.\d+\.\d+\.\d+:\d+$/) {
+ # IP
+ $ret .= "Listen $_\\n";
+ } elsif (/^[a-zA-Z0-9-_.*]+$/ || /^[a-zA-Z0-9-_.*]+:\d+$/) {
+ my($tmp) = $_;
+ if (/^[a-zA-Z0-9-_.*]+:(\d+)$/) {
+ if ($1 < 0 || $1 > 65535) {
+ # ERROR
+ $ret = "";
+ last;
+ }
+ }
+ # HOSTNAME
+ $ret .= "Listen $_\\n";
+ } elsif (/^\//) {
+ # domain socket
+ $ret .= "Listen $_\\n";
+ } else {
+ # ERROR
+ $ret = "";
+ last;
+ }
+ }
+ print $ret;
+ }')
+
+ if [ -z "$VAL" ]; then
+ echo "Error: debconf has an invalid value. Run 'dpkg-reconfigure cupsys' again."
+ return 1
+ else
+ /bin/echo -e -n "$VAL" > /etc/cups/cups.d/ports.conf
+ fi
+
+ db_get cupsys/browse
+ if [ "$RET" = "true" ]; then
+ /bin/echo "Browsing on" > /etc/cups/cups.d/browse.conf
+ else
+ /bin/echo "Browsing off" > /etc/cups/cups.d/browse.conf
+ fi
+
+ # fix browse.conf Include directive for upgrades
+ if dpkg --compare-versions "$2" le-nl "1.1.23-10ubuntu4" &&
+ test -e /etc/cups/cupsd.conf &&
+ grep -q '^Include cupsd-browsing.conf\>' /etc/cups/cupsd.conf; then
+ sed -i 's_^Include cupsd-browsing.conf_Include /etc/cups/cups.d/browse.conf_' /etc/cups/cupsd.conf
+ fi
+
+ # fix permissions for upgrades which might have written cache files as
+ # root
+ if [ -d /var/cache/cups ]; then
+ chown -R cupsys:lp /var/cache/cups || true
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+db_stop
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys.default
+++ cupsys-1.2.2/debian/cupsys.default
@@ -0,0 +1 @@
+# Cups configure options
--- cupsys-1.2.2.orig/debian/cupsys-bsd.prerm
+++ cupsys-1.2.2/debian/cupsys-bsd.prerm
@@ -0,0 +1,45 @@
+#! /bin/sh
+# prerm script for cupsys-bsd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `upgrade'
+# * `failed-upgrade'
+# * `remove' `in-favour'
+# * `deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+
+if [ -L /etc/printcap ]; then
+ rm -f /etc/printcap
+fi
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ # Remove documentation links
+ rm -rf /usr/share/doc/cupsys-bsd
+
+ # Disable inetd entry
+ update-inetd --pattern cups-lpd --disable printer
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys.init.d
+++ cupsys-1.2.2/debian/cupsys.init.d
@@ -0,0 +1,81 @@
+#! /bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/cupsd
+NAME=cupsd
+PIDFILE=/var/run/cups/$NAME.pid
+DESC="Common Unix Printing System"
+
+unset TMPDIR
+
+test -f $DAEMON || exit 0
+
+set -e
+
+. /lib/lsb/init-functions
+
+# Get the timezone set.
+if [ -z "$TZ" -a -e /etc/timezone ]; then
+ TZ=`cat /etc/timezone`
+ export TZ
+fi
+
+case "$1" in
+ start)
+ log_begin_msg "Starting $DESC: $NAME"
+ chown root:lpadmin /usr/share/ppd/custom 2>/dev/null || true
+ chmod 3775 /usr/share/ppd/custom 2>/dev/null || true
+ mkdir -p `dirname "$PIDFILE"`
+ chown cupsys:lp `dirname "$PIDFILE"`
+
+ # create the logs file since cupsd can't
+ for l in access_log page_log error_log; do
+ if [ ! -e /var/log/cups/$l ]; then
+ touch /var/log/cups/$l
+ chmod 640 /var/log/cups/$l
+ chown cupsys:lpadmin /var/log/cups/$l
+ fi
+ done
+
+ # load modules for parallel printer support which are not covered by
+ # udev
+ modprobe lp 2>/dev/null || true
+ modprobe ppdev 2>/dev/null || true # for ISO-1284 device name detection
+
+ start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON
+ log_end_msg $?
+ ;;
+ stop)
+ log_begin_msg "Stopping $DESC: $NAME"
+ start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME
+ log_end_msg $?
+ ;;
+ restart|force-reload)
+ log_begin_msg "Restarting $DESC: $NAME"
+ if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME; then
+ start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON
+ fi
+ log_end_msg $?
+ ;;
+ status)
+ echo -n "Status of $DESC: "
+ if [ ! -r "$PIDFILE" ]; then
+ echo "$NAME is not running."
+ exit 3
+ fi
+ if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
+ echo "$NAME is running."
+ exit 0
+ else
+ echo "$NAME is not running but $PIDFILE exists."
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/${0##*/}
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- cupsys-1.2.2.orig/debian/cupsys.postrm
+++ cupsys-1.2.2/debian/cupsys.postrm
@@ -0,0 +1,45 @@
+#! /bin/sh
+# postrm script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `remove'
+# * `purge'
+# * `upgrade'
+# * `failed-upgrade'
+# * `abort-install'
+# * `abort-install'
+# * `abort-upgrade'
+# * `disappear' overwrit>r>
+# for details, see /usr/doc/packaging-manual/
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+case "$1" in
+ purge)
+ rm -rf /var/lib/cups
+ rm -rf /var/log/cups
+ rm -rf /var/spool/cups
+ rm -rf /etc/cups/interfaces
+ rm -rf /etc/cups/ppd
+ rm -rf /etc/cups/passwd.md5
+ rm -f /etc/cups/cups.d/*
+ rm -f /etc/cups/printers.conf* /etc/cups/classes.conf.* \
+ /var/lib/cups/ppds.dat /etc/cups/raw.convs /etc/cups/raw.types
+ rmdir /etc/cups 2>/dev/null || true
+ deluser --system --quiet cupsys
+ ;;
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+
+esac
--- cupsys-1.2.2.orig/debian/libcupsimage2.postinst
+++ cupsys-1.2.2/debian/libcupsimage2.postinst
@@ -0,0 +1,46 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ ldconfig
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/local/enable_browsing
+++ cupsys-1.2.2/debian/local/enable_browsing
@@ -0,0 +1,60 @@
+#!/bin/sh -e
+
+# Author: Martin Pitt
+# (C) 2005 Canonical Ltd.
+#
+# Configure CUPS IPP network browsing; this is only possible if
+# cups.d/browse.conf is included by cupsd.conf and "Browsing" is present in
+# browse.conf (i. e. browsing_status returns 0 or 1). If the setting
+# changed, CUPS will be restarted.
+#
+# Argument:
+# 0: disable browsing
+# 1: enabled browsing
+# Return 0 on success, or 1 on failure (prints error to stderr)
+
+CONF=/etc/cups/cups.d/browse.conf
+STATUS_SCRIPT=/usr/share/cups/browsing_status
+
+[ -x $STATUS_SCRIPT ] || {
+ echo "Error: cannot execute $STATUS_SCRIPT" >&2
+ exit 1
+}
+
+set +e
+$STATUS_SCRIPT
+STATUS=$?
+set -e
+
+case "$1" in
+ 0)
+ NEWVAL=Off
+ ;;
+ 1)
+ NEWVAL=On
+ ;;
+ *)
+ echo "Invalid argument (must be 0 or 1)" >&2
+ exit 1
+ ;;
+esac
+
+[ $STATUS = 0 -o $STATUS = 1 ] || {
+ echo "Error: cannot modify custom configuration" >&2
+ exit 1
+}
+
+# nothing to do?
+[ $1 != $STATUS ] || exit 0
+
+sed -ri "s/^([[:space:]]*Browsing[[:space:]]+)(No|Off|Yes|On)([[:space:]]*(#.*)?)\$/\\1$NEWVAL\\3/i" $CONF
+
+# restart CUPS
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/cupsys" ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d cupsys restart || exit 0
+ else
+ /etc/init.d/cupsys restart || exit 0
+ fi
+fi
--- cupsys-1.2.2.orig/debian/local/browsing_status
+++ cupsys-1.2.2/debian/local/browsing_status
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+
+# Author: Martin Pitt
+# (C) 2005 Canonical Ltd.
+#
+# Get the status of IPP network browsing through exit code:
+#
+# 0: browsing is disabled (default configuration)
+# 1: browsing is enabled for LAN
+# 2: the configuration was adapted manually; in this case enable_browsing cannot
+# be used
+
+MAINCONF=/etc/cups/cupsd.conf
+BROWSECONF=/etc/cups/cups.d/browse.conf
+
+[ -f $MAINCONF -a -f $BROWSECONF ] || exit 2
+
+# if BROWSECONF is not included -> custom
+egrep -qi "^[[:space:]]*Include[[:space:]]+($BROWSECONF|$(basename $BROWSECONF))[[:space:]]*(#.*)?\$" $MAINCONF || exit 2
+
+if egrep -qi '^[[:space:]]*Browsing[[:space:]]+(No|Off)[[:space:]]*(#.*)?$' $BROWSECONF; then
+ exit 0
+fi
+if egrep -qi '^[[:space:]]*Browsing[[:space:]]+(Yes|On)[[:space:]]*(#.*)?$' $BROWSECONF; then
+ exit 1
+fi
+exit 2
--- cupsys-1.2.2.orig/debian/local/enable_sharing
+++ cupsys-1.2.2/debian/local/enable_sharing
@@ -0,0 +1,66 @@
+#!/bin/sh -e
+
+# Author: Martin Pitt
+# (C) 2005 Canonical Ltd.
+#
+# Configure CUPS IPP LAN printer sharing; this is only possible if
+# cups.d/ports.conf is included by cupsd.conf and "Listen" is present in
+# ports.conf (i. e. sharing_status returns 0 or 1). If the setting
+# changed, CUPS will be restarted.
+#
+# Argument:
+# 0: disable sharing
+# 1: enabled sharing
+# Return 0 on success, or 1 on failure (prints error to stderr)
+
+STATUS_SCRIPT=/usr/share/cups/sharing_status
+PORTSCONF=/etc/cups/cups.d/ports.conf
+
+[ -x $STATUS_SCRIPT ] || {
+ echo "Error: cannot execute $STATUS_SCRIPT" >&2
+ exit 1
+}
+
+set +e
+$STATUS_SCRIPT
+STATUS=$?
+set -e
+
+case "$1" in
+ 0)
+ NEWVAL=Off
+ ;;
+ 1)
+ NEWVAL=On
+ ;;
+ *)
+ echo "Invalid argument (must be 0 or 1)" >&2
+ exit 1
+ ;;
+esac
+
+[ $STATUS = 0 -o $STATUS = 1 ] || {
+ echo "Error: cannot modify custom configuration" >&2
+ exit 1
+}
+
+# nothing to do?
+[ $1 != $STATUS ] || exit 0
+
+
+if [ $1 = 0 ]; then
+ sed -ri "s/^[[:space:]]*(Port|Listen)[[:space:]]+631\\>/Listen localhost:631/i" $PORTSCONF
+else
+ sed -ri "s/^[[:space:]]*Listen[[:space:]]+localhost:631\\>/Listen 631/i" $PORTSCONF
+fi
+
+
+# restart CUPS
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/cupsys" ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d cupsys restart || exit 0
+ else
+ /etc/init.d/cupsys restart || exit 0
+ fi
+fi
--- cupsys-1.2.2.orig/debian/local/sharing_status
+++ cupsys-1.2.2/debian/local/sharing_status
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+
+# Author: Martin Pitt
+# (C) 2005 Canonical Ltd.
+#
+# Get the status of IPP network browsing through exit code:
+#
+# 0: sharing is disabled (default configuration)
+# 1: sharing is enabled for LAN
+# 2: the configuration was adapted manually; in this case enable_sharing cannot
+# be used
+
+MAINCONF=/etc/cups/cupsd.conf
+PORTSCONF=/etc/cups/cups.d/ports.conf
+
+[ -f $MAINCONF -a -f $PORTSCONF ] || exit 2
+
+# if PORTSCONF is not included -> custom
+egrep -qi "^[[:space:]]*Include[[:space:]]+($PORTSCONF|$(basename $PORTSCONF))[[:space:]]*(#.*)?\$" $MAINCONF || exit 2
+
+if egrep -qi '^[[:space:]]*(Port|Listen)[[:space:]]+(631)[[:space:]]*(#.*)?$' $PORTSCONF; then
+ exit 1
+fi
+if egrep -qi '^[[:space:]]*Listen[[:space:]]+(localhost:631)[[:space:]]*(#.*)?$' $PORTSCONF; then
+ exit 0
+fi
+exit 2
--- cupsys-1.2.2.orig/debian/libcupsimage2.preinst
+++ cupsys-1.2.2/debian/libcupsimage2.preinst
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for libcupsimage2
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if [ ! -L /usr/share/doc/libcupsimage2 ]; then
+ rm -rf /usr/share/doc/libcupsimage2
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys-client.postinst
+++ cupsys-1.2.2/debian/cupsys-client.postinst
@@ -0,0 +1,64 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure)
+ if [ -z "`getent group lpadmin`" ]; then
+ addgroup --system lpadmin
+ fi
+
+ # Set up cupsys user.
+ if [ -z "`getent passwd cupsys`" ]; then
+ adduser --system --no-create-home --ingroup lpadmin --disabled-password cupsys
+ fi
+ # necessary for access to local parallel and usb printers
+ adduser --quiet cupsys lp
+ # necessary for access to local serial printers
+ adduser --quiet cupsys dialout
+ # necessary for web authentication
+ # disabled by default since lpadmin membership is sufficient
+ # adduser --quiet cupsys shadow
+ chown cupsys:lpadmin /usr/bin/lppasswd
+
+ chmod u+s /usr/bin/lppasswd
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys-bsd.postinst
+++ cupsys-1.2.2/debian/cupsys-bsd.postinst
@@ -0,0 +1,80 @@
+#! /bin/sh
+# postinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `configure'
+# * `abort-upgrade'
+# * `abort-remove' `in-favour'
+#
+# * `abort-deconfigure' `in-favour'
+# `removing'
+#
+# for details, see /usr/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+# Debconf
+. /usr/share/debconf/confmodule
+
+case "$1" in
+ configure)
+
+ # Set documentation symlinks
+ if [ -d /usr/share/doc/cupsys ]; then
+ if [ ! -e /usr/share/doc/cupsys-bsd ]; then
+ ln -sf cupsys /usr/share/doc/cupsys-bsd
+ fi
+ fi
+
+ # Add cups-lpd to inetd.conf
+ db_get cupsys-bsd/setuplpd
+ if [ "$RET" = "true" ]; then
+ update-inetd --add 'printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd'
+ fi
+
+ # Manage printcap file and associated symlinks
+ if [ -e /etc/cups/cupsd.conf ]; then
+ if [ -e /etc/printcap.cups ]; then
+ rm -f /etc/printcap.cups
+ fi
+ if [ -L /etc/printcap -a ! -e /etc/printcap ]; then
+ rm -f /etc/printcap
+ fi
+
+ printcap_file=`egrep '^Printcap ' /etc/cups/cupsd.conf | awk '{print $2}'`
+ if [ "$printcap_file" != "" ]; then
+ touch $printcap_file 2>/dev/null || true
+ if [ ! -e /etc/printcap -a -e $printcap_file ]; then
+ ln -s $printcap_file /etc/printcap
+ fi
+ fi
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys.templates
+++ cupsys-1.2.2/debian/cupsys.templates
@@ -0,0 +1,66 @@
+Template: cupsys/raw-print
+Type: boolean
+Default: true
+_Description: Do you want CUPS to print unknown jobs as raw jobs?
+ All print jobs in IPP get a MIME type. Since not all sources of print
+ jobs can attach an appropriate type, many jobs get submitted as the MIME
+ type application/octet-stream. Because of this, when CUPS receives a job
+ with that MIME type, it attempts to guess what the format is. By default,
+ if it cannot guess the proper type, it rejects the job.
+ .
+ It is possible to cause CUPS to treat all unrecognized jobs with this MIME
+ type as "raw" jobs, which causes them to be sent directly to the printer
+ without processing.
+ .
+ If you will be accepting print jobs from Windows computers, you probably
+ want this option set, as Windows gives all IPP print jobs processed by a
+ local driver the MIME type application/octet-stream. Samba also submits
+ its print jobs this way.
+
+Template: cupsys/backend
+Type: multiselect
+__Choices: ipp, lpd, parallel, scsi, serial, socket, usb
+Default: ipp, lpd, parallel, socket, usb
+_Description: Printer communication backends:
+ CUPS uses backend programs for communication with printer device or port.
+ .
+ Unfortunately, some backend programs cause some trouble.
+ (For example, some PPC kernel crashes with the parallel backend)
+ .
+ Please choose the backend program to be used by CUPS. The default choice
+ should fit the most common environments.
+
+Template: cupsys/ports
+Type: string
+Default: localhost:631 /var/run/cups/cups.sock
+_Description: Port or/and host name where CUPS will listen to:
+ Please specify the port or the host name CUPS daemon will listen to.
+ The following formats are allowed:
+ .
+ - Port number (631);
+ - Host name (debian.example.com);
+ - Host:Port (debian.example.com:631);
+ - File domain socket (/var/run/cups/cups.sock).
+ .
+ You can combine any of these by delimiting in a space-separated list.
+ .
+ The default port 631 is reserved for the Internet Printing Protocol (IPP).
+ "localhost:631" is recommended to setup a standalone environment for security
+ reasons.
+
+Template: cupsys/browse
+Type: boolean
+Default: false
+_Description: Broadcast and/or listen for CUPS printer information on the network?
+ CUPS daemon can broadcast printer information for clients on the network,
+ and detect printers on the network automatically.
+ .
+ If you choose this option, the CUPS daemon will periodically send UDP
+ broadcasts to detect printers.
+
+Template: cupsys/portserror
+Type: note
+_Description: Incorrect value entered
+ an error occurred while parsing the port number or the host name.
+ .
+ Please correct your input.
--- cupsys-1.2.2.orig/debian/cupsys-bsd.preinst
+++ cupsys-1.2.2/debian/cupsys-bsd.preinst
@@ -0,0 +1,40 @@
+#! /bin/sh
+# preinst script for cupsys-bsd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if [ ! -L /usr/share/doc/cupsys-bsd ]; then
+ rm -rf /usr/share/doc/cupsys-bsd
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/cupsys.config
+++ cupsys-1.2.2/debian/cupsys.config
@@ -0,0 +1,143 @@
+#!/bin/sh
+
+set -e
+
+CONF=/etc/cups/cupsd.conf
+PORTS=/etc/cups/cups.d/ports.conf
+BROWSE=/etc/cups/cups.d/browse.conf
+
+# Move cupsd-browsing.conf to new location and name
+if [ -f /etc/cups/cupsd-browsing.conf -a ! -e /etc/cups/cups.d/browse.conf ]; then
+ echo "Moving /etc/cups/cupsd-browsing.conf to new location /etc/cups/cups.d/browse.conf..." >&2
+ mkdir -p /etc/cups/cups.d
+ mv /etc/cups/cupsd-browsing.conf /etc/cups/cups.d/browse.conf
+fi
+
+# Debconf library
+. /usr/share/debconf/confmodule
+
+is_ports () {
+ # syntax: parse_ports string (0: success 1: error)
+ VAL=$(echo "$1" | LC_ALL=C perl -e '$ret = ""; while () { chomp;
+ @values = split(/\s+/);
+ foreach(@values) {
+ if (/^\d+$/ && $_ >= 0 && $_ < 65536) {
+ # PORT
+ $ret .= "Port $_\\n";
+ } elsif (/^\d+\.\d+\.\d+\.\d+$/ || /^\d+\.\d+\.\d+\.\d+:\d+$/) {
+ # IP
+ $ret .= "Listen $_\\n";
+ } elsif (/^[a-zA-Z0-9-_.*]+$/ || /^[a-zA-Z0-9-_.*]+:\d+$/) {
+ my($tmp) = $_;
+ if (/^[a-zA-Z0-9-_.*]+:(\d+)$/) {
+ if ($1 < 0 || $1 > 65535) {
+ # ERROR
+ $ret = "";
+ last;
+ }
+ }
+ # HOSTNAME
+ $ret .= "Listen $_\\n";
+ } elsif (/^\//) {
+ # domain socket
+ $ret .= "Listen $_\\n";
+ } else {
+ # ERROR
+ $ret = "";
+ last;
+ }
+ }
+ print $ret;
+ }')
+
+ if [ -z "$VAL" ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+db_get cupsys/raw-print
+OLD_RET=$RET
+
+db_input low cupsys/raw-print || true
+db_go
+
+db_get cupsys/raw-print
+if [ "$OLD_RET" != "$RET" ]; then
+ db_fset cupsys/raw-print changed true
+fi
+
+# remove parallel from PPC default
+ARCH=`dpkg --print-architecture`
+if [ "$ARCH" = "ppc" -o "$ARCH" = "ppc-none" ]; then
+ db_fget cupsys/backend seen
+ if [ "$RET" = "false" ]; then
+ db_set cupsys/backend "ipp, lpd, socket, usb"
+ fi
+fi
+
+db_input low cupsys/backend || true
+db_go
+
+RET=
+if [ -f "$CONF" ]; then
+ if [ "$(grep -h "Include[[:space:]]\+$PORTS" $CONF)" -a -f "$PORTS" ]; then
+ RET=$(grep -h -e "^\(Port\|Listen\)[[:space:]]\+" $CONF $PORTS | sort | uniq | sed -e "s/Port[[:space:]]\+//" -e "s/Listen[[:space:]]\+//" | tr "\n" " ")
+ else
+ RET=$(grep -h -e "^\(Port\|Listen\)[[:space:]]\+" $CONF | sort | uniq | sed -e "s/Port[[:space:]]\+//" -e "s/Listen[[:space:]]\+//" | tr "\n" " ")
+ fi
+ if [ "$RET" ]; then
+ db_set cupsys/ports $RET
+ fi
+ db_input low cupsys/ports || true
+ db_go
+ db_get cupsys/ports
+ STATE=0
+ while ! is_ports "$RET"; do
+ db_input critical cupsys/portserror || true
+ db_go
+ db_fset cupsys/ports seen false
+ STATE=$(expr $STATE + 1)
+ if [ "$STATE" = "5" ]; then
+ echo "Illegal port value for CUPS. Please correct this by running 'dpkg-reconfigure cupsys'."
+ exit 1
+ fi
+ db_input high cupsys/ports || true
+ db_go
+ db_get cupsys/ports
+ done
+
+ if [ "$(grep -h "Include[[:space:]]\+\($BROWSE\|cupsd-browsing.conf\)" $CONF)" -a -f "$BROWSE" ]; then
+ RET=$(grep -h -e "^Browsing[[:space:]]\+" $CONF $BROWSE | head -1 | sed -e "s/Browsing[[:space:]]\+//" | tr "A-Z" "a-z")
+ else
+ RET=$(grep -h -e "^Browsing[[:space:]]\+" $CONF | head -1 | sed -e "s/Browsing[[:space:]]\+//" | tr "A-Z" "a-z")
+ fi
+ if [ "$RET" = "off" ]; then
+ db_set cupsys/browse false
+ elif [ "$RET" = "on" ]; then
+ db_set cupsys/browse true
+ fi
+ db_input low cupsys/browse || true
+ db_go
+else
+ db_input low cupsys/ports || true
+ db_go
+ db_get cupsys/ports
+ STATE=0
+ while ! is_ports "$RET"; do
+ db_input critical cupsys/portserror || true
+ db_go
+ db_fset cupsys/ports seen false
+ STATE=$(expr $STATE + 1)
+ if [ "$STATE" = "5" ]; then
+ echo "Illegal port value for CUPS. Please correct this by running 'dpkg-reconfigure cupsys'."
+ exit 1
+ fi
+ db_input low cupsys/ports || true
+ db_go
+ db_get cupsys/ports
+ done
+ db_input low cupsys/browse || true
+ db_go
+fi
--- cupsys-1.2.2.orig/debian/libcupsimage2-dev.files
+++ cupsys-1.2.2/debian/libcupsimage2-dev.files
@@ -0,0 +1,3 @@
+usr/lib/libcupsimage.so
+usr/include/cups/image.h
+usr/include/cups/raster.h
--- cupsys-1.2.2.orig/debian/NEWS
+++ cupsys-1.2.2/debian/NEWS
@@ -0,0 +1,11 @@
+cupsys (1.1.99.rc2-0exp1) experimental; urgency=low
+
+ * This is EXPERIMENTAL version.
+ - By ABI incompatibility, KDE control center will complain.
+ * 'enable' and 'disable' commands are removed.
+ Use 'cupsenable' and 'cupsdisable' instead of them.
+ * /etc/cups/client.conf has been removed upstream. Now it becomes
+ obsolete.
+
+
+ -- Kenshi Muto Sun, 16 Apr 2006 17:39:36 +0900
--- cupsys-1.2.2.orig/debian/cupsys.docs
+++ cupsys-1.2.2/debian/cupsys.docs
@@ -0,0 +1,4 @@
+CHANGES.txt
+CREDITS.txt
+README.txt
+debian/HOWTO_BUGREPORT.txt
--- cupsys-1.2.2.orig/debian/cupsys.preinst
+++ cupsys-1.2.2/debian/cupsys.preinst
@@ -0,0 +1,86 @@
+#! /bin/sh
+# preinst script for cupsys
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * `install'
+# * `install'
+# * `upgrade'
+# * `abort-upgrade'
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ if dpkg --compare-versions "$2" le 1.1.23-6; then
+ [ -f /etc/cups/printers.conf ] && mv /etc/cups/printers.conf /etc/cups/printers.conf.save
+ [ -f /etc/cups/classes.conf ] && mv /etc/cups/classes.conf /etc/cups/classes.conf.save
+ fi
+ if [ -e /var/lib/cups/conf -a ! -L /var/lib/cups/conf -a ! -e /etc/cups ]; then
+ echo -n "Moving configuration files..."
+ mkdir -p /etc/cups || true
+ if [ `ls /var/lib/cups/conf | wc -l` -ne " 0" ]; then
+ cp -a /var/lib/cups/conf/* /etc/cups
+ fi
+ rm -rf /var/lib/cups/conf
+ echo "done."
+ fi
+
+ if [ -e /var/lib/cups/ppd -a ! -L /var/lib/cups/ppd -a ! -e /etc/cups/ppd ]; then
+ echo -n "Moving printer definition files..."
+ mkdir -p /etc/cups/ppd || true
+ if [ `ls /var/lib/cups/ppd | wc -l` -ne " 0" ]; then
+ cp -a /var/lib/cups/ppd/* /etc/cups/ppd
+ fi
+ rm -rf /var/lib/cups/ppd
+ echo "done."
+ fi
+
+ if [ -e /var/lib/cups/logs -a ! -L /var/lib/cups/logs ]; then
+ rmdir /var/lib/cups/logs || true
+ fi
+
+ # Remove dangling pdftops.conf symlink, which is obsolete anyway
+ if [ -L /etc/cups/pdftops.conf -a ! -e /etc/cups/pdftops.conf ]; then
+ rm -f /etc/cups/pdftops.conf
+ fi
+
+ # Remove obsolete /etc/cups/certs
+ [ -L /etc/cups/certs ] && rm -f /etc/cups/certs || true
+
+ # Move cupsd-browsing.conf to new location and name
+ if dpkg --compare-versions "$2" le-nl '1.1.23-10ubuntu4'; then
+ if [ -f /etc/cups/cupsd-browsing.conf ]; then
+ echo "Moving /etc/cups/cupsd-browsing.conf to new location /etc/cups/cups.d/browse.conf..."
+ mkdir -p /etc/cups/cups.d
+ mv /etc/cups/cupsd-browsing.conf /etc/cups/cups.d/browse.conf
+ fi
+ fi
+
+ # Fix root-owned PPD files from upgrades
+ if dpkg --compare-versions "$2" le-nl '1.1.99.b1.r4929-0ubuntu2'; then
+ find /etc/cups/ppd -type f -uid 0 -exec chown cupsys '{}' \; || true
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- cupsys-1.2.2.orig/debian/changelog
+++ cupsys-1.2.2/debian/changelog
@@ -0,0 +1,2541 @@
+cupsys (1.2.2-0ubuntu0.6.06.17) dapper-security; urgency=low
+
+ * SECURITY UPDATE: privilege escalation via lppasswd tool
+ - debian/patches/84_CVE-2010-0393.dpatch: don't allow environment
+ variables to override directories in cups/globals.c and
+ systemv/lppasswd.c.
+ - CVE-2010-0393
+
+ -- Marc Deslauriers Thu, 25 Feb 2010 11:04:17 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.15) dapper-security; urgency=low
+
+ * SECURITY UPDATE: XSS and CRLF injection in headers
+ - debian/patches/83_CVE-2009-2820.dpatch: Introduce cgiClearVariables()
+ in cgi-bin/{var.c,cgi.h}. Clear out variables in
+ cgi-bin/{classes,help,ipp-var,jobs,printers}.c. Encode URL string and
+ clear out variables in cgi-bin/admin.c. Filter more characters in
+ cgi-bin/template.c.
+ - CVE-2009-2820
+
+ -- Marc Deslauriers Fri, 30 Oct 2009 21:40:07 -0400
+
+cupsys (1.2.2-0ubuntu0.6.06.14) dapper-security; urgency=low
+
+ * SECURITY UPDATE: Remote denial-of-service via IPP_TAG_UNSUPPORTED tags.
+ - debian/patches/82_CVE-2009-0949.dpatch: make sure the name field
+ exists in scheduler/ipp.c.
+ - CVE-2009-0949
+
+ -- Marc Deslauriers Mon, 01 Jun 2009 10:34:39 -0400
+
+cupsys (1.2.2-0ubuntu0.6.06.13) dapper-security; urgency=low
+
+ * SECURITY UPDATE: fix integer overflow via large TIFF file
+ - debian/patches/81_CVE-2009-0163.dpatch: adjust CUPS_IMAGE_MAX_HEIGHT in
+ filter/image-private.h
+ - CVE-2009-0163
+
+ -- Jamie Strandboge Wed, 15 Apr 2009 09:25:58 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.12) dapper-security; urgency=low
+
+ * SECURITY UPDATE: arbitrary code execution via integer overflow from a PNG
+ image with a large height value
+ - This issue was introduced in the patch for CVE-2008-1722.
+ - debian/patches/77_CVE-2008-1722.patch: adjust patch to multiply img->xsize
+ instead of img->ysize so we don't overflow in filter/image-png.c.
+ - CVE-2008-5286
+ * SECURITY UPDATE: arbitrary file overwrite via temp log file symlink attack
+ - debian/filters/pstopdf: use the cleaned-up version from Debian.
+ - CVE-2008-5377
+
+ -- Marc Deslauriers Thu, 08 Jan 2009 10:27:16 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.11) dapper-security; urgency=low
+
+ * SECURITY UPDATE: heap-based buffer overflow due to unchecked boundary in
+ the SGI filter
+ - debian/patches/78_CVE-2008-3639.dpatch: adjust filter/image-sgilib.c to
+ properly check for xsize. Taken from Debian patch by Martin Pitt.
+ - STR #2918
+ - CVE-2008-3639
+ * SECURITY UPDATE: integer overflow in texttops filter which could lead
+ to heap-based overflow
+ - debian/patches/79_CVE-2008-3640.dpatch: adjust textcommon.c and
+ texttops.c to check for too large or negative page metrics. Based on
+ Debian patch by Martin Pitt.
+ - STR #2919
+ - CVE-2008-3640
+ * SECURITY UPDATE: buffer overflow in HPGL filter which could lead to
+ arbitrary code execution
+ - debian/patches/80_CVE-2008-3641.dpatch: adjust hpgl-attr.c to properly
+ check for an invalid number of pens. Also includes fix for regression in
+ orginal upstream patch which changed the color mapping and an off-by-one
+ loop error. Taken from Debian patch by Martin Pitt.
+ - STR #2911
+ - STR #2966
+ - CVE-2008-3641
+ * debian/patches/00list: apply 77_CVE-2008-1722.dpatch from previous update,
+ which was not applied
+
+ -- Jamie Strandboge Tue, 14 Oct 2008 14:08:29 -0500
+
+cupsys (1.2.2-0ubuntu0.6.06.9) dapper-security; urgency=low
+
+ * SECURITY UPDATE: Denial of service and possibly arbitrary code execution
+ * debian/patches/77_CVE-2008-1722.dpatch: fix for two integer overflows in
+ filter/image-png.c. Taken from Debian SVN Head.
+ * References
+ CVE-2008-1722
+ LP: #219491
+ http://www.cups.org/str.php?L2790
+
+ -- Jamie Strandboge Thu, 24 Apr 2008 13:02:31 -0400
+
+cupsys (1.2.2-0ubuntu0.6.06.8) dapper-security; urgency=low
+
+ * debian/patches/72_CVE-2008-0047.dpatch: Fix buffer overflow in
+ cgiCompileSearch() using crafted search expressions. Exploitable if
+ printer sharing is enabled. Thanks to Martin Pitt for supplying the patch.
+ * debian/patches/73_CVE-2008-0882.dpatch: Fix double-free in
+ process_browse_data(), which could be exploited to a remote DoS by sending
+ crafted data to the cups UDP port. Thanks to Martin Pitt for supplying the
+ patch.
+ * debian/patches/74_pid.dpatch: Specify PidFile in temporary directory in
+ the self test's cupsd.conf. This affects the test suite (in the sense that
+ it actually works now) and does not affect the built binaries at all.
+ (Backported from trunk). Thanks to Martin Pitt for supplying the patch.
+ * debian/patches/75_CVE-2008-0053.dpatch: Fix buffer overflows in
+ ParseCommand() in hpgl-input.c by properly checking number of parameters
+ * debian/patches/76_CVE-2008-1373.dpatch: Fix buffer overflow in
+ gif_read_image() in image-gif.c by properly validating code_size
+ * References
+ CVE-2008-0047
+ CVE-2008-0882
+ CVE-2008-0053
+ CVE-2008-1373
+ http://www.cups.org/str.php?L2729
+ http://www.cups.org/str.php?L2656
+
+ -- Jamie Strandboge Wed, 26 Mar 2008 15:02:55 -0400
+
+cupsys (1.2.2-0ubuntu0.6.06.7) dapper-proposed; urgency=low
+
+ * Reapply pending SRU which got superseded in -security.
+ * Add debian/patches/60_ipp_read_busy_loop.dpatch:
+ - Fix logic error that causes IPP client programs like gnome-cups-icon to
+ sometimes get into a state where it uses 100% CPU time.
+ - Properly handle ippReadIO() encountering IPP_IDLE and make sure to never
+ return this to the outside world, since it is interpreted as an error
+ condition which causes a busy loop.
+ - Error out if the read callback doesn't return a value/group tag, which
+ would confuse the higher layers.
+ - Patch backported from upstream SVN (fixed in 1.2.11).
+ - LP: #44196
+
+ -- Martin Pitt Wed, 09 Jan 2008 09:14:42 +0100
+
+cupsys (1.2.2-0ubuntu0.6.06.6) dapper-security; urgency=low
+
+ * SECURITY UPDATE: tempfile race, denial of service in SNMP backend.
+ * Add 70_CVE-2007-6358.dpatch, 71_CVE-2007-5849.dpatch: upstream fixes
+ thanks to Kenshi Muto.
+ * References
+ CVE-2007-6358
+ CVE-2007-5849
+
+ -- Kees Cook Mon, 07 Jan 2008 16:08:28 -0800
+
+cupsys (1.2.2-0ubuntu0.6.06.4) dapper-security; urgency=low
+
+ * SECURITY UPDATE: arbitrary code execution via stack overflow.
+ * Add debian/patches/ipptags-corruption-fix.dpatch: upstream fixes
+ from Michael Sweet.
+ * References
+ CVE-2007-4351
+
+ -- Kees Cook Thu, 01 Nov 2007 06:52:01 -0700
+
+cupsys (1.2.2-0ubuntu0.6.06.3) dapper-proposed; urgency=low
+
+ * Add debian/patches/59_title_escaping.dpatch:
+ - Escape non-ASCII characters in comment fields in the filters.
+ - This fixes printing of documents with titles containing non-ASCII
+ characters, line breaks, etc.
+ - Patch backported from upstream SVN (dropped the formatting changes):
+ http://www.cups.org/strfiles/1988/str1988.patch
+ - LP #57445.
+ * Skipping version number to .3 since .2 is in proposed and didn't verify.
+
+ -- Martin Pitt Fri, 10 Aug 2007 12:47:32 +0200
+
+cupsys (1.2.2-0ubuntu0.6.06) dapper-updates; urgency=low
+
+ * New upstream bugfix release:
+ - Fixes printing to 1.1.x servers. Closes: LP#42513, LP#42802
+ - Fixes parsing of some PostScript files which previously generated empty
+ pages. Closes: LP#51432
+ - Fixes parsing of network masks. Closes: LP#52390
+ - Lots of more fixes, see upstream changelog.
+ * Dropped debian/patches/00_r{5643,5660}.dpatch: Upstream now.
+ * debian/patches/02_configure.dpatch,
+ debian/patches/09_runasuser_autoconf.dpatch: Adapted to new upstream
+ version (taken from current edgy package).
+
+ -- Martin Pitt Thu, 27 Jul 2006 06:38:01 +0000
+
+cupsys (1.2.1-0ubuntu2) dapper-updates; urgency=low
+
+ * Add debian/patches/00_r5660.dpatch
+ - Fix for 11.22.33.* network masks (STR #1769), Closes: LP#52390
+ * Fixed debian/patches/05_avoidunknowngroup
+ - Don't create .rej files
+ * Fixed debian/rules
+ - Delete backend/*.o on clean
+
+ -- Ante Karamatic Sun, 9 Jul 2006 08:05:12 +0200
+
+cupsys (1.2.1-0ubuntu1) dapper-updates; urgency=low
+
+ * Upgrade to new upstream version 1.2.1 (backported from edgy):
+ - fix for printing on Xerox IPP printers; Closes: LP#47387
+ - fix for banners on single page
+ - fix for custom page sizes (cups ignores them now in some cases)
+ - fix for -u and -U switches for lpadmin
+ - fix for printing on some Canon printers
+ - fix for printing on CUPS server < 1.1.17 (RHEL3 and older)
+ (partly fixes LP bug #42802)
+ - couple of fixes for imagetoraster
+ * Add debian/patches/00_r5643.dpatch: Pull some fixes from upstream SVN
+ scheduled to go into 1.2.2:
+ - The lpstat command did not use the correct character
+ set when reporting the date and time (STR #1751)
+ - The cupsaddsmb command and web interface did not update
+ the Windows PPD files properly, resulting in corrupt
+ PPD files for the Windows client to use (STR #1750)
+ - The cupsd.conf man page didn't describe the Listen
+ domain socket syntax (STR #1753)
+ - The scheduler no longer tries to support more than
+ FD_SETSIZE file descriptors.
+ - The USB backend now reports a "no such device" error
+ when using the old filename-based USB URIs instead of
+ the "success" error.
+ - Increased the HTTP and IPP read timeouts to 10 seconds,
+ as 1 second was too short on congested networks (STR
+ #1719)
+ - Fixed another file descriptor leak when printing raw
+ files (STR #1736)
+ - The scheduler didn't always choose the least costly
+ filter.
+ - Fixed parsing of IPv6 addresses in Allow, Deny,
+ BrowseAllow, BrowseDeny, and BrowseRelay directives
+ (STR #1713)
+ - Special cases for the "localhost" hostname did not
+ work, causing printing to not work when the /etc/hosts
+ file did not contain a localhost entry (STR #1723)
+ - Updated the Spanish translation (STR #1720)
+ - Reverse-order page output was broken when N-up or
+ landscape orientations were used (STR #1725)
+ - The parallel, serial, socket, and USB backends needed
+ print data before they would report back-channel data,
+ causing problems with several new drivers (STR #1724)
+ * Ship /etc/cups/ssl directory. Closes: LP#44931
+ * Removed debian/patches/svn*.dpatch, these were backported from 1.2.1 in
+ 1.2.0-0ubuntu3.
+ * debian/cupsys.init.d: Add missing log_end_msg. Closes: LP#48116
+ * Bump up shlibs to >= 1.2.1 for compatibility safety.
+
+ -- Martin Pitt Thu, 6 Jul 2006 19:25:04 +0200
+
+cupsys (1.2.0-0ubuntu5) dapper; urgency=low
+
+ * Remove debian/patches/56_revert_svn_5438.dpatch: The reason for this
+ reversion has now been fixed in gnome-cups-manager 0.31-1.1ubuntu8. This
+ fixes the handling of spaces in manufacturer names. Closes: LP#33545
+
+ -- Martin Pitt Wed, 17 May 2006 13:18:05 +0200
+
+cupsys (1.2.0-0ubuntu4) dapper; urgency=low
+
+ * Add debian/patches/svn5530_str1667_octet_stream.dpatch: Fix printing of
+ application/octet-stream jobs (usually from Windows clients with locally
+ installed driver). (STR #1667) Closes: LP#43145
+
+ -- Martin Pitt Wed, 17 May 2006 08:58:16 +0200
+
+cupsys (1.2.0-0ubuntu3) dapper; urgency=low
+
+ * Pull some bug fixes from SVN head:
+ * Add debian/patches/svn5512_KCMYcm_fix.dpatch: Fix bug in KCMYcm handling
+ (typo in variable name).
+ * Add debian/patches/svn5518_12bitraster.dpatch: Make sure we swap 12/16 bit
+ chunky data in raster filter.
+ * Add debian/patches/svn5523_1_2_4bit_raster.dpatch:
+ - Fix imagetoraster generation of 1/2/4-bit raster data.
+ - Fix cupsRasterWritePixels() - bad double line termination.
+ * Add debian/patches/svn5526_str1676_stopped_jobs_active.dpatch: Fix stopped
+ jobs to be considered active (STR #1676).
+ * Add debian/patches/svn5527_LDAP_define.dpatch: Fix typo in #ifdef:
+ s/OPENDAP/OPENLDAP/.
+ * Add debian/patches/svn5527_str1683_lpstaterror.dpatch: The lpstat command
+ displayed the wrong error message for a missing destination (STR #1683).
+ * Add debian/patches/svn5527_str1689_printeroptions.dpatch: "Set Printer
+ Options" in the web interface did not update the DefaultImageableArea or
+ DefaultPaperDimension attributes in the PPD file (STR #1689).
+ * Add debian/patches/svn5528_str1680_load_custom_options.dpatch: ppdOpen*()
+ did not load custom options properly (STR #1680).
+
+ -- Martin Pitt Tue, 16 May 2006 12:39:35 +0200
+
+cupsys (1.2.0-0ubuntu2) dapper; urgency=low
+
+ * debian/cupsys.init:
+ - Load the 'lp' module. Earlier installers did not put it in /etc/modules
+ and we keep getting dozens of bug reports about that, so let's just fix it
+ here once and for all.
+ - Load the 'ppdev' module. This should fix detection of parallel printers.
+ Closes: LP#29050
+
+ -- Martin Pitt Thu, 11 May 2006 11:09:59 +0200
+
+cupsys (1.2.0-0ubuntu1) dapper; urgency=low
+
+ * Final 1.2.0 upstream release (bug fixes only). Closes: LP#43898
+ * Remove debian/patches/01_cupsimage.dpatch, fixed upstream.
+ * Remove debian/patches/57_svn_5461.dpatch, fixed upstream.
+ * debian/patches/58_cupsd.conf-AllowLocal.dpatch: Fix typo: @LOCAL@ ->
+ @LOCAL. Closes: LP#43933
+
+ -- Martin Pitt Wed, 10 May 2006 12:09:54 +0200
+
+cupsys (1.1.99.rc3-0ubuntu4) dapper; urgency=low
+
+ * Add debian/patches/58_cupsd.conf-AllowLocal.dpatch: Add 'Allow @LOCAL'
+ to server ACL to actually allow LAN computers to access the printer if
+ sharing is enabled. This avoid having to change two things for enabling
+ printer sharing (a source of much confusion and a FAQ). This does not
+ change the default behavior (port only listens on localhost by default).
+
+ -- Martin Pitt Tue, 9 May 2006 17:53:02 +0200
+
+cupsys (1.1.99.rc3-0ubuntu3) dapper; urgency=low
+
+ * debian/cupsys.config: Print migration note to stderr, not stdout, to not
+ confuse debconf. Closes: LP#41716
+ * debian/cupsys.postinst: Fix ownership of files in /var/cache/cups/ so that
+ they are writable by non-root cupsd. Earlier dapper versions got the
+ ownership wrong, so fix this for intra-dapper upgrades. Closes: LP#40795
+ * Add debian/local/{sharing_status,enable_sharing}: Scripts to control
+ printer sharing (by opening or closing the TCP port). Thanks to Ante
+ Karamatić for his initial scripts and research!
+
+ -- Martin Pitt Tue, 9 May 2006 16:33:19 +0200
+
+cupsys (1.1.99.rc3-0ubuntu2) dapper; urgency=low
+
+ * debian/cupsys.init.d: Fix log creation for real. Closes: LP#41267
+ * debian/cupsys.logrotate: Create files as cupsys:lpadmin, not root:lp.
+ (Also part of LP#41267)
+
+ -- Martin Pitt Tue, 2 May 2006 19:36:22 +0200
+
+cupsys (1.1.99.rc3-0ubuntu1) dapper; urgency=low
+
+ * New upstream bug fix release 1.2RC3, UVF exception approved by Matt
+ Zimmerman.
+ * Add debian/patches/56_revert_svn_5438.dpatch: Revert upstream svn commit
+ 5438 (fixed handling of products/manufacturers with spaces in the name)
+ for now since it causes regressions in gnome-cups-add. Will be reactivated
+ later when the issue is sorted out with upstream.
+ * Update patches for new upstream release.
+ * Remove debian/patches/20_httpGetHostname_crash.dpatch, fixed upstream.
+ * Add debian/patches/14_dont_force_ssl.dpatch: Upstream now requires
+ encryption by default for accessing /admin/, but our GUI frontends do not
+ yet cope with that. Disable SSL requirement for now to revert to the old
+ behaviour.
+ * debian/patches/08_cupsd.conf.conf.d.dpatch:
+ - Set "BrowseAddress @LOCAL"; without this, sending browsing information
+ does not work (Browsing still has to be enabled). Since enable_browsing
+ now works for exporting printers, too, this Closes: LP#17981
+ - Add some comments to point out that the Port and Browsing settings are
+ moved to /etc/cups/cups.d/.
+ * debian/cupsys.postrm: Clean up passwd.md5 on purge.
+ * debian/cupsys.init.d: Pre-create error_log, too, and clean up code a bit.
+ Closes: LP#41267
+ * debian/cupsys.postinst: If upgrading from Breezy, adapt the inclusion of
+ external browsing configuration in cupsd.conf to retain the correct
+ setting for modified cupsd.conf files.
+ * debian/cupsys.config:
+ - Fix handling of cupsd-browsing.conf -> cups.d/browse.conf transition for
+ breezy->dapper upgrades.
+ - Fix browse.conf parsing to set the correct debconf default value, so
+ that the browse setting is not reset to 'off' on upgrades.
+ Closes: LP#38704
+ * Add debian/patches/57_svn_5461.dpatch:
+ - Properly HTML-quote the printer name so that names containing e. g. '+'
+ work properly in the web interface.
+ - Upstream svn commit 5461.
+ - Closes: LP#37018
+
+ -- Martin Pitt Tue, 25 Apr 2006 20:09:37 +0200
+
+cupsys (1.1.99.rc2-0ubuntu2) dapper; urgency=low
+
+ * debian/cupsys-client.links: Fix cupsenable/cupsdisable manpage link.
+ Closes: LP#40725
+ * debian/patches/09_runasuser.dpatch: Do not drop additional group
+ privileges in scheduler/process.c. This should fix a range of bugs
+ concerning detection of parallel port printers and other 'permission
+ denied' bugs.
+
+ -- Martin Pitt Mon, 24 Apr 2006 19:17:12 +0200
+
+cupsys (1.1.99.rc2-0ubuntu1) dapper; urgency=low
+
+ * Many changes have been applied in Debian now; reapply remaining Ubuntu
+ changes from scratch to clean up some cruft (see below for details). Also,
+ maintain Ubuntu package as SVN branch of the Debian one.
+ * debian/rules: Enable --with-cups-user=cupsys and
+ --enable-privilege-dropping to not run cupsd as root.
+ * debian/control: Remove libdbus-1-dev build dependency, dbus support is not
+ something for dapper.
+ * debian/cupsys.init.d: Disable reload (it doesn't work as normal user),
+ change force-reload to restart.
+ * debian/cupsys.init.d: Pre-create access_log and error_log since cupsd
+ can't create them as normal user.
+ * debian/rules: Set rc runlevel priority to 19.
+ * debian/cupsys.{postinst,postrm}, debian/cupsys-client.postinst:
+ Setup/remove cupsys user and its needed groups.
+ * debian/cupsys.templates: Disable browsing by default due to our 'no open
+ ports in the default install' policy.
+ * debian/README.Debian: Explain disabling of administrative functions in web
+ interface and describe how to re-enable it.
+ * debian/cupsys.preinst:
+ - Migrate /etc/cups/cupsd-browsing.conf to /etc/cups/cups.d/browse.conf
+ for smooth upgrades from Hoary.
+ - Fix owner of /etc/cups/ppd/* on upgrades.
+ * debian/patches/ubuntu-nowebadmin.dpatch: Explain disabling of
+ administrative functions in the web interface and point to doc how to
+ reenable it.
+ * debian/patches/55_ppd_okidata_name.dpatch: Change "Oki" manufacturer name
+ to "Okidata" to be consistent with other PPD files.
+ * Implement http://wiki.debian.org/PpdFileStructureSpecification:
+ - debian/dirs: Create /usr/share/ppd/cups-included/.
+ - debian/rules: Install shipped PPDs into
+ /usr/share/ppd/cups-included// and provide a symlink to
+ the old /usr/share/cups/model directory for backwards compatibility.
+ * debian/libcupsys2.shlibs: Remove Debian revision to allow -0ubuntuN
+ number.
+ * Support custom PPD installation by lpadmin members (through e. g.
+ gnome-cups-manager):
+ - debian/cupsys.dirs: Create /usr/share/ppd/custom/.
+ - debian/cupsys.init.d: Fix permissions of that dir to root:lpadmin 3775.
+ - debian/rules: Install compatibility symlink
+ /usr/share/cups/model/custom.
+ * debian/cupsys.dirs: Ship /usr/lib/cups/driver/ to avoid error messages if
+ it's missing.
+ * debian/patches/09_runasuser.dpatch, scheduler/cert.c: Change root
+ certificate permissions from 0440 to 0240, so that the CGI programs cannot
+ read it any more. Without this patch, cupsd presented its own certificate
+ to itself, and *every* user could do admin tasks without authentication.
+
+ -- Martin Pitt Fri, 21 Apr 2006 16:19:37 +0200
+
+cupsys (1.1.99.rc2-0exp1) experimental; urgency=low
+
+ [ Kenshi Muto ]
+ * New upstream release 1.2RC2.
+ - Because -fpie config becomes optional, compiler works on amd64 and
+ other architectures. (closes: #335199)
+ * Enable LDAP support.
+ * Remove duplicated update-rc.d (closes: #356911)
+ * Stopped asking admin password because it works only if user chooses
+ digest authentication. The default configuration of Debian uses
+ PAM and basic authentication.
+ * Enable dbus support.
+ * 03_clean.dpatch: Remove produced and remained files during build.
+ * Now CUPS uses 'lp' user/group privilege to call backend or any other
+ programs.
+ CUPS SystemGroup is 'lpadmin'. You need to add users who are allowed
+ to add/modify/remove printers/jobs/classes.
+ * Remove image.h.patch from source. It is no longer needed.
+ * 02_configure.dpath: Remove -rpath from configure.
+ * Fix typo in cupsys-bsd description. (closes: #362070)
+ * Add Galician debconf translation. (closes: #361258)
+ * Update Danish debconf translation. (closes: #357969)
+ * Use 'reload' during logrotate instead of 'restart'. It looks safe
+ on CUPS 1.2. (though job-restart problem still remains)
+ * set TZ in init script only if TZ isn't defined yet.
+ * Use if-fi structure style for postrotate of logrotate script.
+ It solves error when cupsys is not running. (closes: #347641)
+ * Unset TMPDIR environment variable before running daemon. (closes: #347829)
+ * Removed /etc/cups/pdftops.conf because it was for pdftops of upstream
+ version. Debian CUPS uses xpdf-utils wrapper and doesn't need
+ pdftops.conf.
+ * Notice: /etc/cups/client.conf has been removed upstream.
+ * Notice: {dis,en}able have been renamed to cups{dis,en}able.
+
+ [ Martin Pitt ]
+ * debian/patches/48_stdlib.dpatch: Adapted to new upstream version.
+ * debian/cupsys.init.d:
+ - Fix arguments of start-stop-daemon and remove the hideous kill
+ algorithm.
+ - Ensure that /var/run/cupsd exists; this makes the init script work with
+ /var/run mounted on a tmpfs.
+ * debian/libcupsys2-dev.files, debian/libcupsimage2-dev.files: Remove static
+ library; upstream does not build them any more, and they are useless
+ anyway.
+ * Add debian/patches/06_disable_backend_setuid.dpatch: Remove the uid
+ changing in scheduler/cups-deviced.c which was introduced recently in
+ upstream. It totally breaks device node access (e. g. /dev/lp0 is root:lp
+ 0660, which is inaccessible for a process which runs as lp:root).
+ * debian/rules: Remove --with-cups-user, upstream does not support
+ it any more.
+ * debian/patches/09_runasuser_fixes.dpatch: RunAsUser was removed upstream;
+ rename the patch to 09_runasuser.dpatch and rewrite it:
+ - Enclose all changes in an #if CUPS_DROP_PRIVILEGES, so that it is easy to
+ enable this feature.
+ - scheduler/main.c: Drop privileges after initialization.
+ - scheduler/conf.c: If we build with CUPS_DROP_PRIVILEGES, set RunUser to
+ User instead of getuid(), since at that point we will always run as root
+ (privileges cannot yet be dropped at that point).
+ - config-scripts/cups-defaults.m4: Add --enable-privilege-dropping option.
+ - config.h.in: Add CUPS_DROP_PRIVILEGES option template.
+ * Add debian/patches/09_runasuser_autoconf.dpatch: autoconf changes for
+ 09_runasuser_fixes.dpatch changes.
+ * debian/pdftops: Fix reading from stdin (https://launchpad.net/bugs/17124)
+ * debian/cupsys.preinst: Remove dangling /etc/cups/pdftops.conf symlink on
+ upgrades to unbreak printing with poppler-utils.
+ * debian/control: Add poppler-utils alternative for xpdf-utils dependency.
+ * Add debian/patches/12_quiesce_ipp_logging.dpatch:
+ - Drop successful IPP messages to log level 'debug' and unsuccessful ones
+ to 'info'.
+ - Do not flood access_log with successful CUPS-Get-Printers and
+ Get-Printer-Attributes queries (which are generated by e. g.
+ gnome-cups-icon every 3 seconds).
+ - Closes: #280718
+ * Add debian/patches/13_default_log_warn.dpatch: Raise default log severity
+ to 'warning' to not log gazillions of IPP requests by default. (other part
+ of #280718)
+ * debian/rules, debian/cupsys.postinst: Remove obsolete /etc/cups/certs and
+ /var/lib/cups/certs (certificates are managed in /var/run/certs now).
+ * debian/cupsys.preinst: Remove obsolete /etc/cups/certs symlink on upgrades.
+ * debian/cupsys-client.files: Install cupstestdsc and manpage.
+ * debian/cupsd.init: Have force-reload to reload, not restart.
+ * debian/cupsys.logrotate: Use force-reload instead of reload, since the
+ latter is not required to exist by Debian Policy.
+ * debian/rules: Ship browsing_status and enable_browsing.
+ * debian/patches/20_httpGetHostname_crash.dpatch: Add some robustifications
+ to httpGetHostname() to hopefully fix a reported crash.
+
+ -- Kenshi Muto Sun, 16 Apr 2006 17:49:57 +0900
+
+cupsys (1.1.99.b1.r4929-0ubuntu9) dapper; urgency=low
+
+ * Correct permissions of /var/run/cups in the init script.
+
+ -- Scott James Remnant Wed, 19 Apr 2006 14:15:14 +0100
+
+cupsys (1.1.99.b1.r4929-0ubuntu8) dapper; urgency=low
+
+ * Disable 53_usr_share_ppd_support.dpatch again, too many
+ packages still have /usr/share/cups/model hardcoded.
+ * Symlink /usr/share/cups/model/cups-included to /usr/share/ppd/cups-included.
+ * Place ppd files in manufacturer specific subdirectories.
+ * Change "Oki" manufacturer name to "Okidata".
+ * Symlink /usr/share/cups/model/custom to /usr/share/ppd/custom.
+
+ -- Matthias Klose Wed, 12 Apr 2006 19:26:18 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu7) dapper; urgency=low
+
+ * debian/cupsys.init.d: Move log_end_msg to the right place again.
+ * Add debian/patches/53_usr_share_ppd_support.dpatch:
+ - Look for PPDs in /usr/share/ppd, according to
+ http://wiki.debian.org/PpdFileStructureSpecification.
+ - Fixes Debian bug #358186.
+ * debian/rules: Install PPD files into /usr/share/ppd/cups-included,
+ according to above specification.
+ * debian/patches/54_cups-config_modeldir.dpatch: Add --modeldir to
+ cups-config so that other packages can use it to figure out the correct
+ PPD base path.
+ * debian/libcupsys2.shlibs: Bump version number so that other packages can
+ rely on cups-config's modeldir.
+ * Re-add debian/patches/51_dont_log_ipp_printer_query.dpatch, since these
+ log messages are routed through a different code path.
+ * debian/cupsys.init.d: Change custom PPD path from /usr/share/cups/ppd to
+ /usr/share/ppd/custom.
+
+ -- Martin Pitt Fri, 7 Apr 2006 17:14:25 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu6) dapper; urgency=low
+
+ * Add debian/patches/51_ipp_log_severity_info.dpatch: Drop successful IPP
+ messages to log level 'debug' and unsuccessful ones to 'info'. This is a
+ more generic approach to avoid ridiculously huge logs due to polling by
+ gnome-cups-icon and friends.
+ * Drop debian/patches/51_dont_log_ipp_printer_query.dpatch, obsoleted by
+ above patch.
+ * Add debian/patches/52_default_log_level_warning.dpatch: Raise default log
+ level from info to warning. Closes: LP#38042
+
+ -- Martin Pitt Thu, 6 Apr 2006 12:05:45 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu5) dapper; urgency=low
+
+ * debian/patches/51_dont_log_ipp_printer_query.dpatch: Suppress logging of
+ successful CUPS_GET_DEFAULT messages, too. Closes: LP#29895
+ * debian/pdftops: Fix reading from stdin. Closes: LP#17124
+
+ -- Martin Pitt Thu, 30 Mar 2006 19:52:20 +0200
+
+cupsys (1.1.99.b1.r4929-0ubuntu4) dapper; urgency=low
+
+ * debian/cupsys.postinst: Make sure that the scanner group exists before
+ trying to add the cupsys user to it.
+
+ -- Colin Watson Thu, 9 Mar 2006 08:20:02 +0000
+
+cupsys (1.1.99.b1.r4929-0ubuntu3) dapper; urgency=low
+
+ * debian/rules: Do not install dangling pdftops.conf symlink. (Malone #26785)
+ * debian/cupsys.preinst: Remove a dangling pdftops.conf symlink on upgrades
+ to this version.
+ * debian/cupsys.postinst: Add cupsys to group 'scanner' to be able to access
+ printer/scanner combined devices. (Malone #29050)
+ * debian/patches/44_fixconfdirperms.dpatch: Make /etc/cups/ppd group
+ writable. (Malone #31533)
+ * debian/cupsys.init.d: Make sure that page_log exists with the right
+ permissions. (Malone #33409)
+ * Add debian/patches/51_dont_log_ipp_printer_query.dpatch: Do not flood
+ access_log with successful CUPS-Get-Printers and Get-Printer-Attributes
+ queries (which are generated by gnome-cups-icon every 3 seconds). This is
+ a hideous and hackish patch, but it has to do until we dbusify cupsys
+ properly. (Malone #29895)
+
+ -- Martin Pitt Mon, 6 Mar 2006 16:08:32 +0100
+
+cupsys (1.1.99.b1.r4929-0ubuntu2) dapper; urgency=low
+
+ * Add 50_truncate_ppd.dpatch:
+ - cups/file.c: Do not forget to write the pending uncompressed tail when
+ copying a compressed file. Fixes cropped PPD files in /etc/cups/ppd.
+ - Patch taken from upstream svn commit 4942.
+ - Malone #28642
+ * debian/cupsys.init.d: Create access_log with proper permissions if it does
+ not yet exist. (Malone #28492)
+ * debian/cupsys.preinst: If we upgrade from a version earlier than this one,
+ change all root-owned PPD files in /etc/cups/ppd to be owned by cupsys.
+ (Malone #12879)
+
+ -- Martin Pitt Thu, 19 Jan 2006 16:55:51 +0100
+
+cupsys (1.1.99.b1.r4929-0ubuntu1) dapper; urgency=low
+
+ * New upstream snapshot with lots of bug fixes.
+ * Remove debian/patches/50_local_username_check.dpatch: Adopted upstream.
+ * debian/patches/02_configure.patch: Greatly simplified to be more robust
+ against upstream changes; renamed to debian/patches/02_disable_pie.patch
+ for clarity.
+ * Disable debian/patches/48_stdlib.dpatch, it shouldn't be necessary on at
+ least our platforms.
+
+ -- Martin Pitt Tue, 17 Jan 2006 16:44:47 +0100
+
+cupsys (1.1.99.b1.r4892-0ubuntu1) dapper; urgency=low
+
+ * New upstream snapshot.
+ * Adapt patches to new upstream version:
+ - 02_configure.dpatch
+ - 48_stdlib.dpatch
+ - ubuntu-nowebadmin.dpatch
+ * Add debian/patches/50_local_username_check.dpatch: Fix the restriction
+ of changing/cancelling of print jobs to the owner.
+ - scheduler/auth.c: Disable weird code that bypasses user name check for
+ local authentication.
+ - scheduler/ipp.c: Copy the determined user name of the connection to the
+ con structure, so that cupsdCheckPolicy() has a chance to actually
+ verify it.
+ - Ubuntu #12177
+
+ -- Martin Pitt Fri, 13 Jan 2006 15:28:22 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu8) dapper; urgency=low
+
+ * debian/cupsys.init.d: Remove the hideous killing hacks and just invoke
+ start-stop-daemon with the correct arguments.
+
+ -- Martin Pitt Wed, 11 Jan 2006 19:23:47 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu7) dapper; urgency=low
+
+ * debian/cupsys.init.d: Make sure that the PID file directory /var/run/cups
+ exists. The new approach of mounting /var/run as tmpfs removes the
+ directory that is shipped in the deb. (Ubuntu #22261)
+
+ -- Martin Pitt Wed, 11 Jan 2006 13:47:45 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu6) dapper; urgency=low
+
+ * debian/cupsys.init: Call stop/start in the 'restart/force-reload' section
+ to make use of the much more robust 'stop' handling. This should avoid
+ frequent failures of force-reload. (Ubuntu #21787)
+ * debian/cupsys.postinst:
+ - Set permissions of /etc/cups/interfaces to root:lpadmin 2775.
+ - Make /etc/printcap writable for group lpadmin.
+ - This fixes third-party printer drivers and command line tools.
+ - Ubuntu #20891
+
+ -- Martin Pitt Thu, 5 Jan 2006 18:11:51 +0100
+
+cupsys (1.1.99.b1.r4841-1ubuntu5) dapper; urgency=low
+
+ * Synchronize to Debian's svn head to get the various configuration handling
+ RC bug fixes, but keep Ubuntu upstream version at r4841 since 4885 has
+ serious regressions.
+ * All non-Ubuntu specific patches have been applied in Debian now.
+ * Drop the following patches (accepted in Debian):
+ - ubuntu-sanitize-conffile-handling.dpatch
+ - ubuntu-localports.dpatch
+ - ubuntu-include-conf.d.dpatch
+ - ubuntu-nowebadmin.dpatch
+ - ubuntu-cupsimage.dpatch
+ * ubuntu-runasuser.dpatch: Remove the upstream code fixes (already in Debian
+ now), just add the 'RunAsUser' directive to cupsd.conf.
+ * debian/cupsys.templates: Disable browsing by default.
+
+ -- Martin Pitt Thu, 22 Dec 2005 15:08:51 +0100
+
+cupsys (1.1.99.b1.r4885-1) experimental; urgency=low
+
+ [ Kenshi Muto ]
+ * New SVN release taken from rr4885.
+ * Updated Russian debconf translation, taken from cupsys trunk.
+ * Downgrade port and browse question to low.
+ * Add timeout routine to avoid lockup.
+ * debian/patches/08_cupsd.conf.conf.d.dpatch:
+ - Commented out Port/Listen/Browsing from cupsd.conf.in.
+ CUPS crashes when there is a duplicate definition.
+ * Updated Swedish debconf translation.
+ * Set seen false flag when ports configuration is failed.
+ * Allow '*' for hostname in ports.conf.
+ * Use /bin/echo instead of shell built-in echo.
+ * Improve cupsys.templates.
+ * Updated Russian, German, Czech,French, Vietnamese debconf translation.
+ * Removed example descriptions from init.d script.
+ * Fix IPv4 validation.
+
+ [ Martin Pitt ]
+ * Adapt debian/patches/02_configure.dpatch to r4885.
+ * Move forcefully killing of cupsd if start-stop-daemon fails from
+ postinst to init script, where it belongs to. Do not kill all running
+ cupsd processes, but only the one in the pid file; this will unbreak cupsd
+ behaviour in chroots.
+ * debian/cupsys.default: Remove obsolete FORCE_RESTART option.
+ * Resurrect debian/patches/01_cupsimage.dpatch (formerly
+ 03_cupsimage.dpatch), as we get unresolved symbols if libcupsimage
+ isn't properly linked to libcupsys, causing other packages to FTBFS.
+ Thanks to Adam Conrad.
+ * debian/cupsys.init.d: Add --oknodo to not fail if cupsd is already
+ running.
+ * debian/rules: In clean rule, clean up a lot of files that are left behind
+ by 'make clean'.
+
+ -- Kenshi Muto Fri, 23 Dec 2005 06:33:05 +0000
+
+cupsys (1.1.99.b1.r4876-1) unstable; urgency=low
+
+ [ Martin Pitt ]
+ * debian/local/{enable_browsing,browsing_status}: Adapt configuration file
+ locations to new conf.d structure.
+ * debian/cupsys.templates: Fix default value for cupsys/browse: 'yes' is an
+ invalid bool option, change to true.
+ * debian/cupsys.init.d: Use LSB init functions. Add lsb-base package
+ dependency.
+ * debian/cupsys.postinst: Wait a second between kill -9'ing cupsys and
+ checking if the process still exists to avoid false positives and upgrade
+ failures.
+ * Clean up support for /etc/cups/conf.d:
+ - Add debian/patches/08_cupsd.conf.conf.d.dpatch: Add include commands to
+ default cupsd.conf file.
+ - debian/cupsys.postinst: Remove fiddling with cupsd.conf.
+ - This will ensure that cupsd.conf will remain an unchanged conffile.
+ * debian/rules: Remove empty debian/patched on clean.
+ * debian/patches/10_cupsd.conf2.dpatch: Re-enable listening to localhost to
+ make the web interface work.
+ * debian/patches/44_fixconfdirperms.dpatch:
+ - Put configuration files into group root instead of nobody to avoid
+ privilege escalation of nobody/nogroup and comply to Debian standards.
+ - Use CUPS_DEFAULT_GROUP instead of 'nobody' as the default group for
+ setgid'ing to and conffiles which must be writable for cupsd.
+ - Disable changing permissions of cupsd.conf conffile.
+ * Add debian/patches/09_runasuser_fixes.dpatch:
+ - scheduler/main.c: Generate a certificate even when running as user, just
+ as in 1.1.x; this unbreaks local certificate authorization for cupsd
+ when it runs as normal user.
+ - scheduler/main.c: When running as non-root, call initgroups() instead of
+ setgroups() to allow auxiliary groups. These are required to access
+ different device types (lp for USB/parallel printers, dialout for serial
+ printers, etc.)
+
+ [ Kenshi Muto ]
+ * New SVN release taken from r4876.
+
+ -- Kenshi Muto Thu, 8 Dec 2005 21:26:22 +0900
+
+cupsys (1.1.99.b1.r4841-1) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * New SVN release taken from r4841.
+ * Remove -pie and -fpie from compiler option. pie option causes
+ a problem with Debian binutils.
+ I hope this change avoids FTBFS on sparc and others. (closes: #339120)
+
+ -- Kenshi Muto Wed, 16 Nov 2005 12:27:27 +0000
+
+cupsys (1.1.99.b1.r4748-4) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * 00_r4835.dpatch: Taken from r4835.
+ Well, r4835 removes some files. It means dpkg-buildpackage always
+ fails when we rebuild source. Maybe it's time to change orig source.
+ Moved obsolete patches to patches/obsolete.
+ * 48_stdlib.dpatch: Fix FTBFS for arm, mips, and mipsel.
+ * 03_manext.dpatch: Don't use upstream's manpage file handling.
+ Debian uses dh_installman.
+ * 04_freebsd.dpatch: Apply Brian's patch to support GNU/kFreeBSD
+ (closes: #338266)
+ * Install lppasswd as owner 'lp'.
+
+ -- Kenshi Muto Fri, 4 Nov 2005 13:56:27 +0000
+
+cupsys (1.1.99.b1.r4748-3) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * 47_pid.dpatch: Modified to allow to configure location of pid file.
+ (closes: #337093)
+ You can change this location by PidFile directive at your cupsd.conf.
+ * Remove example comments from init script. (closes: #334842)
+
+ -- Kenshi Muto Thu, 3 Nov 2005 11:39:07 +0000
+
+cupsys (1.1.99.b1.r4748-2) experimental; urgency=medium
+
+ * EXPERIMENTAL
+ * 02_configure.dpatch: Modified to remove -pie/-fpie if arch = x86_64.
+ (closes: #335199)
+
+ -- Kenshi Muto Mon, 24 Oct 2005 11:42:59 +0000
+
+cupsys (1.1.99.b1.r4748-1) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * CUPS 1.2 snapshot (r4748) from SVN.
+
+ -- Kenshi Muto Wed, 5 Oct 2005 12:54:27 +0000
+
+cupsys (1.1.23-13) UNRELEASED; urgency=low
+
+ * 38_pdftopscan.dpatch: Apply CAN-2005-0064, CAN-2004-0888,
+ and CAN-2005-2097 patches. (closes: #324459, #324460, #324464)
+ Because Debian cupsys uses xpdf wrapper instead of forked pdftops,
+ users aren't affected these security problems.
+ This patch is just for users who want to create own pdftops from
+ source.
+ * Move Port/Listen and Browsing configurations from /etc/cups/
+ cupsd.conf to /etc/cups/cups.d/.
+
+ /etc/cups/cups.d/ports.conf: Port/Listen configuration.
+ /etc/cups/cups.d/browse.conf: Browsing configuration
+
+ Migration will be done automatically.
+ You can configure these values by using "dpkg-reconfigure cupsys".
+ (closes: #235906, #297695, #178838, #288838)
+
+ -- Kenshi Muto Mon, 22 Aug 2005 18:50:26 +0900
+
+cupsys (1.1.23-12) unstable; urgency=medium
+
+ * foomatic-rip may be treated as recommended tool.
+ Modified control file. (closes: #320196)
+ * Add debconf-2.0 as debconf alternative.
+ * Migrated to libgnutls12. (closes: #322087)
+ libcupsys2 backed as real library. libcupsys2-gnutls10 became
+ transitional package. (closes: #322018)
+ * Add procps to Depends: of cupsys. ps command is used by
+ cupsys.postinst.
+ * 47_pid.dpatch: Added a patch to make forked PID file.
+ Now init script use this file instead of one created by
+ start-stop-daemon.
+ I hope this solves Samba starting bug. (closes: #315017)
+ * Back gs-esp to Depends:. (closes: #312244)
+ PostScript printer owners may claim this, but currently
+ we Debian CUPS Maintainers team have massive complains about
+ missing gs-esp dependency. It's current best workaround to
+ avoid such printing problems.
+
+ -- Kenshi Muto Thu, 28 Jul 2005 11:35:27 +0900
+
+cupsys (1.1.23-11) unstable; urgency=low
+
+ * "At Debconf 5" release.
+ * Now CUPS is maintained by Debian CUPS Maintainers Team.
+
+ * Do "sleep 2" to wait daemon's wake up. (this is just workaround...
+ needs better solution, for #309794 and #315017)
+ * Added Vietnamese translation. (closes: #310152)
+ * Check whether daemon is running or not before restart in logrotate.
+ (closes: #310535)
+ * Add description about foomatic-rip (in foomatic-filters package)
+ to README.Debian. (closes: #309399)
+ * Remove unnecessary comment from debian/po/de.po (closes: #314135)
+ * Apply status option for init script (closes: #312683). Thanks Stephen.
+ * Suggests cupsys-driver-gutenprint, this package is new name of
+ cupsys-driver-gimpprint.
+ * 46_ppdsdat: Move /etc/cups/ppds.dat to /var/lib/cups/ppds.dat and
+ make symlink. (closes: #317905)
+ * Unapply NOAUTH handling from 33_jobauthorize. A user warns me
+ it's dangerous to use.
+
+ -- Kenshi Muto Fri, 20 May 2005 11:07:42 +0900
+
+cupsys (1.1.23-10ubuntu4) breezy; urgency=low
+
+ * Add debian/patches/ubuntu-disable-conffile-chmod.dpatch:
+ - Stop fiddling with the /etc/cups/cupsd.conf permissions at server
+ startup. The default permissions as shipped (root:root 0644) are just
+ fine for that file, and cupsys modifies it in a way that normal users
+ cannot read them any more, which breaks gnome-cups-manager.
+ - Ubuntu #15165
+ * debian/cupsys.postinst:
+ - If the package is upgraded from a version earlier than this one, correct
+ permissions of cupsd.conf.
+
+ -- Martin Pitt Wed, 14 Sep 2005 14:52:13 +0200
+
+cupsys (1.1.23-10ubuntu3) breezy; urgency=low
+
+ * Fix installation of /usr/share/cups/{enable-browsing,browsing_status} to
+ ship these scripts again. (Ubuntu #14546 )
+
+ -- Martin Pitt Fri, 2 Sep 2005 12:00:02 +0200
+
+cupsys (1.1.23-10ubuntu2) breezy; urgency=low
+
+ * Added debian/patches/ubuntu-confpermissions.dpatch:
+ - Add and document ConfigFilePerm to cupsd.conf and set it to 0600 to
+ avoid exposing SMB passwords to lpadmin members. This makes it slightly
+ harder to intercept the password. (Ubuntu #12036)
+
+ -- Martin Pitt Thu, 23 Jun 2005 12:44:14 +0200
+
+cupsys (1.1.23-10ubuntu1) breezy; urgency=low
+
+ * Debian adopted many changes and MOM output was messy; reapplied remaining
+ Ubuntu changes to pristine Debian version. Mention them here again to
+ ease further merges and Debian adoptions.
+ * Convert Ubuntu patches to dpatch and added descriptions.
+ * Convert to poppler:
+ - debian/patches/ubuntu-pdf2ps_poppler.dpatch: Replace pdftops/pdftops.cxx
+ with a port from xpdf-utils to libpoppler.
+ - debian/control: Add build dependency libpoppler-dev, remove xpdf-utils
+ dependency.
+ - Disable 06_replacepdftops.dpatch to build the pdftops/ subdir again.
+ - debian/rules: Install newly built pdftops into /usr/lib/cups/.
+ * Run as user 'cupsys' instead of root:
+ - debian/patches/ubuntu-runasuser.dpatch: Enable RunAsUser in
+ configuration.
+ - debian/patches/ubuntu-auxgroups.dpatch: When running as non-root, call
+ initgroups() instead of setgroups() to allow auxiliary groups.
+ - debian/rules: Configure with --with-cups-user=cupsys.
+ - debian/cupsys.postinst, debian/cupsys-client.postinst: Create cupsys
+ user and setup permissions.
+ - debian/cupsys.postrm: Remove cupsys user on purge.
+ * Disable web interface to avoid putting the user 'cupsys' into group
+ shadow:
+ - debian/README.Debian: Explain the change.
+ - debian/patches/ubuntu-nowebadmin.dpatch: Explain the disabled
+ administrator pages in the web interface.
+ - Add debian/local/ja-nowebadmin.ptch: Add the same explanation to the
+ Japanese translation in patches/ja.tar.gz.uu.
+ - debian/rules: Apply debian/local/ja-nowebadmin.ptch.
+ * Automatic detection of LAN printers (browsing):
+ - Add debian/local/{enable_browsing,browsing_status,cupsd-browsing.conf}
+ and install them in debian/rules.
+ - debian/patches/ubuntu-externalbrowseconf.dpatch: Externalize browsing
+ setting to cupsd-browsing.conf.
+ * Listen to local port only by default to comply to Ubuntu Security Policy:
+ - debian/patches/ubuntu-localports.dpatch
+ * debian/cupsys.init.d: LSB init script.
+
+ -- Martin Pitt Thu, 23 Jun 2005 11:23:37 +0200
+
+cupsys (1.1.23-10) unstable; urgency=high
+
+ * Recovered http backend. -8 and -9 missed it. (closes: #305169)
+ * Use absolete path for doc-root instead of relative path.
+ (closes: #305339)
+
+ -- Kenshi Muto Tue, 19 Apr 2005 20:47:49 +0900
+
+cupsys (1.1.23-9) unstable; urgency=medium
+
+ * Remove unnecessary and toxic space in doc-base file.
+ (closes: #305084)
+
+ -- Kenshi Muto Mon, 18 Apr 2005 08:08:03 +0900
+
+cupsys (1.1.23-8) unstable; urgency=medium
+
+ * "Brush up for Sarge" release.
+ * Introduced dpatch for source management.
+ * Included Spanish man pages.
+ * 43_filtercost: Applied a patch for wrong computation of cost
+ (closes: #304205)
+ * Applied many part of ubuntu patch, http://people.ubuntu.com/~scott/patches/cupsys/cupsys_1.1.23-7ubuntu1.patch.
+ (User 'cupsys' feature and Browsing feature aren't applied at this time.
+ They are post-Sarge things)
+ * Applied improved dvifilter patch. (Although you need to modify
+ /etc/cups/mime.convs and some other files to use it) (closes: #198100)
+ * Provides /var/run/cups/cupsd.pid. (closes: #301804)
+ * Added cupsys documentation to doc-base structure. (closes: #171396, #304333)
+ * Included filter for PostScript from Windows PostScript driver, created by
+ Matt Swift .
+ If you want to use, put /usr/share/doc/cupsys/examples/filters/samba-postscript.* to /etc/cups,
+ and put /usr/share/doc/cupsys/examples/filters/samba-ps-to-ps to /usr/lib/cups/filter. (closes: #246577)
+
+ -- Kenshi Muto Wed, 16 Mar 2005 10:01:57 +0900
+
+cupsys (1.1.23-7ubuntu2) breezy; urgency=low
+
+ * debian/control:
+ - Add build dependency libpoppler-dev.
+ - Drop cupsys dependency xpdf-utils.
+ * Added debian/patches/ubuntu-pdf2ps_poppler.patch:
+ - Replace pdftops/pdftops.cxx with the latest version from xpdf-3.00 code;
+ it was modified to use poppler's include files and use GooString instead
+ of GString (a simple rename in poppler).
+ - Adapt build rule.
+ * debian/rules: Install newly built pdftops into /usr/lib/cups/.
+ * debian/pdftops: Change path to pdftops from /usr/bin to /usr/lib/cups.
+ * Removed debian/patches/06replacepdftops.patch: This patch prevented the
+ building of pdftops/, but we want that again.
+
+ -- Martin Pitt Tue, 24 May 2005 14:39:14 +0200
+
+cupsys (1.1.23-7ubuntu1) breezy; urgency=low
+
+ * Resynchronise with Debian. (#9281)
+ * Fixed merging conflicts in debian/rules.
+ * Dropped patch ubuntu-lppasswd_noexistingconf.patch, now included in
+ Debian.
+ * debian/cupsys.postinst: Include /etc/default/cupsys to make the
+ #298040 patch effective (this somehow got lost in MOM).
+
+ -- Martin Pitt Fri, 15 Apr 2005 13:20:17 +0200
+
+cupsys (1.1.23-7) unstable; urgency=low
+
+ * Drop /etc/cups/printers.conf and /etc/cups/classes.conf from
+ configuration files. (closes: #298103)
+ Migration will be done automatically.
+ * Add /etc/default/cupsys. You can change force stop behavior by
+ changing FORCE_RESTART in this file. (closes: #298040)
+ * Add hplip to Suggests:. (closes: #297776)
+
+ -- Kenshi Muto Sat, 5 Mar 2005 12:27:32 +0900
+
+cupsys (1.1.23-6) unstable; urgency=medium
+
+ * Fix missing adduser dependency in cupsys-client. (closes: #296849)
+ * Apply parallel backend improvement patch.
+ - don't receive signal during writing (closes: #296222)
+ - fix 64bit problem (closes: #296223)
+
+ -- Kenshi Muto Sat, 26 Feb 2005 08:07:39 +0000
+
+cupsys (1.1.23-5) unstable; urgency=low
+
+ * Improve postinst message (closes: #295642). Thanks Adam.
+
+ -- Kenshi Muto Fri, 18 Feb 2005 21:23:10 +0900
+
+cupsys (1.1.23-4) unstable; urgency=low
+
+ * 20defaultport.patch is merged in upstream source.
+ * ARGH, libcupsys2-dev should conflict/replace against <<1.1.22-3.
+ Fix control file. (closes: #292879)
+ * Remove obsolete README_fr.txt. (closes: #293274)
+
+ -- Kenshi Muto Sun, 30 Jan 2005 08:35:17 +0900
+
+cupsys (1.1.23-3) unstable; urgency=low
+
+ * Remove $Id$ from config file: 07cvsremovetag.patch (closes: #291629)
+ * Fix 'lppasswd does not work with nonexisting passwd file' by mpitt's patch:
+ 41lppasswdnoexistingconf.patch (closes: 290011)
+
+ -- Kenshi Muto Sat, 22 Jan 2005 12:23:46 +0900
+
+cupsys (1.1.23-2) unstable; urgency=medium
+
+ * Move defvalue declaration to begin block for compile on
+ backports environment. Thanks Massimiliano.
+ * Fix Cyclades serial port name: 40cycladeserial.patch (closes: #270375)
+ * Upgrade shlibs of libcupsys2-gnutls10. cupsys-client needs newest
+ libcupsys2-gnutls10 (closes: #289930, #289939).
+
+ -- Kenshi Muto Mon, 10 Jan 2005 13:48:32 +0900
+
+cupsys (1.1.23-1ubuntu12) hoary; urgency=low
+
+ * debian/cupsys.init.d:
+ - Make the start-stop-daemon invocation in restart use the schedule
+ syntax (--retry TERM/10) to keep trying to kill cupsd for 10
+ seconds before it gives up. If it does fail, restart now fails
+ gracefully, rather than bringing down the shell. (Ubuntu #7847)
+ - Make the same changes to the stop target for consistency.
+
+ -- Adam Conrad Tue, 22 Mar 2005 03:40:51 +0000
+
+cupsys (1.1.23-1ubuntu11) hoary; urgency=low
+
+ * debian/cupsys.postinst:
+ - cleanup kill code somewhat - use pidof instead of ps aux output.
+ should fix Debian bug#298040
+ - Don't die if the kill fails.
+
+ -- LaMont Jones Thu, 17 Mar 2005 16:10:27 -0700
+
+cupsys (1.1.23-1ubuntu10) hoary; urgency=low
+
+ * debian/cupsys.postinst:
+ - Remove "--home /" from adduser invocation; sometimes adduser chowns the
+ home directory even if --no-create-home is given.
+ - If upgrading from a previous version, chown / to 0:0 to fix the bug from
+ previous releases.
+
+ -- Martin Pitt Thu, 10 Mar 2005 08:30:42 +0100
+
+cupsys (1.1.23-1ubuntu9) hoary; urgency=low
+
+ * Updated debian/patches/ubuntu-fixconfdirperms.patch:
+ - chmod /etc/cups/ppd to 2775 instead of 755 so that cupsd can actually
+ write into it. (Ubuntu #6816)
+ * Added debian/patches/ubuntu-slashprinternames.patch:
+ - When determining the path to a PPD or interface file, replace slashes
+ with underscores; otherwise the server will try to write into
+ nonexisting subdirectories of e. g. /etc/cups/ppd/. (Ubuntu #6816)
+ * Updated debian/patches/ubuntu-nowebadmin.patch:
+ - Corrected the gnome-cumps-manager menu path on all web pages and
+ translations. (Ubuntu #4725)
+
+ -- Martin Pitt Mon, 28 Feb 2005 19:04:51 +0100
+
+cupsys (1.1.23-1ubuntu8) hoary; urgency=low
+
+ * debian/patches/ubuntu-localports.patch:
+ - Removed "Browsing" patch hunk.
+ * Added debian/patches/ubuntu-externalbrowseconf.patch:
+ - Replace "Browsing" setting by "Include cupsd-browsing.conf" and update
+ the documentation comment; this allows to enable/disable browsing
+ without changing the main configuration file (which avoids dpkg
+ questions on upgrades).
+ - Enable "BrowseAddress @LOCAL" by default.
+ * Added debian/local/cupsd-browsing.conf (single "Browsing" configuration
+ parameter, default Off) and install it to /etc/cups/.
+ * Added scripts to manage browsing status to debian/local and install them
+ to /usr/share/cups/:
+ - browsing_status: Return whether browsing is currently disabled (0),
+ enabled (1) or there is a custom configuration (2).
+ - enable_browsing: Enable (1) or disable (0) browsing. Only possible with
+ non-custom configurations and with root privileges.
+ * Backend part of Ubuntu bug #2251 (user-friendly browsing configuration).
+
+ -- Martin Pitt Tue, 22 Feb 2005 13:46:02 +0100
+
+cupsys (1.1.23-1ubuntu7) hoary; urgency=low
+
+ * Reapply patch to background cupsd during startup.
+
+ -- Thom May Thu, 20 Jan 2005 17:28:30 +0000
+
+cupsys (1.1.23-1ubuntu6) hoary; urgency=low
+
+ * Must create cupsys user _AFTER_ we create the lpadmin group. sigh.
+
+ -- LaMont Jones Fri, 14 Jan 2005 15:01:21 -0700
+
+cupsys (1.1.23-1ubuntu5) hoary; urgency=low
+
+ * Need to possibly add cupsys user in cupsys-client postinst, too.
+
+ -- LaMont Jones Fri, 14 Jan 2005 12:08:14 -0700
+
+cupsys (1.1.23-1ubuntu4) hoary; urgency=low
+
+ * Fix postrm to not horribly break debconf and die.
+
+ -- LaMont Jones Thu, 13 Jan 2005 11:35:39 -0700
+
+cupsys (1.1.23-1ubuntu3) hoary; urgency=low
+
+ * debian/control: Added missing cupsys dependency 'procps'.
+ * Moved lppasswd permission setup from cupsys.postinst to
+ cupsys-client.postinst (to where it belongs).
+
+ -- Martin Pitt Thu, 13 Jan 2005 11:27:09 +0100
+
+cupsys (1.1.23-1ubuntu2) hoary; urgency=low
+
+ * Added debian/patches/ubuntu-build_avoid_unknown_chown.patch:
+ - systemv/Makefile: do not try to install lppasswd with owner CUPS_USER
+ during build since user "cupsys" does not exist on the buildds; install
+ it as root:root 755 instead
+ * debian/cupsys.postinst: setup permissions of lppasswd to cupsys:root 4755
+ * Added debian/patches/ubuntu-lppasswd_noexistingconf.patch:
+ - lppasswd tries to rename /etc/passwd.md5 to /etc/passwd.old; do not fail
+ if the former does not exist (at the very first invocation of the
+ program)
+ * debian/rules: removed silly "DEB_DH_INSTALLINIT_ARGS := -n" introduced by
+ some Ubuntu upload; this completely broke install/upgrade service
+ stopping/starting/restarting
+ * Added debian/patches/ubuntu-fixconfdirperms.patch:
+ - scheduler/conf.c: chmod /etc/cups to 3755 instead of 755:
+ + setgid forces the correct group (lpadmin) to files like passwd.md5
+ + sticky denies removing root-owned files by lpadmin members
+
+ -- Martin Pitt Wed, 12 Jan 2005 12:06:30 +0100
+
+cupsys (1.1.23-1ubuntu1) hoary; urgency=low
+
+ * Merged new Debian version
+ * Dropped patches (merged upstream):
+ + 39CAN-2004-1125.patch
+ + 40CAN-2004-1267.patch
+ + 41CAN-2004-1268+1269+1270.patch
+ * Moved change to cups/cups_C.h to ubuntu-nowebadmin.patch
+ * Reworked the following patches to work with new version:
+ + ubuntu-init.d.patch
+ + ubuntu-runasuser.patch
+ * Applied and removed Ubuntu-specific patches which patch files in debian/;
+ this plays better with merge-o-matic and my fellow developers like it that
+ way; however, it will make manual merges a pain:
+ + ubuntu-init.d.patch
+ + ubuntu-logrotate.patch
+ + ubuntu-runasuser.patch (only the parts touching debian/)
+ + ubuntu-runlevel-19.patch
+
+ -- Martin Pitt Thu, 6 Jan 2005 10:21:18 +0100
+
+cupsys (1.1.23-1) unstable; urgency=low
+
+ * New upstream release
+ * lprng disabled ipp feature since 3.8.26-1. Remove conflicts: lprng
+ of cupsys. (closes: #288531)
+
+ -- Kenshi Muto Tue, 4 Jan 2005 19:32:16 +0900
+
+cupsys (1.1.22-8) unstable; urgency=high
+
+ * Fix another security vulnerability since 1.1.21. Sigh...
+ (closes: #287835)
+
+ -- Kenshi Muto Fri, 31 Dec 2004 13:16:54 +0900
+
+cupsys (1.1.22-7) unstable; urgency=medium
+
+ * Use Depends: xpdf-utils instead of Recommends:.
+ This is RC fix (closes: #287921)
+
+ -- Kenshi Muto Fri, 31 Dec 2004 08:37:54 +0900
+
+cupsys (1.1.22-6) unstable; urgency=high
+
+ * Replaced upstream pdftops (derived from Xpdf) with pdftops.pl wrapper.
+ pdftops.pl is made by Helge Blischke, GNU GPL licensed.
+
+ CUPS 1.1.22 should enter to Sarge ASAP by some security reasons,
+ but upstream pdftops prevents to enter because it has libgcc_s.so
+ dependency and current gcc 3.4 faces difficult 'unwind' problem.
+ Now I believe cupsys 1.1.22-6 can enter soon without waiting
+ gcc problem.
+
+ If you want to print PDF files directly, you need to install
+ xpdf-utils. pdftops.pl calls pdftops in xpdf-utils package.
+ * Fix typo in control file.
+
+ -- Kenshi Muto Wed, 29 Dec 2004 14:59:28 +0000
+
+cupsys (1.1.22-5) unstable; urgency=high
+
+ * Apply upstream CVS patch (00cvs20041229.patch)
+ This includes fix of buffer overflow possibility in scheduler.
+
+ -- Kenshi Muto Wed, 29 Dec 2004 21:35:51 +0900
+
+cupsys (1.1.22-4) unstable; urgency=high
+
+ * Add Replaces migration for libcupsys2-dev.
+ It solves 'libcupsys2-dev overwrite a file in cupsys' problem.
+ (closes: #287609)
+
+ -- Kenshi Muto Wed, 29 Dec 2004 02:43:09 +0000
+
+cupsys (1.1.22-3) unstable; urgency=medium
+
+ * Remove unwanted ldflag: Back 02configure.patch (closes: #286450)
+ * Move fr/cups-config.1 to libcupsys2-dev (closes: #286449)
+ Thanks for your above two bug reports, Henrique.
+ * Note: [CAN-2004-1125] "xpdf buffer overflows" is already fixed in
+ previous Debian revision (1.1.22-2) with upstream patch.
+
+ -- Kenshi Muto Sat, 25 Dec 2004 23:40:15 +0900
+
+cupsys (1.1.22-2) unstable; urgency=medium
+
+ * Apply security fix patches from 1.1.23rc1.
+ * Revert logrotate to use 'reload'. (closes: #271872)
+
+ -- Kenshi Muto Sun, 19 Dec 2004 17:43:10 +0900
+
+cupsys (1.1.22-1) unstable; urgency=low
+
+ * New upstream release for unstable. Time is over, sarge isn't shipped.
+ I checked 1.1.21 to 1.1.22 migration doesn't break ABI quickly,
+ but I'm still scared...
+ * Apply gcc-4.0 patch for amd64: 37gfxfont.patch (closes: #285601)
+ * Do 'restart' instead of 'reload' when log is rotated.
+ 'reload' sometime causes just shutdown daemon. (Unknown problem)
+ * Fix equation in cupsys.postscript. (closes: #285205)
+ * Apply Russell's patch: 38httpwait.patch (closes: #284829)
+ (This is trial. If there is any grave problem by this, I'll off this
+ patch)
+ - Made http_wait() handle EINTR. This bug was causing cups
+ to print multiple copies of reports on remote printers.
+ - Lengthed the wait in ipp_http_read to handle connections
+ running over the internet. The short wait was causing
+ unwated multiple copies of reports to be printed.
+ - While both these bugs need to be fixed, neither completely
+ solves the original multiple copies problem. To solve
+ that no data should be printed if there was a read error.
+ * Add dependency version of smbclient. (closes: #284733)
+ * Fix SIGSEGV when remote destination goes timeout: 39remotetimeout.patch
+ (closes: #283500)
+
+ -- Kenshi Muto Wed, 15 Dec 2004 18:58:55 +0900
+
+cupsys (1.1.22-0.experimental4) experimental; urgency=low
+
+ * "I'm tired waiting Sarge forever" release.
+ I'm considering to upload 1.1.22 to unstable.
+ * I forgot to copy files from unstable version... FTBFS is solved.
+ (closes: #284574)
+ * Downgrade gs-esp dependency to Recommends.
+ I'm bore with attacks from stingy people.
+
+ -- Kenshi Muto Tue, 7 Dec 2004 21:39:55 +0900
+
+cupsys (1.1.22-0.experimental3) experimental; urgency=low
+
+ * Rebuild with -sa.
+
+ -- Kenshi Muto Tue, 7 Dec 2004 00:52:15 +0900
+
+cupsys (1.1.22-0.experimental2) experimental; urgency=low
+
+ * New upstream release
+
+ -- Kenshi Muto Mon, 6 Dec 2004 23:10:18 +0900
+
+cupsys (1.1.21-0.experimental2) experimental; urgency=low
+
+ * Fix typo in templates and unfuzzied po files. (closes: Bug#274851)
+ * Update German translation (closes: Bug#274828)
+ * Make pam.d/cupsys standard @include style (closes: Bug#265299)
+ * Set up group lpadmin in postinst instead of rules.
+ Because lpadmin isn't there on initial build environemnt
+ (closes: Bug#274985)
+
+ -- Kenshi Muto Mon, 4 Oct 2004 23:09:51 +0900
+
+cupsys (1.1.21-0.experimental1) experimental; urgency=low
+
+ * Experimental.
+ * new upstream version.
+
+ -- Kenshi Muto Sun, 3 Oct 2004 18:15:23 +0900
+
+cupsys (1.1.20final+rc1-10ubuntu8) hoary; urgency=low
+
+ * debian/patches patches patching debian/. sigh.
+
+ -- LaMont Jones Tue, 4 Jan 2005 09:29:48 -0700
+
+cupsys (1.1.20final+rc1-10ubuntu7) hoary; urgency=low
+
+ * Ignore errors on the stop phase of restart. Closes: warty#4504
+
+ -- LaMont Jones Mon, 3 Jan 2005 20:10:54 -0700
+
+cupsys (1.1.20final+rc1-10ubuntu6) hoary; urgency=low
+
+ * SECURITY UPDATE: fixed multiple buffer overflows
+ * Added patch 39CAN-2004-1125.patch:
+ - cupsys contains code from xpdf, therefore CAN-2004-1125 applies, too.
+ - References:
+ CAN-2004-1125
+ http://www.idefense.com/application/poi/display?id=172
+ * Added patch 40CAN-2004-1267.patch:
+ - filter/hpgl-input.c, ParseCommand(): Prevent reading an arbitrary string
+ into statically sized buffer "buf"; clip string if necessary.
+ - patch taken from http://www.cups.org/str.php?L1024+P0+S-2+C0+I0+E0+Qhpgl
+ - Thanks to Ariel Berkman for spotting this.
+ - References:
+ CAN-2004-1267
+ http://tigger.uic.edu/~jlongs2/holes/cups.txt
+ * Added patch 41CAN-2004-1268+1269+1270.patch: fix several vulns in
+ systemv/lppasswd.c:
+ - Check return value of fputs() and fprintf() when writing to the new
+ password file. When ignoring them, an user can truncate the new passwd
+ file by filling up the disk at the right moment. Now unlink the file on
+ error and print out a message.
+ - If the passwd.new file reaches the maximum file size system limit, the
+ new file was not deleted, thus lppasswd could not be used again. Now
+ ignores all relevant signals and unlinks the new file on write error.
+ - Check that the output file is not stdin, stdout, or stderr; otherwise
+ error messages would be written into the output file which would destroy
+ it.
+ - Thanks to Bartlomiej Sieka for spotting this.
+ - References:
+ CAN-2004-1268
+ CAN-2004-1269
+ CAN-2004-1270
+ http://tigger.uic.edu/~jlongs2/holes/cups2.txt
+
+ -- Martin Pitt Thu, 23 Dec 2004 11:18:50 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu5) hoary; urgency=low
+
+ * Start cupsys using its -F switch and explicitly background it with
+ start-stop-daemon; this shaves seconds off the boot process.
+ * Rename debian/patches/ubuntu-runlevel-12.patch to
+ ubuntu-runlevel-19.patch, moving the start point from 12 to 19 and
+ migrating users who were at both 20 and 12.
+
+ -- Scott James Remnant Thu, 9 Dec 2004 09:28:35 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu4) hoary; urgency=low
+
+ * Unbreak debian/patches/ubuntu-nowebadmin.patch, so that it does not create
+ other patches in debian/patches (jp-nowebadmin.patch moved to
+ debian/local), or .orig files.
+ * Add debian/patches/ubuntu-runlevel-12.patch, which moves the runlevel of
+ the init script to 12, and performs the migration accordingly.
+
+ -- Daniel Stone Mon, 6 Dec 2004 17:30:45 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu3) hoary; urgency=low
+
+ * SECURITY: still CAN-2004-0888. Updated patch 36pdftopsoverflow.patch:
+ - pdftops/gmem.[ch]: change declarations of gmalloc and grealloc to use size_t
+ instead of int; int truncated sizes to 32 bits, which made xpdf still
+ vulnerable to integer (and eventually buffer) overflow attacks on 64 bit
+ platforms like amd64.
+ - pdftops/Xref.cxx: fix several unchecked negative integer conditions
+ * Thanks to Marcus Meissner for providing the patches.
+
+ -- Martin Pitt Mon, 1 Nov 2004 14:37:58 +0100
+
+cupsys (1.1.20final+rc1-10ubuntu2) hoary; urgency=low
+
+ * Fixed debian/patches/ubuntu-localports.patch: do not comment out the
+ 'Listen' statement (Warty bug #3009).
+
+ -- Martin Pitt Fri, 29 Oct 2004 08:50:56 +0200
+
+cupsys (1.1.20final+rc1-10ubuntu1) hoary; urgency=low
+
+ * Resynchronized to Debian
+ * Now keep all Ubuntu specific modification as patches prefixed with
+ "ubuntu-" to ease further merges:
+ - ubuntu-auxgroups: allow cupsd to run in auxilliary groups
+ - ubuntu-init.d: pretty initscript, make /usr/share/cups/model
+ lpadmin-writeable to install custom printer drivers
+ - ubuntu-localports: listen on localhost port only by default
+ - ubuntu-logrotate: use 'restart', not 'reload' to restart cupsd after log
+ rotation (reload does not exist any more)
+ - ubuntu-nowebadmin: display a red warning on the web interface that
+ administrative functions are disabled for security reasons
+ - ubuntu-runasuser: do not run as 'root', but as 'cupsys' by default
+ * Ubuntu-specific debian/rules (can't be patched):
+ - configure with --with-cups-user=cupsys
+ - apply patch debian/patches/ja-nowebadmin.ptch (must be done after
+ uudecoding ja.tar.gz.uu)
+
+ -- Martin Pitt Thu, 28 Oct 2004 23:56:54 +0200
+
+cupsys (1.1.20final+rc1-8) unstable; urgency=medium
+
+ * Apply GNU Hurd configure patch for fix FTBFS. (closes: Bug#274599)
+ * Improve patch test routine. (closes: Bug#272952, Bug#274564)
+
+ -- Kenshi Muto Sun, 3 Oct 2004 13:07:43 +0900
+
+cupsys (1.1.20final+rc1-7) unstable; urgency=medium
+
+ * Fix french debconf translation (closes: Bug#272520).
+ This update is important because previous version shows
+ illegal debconf choice in French.
+
+ -- Kenshi Muto Tue, 21 Sep 2004 22:31:54 +0900
+
+cupsys (1.1.20final+rc1-6) unstable; urgency=high
+
+ * Applied patch from Alvaro Martinez Echevarria to fix
+ daniel of service [scheduler/dirsvc.c, CAN-2004-0558]
+ * Apply GNU/Hurd patch (closes: Bug#263526)
+ * Update pt_PR debconf translation (closes: Bug#264096)
+ * Remove directory before making symlink (closes: Bug#270741)
+
+ -- Kenshi Muto Tue, 24 Aug 2004 10:31:32 +0900
+
+cupsys (1.1.20final+rc1-5) unstable; urgency=low
+
+ * Apply anonymous patch for /jobs. This patch avoids many
+ client-error-forbidden. (closes: Bug#184361)
+ cupsd.conf will be automatically modified to use basic user
+ authentication (Add AuthType Basic
+ AuthType User).
+
+ -- Kenshi Muto Wed, 4 Aug 2004 09:13:02 +0900
+
+cupsys (1.1.20final+rc1-4) unstable; urgency=medium
+
+ * Wait 10 seconds after reload for samba restart problem.
+ (closes: Bug#260969)
+ * Update Czech debconf translation (closes: Bug#260862)
+ * Built against libtiff4.
+ * Build against libgnutls11. (Though package name is still
+ libcupsys2-gnutls10)
+
+ -- Kenshi Muto Mon, 26 Jul 2004 22:12:18 +0900
+
+cupsys (1.1.20final+rc1-3) unstable; urgency=high
+
+ * Change guess order of USB device name for FHS compliant.
+ (closes: Bug#259965)
+
+ -- Kenshi Muto Sun, 18 Jul 2004 04:54:58 +0900
+
+cupsys (1.1.20final+rc1-2) unstable; urgency=medium
+
+ * Replace set-as-default icon of Japanese. Thanks Tomo-p.
+ * Provides libcupsys2 dummy package for smooth transition. (closes: #259378)
+
+ -- Kenshi Muto Wed, 14 Jul 2004 19:10:43 +0900
+
+cupsys (1.1.20final+rc1-1) unstable; urgency=low
+
+ * Apply a patch for fixing typo in DE templates. (Closes: Bug#250883)
+ * New upstream source, 2004-07-03 CVS.
+ * Add netbase dependency for cupsys-bsd.
+ * Move certs files to /var/lib/cups/certs. (Closes: Bug#254153)
+
+ -- Kenshi Muto Wed, 26 May 2004 08:46:35 +0900
+
+cupsys (1.1.20final+cvs20040330-4) unstable; urgency=medium
+
+ * Now libgnutls10 migration starts at 'unstable'/'testing'.
+ Packages depending libcupsys2 should be rebuit with newer
+ libcupsys2-dev.
+ * Fix log rotation problem by adding 'sharedscripts' to
+ /etc/logrotate.d/cupsys. (Closes: Bug#249023)
+
+ -- Kenshi Muto Tue, 25 May 2004 08:14:44 +0900
+
+cupsys (1.1.20final+cvs20040330-3experimental2) experimental; urgency=medium
+
+ * Rename libcupsys2 to libcupsys2-gnutls10.
+ This package doesn't 'Provides: libcupsys2' to migrate libgnutls10.
+ Sebastien Bacher plans cups/libgnutls10 migration.
+ * Add notes about backend configuration to README.Debian.
+ * Fix (I hope) log rotation problem by adding sharedscripts to
+ /etc/logrotate.d/cupsys. (Closes: Bug#249024)
+
+ -- Kenshi Muto Sat, 15 May 2004 11:17:16 +0900
+
+cupsys (1.1.20final+cvs20040330-3) unstable; urgency=low
+
+ * Remove EXPORT_SSLLIBS variable from cups-config (Closes: Bug#246102).
+ -lgnutls isn't necessary by software using libcups.
+ * Apply PJL detection patch from upstream.
+ * Translations
+ - Updated Turkish debconf messages (Closes: Bug#246075). Thanks
+ Recai and Gurkan.
+
+ -- Kenshi Muto Wed, 28 Apr 2004 00:23:59 +0900
+
+cupsys (1.1.20final+cvs20040330-2) unstable; urgency=low
+
+ * Fix typo in HOWTO_BUGREPORT.txt.
+ * Translations
+ - Update Dutch debconf messages (Closes: Bug#242260). Thanks Tim.
+
+ -- Kenshi Muto Tue, 6 Apr 2004 19:16:48 +0900
+
+cupsys (1.1.20final+cvs20040330-1) unstable; urgency=low
+
+ * New upstream CVS
+ * Revert pstops to old 1.1.20. (Closes: Bug#240792)
+ * Translations
+ - Updated Danish debconf messages.
+
+ -- Kenshi Muto Fri, 26 Mar 2004 19:00:01 +0900
+
+cupsys (1.1.20final+cvs20040317-4) unstable; urgency=low
+
+ * Chagnge backend question priority to low. (Closes: Bug#238847)
+ When you use PPC, parallel backend will be removed from default choice
+ automatically.
+ If you want to use parallel (and you know what you will do),
+ please run 'dpkg-reconfigure cupsys'.
+ * Translations
+ - Updated Danish debconf messages (Closes: Bug#239256). Thanks Claus.
+ - Updated French debconf messages (Closes: Bug#239756). Thanks Christian.
+
+ -- Kenshi Muto Wed, 24 Mar 2004 22:30:28 +0900
+
+cupsys (1.1.20final+cvs20040317-3) unstable; urgency=low
+
+ * Remove sysvinit. This package is essential. Thanks Thomas.
+ * Now choice menu is translatable (Closes: Bug#238821).
+ * Updated French debconf messages. Thanks Christian.
+ * Add socket to default choice. I think this backend doesn't
+ cause hang up anywhere.
+
+ -- Kenshi Muto Fri, 19 Mar 2004 17:16:48 +0900
+
+cupsys (1.1.20final+cvs20040317-2) unstable; urgency=medium
+
+ * Add sysvinit in dependency. (Closes: Bug#238763)
+ * Updated Brazilian Portuguese debconf messages. Thanks Andre.
+ * Fix printers.cgi crash (Closes: Bug#238800)
+ * Updated Japanese templates & images.
+
+ -- Kenshi Muto Fri, 19 Mar 2004 09:00:04 +0900
+
+cupsys (1.1.20final+cvs20040317-1) unstable; urgency=low
+
+ * New CVS release.
+ * Add asking about backend program. This is not best way to solve
+ PPC crash / i386 serial hang-up, but at least user can choose what
+ he/she want to use. serial backend becomes 'not use' by default.
+ Add notice about 'parallel of PPC may cause a problem'.
+ (closes: Bug#237613, Bug#233529, Bug#211677, Bug#224760)
+ * Updated Spanish debconf messages (closes: Bug#236470). Thanks Carlos.
+ * Updated Danish debconf messages. Thanks Claus.
+ * Updated French debconf messages. Thanks Christian.
+ * Updated Czech debconf messages. Thanks Miroslav.
+
+ -- Kenshi Muto Sat, 6 Mar 2004 21:36:35 +0900
+
+cupsys (1.1.20final-16) unstable; urgency=low
+
+ * Improved init.d/cupsys message (closes: Bug#235693). Thanks Lee.
+ * Add Czech debconf messages (closes: Bug#236276). Thanks Miroslav.
+
+ -- Kenshi Muto