[Pkg-cups-devel] r463 - in cupsys/trunk/debian: . patches

Martin Pitt mpitt at alioth.debian.org
Mon Apr 30 11:53:06 UTC 2007


Author: mpitt
Date: Mon Apr 30 11:53:05 2007
New Revision: 463

Added:
   cupsys/trunk/debian/patches/14_dont_force_ssl.dpatch
   cupsys/trunk/debian/patches/58_cupsd.conf-AllowLocal.dpatch
   cupsys/trunk/debian/patches/70_reactivate_recommended_driver.dpatch
   cupsys/trunk/debian/patches/98_search_mime_files_in_usr_share.dpatch
Removed:
   cupsys/trunk/debian/patches/00_00str2111.dpatch
   cupsys/trunk/debian/patches/00_01str2137.dpatch
   cupsys/trunk/debian/patches/00_02str2144.dpatch
   cupsys/trunk/debian/patches/00_03str2106.dpatch
   cupsys/trunk/debian/patches/00_04str2117.dpatch
   cupsys/trunk/debian/patches/00_05str2133.dpatch
   cupsys/trunk/debian/patches/00_06str2121.dpatch
   cupsys/trunk/debian/patches/00_07str2123.dpatch
   cupsys/trunk/debian/patches/00_08str2135.dpatch
   cupsys/trunk/debian/patches/00_09str2198.dpatch
   cupsys/trunk/debian/patches/03_clean.dpatch
   cupsys/trunk/debian/patches/08_cupsd.conf.conf.d.dpatch
   cupsys/trunk/debian/patches/26_modprobe.dpatch
   cupsys/trunk/debian/patches/48_stdlib.dpatch
   cupsys/trunk/debian/patches/61_job_c_strangeloop.dpatch
   cupsys/trunk/debian/patches/64_driverfolder.dpatch
   cupsys/trunk/debian/patches/65_detect_http_shutdown.dpatch
Modified:
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/patches/00list
   cupsys/trunk/debian/patches/04_freebsd.dpatch
   cupsys/trunk/debian/patches/06_disable_backend_setuid.dpatch
   cupsys/trunk/debian/patches/07_removecvstag.dpatch
   cupsys/trunk/debian/patches/09_runasuser.dpatch
   cupsys/trunk/debian/patches/09_runasuser_autoconf.dpatch
   cupsys/trunk/debian/patches/53_usr_share_ppd_support.dpatch
   cupsys/trunk/debian/patches/54_cups-config_modeldir.dpatch
   cupsys/trunk/debian/patches/55_ppd_okidata_name.dpatch
   cupsys/trunk/debian/patches/56_dirsvc.dpatch
   cupsys/trunk/debian/patches/62_classes_crash.dpatch
Log:
* New upstream bugfix release.
Synchronize patches with Ubuntu and new upstream version 1.2.10:
* Drop patches which are fixed upstream:
  00_00str2111.dpatch, 00_01str2137.dpatch, 00_02str2144.dpatch,
  00_03str2106.dpatch, 00_04str2117.dpatch, 00_05str2133.dpatch,
  00_06str2121.dpatch, 00_07str2123.dpatch, 00_08str2135.dpatch,
  00_09str2198.dpatch, 03_clean.dpatch, 65_detect_http_shutdown.dpatch
* Remove a few obsolete patches:
  08_cupsd.conf.conf.d.dpatch, 26_modprobe.dpatch, 48_stdlib.dpatch,
  61_job_c_strangeloop.dpatch, 08_cupsd.conf.conf.d.dpatch,
  64_driverfolder.dpatch.
* Add debian/patches/14_dont_force_ssl.dpatch: Do not require SSL for /admin
  pages, since gnome-cups-manager (and most probably other GUI frontends)
  does not support this.
* Add debian/patches/58_cupsd.conf-AllowLocal.dpatch: Allow access to local
  ethernet by default. This just affects the ACL, for actually enabling
  access cupsd needs to be switched to not only listen on localhost. With
  that, this setting does not need to be configured in two different places.
* Add debian/patches/70_reactivate_recommended_driver.dpatch: Upstream CUPS
  filters the "(recommended)" marking from the NickNames of the PPD files
  when listing PPDs. These are an important orientation for the user and
  they are also made use of by some printer setup tools. We need them at
  least until a better solution for recommending drivers gets available.
* Add debian/patches/98_search_mime_files_in_usr_share.dpatch: Let CUPS also
  search for *.types and *.convs files in /usr/share/cups/mime. This way
  packages can provide *.types and *.convs files which do not get considered
  as conffiles. (See https://launchpad.net/36532 for details).
* debian/patches/*.dpatch: Forwarded a lot of patches to upstream bug
  tracker, add STR URLs to dpatch DP: headers.

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Mon Apr 30 11:53:05 2007
@@ -1,4 +1,4 @@
-cupsys (1.2.7-5) UNRELEASED; urgency=low
+cupsys (1.2.10-1) UNRELEASED; urgency=low
 
   [ Kenshi Muto ]
   * Applied templates improvement patch contributed by
@@ -23,7 +23,40 @@
     - Dutch. (closes: #418135)
     - Portuguese (closes: #418299)
 
- -- Christian Perrier <bubulle at debian.org>  Mon, 02 Apr 2007 07:51:20 +0200
+  [ Martin Pitt ]
+  * New upstream bugfix release.
+
+  Synchronize patches with Ubuntu and new upstream version 1.2.10:
+
+  * Drop patches which are fixed upstream:
+    00_00str2111.dpatch, 00_01str2137.dpatch, 00_02str2144.dpatch,
+    00_03str2106.dpatch, 00_04str2117.dpatch, 00_05str2133.dpatch,
+    00_06str2121.dpatch, 00_07str2123.dpatch, 00_08str2135.dpatch,
+    00_09str2198.dpatch, 03_clean.dpatch, 65_detect_http_shutdown.dpatch
+  * Remove a few obsolete patches:
+    08_cupsd.conf.conf.d.dpatch, 26_modprobe.dpatch, 48_stdlib.dpatch,
+    61_job_c_strangeloop.dpatch, 08_cupsd.conf.conf.d.dpatch,
+    64_driverfolder.dpatch.
+  * Add debian/patches/14_dont_force_ssl.dpatch: Do not require SSL for /admin
+    pages, since gnome-cups-manager (and most probably other GUI frontends)
+    does not support this.
+  * Add debian/patches/58_cupsd.conf-AllowLocal.dpatch: Allow access to local
+    ethernet by default. This just affects the ACL, for actually enabling
+    access cupsd needs to be switched to not only listen on localhost. With
+    that, this setting does not need to be configured in two different places.
+  * Add debian/patches/70_reactivate_recommended_driver.dpatch: Upstream CUPS
+    filters the "(recommended)" marking from the NickNames of the PPD files
+    when listing PPDs. These are an important orientation for the user and
+    they are also made use of by some printer setup tools. We need them at
+    least until a better solution for recommending drivers gets available.
+  * Add debian/patches/98_search_mime_files_in_usr_share.dpatch: Let CUPS also
+    search for *.types and *.convs files in /usr/share/cups/mime. This way
+    packages can provide *.types and *.convs files which do not get considered
+    as conffiles. (See https://launchpad.net/36532 for details).
+  * debian/patches/*.dpatch: Forwarded a lot of patches to upstream bug
+    tracker, add STR URLs to dpatch DP: headers.
+
+ -- Martin Pitt <mpitt at debian.org>  Mon, 30 Apr 2007 13:45:06 +0200
 
 cupsys (1.2.7-4) unstable; urgency=high
 

Modified: cupsys/trunk/debian/patches/00list
==============================================================================
--- cupsys/trunk/debian/patches/00list	(original)
+++ cupsys/trunk/debian/patches/00list	Mon Apr 30 11:53:05 2007
@@ -1,42 +1,26 @@
-00_00str2111.dpatch
-#00_01str2137.dpatch
-00_02str2144.dpatch
-00_03str2106.dpatch
-00_04str2117.dpatch
-00_05str2133.dpatch
-00_06str2121.dpatch
-00_07str2123.dpatch
-00_08str2135.dpatch
-00_09str2198.dpatch
 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
 53_usr_share_ppd_support.dpatch
 54_cups-config_modeldir.dpatch
 55_ppd_okidata_name.dpatch
 56_dirsvc.dpatch
 57_cupsaddsmb.dpatch
-#58_fixdestc.dpatch
+58_cupsd.conf-AllowLocal.dpatch
 60_device_uri.dpatch
-#61_job_c_strangeloop.dpatch
 62_classes_crash.dpatch
-#64_driverfolder.dpatch
-65_detect_http_shutdown.dpatch
-#66_setegid.dpatch
 67_printcap.dpatch
 68_edit-config.dpatch
+70_reactivate_recommended_driver.dpatch
+98_search_mime_files_in_usr_share.dpatch

Modified: cupsys/trunk/debian/patches/04_freebsd.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/04_freebsd.dpatch	(original)
+++ cupsys/trunk/debian/patches/04_freebsd.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 04_freebsd.dpatch by Kenshi Muto <kmuto at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: man extension is handled by dh_installman
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2367
 
 @DPATCH@
 diff -urNad cups-1.2~/backend/parallel.c cups-1.2/backend/parallel.c

Modified: cupsys/trunk/debian/patches/06_disable_backend_setuid.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/06_disable_backend_setuid.dpatch	(original)
+++ cupsys/trunk/debian/patches/06_disable_backend_setuid.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 06_disable_backend_setuid.dpatch by  <mpitt at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2368
 
 @DPATCH@
 diff -urNad cupsys~/scheduler/cups-deviced.c cupsys/scheduler/cups-deviced.c
@@ -31,4 +31,4 @@
 -   /*
      * Run the backend with no arguments and collect the output...
      */
- 
+

Modified: cupsys/trunk/debian/patches/07_removecvstag.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/07_removecvstag.dpatch	(original)
+++ cupsys/trunk/debian/patches/07_removecvstag.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 07_removecvstag.dpatch by Kenshi Muto <kmuto at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2369
 
 @DPATCH@
 diff -urNad cups-1.2~/conf/Makefile cups-1.2/conf/Makefile

Modified: cupsys/trunk/debian/patches/09_runasuser.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/09_runasuser.dpatch	(original)
+++ cupsys/trunk/debian/patches/09_runasuser.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,13 +2,17 @@
 ## 09_runasuser.dpatch by  <mpitt at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Provide a configuration switch --enable-privilege-dropping for running
+## DP: the scheduler as a normal system user. This confines security
+## DP: vulnerabilities to the scheduler itself rather than providing a
+## DP: remote root attack vector.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2370
 
 @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 @@
+diff -urNad cups-1.2-ubuntu~/config-scripts/cups-defaults.m4 cups-1.2-ubuntu/config-scripts/cups-defaults.m4
+--- cups-1.2-ubuntu~/config-scripts/cups-defaults.m4	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/config-scripts/cups-defaults.m4	2007-04-30 11:47:55.000000000 +0200
+@@ -220,6 +220,17 @@
  AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
  AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS")
  
@@ -24,11 +28,11 @@
 +AC_SUBST(CUPS_DROP_PRIVILEGES)
 +
  dnl Default printcap file...
- AC_ARG_WITH(printcap, [  --with-printcap     set 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
+diff -urNad cups-1.2-ubuntu~/config.h.in cups-1.2-ubuntu/config.h.in
+--- cups-1.2-ubuntu~/config.h.in	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/config.h.in	2007-04-30 11:47:55.000000000 +0200
 @@ -41,6 +41,11 @@
  #define CUPS_DEFAULT_GROUP	"sys"
  #define CUPS_DEFAULT_SYSTEM_GROUPS	"sys root system"
@@ -41,9 +45,9 @@
  
  /*
   * 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
+diff -urNad cups-1.2-ubuntu~/scheduler/cert.c cups-1.2-ubuntu/scheduler/cert.c
+--- cups-1.2-ubuntu~/scheduler/cert.c	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/cert.c	2007-04-30 11:47:55.000000000 +0200
 @@ -116,7 +116,7 @@
      * Root certificate...
      */
@@ -53,10 +57,10 @@
      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 @@
+diff -urNad cups-1.2-ubuntu~/scheduler/conf.c cups-1.2-ubuntu/scheduler/conf.c
+--- cups-1.2-ubuntu~/scheduler/conf.c	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/conf.c	2007-04-30 11:47:55.000000000 +0200
+@@ -465,7 +465,11 @@
    if (!status)
      return (0);
  
@@ -67,11 +71,44 @@
 +#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 @@
+   * See if the ServerName is an IP address...
+diff -urNad cups-1.2-ubuntu~/scheduler/cups-polld.c cups-1.2-ubuntu/scheduler/cups-polld.c
+--- cups-1.2-ubuntu~/scheduler/cups-polld.c	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/cups-polld.c	2007-04-30 11:47:55.000000000 +0200
+@@ -34,6 +34,9 @@
+  * Include necessary headers...
+  */
+ 
++#include "config.h"
++#include <pwd.h>
++
+ #include <cups/http-private.h>
+ #include <cups/cups.h>
+ #include <stdlib.h>
+@@ -150,6 +153,19 @@
+   }
+ 
+  /*
++  * Drop our privileges to the cupsd scheduler user
++  */
++#if CUPS_DROP_PRIVILEGES == 1
++  struct passwd * pwd = getpwnam(CUPS_DEFAULT_USER);
++  if (!pwd) {
++    fprintf(stderr, "ERROR: could not get passwd data for user " CUPS_DEFAULT_USER "\n");
++    exit(1);
++  }
++  setgid(pwd->pw_gid);
++  setuid(pwd->pw_uid);
++#endif
++
++ /*
+   * Loop forever, asking for available printers and classes...
+   */
+ 
+diff -urNad cups-1.2-ubuntu~/scheduler/main.c cups-1.2-ubuntu/scheduler/main.c
+--- cups-1.2-ubuntu~/scheduler/main.c	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/main.c	2007-04-30 11:47:55.000000000 +0200
+@@ -58,6 +58,9 @@
  #include <sys/resource.h>
  #include <syslog.h>
  #include <grp.h>
@@ -81,7 +118,7 @@
  
  #ifdef HAVE_LAUNCH_H
  #  include <launch.h>
-@@ -515,6 +518,20 @@
+@@ -536,6 +539,20 @@
    cupsdStartSystemMonitor();
  #endif /* __APPLE__ */
  
@@ -102,7 +139,7 @@
   /*
    * Start any pending print jobs...
    */
-@@ -998,7 +1015,7 @@
+@@ -1037,7 +1054,7 @@
      */
  
      if ((current_time - RootCertTime) >= RootCertDuration && RootCertDuration &&
@@ -112,21 +149,21 @@
       /*
        * 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 @@
+--- cups-1.2-ubuntu~/scheduler/process.c	2007-04-30 11:47:51.000000000 +0200
++++ cups-1.2-ubuntu/scheduler/process.c	2007-04-30 11:48:06.000000000 +0200
+@@ -245,6 +245,7 @@
        if (setuid(User))
          exit(errno);
      }
--    else
--    {
--     /*
--      * Reset group membership to just the main one we belong to.
--      */
--
--      setgid(Group);
--      setgroups(1, &Group);
--    }
++#if CUPS_DROP_PRIVILEGES == 0
+     else
+     {
+      /*
+@@ -254,6 +255,7 @@
+       setgid(Group);
+       setgroups(1, &Group);
+     }
++#endif
  
     /*
      * Change umask to restrict permissions on created files...

Modified: cupsys/trunk/debian/patches/09_runasuser_autoconf.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/09_runasuser_autoconf.dpatch	(original)
+++ cupsys/trunk/debian/patches/09_runasuser_autoconf.dpatch	Mon Apr 30 11:53:05 2007
@@ -5,15 +5,15 @@
 ## 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
+diff -urNad cups-1.2-ubuntu~/configure cups-1.2-ubuntu/configure
+--- cups-1.2-ubuntu~/configure	2007-04-30 10:40:19.000000000 +0200
++++ cups-1.2-ubuntu/configure	2007-04-30 10:40:55.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_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 RCLEVELS RCSTART RCSTOP 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 INSTALL32 LIB32CUPS LIB32CUPSIMAGE LIB32DIR UNINSTALL32 INSTALL64 LIB64CUPS LIB64CUPSIMAGE LIB64DIR UNINSTALL64 DSO DSOFLAGS DSO32FLAGS DSO64FLAGS LIBCUPS LIBCUPSIMAGE LINKCUPS LINKCUPSIMAGE DSOLIBS IMGLIBS EXPORT_LDFLAGS LIBTOOL OPTIM ARCHFLAGS ARCH32FLAGS ARCH64FLAGS 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 RCLEVELS RCSTART RCSTOP 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 INSTALL32 LIB32CUPS LIB32CUPSIMAGE LIB32DIR UNINSTALL32 INSTALL64 LIB64CUPS LIB64CUPSIMAGE LIB64DIR UNINSTALL64 DSO DSOFLAGS DSO32FLAGS DSO64FLAGS LIBCUPS LIBCUPSIMAGE LINKCUPS LINKCUPSIMAGE DSOLIBS IMGLIBS EXPORT_LDFLAGS LIBTOOL OPTIM ARCHFLAGS ARCH32FLAGS ARCH64FLAGS 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.
@@ -25,7 +25,7 @@
    --enable-pdftops        build pdftops filter, default=auto
  
  Optional Packages:
-@@ -13297,6 +13298,26 @@
+@@ -14055,6 +14056,26 @@
  _ACEOF
  
  
@@ -52,7 +52,7 @@
  
  # Check whether --with-printcap or --without-printcap was given.
  if test "${with_printcap+set}" = set; then
-@@ -14584,6 +14605,7 @@
+@@ -15355,6 +15376,7 @@
  s, at CUPS_GROUP@,$CUPS_GROUP,;t t
  s, at CUPS_SYSTEM_GROUPS@,$CUPS_SYSTEM_GROUPS,;t t
  s, at CUPS_PRIMARY_SYSTEM_GROUP@,$CUPS_PRIMARY_SYSTEM_GROUP,;t t

Added: cupsys/trunk/debian/patches/14_dont_force_ssl.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/14_dont_force_ssl.dpatch	Mon Apr 30 11:53:05 2007
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_dont_force_ssl.dpatch by  <martin.pitt at ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at 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...
+ <Location /admin>
+- at ENCRYPTION_REQUIRED@
+   Order allow,deny
+   Allow localhost
+ </Location>

Modified: cupsys/trunk/debian/patches/53_usr_share_ppd_support.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/53_usr_share_ppd_support.dpatch	(original)
+++ cupsys/trunk/debian/patches/53_usr_share_ppd_support.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 53_usr_share_ppd_support.dpatch by  <martin.pitt at ubuntu.com>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2371
 
 @DPATCH@
 diff -urNad cupsys-1.2.1~/scheduler/cups-driverd.c cupsys-1.2.1/scheduler/cups-driverd.c

Modified: cupsys/trunk/debian/patches/54_cups-config_modeldir.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/54_cups-config_modeldir.dpatch	(original)
+++ cupsys/trunk/debian/patches/54_cups-config_modeldir.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 54_cups-config_modeldir.dpatch by  <martin.pitt at ubuntu.com>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2371
 
 @DPATCH@
 diff -urNad cups-1.2-ubuntu~/cups-config.in cups-1.2-ubuntu/cups-config.in

Modified: cupsys/trunk/debian/patches/55_ppd_okidata_name.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/55_ppd_okidata_name.dpatch	(original)
+++ cupsys/trunk/debian/patches/55_ppd_okidata_name.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 55_ppd_okidata_name.dpatch by  <doko at ubuntu.com>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2372
 
 @DPATCH@
 --- ./ppd/okidata9.ppd~	2005-12-15 17:19:46.000000000 +0100

Modified: cupsys/trunk/debian/patches/56_dirsvc.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/56_dirsvc.dpatch	(original)
+++ cupsys/trunk/debian/patches/56_dirsvc.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 56_dirsvc.dpatch by Kenshi Muto <kmuto at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2373
 
 @DPATCH@
 diff -urNad cups-1.2-ubuntu~/scheduler/dirsvc.c cups-1.2-ubuntu/scheduler/dirsvc.c

Added: cupsys/trunk/debian/patches/58_cupsd.conf-AllowLocal.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/58_cupsd.conf-AllowLocal.dpatch	Mon Apr 30 11:53:05 2007
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 58_cupsd.conf-AllowLocal.dpatch by  <martin.pitt at ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at 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 @@
+ <Location />
+   Order allow,deny
+   Allow localhost
++  Allow @LOCAL
+ </Location>
+ 
+ # Restrict access to the admin pages...

Modified: cupsys/trunk/debian/patches/62_classes_crash.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/62_classes_crash.dpatch	(original)
+++ cupsys/trunk/debian/patches/62_classes_crash.dpatch	Mon Apr 30 11:53:05 2007
@@ -2,7 +2,7 @@
 ## 62_classes_crash.dpatch by Kenshi Muto <kmuto at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: TODO: forward upstream, find details
 
 @DPATCH@
 diff -urNad cupsys-1.2.3~/scheduler/classes.c cupsys-1.2.3/scheduler/classes.c

Added: cupsys/trunk/debian/patches/70_reactivate_recommended_driver.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/70_reactivate_recommended_driver.dpatch	Mon Apr 30 11:53:05 2007
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70_reactivate_recommended_driver.dpatch by  <till.kamppeter at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cupsys-1.2.8~/scheduler/cups-driverd.c cupsys-1.2.8/scheduler/cups-driverd.c
+--- cupsys-1.2.8~/scheduler/cups-driverd.c	2007-01-23 17:01:48.000000000 +0000
++++ cupsys-1.2.8/scheduler/cups-driverd.c	2007-02-22 10:01:26.000000000 +0000
+@@ -147,7 +147,6 @@
+ 	size_t     size)		/* I - File size */
+ {
+   ppd_info_t	*ppd;			/* PPD */
+-  char		*recommended;		/* Foomatic driver string */
+ 
+ 
+  /*
+@@ -199,14 +198,6 @@
+   strlcpy(ppd->record.device_id, device_id, sizeof(ppd->record.device_id));
+ 
+  /*
+-  * Strip confusing (and often wrong) "recommended" suffix added by
+-  * Foomatic drivers...
+-  */
+-
+-  if ((recommended = strstr(ppd->record.make_and_model, " (recommended)")) != NULL)
+-    *recommended = '\0';
+-
+- /*
+   * Return the new PPD pointer...
+   */
+ 

Added: cupsys/trunk/debian/patches/98_search_mime_files_in_usr_share.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/98_search_mime_files_in_usr_share.dpatch	Mon Apr 30 11:53:05 2007
@@ -0,0 +1,188 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 98_search_mime_files_in_usr_share.dpatch by  <till.kamppeter at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Forwarded upstream: http://www.cups.org/str.php?L2373
+
+ at DPATCH@
+diff -urNad cupsys-1.2.8~/scheduler/conf.c cupsys-1.2.8/scheduler/conf.c
+--- cupsys-1.2.8~/scheduler/conf.c	2007-03-14 12:22:15.000000000 +0000
++++ cupsys-1.2.8/scheduler/conf.c	2007-03-14 12:22:16.000000000 +0000
+@@ -216,6 +216,7 @@
+   cups_file_t	*fp;			/* Configuration file */
+   int		status;			/* Return status */
+   char		temp[1024],		/* Temporary buffer */
++                temp2[1024],            /* Another temporary buffer */
+ 		*slash;			/* Directory separator */
+   cups_lang_t	*language;		/* Language */
+   struct passwd	*user;			/* Default user */
+@@ -973,19 +974,20 @@
+     */
+ 
+     snprintf(temp, sizeof(temp), "%s/filter", ServerBin);
++    snprintf(temp2, sizeof(temp2), "%s/mime:%s", DataDir, ServerRoot);
+ 
+-    MimeDatabase = mimeLoad(ServerRoot, temp);
++    MimeDatabase = mimeLoad(temp2, temp);
+ 
+     if (!MimeDatabase)
+     {
+       cupsdLogMessage(CUPSD_LOG_EMERG,
+-                      "Unable to load MIME database from \'%s\'!", ServerRoot);
++                      "Unable to load MIME database from \'%s\'!", temp2);
+       exit(errno);
+     }
+ 
+     cupsdLogMessage(CUPSD_LOG_INFO,
+                     "Loaded MIME database from \'%s\': %d types, %d filters...",
+-                    ServerRoot, mimeNumTypes(MimeDatabase),
++                    temp2, mimeNumTypes(MimeDatabase),
+ 		    mimeNumFilters(MimeDatabase));
+ 
+    /*
+diff -urNad cupsys-1.2.8~/scheduler/mime.c cupsys-1.2.8/scheduler/mime.c
+--- cupsys-1.2.8~/scheduler/mime.c	2006-05-30 20:40:34.000000000 +0100
++++ cupsys-1.2.8/scheduler/mime.c	2007-03-14 12:23:11.000000000 +0000
+@@ -217,9 +217,12 @@
+ 
+ mime_t *				/* O - Updated MIME database */
+ mimeMerge(mime_t     *mime,		/* I - MIME database to add to */
+-          const char *pathname,		/* I - Directory to load */
+-          const char *filterpath)	/* I - Directory to load */
++          const char *pathname,		/* I - Directory/ies to load */
++          const char *filterpath)	/* I - Filter directory */
+ {
++  char          *paths,                 /* Pointers for parsing mime */
++                *dirname,               /* directories */
++                *colon;
+   cups_dir_t	*dir;			/* Directory */
+   cups_dentry_t	*dent;			/* Directory entry */
+   char		filename[1024];		/* Full filename of types/converts file */
+@@ -234,62 +237,88 @@
+   if (!pathname)
+     return (NULL);
+ 
+-  if ((dir = cupsDirOpen(pathname)) == NULL)
+-    return (NULL);
++  paths = strdup(pathname); /* copy path as we are writing into it */
++  dirname = paths;
++  colon = paths;
++  while (colon != NULL) { /* Go through each of the colon-separated
++			     directories */
++    colon = strchr(dirname, ':');
++    if (colon != NULL) *colon = '\0';
+ 
+- /*
+-  * If "mime" is NULL, make a new, blank database...
+-  */
++    if ((dir = cupsDirOpen(dirname)) != NULL) {
+ 
+-  if (!mime)
+-    mime = mimeNew();
+-  if (!mime)
+-    return (NULL);
++      /*
++       * If "mime" is NULL, make a new, blank database...
++       */
+ 
+- /*
+-  * Read all the .types files...
+-  */
++      if (!mime)
++	mime = mimeNew();
++      if (!mime)
++	return (NULL);
+ 
+-  while ((dent = cupsDirRead(dir)) != NULL)
+-  {
+-    if (strlen(dent->filename) > 6 &&
+-        !strcmp(dent->filename + strlen(dent->filename) - 6, ".types"))
+-    {
+-     /*
+-      * Load a mime.types file...
+-      */
++      /*
++       * Read all the .types files...
++       */
+ 
+-      snprintf(filename, sizeof(filename), "%s/%s", pathname, dent->filename);
+-      load_types(mime, filename);
++      while ((dent = cupsDirRead(dir)) != NULL)
++	{
++	  if (strlen(dent->filename) > 6 &&
++	      !strcmp(dent->filename + strlen(dent->filename) - 6, ".types"))
++	    {
++	      /*
++	       * Load a mime.types file...
++	       */
++
++	      snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->filename);
++	      load_types(mime, filename);
++	    }
++	}
++
++      cupsDirClose(dir);
+     }
++    if (colon != NULL) dirname = colon + 1;
+   }
++  free(paths); /* We need to copy the original path again for reading
++		  the convs */
+ 
+-  cupsDirRewind(dir);
+-
+- /*
+-  * Read all the .convs files...
+-  */
++  /*
++   * Read all the .convs files...
++   */
+ 
+   filtercache = cupsArrayNew((cups_array_func_t)compare_fcache, NULL);
+ 
+-  while ((dent = cupsDirRead(dir)) != NULL)
+-  {
+-    if (strlen(dent->filename) > 6 &&
+-        !strcmp(dent->filename + strlen(dent->filename) - 6, ".convs"))
+-    {
+-     /*
+-      * Load a mime.convs file...
+-      */
++  paths = strdup(pathname); /* copy path as we are writing into it */
++  dirname = paths;
++  colon = paths;
++  while (colon != NULL) { /* Go through each of the colon-separated
++			     directories */
++    colon = strchr(dirname, ':');
++    if (colon != NULL) *colon = '\0';
+ 
+-      snprintf(filename, sizeof(filename), "%s/%s", pathname, dent->filename);
+-      load_convs(mime, filename, filterpath, filtercache);
++    if ((dir = cupsDirOpen(dirname)) != NULL) {
++
++      while ((dent = cupsDirRead(dir)) != NULL)
++	{
++	  if (strlen(dent->filename) > 6 &&
++	      !strcmp(dent->filename + strlen(dent->filename) - 6, ".convs"))
++	    {
++	      /*
++	       * Load a mime.convs file...
++	       */
++
++	      snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->filename);
++	      load_convs(mime, filename, filterpath, filtercache);
++	    }
++	}
++
++      cupsDirClose(dir);
+     }
++    if (colon != NULL) dirname = colon + 1;
+   }
++  free(paths);
+ 
+   delete_fcache(filtercache);
+ 
+-  cupsDirClose(dir);
+-
+   return (mime);
+ }
+ 



More information about the Pkg-cups-devel mailing list