]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from 1.4svn-r7067.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 9 Nov 2007 19:55:26 +0000 (19:55 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 9 Nov 2007 19:55:26 +0000 (19:55 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@533 a1ca3aef-8c08-0410-bb20-df032aa958be

25 files changed:
CHANGES-1.3.txt
Makefile
backend/ipp.c
backend/lpd.c
cups/Makefile
cups/auth.c
cups/encode.c
cups/ipp.c
cups/ipp.h
cups/language.c
doc/help/ref-cupsd-conf.html.in
doc/help/spec-ppd.html
filter/pstops.c
init/Localizable.strings
init/PrintingServices
init/PrintingServices.launchd
init/StartupParameters.plist
packaging/cups.list.in
packaging/cups.spec.in
scheduler/conf.c
scheduler/ipp.c
scheduler/main.c
scheduler/sysman.c
systemv/lpadmin.c
tools/testosx

index a85d714221d063a261cab8a58d934f63eedd658c..9e3b973b22cbd76d0e2c9bb53d47b29dfec9716a 100644 (file)
@@ -1,9 +1,38 @@
 CHANGES-1.3.txt
 ---------------
 
+CHANGES IN CUPS V1.3.5
+
+       - The scheduler incorrectly sent the
+         "com.apple.printerListChanged" message for printer state
+         changes.
+       - The PostScript filter drew the page borders (when enabled)
+         outside the imageable area.
+       - The LPD and IPP backends did not default to the correct
+         port numbers when using alternate scheme names.
+       - The scheduler incorrectly deleted hardwired remote printers
+         on system sleep.
+       - The scheduler would abort if a bad browse protocol name
+         was listed in the cupsd.conf file.
+       - The online cupsd.conf help file incorrectly showed "dns-sd"
+         instead of "dnssd" for Bonjour sharing.
+       - The scheduler could crash changing the port-monitor value.
+       - The scheduler generated CoreFoundation errors when run
+         as a background process.
+       - When printing with number-up > 1, it was possible to get
+         an extra blank page.
+
+
 CHANGES IN CUPS V1.3.4
 
-       - Documentation updates (STR #2560, STR #2563)
+       - Documentation updates (STR #2560, STR #2563, STR #2569)
+       - CUPS now maps the "nb" locale to "no" on all platforms
+         (STR #2575)
+       - CUPS did not work with a Windows 2003 R2 KDC (STR #2568)
+       - ippReadIO() could read past the end of a buffer (STR
+         #2561)
+       - The scheduler would crash on shutdown if it was unable
+         to create a Kerberos context.
        - Multiple AuthTypes in cupsd.conf did not work (STR
          #2545)
        - The snmp.conf file referenced the wrong man page (STR
index 9722914913139c68f6098a819b4230b0ee41701e..2c72a464f0c762ca90672e0759d529a2eabfde09 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -118,13 +118,7 @@ install:   installhdrs
        fi
        if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
                $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
-               if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
-                       echo Installing StartupItems files...; \
-                       $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
-                       $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
-                       $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
-                       $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
-               elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
+               if test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
                        echo Installing LaunchDaemons configuration files...; \
                        $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
                        $(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
index 3dc0991fe0b1149cbcb2cd5358703934005be121..95e598252a67e8b2a4b3a66f8842ddae96eff1be 100644 (file)
@@ -236,6 +236,9 @@ main(int  argc,                             /* I - Number of command-line args */
     return (CUPS_BACKEND_STOP);
   }
 
+  if (!port)
+    port = IPP_PORT;                   /* Default to port 631 */
+
   if (!strcmp(method, "https"))
     cupsSetEncryption(HTTP_ENCRYPT_ALWAYS);
   else
index 53a6539c1f33f2240ef8965a6c40d88f6919d8f8..926033a54188441924b3c85bc47ed8d1d980ec3e 100644 (file)
@@ -201,6 +201,9 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
                  hostname, sizeof(hostname), &port,
                  resource, sizeof(resource));
 
+  if (!port)
+    port = 515;                                /* Default to port 515 */
+
   if (!username[0])
   {
    /*
index 1095c789c08c723ad1080841dfe72940667bf677..822f10f547471901216da804fe37276369c56174 100644 (file)
@@ -96,7 +96,8 @@ HEADERS       =       \
                language.h \
                ppd.h \
                sidechannel.h \
-               transcode.h
+               transcode.h \
+               versioning.h
 
 
 #
index 05597719377ca94c38de2ea03def2bbd7a3f955f..6882bfad131bf22503974c39294627cd004519ff 100644 (file)
@@ -92,7 +92,7 @@ cupsDoAuthentication(http_t     *http,        /* I - HTTP connection to server */
   char         prompt[1024],           /* Prompt for user */
                realm[HTTP_MAX_VALUE],  /* realm="xyz" string */
                nonce[HTTP_MAX_VALUE],  /* nonce="xyz" string */
-               encode[2048];           /* Encoded username:password */
+               encode[4096];           /* Encoded username:password */
   int          localauth;              /* Local authentication result */
   _cups_globals_t *cg;                 /* Global data */
 
index c1835980109cee7b1c7fcd3d6bb31484211d15a1..4e7f78118548ba342a3ab0d5c096bf702c0661de 100644 (file)
@@ -100,6 +100,7 @@ static const _ipp_option_t ipp_options[] =
   { "page-top-default",                IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
   { "penwidth",                        IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { "penwidth-default",                IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
+  { "port-monitor",             IPP_TAG_NAME,           IPP_TAG_PRINTER },
   { "ppi",                     IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { "ppi-default",             IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
   { "prettyprint",             IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
index 048fdc2fe72bcee86d9d21b9054a1b9c8cf06327..c068d84ce81de6b8e8faa36630e413b5f00c9b81 100644 (file)
@@ -1014,8 +1014,10 @@ ippReadIO(void       *src,               /* I - Data source */
           ipp_t      *ipp)             /* I - IPP data */
 {
   int                  n;              /* Length of data */
-  unsigned char                buffer[32768],  /* Data buffer */
-                       string[255],    /* Small string buffer */
+  unsigned char                buffer[IPP_MAX_LENGTH],
+                                       /* Data buffer */
+                       string[IPP_MAX_NAME],
+                                       /* Small string buffer */
                        *bufptr;        /* Pointer into buffer */
   ipp_attribute_t      *attr;          /* Current attribute */
   ipp_tag_t            tag;            /* Current tag */
@@ -1306,6 +1308,12 @@ ippReadIO(void       *src,               /* I - Data source */
          {
            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!");
@@ -1318,6 +1326,12 @@ ippReadIO(void       *src,               /* I - Data source */
                 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!");
@@ -1335,6 +1349,12 @@ ippReadIO(void       *src,               /* I - Data source */
            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!");
@@ -1347,6 +1367,12 @@ ippReadIO(void       *src,               /* I - Data source */
                              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!");
@@ -1354,6 +1380,12 @@ ippReadIO(void       *src,               /* I - Data source */
                }
                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!");
@@ -1370,6 +1402,12 @@ ippReadIO(void       *src,               /* I - Data source */
                    (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!");
@@ -1385,7 +1423,7 @@ ippReadIO(void       *src,                /* I - Data source */
                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);
@@ -1411,22 +1449,27 @@ ippReadIO(void       *src,              /* I - Data source */
 
                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;
@@ -1468,6 +1511,12 @@ ippReadIO(void       *src,               /* I - Data source */
                * 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!");
@@ -1489,6 +1538,12 @@ ippReadIO(void       *src,               /* I - Data source */
                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)
                {
@@ -1627,7 +1682,8 @@ ippWriteIO(void       *dst,               /* I - Destination */
 {
   int                  i;              /* Looping var */
   int                  n;              /* Length of data */
-  unsigned char                buffer[32768],  /* Data buffer */
+  unsigned char                buffer[IPP_MAX_LENGTH + 2],
+                                       /* Data buffer + length bytes */
                        *bufptr;        /* Pointer into buffer */
   ipp_attribute_t      *attr;          /* Current attribute */
   ipp_value_t          *value;         /* Current value */
@@ -1947,7 +2003,7 @@ ippWriteIO(void       *dst,               /* I - Destination */
                 /*
                  * All simple strings consist of the 2-byte length and
                  * character data without the trailing nul normally found
-                 * in C strings.  Also, strings cannot be longer than 32767
+                 * in C strings.  Also, strings cannot be longer than IPP_MAX_LENGTH
                  * bytes since the 2-byte length is a signed (twos-complement)
                  * value.
                  *
index 04f689a914a6b180688dad29f03b8e891278be2a..29ef86afd37e38fff89f0f783fd8f884ebe5d131 100644 (file)
@@ -55,7 +55,8 @@ extern "C" {
  * Common limits...
  */
 
-#  define IPP_MAX_NAME         256
+#  define IPP_MAX_LENGTH       32767   /* Maximum size of any single value */
+#  define IPP_MAX_NAME         256     /* Maximum length of common name values */
 #  define IPP_MAX_VALUES       8       /* Power-of-2 allocation increment */
 
 
index c1af03a3d914492f1f77efe1867a065df49f2098..4edaab418048a0cda113a1ca6c806f9e9684934d 100644 (file)
@@ -413,8 +413,14 @@ cupsLangGet(const char *language)  /* I - Language or locale */
       strlcpy(locale, ptr, sizeof(locale));
       language = locale;
 
-      DEBUG_printf(("cupsLangGet: new language value is \"%s\"\n",
-                    language ? language : "(null)"));
+     /*
+      * CUPS STR #2575: Map "nb" to "no" for back-compatibility...
+      */
+
+      if (!strncmp(locale, "nb", 2))
+        locale[1] = 'o';
+
+      DEBUG_printf(("cupsLangGet: new language value is \"%s\"\n", language));
     }
   }
 #endif /* __APPLE__ */
index e15c6c1d4f0c42cdaadf9c10a593729f89598a00..a6cc6254cb5c61c8eabb3f20311c163df41ed7b6 100644 (file)
@@ -510,10 +510,10 @@ printers. The default is to not include any options.</P>
 BrowseLocalProtocols all
 BrowseLocalProtocols none
 BrowseLocalProtocols cups
-BrowseLocalProtocols dns-sd
+BrowseLocalProtocols dnssd
 BrowseLocalProtocols ldap
 BrowseLocalProtocols slp
-BrowseLocalProtocols cups dns-sd
+BrowseLocalProtocols cups dnssd
 </PRE>
 
 <H3>Description</H3>
@@ -603,10 +603,10 @@ on all of the systems that you want to see.
 BrowseProtocols all
 BrowseProtocols none
 BrowseProtocols cups
-BrowseProtocols dns-sd
+BrowseProtocols dnssd
 BrowseProtocols ldap
 BrowseProtocols slp
-BrowseProtocols cups dns-sd
+BrowseProtocols cups dnssd
 </PRE>
 
 <H3>Description</H3>
@@ -689,10 +689,10 @@ The default is to not include any options.</P>
 BrowseRemoteProtocols all
 BrowseRemoteProtocols none
 BrowseRemoteProtocols cups
-BrowseRemoteProtocols dns-sd
+BrowseRemoteProtocols dnssd
 BrowseRemoteProtocols ldap
 BrowseRemoteProtocols slp
-BrowseRemoteProtocols cups dns-sd
+BrowseRemoteProtocols cups dnssd
 </PRE>
 
 <H3>Description</H3>
index 91c65738ba85ba1cd6fa50d73b74ec9001979312..0285f4697f13001dc081a90bae86451ef751a76e 100644 (file)
@@ -540,7 +540,7 @@ options on Mac OS X must provide their own user interface via the
 
 <pre class='command'>
 <em>*% Base JCL key code option</em> 
-*OpenUI JCLPasscode/Key Code: PickOne
+*JCLOpenUI JCLPasscode/Key Code: PickOne
 *OrderDependency: 10 JCLSetup *JCLPasscode
 *DefaultJCLPasscode: None
 *JCLPasscode None/No Code: ""
index 964df186719d13cc453700e66d66a1ef87079ac5..0064199da42b5e094f4fc4597caf449da9d24e3c 100644 (file)
@@ -889,7 +889,7 @@ copy_dsc(cups_file_t  *fp,          /* I - File to read from */
   * Finish up the last page(s)...
   */
 
-  if (number && is_not_last_page(number) && cupsArrayLast(doc->pages))
+  if (number && !is_first_page(number) && cupsArrayLast(doc->pages))
   {
     pageinfo = (pstops_page_t *)cupsArrayLast(doc->pages);
 
@@ -2785,8 +2785,11 @@ start_nup(pstops_doc_t *doc,             /* I - Document information */
                tx, ty;                 /* Translation values for subpage */
   float                pagew,                  /* Printable width of page */
                pagel;                  /* Printable height of page */
-  int          bboxw,                  /* BoundingBox width */
+  int          bboxx,                  /* BoundingBox X origin */
+               bboxy,                  /* BoundingBox Y origin */
+               bboxw,                  /* BoundingBox width */
                bboxl;                  /* BoundingBox height */
+  float                margin = 0;             /* Current margin for border */
 
 
   if (doc->number_up > 1)
@@ -2801,17 +2804,22 @@ start_nup(pstops_doc_t *doc,            /* I - Document information */
 
   if (doc->fitplot)
   {
+    bboxx = bounding_box[0];
+    bboxy = bounding_box[1];
     bboxw = bounding_box[2] - bounding_box[0];
     bboxl = bounding_box[3] - bounding_box[1];
   }
   else
   {
+    bboxx = 0;
+    bboxy = 0;
     bboxw = PageWidth;
     bboxl = PageLength;
   }
 
   fprintf(stderr, "DEBUG: pagew = %.1f, pagel = %.1f\n", pagew, pagel);
-  fprintf(stderr, "DEBUG: bboxw = %d, bboxl = %d\n", bboxw, bboxl);
+  fprintf(stderr, "DEBUG: bboxx = %d, bboxy = %d, bboxw = %d, bboxl = %d\n",
+          bboxx, bboxy, bboxw, bboxl);
   fprintf(stderr, "DEBUG: PageLeft = %.1f, PageRight = %.1f\n",
           PageLeft, PageRight);
   fprintf(stderr, "DEBUG: PageTop = %.1f, PageBottom = %.1f\n",
@@ -3129,8 +3137,7 @@ start_nup(pstops_doc_t *doc,              /* I - Document information */
   if (doc->page_border && show_border)
   {
     int                rects;                  /* Number of border rectangles */
-    float      fscale,                 /* Scaling value for points */
-               margin;                 /* Current margin for borders */
+    float      fscale;                 /* Scaling value for points */
 
 
     rects  = (doc->page_border & PSTOPS_BORDERDOUBLE) ? 2 : 1;
@@ -3153,10 +3160,10 @@ start_nup(pstops_doc_t *doc,            /* I - Document information */
     for (; rects > 0; rects --, margin += 2 * fscale)
       if (doc->number_up > 1)
        doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrs\n",
-                  margin - 2.25 * fscale,
-                  margin - 2.25 * fscale,
-                  bboxw + 4.5 * fscale - 2 * margin,
-                  bboxl + 4.5 * fscale - 2 * margin);
+                  margin,
+                  margin,
+                  bboxw - 2 * margin,
+                  bboxl - 2 * margin);
       else
        doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrs\n",
                   PageLeft + margin,
@@ -3174,21 +3181,22 @@ start_nup(pstops_doc_t *doc,            /* I - Document information */
   if (doc->fitplot)
   {
    /*
-    * Clip the page that follows to the bounding box of the page...
+    * Offset the page by its bounding box...
     */
 
     doc_printf(doc, "%d %d translate\n", -bounding_box[0],
                -bounding_box[1]);
-    doc_printf(doc, "%d %d %d %d ESPrc\n", bounding_box[0], bounding_box[1],
-               bboxw, bboxl);
   }
-  else if (doc->number_up > 1)
+
+  if (doc->fitplot || doc->number_up > 1)
   {
    /*
-    * Clip the page that follows to the default page size...
+    * Clip the page to the page's bounding box...
     */
 
-    doc_printf(doc, "0 0 %d %d ESPrc\n", bboxw, bboxl);
+    doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrc\n",
+               bboxx + margin, bboxy + margin,
+               bboxw - 2 * margin, bboxl - 2 * margin);
   }
 }
 
index d08f91972729647d1d1761fecccb204be7c6ca4d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
-       <key>Starting printing services</key>
-       <string>Starting printing services</string>
-</dict>
-</plist>
-
index bbe5ac36b2b21f29c9dad13a8fc6a1dfdbbcdade..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100755 (executable)
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-##
-# PrintingServices - a.k.a. CUPS
-##
-
-. /etc/rc.common
-
-StartService ()
-{
-       if [ "${CUPS:=-AUTOMATIC-}" = "-AUTOMATIC-" ]; then
-               ConsoleMessage "Starting printing services"
-               /usr/sbin/cupsd
-       elif [ "${CUPS:=-AUTOMATIC-}" = "-YES-" ]; then
-               ConsoleMessage "Starting printing services"
-               /usr/sbin/cupsd
-       fi
-}
-
-StopService ()
-{
-       # Until cupsd has a pid file...
-       pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
-       if test "$pid" != ""; then
-               ConsoleMessage "Stopping printing services"
-               kill "${pid}"
-       fi
-}
-
-RestartService ()
-{
-       # Until cupsd has a pid file...
-       pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
-       if test "x$pid" != x; then
-               ConsoleMessage "Restarting printing services"
-               kill -HUP "${pid}"
-       else
-               if [ "${CUPS:=-AUTOMATIC-}" = "-AUTOMATIC-" -o "${CUPS:=-AUTOMATIC-}" = "-YES-" ]; then
-                       ConsoleMessage "Starting printing services"
-                       /usr/sbin/cupsd
-               fi
-       fi
-}
-
-RunService "$1"
index be9992a78e251f6757d4d6951b5fd644ab8cca18..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100755 (executable)
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-##
-# PrintingServices - a.k.a. CUPS
-##
-
-. /etc/rc.common
-
-StartService ()
-{
-       ConsoleMessage "Starting printing services"
-       launchctl start org.cups.cupsd
-}
-
-StopService ()
-{
-       ConsoleMessage "Stopping printing services"
-       launchctl stop org.cups.cupsd
-}
-
-RestartService ()
-{
-       ConsoleMessage "Restarting printing services"
-       launchctl stop org.cups.cupsd
-       launchctl start org.cups.cupsd
-}
-
-RunService "$1"
index 0633bf88a20a7562e5206cad91015a35e534d3ec..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,7 +0,0 @@
-{
-  Description     = "Printing Services";
-  Provides        = ("PrintingServices");
-  Requires        = ("Resolver");
-  Uses            = ("Network Time");
-  OrderPreference = "Late";
-}
index a6205f6a841f832cc6e93d1cd46fbfc2062f46f8..8198efa7aa8cc29211f1170e25b667399389883f 100644 (file)
@@ -450,38 +450,38 @@ f 0644 root sys $DATADIR/model ppd/*.ppd
 d 0755 root sys $DATADIR/templates -
 f 0644 root sys $DATADIR/templates templates/*.tmpl
 
-# Japanese template files
-%subpackage de
-d 0755 root sys $DATADIR/templates/de
-f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
-%subpackage es
-d 0755 root sys $DATADIR/templates/es
-f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
-%subpackage et
-d 0755 root sys $DATADIR/templates/et
-f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
-%subpackage fr
-d 0755 root sys $DATADIR/templates/fr
-f 0644 root sys $DATADIR/templates/fr templates/fr/*.tmpl
-%subpackage he
-d 0755 root sys $DATADIR/templates/he
-f 0644 root sys $DATADIR/templates/he templates/he/*.tmpl
-%subpackage it
-d 0755 root sys $DATADIR/templates/it
-f 0644 root sys $DATADIR/templates/it templates/it/*.tmpl
-%subpackage ja
-d 0755 root sys $DATADIR/templates/ja
-f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
-%subpackage pl
-d 0755 root sys $DATADIR/templates/pl
-f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
-%subpackage sv
-d 0755 root sys $DATADIR/templates/sv
-f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
-%subpackage zh
-d 0755 root sys $DATADIR/templates/zh_TW
-f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
-%subpackage
+## Template files
+#%subpackage de
+#d 0755 root sys $DATADIR/templates/de
+#f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
+#%subpackage es
+#d 0755 root sys $DATADIR/templates/es
+#f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
+#%subpackage et
+#d 0755 root sys $DATADIR/templates/et
+#f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
+#%subpackage fr
+#d 0755 root sys $DATADIR/templates/fr
+#f 0644 root sys $DATADIR/templates/fr templates/fr/*.tmpl
+#%subpackage he
+#d 0755 root sys $DATADIR/templates/he
+#f 0644 root sys $DATADIR/templates/he templates/he/*.tmpl
+#%subpackage it
+#d 0755 root sys $DATADIR/templates/it
+#f 0644 root sys $DATADIR/templates/it templates/it/*.tmpl
+#%subpackage ja
+#d 0755 root sys $DATADIR/templates/ja
+#f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
+#%subpackage pl
+#d 0755 root sys $DATADIR/templates/pl
+#f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
+#%subpackage sv
+#d 0755 root sys $DATADIR/templates/sv
+#f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
+#%subpackage zh
+#d 0755 root sys $DATADIR/templates/zh_TW
+#f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
+#%subpackage
 
 # Config files
 d 0755 root sys $SERVERROOT -
@@ -640,12 +640,6 @@ f 0644 root sys $AMANDIR/man$MAN8DIR/cups-lpd.$MAN8EXT man/cups-lpd.$MAN8EXT
 # Startup scripts
 %system darwin
 f 0644 root sys /System/Library/LaunchDaemons/org.cups.cupsd.plist init/org.cups.cupsd.plist
-d 0755 root sys /System/Library/StartupItems/PrintingServices -
-f 0644 root sys /System/Library/StartupItems/PrintingServices/PrintingServices init/PrintingServices.launchd
-f 0644 root sys /System/Library/StartupItems/PrintingServices/StartupParamters.plist init/StartupParameters.plist
-d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources -
-d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj -
-f 0644 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings init/Localizable.strings
 %preremove <<EOF
 launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
 killall cupsd || exit 0
index bc65635c7b96214077c9608a59b9981fc1d90874..3a967cf06345545007b62252ba72b0bf47862f31 100644 (file)
@@ -493,26 +493,26 @@ rm -rf $RPM_BUILD_ROOT
 
 %files de
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/de
-/usr/share/doc/cups/de/index.html
-%dir /usr/share/cups/templates/de
-/usr/share/cups/templates/de/*
+#%dir /usr/share/doc/cups/de
+#/usr/share/doc/cups/de/index.html
+#%dir /usr/share/cups/templates/de
+#/usr/share/cups/templates/de/*
 /usr/share/locale/de/cups_de.po
 
 %files es
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/es
-/usr/share/doc/cups/es/index.html
-%dir /usr/share/cups/templates/es
-/usr/share/cups/templates/es/*
+#%dir /usr/share/doc/cups/es
+#/usr/share/doc/cups/es/index.html
+#%dir /usr/share/cups/templates/es
+#/usr/share/cups/templates/es/*
 /usr/share/locale/es/cups_es.po
 
 %files et
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/et
-/usr/share/doc/cups/et/index.html
-%dir /usr/share/cups/templates/et
-/usr/share/cups/templates/et/*
+#%dir /usr/share/doc/cups/et
+#/usr/share/doc/cups/et/index.html
+#%dir /usr/share/cups/templates/et
+#/usr/share/cups/templates/et/*
 /usr/share/locale/et/cups_et.po
 
 %files fi
@@ -521,35 +521,35 @@ rm -rf $RPM_BUILD_ROOT
 
 %files fr
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/fr
-/usr/share/doc/cups/fr/index.html
-%dir /usr/share/cups/templates/fr
-/usr/share/cups/templates/fr/*
+#%dir /usr/share/doc/cups/fr
+#/usr/share/doc/cups/fr/index.html
+#%dir /usr/share/cups/templates/fr
+#/usr/share/cups/templates/fr/*
 /usr/share/locale/fr/cups_fr.po
 
 %files he
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/he
-/usr/share/doc/cups/he/index.html
-/usr/share/doc/cups/he/cups.css
-%dir /usr/share/cups/templates/he
-/usr/share/cups/templates/he/*
+#%dir /usr/share/doc/cups/he
+#/usr/share/doc/cups/he/index.html
+#/usr/share/doc/cups/he/cups.css
+#%dir /usr/share/cups/templates/he
+#/usr/share/cups/templates/he/*
 /usr/share/locale/he/cups_he.po
 
 %files it
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/it
-/usr/share/doc/cups/it/index.html
-%dir /usr/share/cups/templates/it
-/usr/share/cups/templates/it/*
+#%dir /usr/share/doc/cups/it
+#/usr/share/doc/cups/it/index.html
+#%dir /usr/share/cups/templates/it
+#/usr/share/cups/templates/it/*
 /usr/share/locale/it/cups_it.po
 
 %files ja
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/ja
-/usr/share/doc/cups/ja/index.html
-%dir /usr/share/cups/templates/ja
-/usr/share/cups/templates/ja/*
+#%dir /usr/share/doc/cups/ja
+#/usr/share/doc/cups/ja/index.html
+#%dir /usr/share/cups/templates/ja
+#/usr/share/cups/templates/ja/*
 /usr/share/locale/ja/cups_ja.po
 
 %files ko
@@ -566,10 +566,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files pl
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/pl
-/usr/share/doc/cups/pl/index.html
-%dir /usr/share/cups/templates/pl
-/usr/share/cups/templates/pl/*
+#%dir /usr/share/doc/cups/pl
+#/usr/share/doc/cups/pl/index.html
+#%dir /usr/share/cups/templates/pl
+#/usr/share/cups/templates/pl/*
 /usr/share/locale/pl/cups_pl.po
 
 %files pt
@@ -584,18 +584,18 @@ rm -rf $RPM_BUILD_ROOT
 
 %files sv
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/sv
-/usr/share/doc/cups/sv/index.html
-%dir /usr/share/cups/templates/sv
-/usr/share/cups/templates/sv/*
+#%dir /usr/share/doc/cups/sv
+#/usr/share/doc/cups/sv/index.html
+#%dir /usr/share/cups/templates/sv
+#/usr/share/cups/templates/sv/*
 /usr/share/locale/sv/cups_sv.po
 
 %files zh
 %defattr(-,root,root)
-%dir /usr/share/doc/cups/zh_TW
-/usr/share/doc/cups/zh_TW/index.html
-%dir /usr/share/cups/templates/zh_TW
-/usr/share/cups/templates/zh_TW/*
+#%dir /usr/share/doc/cups/zh_TW
+#/usr/share/doc/cups/zh_TW/index.html
+#%dir /usr/share/cups/templates/zh_TW
+#/usr/share/cups/templates/zh_TW/*
 /usr/share/locale/zh/cups_zh.po
 /usr/share/locale/zh_TW/cups_zh_TW.po
 
index f52534caaa781b490df5de3d6320196d42bd2918..753081ed8321e7215f2064d08a54a0516ecfd700 100644 (file)
@@ -2023,7 +2023,9 @@ parse_protocols(const char *s)            /* I - Space-delimited protocols */
       protocols |= BROWSE_SLP;
     else if (!strcasecmp(valstart, "ldap"))
       protocols |= BROWSE_LDAP;
-    else if (!strcasecmp(valstart, "dnssd") || !strcasecmp(valstart, "bonjour"))
+    else if (!strcasecmp(valstart, "dnssd") ||
+             !strcasecmp(valstart, "dns-sd") ||
+             !strcasecmp(valstart, "bonjour"))
       protocols |= BROWSE_DNSSD;
     else if (!strcasecmp(valstart, "lpd"))
       protocols |= BROWSE_LPD;
@@ -2032,7 +2034,8 @@ parse_protocols(const char *s)            /* I - Space-delimited protocols */
     else if (!strcasecmp(valstart, "all"))
       protocols |= BROWSE_ALL;
     else if (strcasecmp(valstart, "none"))
-      return (-1);
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unknown browse protocol \"%s\" ignored!", valstart);
 
     for (valstart = valend; *valstart; valstart ++)
       if (!isspace(*valstart & 255) || *valstart != ',')
index 9f50ef812475e8aa2f31830c9a14351a19bfdf8a..e2b517e88c257fb38fa78a4a138c1dbec9dbca4d 100644 (file)
@@ -2415,7 +2415,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
     need_restart_job = 1;
 
     supported = ippFindAttribute(printer->attrs, "port-monitor-supported",
-                                 IPP_TAG_KEYWORD);
+                                 IPP_TAG_NAME);
     for (i = 0; i < supported->num_values; i ++)
       if (!strcmp(supported->values[i].string.text,
                   attr->values[0].string.text))
index 9cb8439bbe4c663ca79d4d0c94a00a920a01b69a..f3836b785ed00d6083a1748accc702bfe9cc976f 100644 (file)
@@ -146,6 +146,10 @@ main(int  argc,                            /* I - Number of command-line args */
   cups_file_t          *fp;            /* Fake lpsched lock file */
   struct stat          statbuf;        /* Needed for checking lpsched FIFO */
 #endif /* __sgi */
+#ifdef __APPLE__
+  int                  run_as_child = 0;
+                                       /* Needed for Mac OS X fork/exec */
+#endif /* __APPLE__ */
 #if HAVE_LAUNCHD
   int                  launchd_idle_exit;
                                        /* Idle exit on select timeout? */
@@ -183,6 +187,12 @@ main(int  argc,                            /* I - Number of command-line args */
       for (opt = argv[i] + 1; *opt != '\0'; opt ++)
         switch (*opt)
        {
+#ifdef __APPLE__
+         case 'C' : /* Run as child with config file */
+              run_as_child = 1;
+             fg           = -1;
+#endif /* __APPLE__ */
+
          case 'c' : /* Configuration file */
              i ++;
              if (i >= argc)
@@ -339,6 +349,18 @@ main(int  argc,                            /* I - Number of command-line args */
        return (3);
       }
     }
+
+#ifdef __APPLE__
+   /*
+    * Since CoreFoundation has an overly-agressive check for whether a
+    * process has forked but not exec'd (whether CF has been called or
+    * not...), we now have to exec ourselves with the "-f" option to
+    * eliminate their bogus warning messages.
+    */
+
+    execlp(argv[0], argv[0], "-C", ConfigurationFile, (char *)0);
+    exit(errno);
+#endif /* __APPLE__ */
   }
 
   if (fg < 1)
@@ -502,7 +524,11 @@ main(int  argc,                            /* I - Number of command-line args */
   */
 
   if (krb5_init_context(&KerberosContext))
+  {
+    KerberosContext = NULL;
+
     cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize Kerberos context");
+  }
 #endif /* HAVE_GSSAPI */
 
  /*
@@ -583,7 +609,11 @@ main(int  argc,                            /* I - Number of command-line args */
   * we are up and running...
   */
 
+#ifdef __APPLE__
+  if (!fg || run_as_child)
+#else
   if (!fg)
+#endif /* __APPLE__ */
   {
    /*
     * Send a signal to the parent process, but only if the parent is
@@ -968,7 +998,9 @@ main(int  argc,                             /* I - Number of command-line args */
     if (LastEvent)
     {
 #ifdef HAVE_NOTIFY_POST
-      if (LastEvent & CUPSD_EVENT_PRINTER_CHANGED)
+      if (LastEvent & (CUPSD_EVENT_PRINTER_ADDED |
+                       CUPSD_EVENT_PRINTER_DELETED |
+                       CUPSD_EVENT_PRINTER_MODIFIED))
       {
         cupsdLogMessage(CUPSD_LOG_DEBUG2,
                        "notify_post(\"com.apple.printerListChange\")");
@@ -1052,7 +1084,8 @@ main(int  argc,                           /* I - Number of command-line args */
 
   if (krb5_init_context != NULL)
 #  endif /* __APPLE__ */
-  krb5_free_context(KerberosContext);
+  if (KerberosContext)
+    krb5_free_context(KerberosContext);
 #endif /* HAVE_GSSAPI */
 
 #ifdef __APPLE__
index a67b4fa7f06a6b34650547e0c93399fcf028c9ef..03aa8d035587383ba9864cf95b4a717e955afa09 100644 (file)
@@ -286,7 +286,7 @@ cupsdUpdateSystemMonitor(void)
            p;
           p = (cupsd_printer_t *)cupsArrayNext(Printers))
       {
-       if (p->type & CUPS_PRINTER_REMOTE)
+       if (p->type & CUPS_PRINTER_DISCOVERED)
        {
          cupsdLogMessage(CUPSD_LOG_DEBUG,
                          "Deleting remote destination \"%s\"", p->name);
index 8625f5a1505f3e3cd493107927356fac0d0fb139..e0e3ad9ff3f9c9b4c7215054a80aecf778b89695 100644 (file)
@@ -1815,10 +1815,10 @@ set_printer_options(
   if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)
   {
     if (!strcasecmp(protocol, "bcp"))
-      ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "port-monitor",
+      ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
                    NULL, "bcp");
     else if (!strcasecmp(protocol, "tbcp"))
-      ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "port-monitor",
+      ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
                    NULL, "tbcp");
   }
 
index fe44a364ccc2eec84e9295a237fc7af4b058b127..36ee266126d7a95f9d464fd92d2f9f3bdacafe08 100755 (executable)
@@ -99,7 +99,7 @@ for file in packaging/cups-desc.plist packaging/cups-info.plist \
        echo Updating $file...
        sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
                -e '1,$s/@CUPS_REVISION@//g' \
-               -e '1,$s/@CUPS_RELEASE@/1.3.'$rev'/g' \
+               -e '1,$s/@CUPS_RELEASE@/1.4.'$rev'/g' \
                <$file.in >$file
 done