]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.5svn-r9763.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 11 May 2011 05:36:13 +0000 (05:36 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 11 May 2011 05:36:13 +0000 (05:36 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3242 a1ca3aef-8c08-0410-bb20-df032aa958be

103 files changed:
CHANGES-1.4.txt
CHANGES.txt
INSTALL.txt
Makedefs.in
Makefile
README.txt
backend/Makefile
backend/ipp.c
backend/lpd.c
backend/snmp-supplies.c
backend/socket.c
backend/usb-darwin.c
berkeley/lpq.c
cgi-bin/admin.c
conf/mime.convs.in
config-scripts/cups-common.m4
config-scripts/cups-defaults.m4
config-scripts/cups-gssapi.m4
config-scripts/cups-image.m4
config-scripts/cups-pdf.m4
config-scripts/cups-ssl.m4
config.h.in
cups/Makefile
cups/api-array.shtml
cups/api-cups.shtml
cups/api-filedir.shtml
cups/api-filter.shtml
cups/api-httpipp.shtml
cups/api-overview.shtml
cups/api-ppd.shtml
cups/array-private.h [new file with mode: 0644]
cups/array.c
cups/auth.c
cups/backend.c
cups/cups-private.h
cups/http-addrlist.c
cups/http-private.h
cups/http-support.c
cups/http.c
cups/ppd.c
cups/request.c
cups/testhttp.c
cups/usersys.c
cups/util.c
doc/help/api-array.html
doc/help/api-cups.html
doc/help/api-filedir.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-overview.html
doc/help/api-ppd.html
doc/help/api-raster.html
doc/help/kerberos.html
doc/help/network.html
doc/help/options.html
doc/help/ref-cupsd-conf.html.in
doc/help/ref-mailto-conf.html
doc/help/ref-ppdcfile.html
doc/help/ref-snmp-conf.html
doc/help/security.html
doc/help/spec-banner.html
doc/help/spec-browsing.html
doc/help/spec-cmp.html
doc/help/spec-command.html
doc/help/spec-ipp.html
doc/help/spec-postscript.html
doc/help/spec-ppd.html
doc/help/spec-raster.html
doc/help/spec-stp.html
doc/help/translation.html
filter/api-raster.shtml
filter/image-colorspace.c
filter/imagetops.c
filter/imagetoraster.c
filter/pdftops.c
filter/pstops.c
filter/raster.c
filter/spec-ppd.shtml
locale/cups.pot
locale/cups.strings
man/lpadmin.man
packaging/cups.list.in
scheduler/auth.c
scheduler/client.c
scheduler/conf.c
scheduler/cups-driverd.cxx
scheduler/cups-polld.c
scheduler/cupsfilter.c
scheduler/ipp.c
scheduler/job.c
scheduler/libcupsmime.exp
scheduler/mime-private.h [new file with mode: 0644]
scheduler/mime.c
scheduler/mime.h
scheduler/util.c
scheduler/util.h
systemv/lpadmin.c
test/ippserver.c
test/run-stp-tests.sh
tools/pdftops-darwin.sh [new file with mode: 0755]
vcnet/config.h
xcode/CUPS.xcodeproj/project.pbxproj
xcode/config.h

index 1cf3a8f2235103cc5907d1f87ff726a6939fc24f..9376825a8829d099e6156b8e67e4dc050ae81aaf 100644 (file)
@@ -4,7 +4,7 @@ CHANGES-1.4.txt
 CHANGES IN CUPS V1.4.7
 
        - Documentation changes (STR #3710, STR #3720, STR #3745, STR #3750,
-         STR #3757, STR #3758, STR #3782, STR #3826, STR #3829)
+         STR #3757, STR #3758, STR #3782, STR #3826, STR #3829, STR #3837)
        - Web interface fixes (STR #3412, STR #3345, STR #3455, STR #3707,
          STR #3755, STR #3769, STR #3783)
        - Configure script fixes (STR #3659, STR #3691)
index 8fcf447801752c69d92240845c8736f3c5b32420..beadcb06ccf298101b1c75a334514e1e051a022e 100644 (file)
@@ -1,8 +1,23 @@
-CHANGES.txt - 2011-03-31
+CHANGES.txt - 2011-05-10
 ------------------------
 
 CHANGES IN CUPS V1.5b1
 
+       - The lpadmin command now allows default option values to be deleted
+         (STR #2959)
+       - The lpadmin command now allows the cupsIPPSupplies and
+         cupsSNMPSupplies keywords to be set in a PPD file (STR #3825)
+       - Moving a held job no longer releases it (STR #3839)
+       - Restored support for GNU TLS and OpenSSL with threading enabled
+         (STR #3605)
+       - Fixed a confusing error message from cups-polld (STR #3806)
+       - Increased the default RIPCache value to 128MB (STR #3535)
+       - MIME errors are now routed to the error_log file (STR #2410)
+       - Updated PDF filter to support new Ghostscript ps2write device
+         (STR #3766)
+       - Updated PDF filter to support new Poppler option to preserve page
+         sizes in PDF files when the user has not selected a particular media
+         size (STR #3689)
        - Added new PWG Raster filter for IPP Everywhere printer support.
        - Added printer-uuid attribute.
        - Added support for the cupsSingleFile PPD keyword.
index bd567ee034f4940d47621336a76d1e2255f2541b..ec242f999533e4eef61c65402f162bd80a7eabfb 100644 (file)
@@ -1,4 +1,4 @@
-INSTALL - CUPS v1.4.0 - 2009-06-26
+INSTALL - CUPS v1.5.0 - 2011-05-06
 ----------------------------------
 
 This file describes how to compile and install CUPS from source code. For more
@@ -166,7 +166,6 @@ CREATING BINARY DISTRIBUTIONS WITH EPM
        deb       - Builds a Debian package
        depot     - Builds a HP-UX package (also swinstall)
        inst      - Builds an IRIX package (also tardist)
-       osx       - Builds a MacOS X package
        pkg       - Builds a Solaris package
        rpm       - Builds a RPM package
        setld     - Build a Tru64 UNIX package
index 10fb71da84638c9eede48c3928ffa43c0cb3e797..0d4397f5b1078382a5a5b6ac76b59c98fbd284a5 100644 (file)
@@ -102,6 +102,18 @@ LIBZ               =       @LIBZ@
 
 INSTALLSTATIC  =       @INSTALLSTATIC@
 
+#
+# IPP backend aliases...
+#
+
+IPPALIASES     =       @IPPALIASES@
+
+#
+# Install XPC backends?
+#
+
+INSTALLXPC     =       @INSTALLXPC@
+
 #
 # Program options...
 #
index 964f562e912a75714f39559771979a9358570b9f..747955d75fc9fed188de2aa332500641164d3ec0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -302,9 +302,6 @@ aix bsd deb depot inst pkg setld slackware swinstall tardist:
 epm:
        epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
 
-osx:
-       epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list
-
 rpm:
        epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
 
index 8bfcbd4dc3318aaca812a54879df7adae6c5a5da..3e9c6d8b5beadc96d78aa3340a4a951f974bcba0 100644 (file)
@@ -1,4 +1,4 @@
-README - CUPS v1.5svn - 2011-01-03
+README - CUPS v1.5svn - 2011-05-06
 ----------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt"
index 1cca9836d49c165b7efcca57cb8cbeb4106c3648..5a0521cff822ae072ea1a16afe6f4c2956bd1a91 100644 (file)
@@ -3,7 +3,7 @@
 #
 #   Backend makefile for CUPS.
 #
-#   Copyright 2007-2010 by Apple Inc.
+#   Copyright 2007-2011 by Apple Inc.
 #   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
 #   These coded instructions, statements, and computer programs are the
@@ -85,7 +85,8 @@ install-data:
 # Install programs...
 #
 
-install-exec:
+install-exec:  $(INSTALLXPC)
+       echo Installing backends in $(SERVERBIN)/backend
        $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
        for file in $(RBACKENDS); do \
                $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
@@ -93,8 +94,10 @@ install-exec:
        for file in $(UBACKENDS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
        done
-       $(RM) $(SERVERBIN)/backend/http
-       $(LN) ipp $(SERVERBIN)/backend/http
+       for file in $(IPPALIASES); do \
+               $(RM) $(SERVERBIN)/backend/$$file; \
+               $(LN) ipp $(SERVERBIN)/backend/$$file; \
+       done
        if test "x$(DNSSD_BACKEND)" != x; then \
                $(RM) $(SERVERBIN)/backend/mdns; \
                $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
@@ -106,6 +109,15 @@ install-exec:
                done \
        fi
 
+install-xpc:   ipp
+       echo Installing XPC backends in $(SERVERBIN)/apple
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
+       $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
+       for file in $(IPPALIASES); do \
+               $(RM) $(SERVERBIN)/apple/$$file; \
+               $(LN) ipp $(SERVERBIN)/apple/$$file; \
+       done
+
 
 #
 # Install headers...
@@ -126,10 +138,17 @@ install-libs:
 #
 
 uninstall:
+       $(RM) $(SERVERBIN)/apple/ipp
+       for file in $(IPPALIASES); do \
+               $(RM) $(SERVERBIN)/apple/$$file; \
+       done
+       -$(RMDIR) $(SERVERBIN)/apple
        for file in $(RBACKENDS) $(UBACKENDS); do \
                $(RM) $(SERVERBIN)/backend/$$file; \
        done
-       $(RM) $(SERVERBIN)/backend/http
+       for file in $(IPPALIASES); do \
+               $(RM) $(SERVERBIN)/backend/$$file; \
+       done
        -$(RMDIR) $(SERVERBIN)/backend
        -$(RMDIR) $(SERVERBIN)
 
index 7fac198edda82bad84973c5a2baa27604dc87b1d..ca45a2f890e2bb7fd92cf9994cf17d2e5082ea20 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 7948 2008-09-17 00:04:12Z mike $"
+ * "$Id: ipp.c 9759 2011-05-11 03:24:33Z mike $"
  *
  *   IPP backend for CUPS.
  *
  *   main()                 - Send a file to the printer or server.
  *   cancel_job()           - Cancel a print job.
  *   check_printer_state()  - Check the printer state.
- *   compress_files()       - Compress print files...
- *   monitor_printer()      - Monitor the printer state...
+ *   compress_files()       - Compress print files.
+ *   monitor_printer()      - Monitor the printer state.
  *   new_request()          - Create a new print creation or validation request.
  *   password_cb()          - Disable the password prompt for
  *                            cupsDoFileRequest().
  *   report_attr()          - Report an IPP attribute value.
  *   report_printer_state() - Report the printer state.
+ *   run_as_user()          - Run the IPP backend as the printing user.
  *   sigterm_handler()      - Handle 'terminate' signals that stop the backend.
  */
 
  */
 
 #include "backend-private.h"
+#include <cups/array-private.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
+#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
+#  include <xpc/xpc.h>
+#  define kPMPrintUIToolAgent  "com.apple.printuitool.agent"
+#  define kPMStartJob          100
+#  define kPMWaitForJob                101
+extern void    xpc_connection_set_target_uid(xpc_connection_t connection,
+                                             uid_t uid);
+#endif /* HAVE_GSSAPI && HAVE_XPC */
 
 
 /*
@@ -62,17 +72,28 @@ typedef struct _cups_monitor_s              /**** Monitoring data ****/
  * Globals...
  */
 
-static const char *auth_info_required = "none";
+static int             num_attr_cache = 0;
+                                       /* Number of cached attributes */
+static cups_option_t   *attr_cache = NULL;
+                                       /* Cached attributes */
+static const char      *auth_info_required;
                                        /* New auth-info-required value */
+#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
+static int             child_pid = 0;  /* Child process ID */
+#endif /* HAVE_GSSAPI && HAVE_XPC */
 static const char * const jattrs[] =   /* Job attributes we want */
 {
+  "job-impressions-completed",
   "job-media-sheets-completed",
   "job-state",
   "job-state-reasons"
 };
-static int     job_canceled = 0;       /* Job cancelled? */
-static char    *password = NULL;       /* Password for device URI */
-static int     password_tries = 0;     /* Password tries */
+static int             job_canceled = 0;
+                                       /* Job cancelled? */
+static char            *password = NULL;
+                                       /* Password for device URI */
+static int             password_tries = 0;
+                                       /* Password tries */
 static const char * const pattrs[] =   /* Printer attributes we want */
 {
   "copies-supported",
@@ -105,7 +126,11 @@ static const char * const remote_job_states[] =
   "cups-remote-aborted",
   "cups-remote-completed"
 };
-static char    tmpfilename[1024] = ""; /* Temporary spool file name */
+static cups_array_t    *state_reasons; /* Array of printe-state-reasons keywords */
+static _cups_mutex_t   state_mutex = _CUPS_MUTEX_INITIALIZER;
+                                       /* Mutex to control access */
+static char            tmpfilename[1024] = "";
+                                       /* Temporary spool file name */
 
 
 /*
@@ -133,7 +158,12 @@ static ipp_t               *new_request(ipp_op_t op, int version, const char *uri,
 static const char      *password_cb(const char *);
 static void            report_attr(ipp_attribute_t *attr);
 static int             report_printer_state(ipp_t *ipp, int job_id);
+#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
+static int             run_as_user(int argc, char *argv[], uid_t uid,
+                                   const char *device_uri, int fd);
+#endif /* HAVE_GSSAPI && HAVE_XPC */
 static void            sigterm_handler(int sig);
+static void            update_reasons(ipp_attribute_t *attr, const char *s);
 
 
 /*
@@ -207,7 +237,7 @@ main(int  argc,                             /* I - Number of command-line args */
                *final_content_type,    /* FINAL_CONTENT_TYPE environment var */
                *document_format;       /* document-format value */
   int          fd;                     /* File descriptor */
-  off_t                bytes;                  /* Bytes copied */
+  off_t                bytes = 0;              /* Bytes copied */
   char         buffer[16384];          /* Copy buffer */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
@@ -215,6 +245,7 @@ main(int  argc,                             /* I - Number of command-line args */
   int          version;                /* IPP version */
   ppd_file_t   *ppd;                   /* PPD file */
   _ppd_cache_t *pc;                    /* PPD cache and mapping data */
+  fd_set       input;                  /* Input set for select() */
 
 
  /*
@@ -270,6 +301,69 @@ main(int  argc,                            /* I - Number of command-line args */
     return (CUPS_BACKEND_STOP);
   }
 
+ /*
+  * Get the device URI...
+  */
+
+  while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
+  {
+    _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
+    sleep(10);
+
+    if (getenv("CLASS") != NULL)
+      return (CUPS_BACKEND_FAILED);
+  }
+
+  if ((auth_info_required = getenv("AUTH_INFO_REQUIRED")) == NULL)
+    auth_info_required = "none";
+
+  state_reasons = _cupsArrayNewStrings(getenv("PRINTER_STATE_REASONS"));
+
+#ifdef HAVE_GSSAPI
+ /*
+  * For Kerberos, become the printing user (if we can) to get the credentials
+  * that way.
+  */
+
+  if (!getuid() && (value = getenv("AUTH_UID")) != NULL)
+  {
+    uid_t      uid = (uid_t)atoi(value);
+                                       /* User ID */
+
+#  ifdef HAVE_XPC
+    if (uid > 0)
+    {
+      if (argc == 6)
+        return (run_as_user(argc, argv, uid, device_uri, 0));
+      else
+      {
+        int status = 0;                        /* Exit status */
+
+        for (i = 6; i < argc && !status && !job_canceled; i ++)
+       {
+         if ((fd = open(argv[i], O_RDONLY)) >= 0)
+         {
+           status = run_as_user(argc, argv, uid, device_uri, fd);
+           close(fd);
+         }
+         else
+         {
+           _cupsLangPrintError("ERROR", _("Unable to open print file"));
+           status = CUPS_BACKEND_FAILED;
+         }
+       }
+
+       return (status);
+      }
+    }
+
+#  else /* No XPC, just try to run as the user ID */
+    if (uid > 0)
+      seteuid(uid);
+#  endif /* HAVE_XPC */
+  }
+#endif /* HAVE_GSSAPI */
+
  /*
   * Get the (final) content type...
   */
@@ -289,15 +383,6 @@ main(int  argc,                            /* I - Number of command-line args */
   * Extract the hostname and printer name from the URI...
   */
 
-  while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
-  {
-    _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
-    sleep(10);
-
-    if (getenv("CLASS") != NULL)
-      return (CUPS_BACKEND_FAILED);
-  }
-
   httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
                   username, sizeof(username), hostname, sizeof(hostname), &port,
                  resource, sizeof(resource));
@@ -522,16 +607,6 @@ main(int  argc,                            /* I - Number of command-line args */
     password = getenv("AUTH_PASSWORD");
   }
 
-#ifdef HAVE_GSSAPI
- /*
-  * For Kerberos, become the printing user (if we can) to get the credentials
-  * that way.
-  */
-
-  if (!getuid() && (value = getenv("AUTH_UID")) != NULL)
-    seteuid(atoi(value));
-#endif /* HAVE_GSSAPI */
-
  /*
   * Try finding the remote server...
   */
@@ -540,7 +615,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
   sprintf(portname, "%d", port);
 
-  fputs("STATE: +connecting-to-device\n", stderr);
+  update_reasons(NULL, "+connecting-to-device");
   fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
 
   while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
@@ -551,7 +626,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
     if (getenv("CLASS") != NULL)
     {
-      fputs("STATE: -connecting-to-device\n", stderr);
+      update_reasons(NULL, "-connecting-to-device");
       return (CUPS_BACKEND_STOP);
     }
   }
@@ -575,8 +650,12 @@ main(int  argc,                            /* I - Number of command-line args */
   */
 
   if (num_files == 0)
+  {
     if (!backendWaitLoop(snmp_fd, &(addrlist->addr), 0, backendNetworkSideCB))
       return (CUPS_BACKEND_OK);
+    else if ((bytes = read(0, buffer, sizeof(buffer))) <= 0)
+      return (CUPS_BACKEND_OK);
+  }
 
  /*
   * Try connecting to the remote server...
@@ -594,7 +673,7 @@ main(int  argc,                             /* I - Number of command-line args */
       int error = errno;               /* Connection error */
 
       if (http->status == HTTP_PKI_ERROR)
-       fputs("STATE: +cups-certificate-error\n", stderr);
+       update_reasons(NULL, "+cups-certificate-error");
 
       if (job_canceled)
        break;
@@ -618,7 +697,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
        sleep(5);
 
-       fputs("STATE: -connecting-to-device\n", stderr);
+       update_reasons(NULL, "-connecting-to-device");
 
         return (CUPS_BACKEND_FAILED);
       }
@@ -632,7 +711,7 @@ main(int  argc,                             /* I - Number of command-line args */
        {
          _cupsLangPrintFilter(stderr, "ERROR",
                               _("The printer is not responding."));
-         fputs("STATE: -connecting-to-device\n", stderr);
+         update_reasons(NULL, "-connecting-to-device");
          return (CUPS_BACKEND_FAILED);
        }
 
@@ -672,14 +751,14 @@ main(int  argc,                           /* I - Number of command-line args */
        break;
     }
     else
-      fputs("STATE: -cups-certificate-error\n", stderr);
+      update_reasons(NULL, "-cups-certificate-error");
   }
   while (http->fd < 0);
 
   if (job_canceled || !http)
     return (CUPS_BACKEND_FAILED);
 
-  fputs("STATE: -connecting-to-device\n", stderr);
+  update_reasons(NULL, "-connecting-to-device");
   _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
 
   fprintf(stderr, "DEBUG: Connected to %s:%d...\n",
@@ -742,11 +821,8 @@ main(int  argc,                            /* I - Number of command-line args */
     {
       fprintf(stderr, "DEBUG: Printer responded with HTTP version %d.%d.\n",
               http->version / 100, http->version % 100);
-
-      _cupsLangPrintFilter(stderr, "ERROR",
-                           _("This printer does not conform to the IPP "
-                            "standard. Please contact the manufacturer of "
-                            "your printer for assistance."));
+      update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                          "cups-ipp-wrong-http-version");
     }
 
     supported  = cupsDoRequest(http, request, resource);
@@ -833,39 +909,57 @@ main(int  argc,                           /* I - Number of command-line args */
       continue;
     }
 
-   /*
-    * Check printer-state-reasons for the "spool-area-full" keyword...
-    */
-
-    if ((printer_state = ippFindAttribute(supported, "printer-state-reasons",
-                                          IPP_TAG_KEYWORD)) != NULL)
+    if (!getenv("CLASS"))
     {
-      for (i = 0; i < printer_state->num_values; i ++)
-        if (!strcmp(printer_state->values[0].string.text, "spool-area-full") ||
-           !strncmp(printer_state->values[0].string.text, "spool-area-full-",
-                    16))
-          break;
+     /*
+      * Check printer-is-accepting-jobs = false and printer-state-reasons for the
+      * "spool-area-full" keyword...
+      */
 
-      if (i < printer_state->num_values)
+      int busy = 0;
+
+      if ((printer_accepting = ippFindAttribute(supported,
+                                               "printer-is-accepting-jobs",
+                                               IPP_TAG_BOOLEAN)) != NULL &&
+         !printer_accepting->values[0].boolean)
+        busy = 1;
+      else if (!printer_accepting)
+        update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                            "cups-ipp-missing-printer-is-accepting-jobs");
+        
+      if ((printer_state = ippFindAttribute(supported,
+                                           "printer-state-reasons",
+                                           IPP_TAG_KEYWORD)) != NULL && !busy)
+      {
+       for (i = 0; i < printer_state->num_values; i ++)
+         if (!strcmp(printer_state->values[0].string.text,
+                     "spool-area-full") ||
+             !strncmp(printer_state->values[0].string.text, "spool-area-full-",
+                      16))
+         {
+           busy = 1;
+           break;
+         }
+      }
+      else
+        update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                            "cups-ipp-missing-printer-state-reasons");
+
+      if (busy)
       {
        _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
 
-        report_printer_state(supported, 0);
+       report_printer_state(supported, 0);
 
        sleep(delay);
 
-        delay = _cupsNextDelay(delay, &prev_delay);
+       delay = _cupsNextDelay(delay, &prev_delay);
 
        ippDelete(supported);
        supported = NULL;
        continue;
       }
     }
-    else
-      _cupsLangPrintFilter(stderr, "ERROR",
-                           _("This printer does not conform to the IPP "
-                            "standard. Please contact the manufacturer of "
-                            "your printer for assistance."));
 
    /*
     * Check for supported attributes...
@@ -912,6 +1006,38 @@ main(int  argc,                           /* I - Number of command-line args */
     if ((operations_sup = ippFindAttribute(supported, "operations-supported",
                                           IPP_TAG_ENUM)) != NULL)
     {
+      for (i = 0; i < operations_sup->num_values; i ++)
+        if (operations_sup->values[i].integer == IPP_PRINT_JOB)
+         break;
+
+      if (i >= operations_sup->num_values)
+       update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                            "cups-ipp-missing-print-job");
+
+      for (i = 0; i < operations_sup->num_values; i ++)
+        if (operations_sup->values[i].integer == IPP_CANCEL_JOB)
+         break;
+
+      if (i >= operations_sup->num_values)
+       update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                            "cups-ipp-missing-cancel-job");
+
+      for (i = 0; i < operations_sup->num_values; i ++)
+        if (operations_sup->values[i].integer == IPP_GET_JOB_ATTRIBUTES)
+         break;
+
+      if (i >= operations_sup->num_values)
+       update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                             "cups-ipp-missing-get-job-attributes");
+
+      for (i = 0; i < operations_sup->num_values; i ++)
+        if (operations_sup->values[i].integer == IPP_GET_PRINTER_ATTRIBUTES)
+         break;
+
+      if (i >= operations_sup->num_values)
+       update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                            "cups-ipp-missing-get-printer-attributes");
+
       for (i = 0; i < operations_sup->num_values; i ++)
         if (operations_sup->values[i].integer == IPP_VALIDATE_JOB)
        {
@@ -920,22 +1046,12 @@ main(int  argc,                          /* I - Number of command-line args */
        }
 
       if (!validate_job)
-      {
-        _cupsLangPrintFilter(stderr, "WARNING",
-                            _("This printer does not conform to the IPP "
-                              "standard and may not work."));
-        fputs("DEBUG: operations-supported does not list Validate-Job.\n",
-             stderr);
-      }
+       update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                             "cups-ipp-missing-validate-job");
     }
     else
-    {
-      _cupsLangPrintFilter(stderr, "WARNING",
-                          _("This printer does not conform to the IPP "
-                            "standard and may not work."));
-      fputs("DEBUG: operations-supported not returned in "
-            "Get-Printer-Attributes request.\n", stderr);
-    }
+      update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                          "cups-ipp-missing-operations-supported");
 
     doc_handling_sup = ippFindAttribute(supported,
                                        "multiple-document-handling-supported",
@@ -1129,7 +1245,8 @@ main(int  argc,                           /* I - Number of command-line args */
       _cupsLangPrintFilter(stderr, "INFO", _("The printer is busy."));
       sleep(10);
     }
-    else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
+    else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN ||
+            ipp_status == IPP_AUTHENTICATION_CANCELED)
     {
      /*
       * Update auth-info-required as needed...
@@ -1153,9 +1270,12 @@ main(int  argc,                          /* I - Number of command-line args */
     }
     else if (ipp_status == IPP_OPERATION_NOT_SUPPORTED)
     {
-      _cupsLangPrintFilter(stderr, "WARNING",
-                          _("This printer does not conform to the IPP "
-                            "standard and may not work."));
+     /*
+      * This is all too common...
+      */
+
+      update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                          "cups-ipp-missing-validate-job");
       break;
     }
     else if (ipp_status < IPP_REDIRECTION_OTHER_SITE)
@@ -1212,21 +1332,38 @@ main(int  argc,                         /* I - Number of command-line args */
         if (num_files == 1)
          fd = open(files[0], O_RDONLY);
        else
-         fd = 0;
+       {
+         fd          = 0;
+         http_status = cupsWriteRequestData(http, buffer, bytes);
+        }
 
-        while ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
+        while (http_status == HTTP_CONTINUE)
        {
-         fprintf(stderr, "DEBUG: Read %d bytes...\n", (int)bytes);
+        /*
+         * Check for side-channel requests and more print data...
+         */
 
-         if (cupsWriteRequestData(http, buffer, bytes) != HTTP_CONTINUE)
-            break;
-          else
-         {
-          /*
-           * Check for side-channel requests...
-           */
+          FD_ZERO(&input);
+         FD_SET(fd, &input);
+         FD_SET(snmp_fd, &input);
 
+          while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
+                       NULL) <= 0 && !job_canceled);
+
+         if (FD_ISSET(snmp_fd, &input))
            backendCheckSideChannel(snmp_fd, http->hostaddr);
+
+          if (FD_ISSET(fd, &input))
+          {
+            if ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
+            {
+             fprintf(stderr, "DEBUG: Read %d bytes...\n", (int)bytes);
+
+             if (cupsWriteRequestData(http, buffer, bytes) != HTTP_CONTINUE)
+               break;
+           }
+           else if (bytes == 0 || (errno != EINTR && errno != EAGAIN))
+             break;
          }
        }
 
@@ -1311,6 +1448,8 @@ main(int  argc,                           /* I - Number of command-line args */
     {
       _cupsLangPrintFilter(stderr, "INFO",
                           _("Print file accepted - job ID unknown."));
+      update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                          "cups-ipp-missing-job-id");
       job_id = 0;
     }
     else
@@ -1462,6 +1601,8 @@ main(int  argc,                           /* I - Number of command-line args */
         * Job has gone away and/or the server has no job history...
        */
 
+       update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                            "cups-ipp-missing-job-history");
         ippDelete(response);
 
        ipp_status = IPP_OK;
@@ -1493,18 +1634,23 @@ main(int  argc,                         /* I - Number of command-line args */
          * Reflect the remote job state in the local queue...
          */
 
-          fputs("STATE: -cups-remote-pending,"
-               "cups-remote-pending-held,"
-               "cups-remote-processing,"
-               "cups-remote-stopped,"
-               "cups-remote-canceled,"
-               "cups-remote-aborted,"
-               "cups-remote-completed\n", stderr);
-          if (job_state->values[0].integer >= IPP_JOB_PENDING &&
+         if (cups_version &&
+             job_state->values[0].integer >= IPP_JOB_PENDING &&
              job_state->values[0].integer <= IPP_JOB_COMPLETED)
-           fprintf(stderr, "STATE: +%s\n",
-                   remote_job_states[job_state->values[0].integer -
-                                     IPP_JOB_PENDING]);
+           update_reasons(NULL,
+                          remote_job_states[job_state->values[0].integer -
+                                            IPP_JOB_PENDING]);
+
+         if ((job_sheets = ippFindAttribute(response,
+                                            "job-media-sheets-completed",
+                                            IPP_TAG_INTEGER)) == NULL)
+           job_sheets = ippFindAttribute(response,
+                                         "job-impressions-completed",
+                                         IPP_TAG_INTEGER);
+
+         if (job_sheets)
+           fprintf(stderr, "PAGE: total %d\n",
+                   job_sheets->values[0].integer);
 
         /*
           * Stop polling if the job is finished or pending-held...
@@ -1512,12 +1658,6 @@ main(int  argc,                          /* I - Number of command-line args */
 
           if (job_state->values[0].integer > IPP_JOB_STOPPED)
          {
-           if ((job_sheets = ippFindAttribute(response,
-                                              "job-media-sheets-completed",
-                                              IPP_TAG_INTEGER)) != NULL)
-             fprintf(stderr, "PAGE: total %d\n",
-                     job_sheets->values[0].integer);
-
            ippDelete(response);
            break;
          }
@@ -1530,8 +1670,8 @@ main(int  argc,                           /* I - Number of command-line args */
          * the job...
          */
 
-          fputs("DEBUG: No job-state available from printer - stopping queue.\n",
-               stderr);
+         update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
+                              "cups-ipp-missing-job-state");
          ipp_status = IPP_INTERNAL_ERROR;
          break;
        }
@@ -1738,7 +1878,7 @@ check_printer_state(
 
 #ifdef HAVE_LIBZ
 /*
- * 'compress_files()' - Compress print files...
+ * 'compress_files()' - Compress print files.
  */
 
 static void
@@ -1808,7 +1948,7 @@ compress_files(int  num_files,            /* I - Number of files */
 
 
 /*
- * 'monitor_printer()' - Monitor the printer state...
+ * 'monitor_printer()' - Monitor the printer state.
  */
 
 static void *                          /* O - Thread exit code */
@@ -2139,7 +2279,7 @@ new_request(
          collate_str = "separate-documents-collated-copies";
        else
          collate_str = "separate-documents-uncollated-copies";
-       
+
         for (i = 0; i < doc_handling_sup->num_values; i ++)
          if (!strcmp(doc_handling_sup->values[i].string.text, collate_str))
          {
@@ -2205,10 +2345,11 @@ password_cb(const char *prompt)         /* I - Prompt (not used) */
 static void
 report_attr(ipp_attribute_t *attr)     /* I - Attribute */
 {
-  int  i;                              /* Looping var */
-  char value[1024],                    /* Value string */
-       *valptr,                        /* Pointer into value string */
-       *attrptr;                       /* Pointer into attribute value */
+  int          i;                      /* Looping var */
+  char         value[1024],            /* Value string */
+               *valptr,                /* Pointer into value string */
+               *attrptr;               /* Pointer into attribute value */
+  const char   *cached;                /* Cached attribute */
 
 
  /*
@@ -2258,11 +2399,17 @@ report_attr(ipp_attribute_t *attr)      /* I - Attribute */
 
   *valptr = '\0';
 
- /*
-  * Tell the scheduler about the new values...
-  */
+  if ((cached = cupsGetOption(attr->name, num_attr_cache,
+                              attr_cache)) == NULL || strcmp(cached, value))
+  {
+   /*
+    * Tell the scheduler about the new values...
+    */
 
-  fprintf(stderr, "ATTR: %s=%s\n", attr->name, value);
+    num_attr_cache = cupsAddOption(attr->name, value, num_attr_cache,
+                                   &attr_cache);
+    fprintf(stderr, "ATTR: %s=%s\n", attr->name, value);
+  }
 }
 
 
@@ -2274,15 +2421,12 @@ static int                              /* O - Number of reasons shown */
 report_printer_state(ipp_t *ipp,       /* I - IPP response */
                      int   job_id)     /* I - Current job ID */
 {
-  int                  i;              /* Looping var */
   int                  count;          /* Count of reasons shown... */
   ipp_attribute_t      *pa,            /* printer-alert */
                        *pam,           /* printer-alert-message */
                        *psm,           /* printer-state-message */
                        *reasons,       /* printer-state-reasons */
                        *marker;        /* marker-* attributes */
-  const char           *reason;        /* Current reason */
-  const char           *prefix;        /* Prefix for STATE: line */
   char                 value[1024],    /* State/message string */
                        *valptr;        /* Pointer into string */
   static int           ipp_supplies = -1;
@@ -2340,31 +2484,7 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
                                   IPP_TAG_KEYWORD)) == NULL)
     return (0);
 
-  value[0] = '\0';
-  prefix   = "STATE: ";
-
-  for (i = 0, count = 0, valptr = value; i < reasons->num_values; i ++)
-  {
-    reason = reasons->values[i].string.text;
-
-    if (strcmp(reason, "paused") &&
-       strcmp(reason, "com.apple.print.recoverable-warning"))
-    {
-      strlcpy(valptr, prefix, sizeof(value) - (valptr - value) - 1);
-      valptr += strlen(valptr);
-      strlcpy(valptr, reason, sizeof(value) - (valptr - value) - 1);
-      valptr += strlen(valptr);
-
-      prefix  = ",";
-    }
-  }
-
-  if (value[0])
-  {
-    *valptr++ = '\n';
-    *valptr   = '\0';
-    fputs(value, stderr);
-  }
+  update_reasons(reasons, NULL);
 
  /*
   * Relay the current marker-* attribute values...
@@ -2412,6 +2532,196 @@ report_printer_state(ipp_t *ipp,        /* I - IPP response */
 }
 
 
+#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
+/*
+ * 'run_as_user()' - Run the IPP backend as the printing user.
+ *
+ * This function uses an XPC-based user agent to run the backend as the printing
+ * user. We need to do this in order to have access to the user's Kerberos
+ * credentials.
+ */
+
+static int                             /* O - Exit status */
+run_as_user(int        argc,           /* I - Number of command-line args */
+           char       *argv[],         /* I - Command-line arguments */
+           uid_t      uid,             /* I - User ID */
+           const char *device_uri,     /* I - Device URI */
+           int        fd)              /* I - File to print */
+{
+  xpc_connection_t     conn;           /* Connection to XPC service */
+  xpc_object_t         request;        /* Request message dictionary */
+  __block xpc_object_t response;       /* Response message dictionary */
+  dispatch_semaphore_t sem;            /* Semaphore for waiting for response */
+  int                  status = CUPS_BACKEND_FAILED;
+                                       /* Status of request */
+
+
+  fprintf(stderr, "DEBUG: Running IPP backend as UID %d.\n", (int)uid);
+
+ /*
+  * Connect to the user agent for the specified UID...
+  */
+
+  conn = xpc_connection_create_mach_service(kPMPrintUIToolAgent,
+                                            dispatch_get_global_queue(0, 0), 0);
+  if (!conn)
+  {
+    _cupsLangPrintFilter(stderr, "ERROR",
+                         _("Unable to start backend process."));
+    fputs("DEBUG: Unable to create connection to agent.\n", stderr);
+    goto cleanup;
+  }
+
+  xpc_connection_set_event_handler(conn,
+                                   ^(xpc_object_t event)
+                                  {
+                                    xpc_type_t messageType = xpc_get_type(event);
+
+                                    if (messageType == XPC_TYPE_ERROR)
+                                    {
+                                      if (event == XPC_ERROR_CONNECTION_INTERRUPTED)
+                                        fprintf(stderr, "DEBUG: Interrupted connection to service %s.\n",
+                                                xpc_connection_get_name(conn));
+                                      else if (event == XPC_ERROR_CONNECTION_INVALID)
+                                        fprintf(stderr, "DEBUG: Connection invalid for service %s.\n",
+                                                xpc_connection_get_name(conn));
+                                      else
+                                        fprintf(stderr, "DEBUG: Unxpected error for service %s: %s\n",
+                                                xpc_connection_get_name(conn),
+                                                xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));
+                                    }
+                                  });
+  xpc_connection_set_target_uid(conn, uid);
+  xpc_connection_resume(conn);
+
+ /*
+  * Try starting the backend...
+  */
+
+  request = xpc_dictionary_create(NULL, NULL, 0);
+  xpc_dictionary_set_int64(request, "command", kPMStartJob);
+  xpc_dictionary_set_string(request, "device-uri", device_uri);
+  xpc_dictionary_set_string(request, "job-id", argv[1]);
+  xpc_dictionary_set_string(request, "user", argv[2]);
+  xpc_dictionary_set_string(request, "title", argv[3]);
+  xpc_dictionary_set_string(request, "copies", argv[4]);
+  xpc_dictionary_set_string(request, "options", argv[5]);
+  xpc_dictionary_set_string(request, "auth-info-required",
+                            getenv("AUTH_INFO_REQUIRED"));
+  xpc_dictionary_set_fd(request, "stdin", fd);
+  xpc_dictionary_set_fd(request, "stderr", 2);
+  xpc_dictionary_set_fd(request, "side-channel", CUPS_SC_FD);
+
+  sem      = dispatch_semaphore_create(0);
+  response = NULL;
+
+  xpc_connection_send_message_with_reply(conn, request,
+                                         dispatch_get_global_queue(0,0),
+                                        ^(xpc_object_t reply)
+                                        {
+                                          /* Save the response and wake up */
+                                          if (xpc_get_type(reply)
+                                                  == XPC_TYPE_DICTIONARY)
+                                            response = xpc_retain(reply);
+
+                                          dispatch_semaphore_signal(sem);
+                                        });
+
+  dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
+  xpc_release(request);
+  dispatch_release(sem);
+
+  if (response)
+  {
+    child_pid = xpc_dictionary_get_int64(response, "child-pid");
+
+    xpc_release(response);
+
+    if (child_pid)
+      fprintf(stderr, "DEBUG: Child PID=%d.\n", child_pid);
+    else
+    {
+      _cupsLangPrintFilter(stderr, "ERROR",
+                           _("Unable to start backend process."));
+      fputs("DEBUG: No child PID.\n", stderr);
+      goto cleanup;
+    }
+  }
+  else
+  {
+    _cupsLangPrintFilter(stderr, "ERROR",
+                         _("Unable to start backend process."));
+    fputs("DEBUG: No reply from agent.\n", stderr);
+    goto cleanup;
+  }
+
+ /*
+  * Then wait for the backend to finish...
+  */
+
+  request = xpc_dictionary_create(NULL, NULL, 0);
+  xpc_dictionary_set_int64(request, "command", kPMWaitForJob);
+  xpc_dictionary_set_fd(request, "stderr", 2);
+
+  sem      = dispatch_semaphore_create(0);
+  response = NULL;
+
+  xpc_connection_send_message_with_reply(conn, request,
+                                         dispatch_get_global_queue(0,0),
+                                        ^(xpc_object_t reply)
+                                        {
+                                          /* Save the response and wake up */
+                                          if (xpc_get_type(reply)
+                                                  == XPC_TYPE_DICTIONARY)
+                                            response = xpc_retain(reply);
+
+                                          dispatch_semaphore_signal(sem);
+                                        });
+
+  dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
+  xpc_release(request);
+  dispatch_release(sem);
+
+  if (response)
+  {
+    status = xpc_dictionary_get_int64(response, "status");
+
+    if (status == SIGTERM || status == SIGKILL || status == SIGPIPE)
+    {
+      fprintf(stderr, "DEBUG: Child terminated on signal %d.\n", status);
+      status = CUPS_BACKEND_FAILED;
+    }
+    else if (WIFSIGNALED(status))
+    {
+      fprintf(stderr, "DEBUG: Child crashed on signal %d.\n", status);
+      status = CUPS_BACKEND_STOP;
+    }
+    else if (WIFEXITED(status))
+    {
+      status = WEXITSTATUS(status);
+      fprintf(stderr, "DEBUG: Child exited with status %d.\n", status);
+    }
+
+    xpc_release(response);
+  }
+  else
+    _cupsLangPrintFilter(stderr, "ERROR",
+                         _("Unable to get backend exit status."));
+
+  cleanup:
+
+  if (conn)
+  {
+    xpc_connection_suspend(conn);
+    xpc_connection_cancel(conn);
+    xpc_release(conn);
+  }
+
+  return (status);
+}
+#endif /* HAVE_GSSAPI && HAVE_XPC */
+
+
 /*
  * 'sigterm_handler()' - Handle 'terminate' signals that stop the backend.
  */
@@ -2421,10 +2731,18 @@ sigterm_handler(int sig)                /* I - Signal */
 {
   (void)sig;   /* remove compiler warnings... */
 
+#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
+  if (child_pid)
+  {
+    kill(child_pid, sig);
+    child_pid = 0;
+  }
+#endif /* HAVE_GSSAPI && HAVE_XPC */
+
   if (!job_canceled)
   {
    /*
-    * Flag that the job should be cancelled...
+    * Flag that the job should be canceled...
     */
 
     job_canceled = 1;
@@ -2433,7 +2751,7 @@ sigterm_handler(int sig)          /* I - Signal */
 
  /*
   * The scheduler already tried to cancel us once, now just terminate
-  * after removing our temp files!
+  * after removing our temp file!
   */
 
   if (tmpfilename[0])
@@ -2444,5 +2762,201 @@ sigterm_handler(int sig)                /* I - Signal */
 
 
 /*
- * End of "$Id: ipp.c 7948 2008-09-17 00:04:12Z mike $".
+ * 'update_reasons()' - Update the printer-state-reasons values.
+ */
+
+static void
+update_reasons(ipp_attribute_t *attr,  /* I - printer-state-reasons or NULL */
+               const char      *s)     /* I - STATE: string or NULL */
+{
+  char         op;                     /* Add (+), remove (-), replace (\0) */
+  cups_array_t *new_reasons;           /* New reasons array */
+  char         *reason,                /* Current reason */
+               add[2048],              /* Reasons added string */
+               *addptr,                /* Pointer into add string */
+               rem[2048],              /* Reasons removed string */
+               *remptr;                /* Pointer into remove string */
+  const char   *addprefix,             /* Current add string prefix */
+               *remprefix;             /* Current remove string prefix */
+
+
+  fprintf(stderr, "DEBUG: update_reasons(attr=%d(%s%s), s=\"%s\")\n",
+         attr ? attr->num_values : 0, attr ? attr->values[0].string.text : "",
+         attr && attr->num_values > 1 ? ",..." : "", s ? s : "(null)");
+
+ /*
+  * Create an array of new reason keyword strings...
+  */
+
+  if (attr)
+  {
+    int        i;                              /* Looping var */
+
+    new_reasons = cupsArrayNew((cups_array_func_t)strcmp, NULL);
+    op          = '\0';
+
+    for (i = 0; i < attr->num_values; i ++)
+    {
+      reason = attr->values[i].string.text;
+
+      if (strcmp(reason, "none") &&
+         strcmp(reason, "none-report") &&
+         strcmp(reason, "paused") &&
+         strcmp(reason, "com.apple.print.recoverable-warning") &&
+         strncmp(reason, "cups-", 5))
+       cupsArrayAdd(new_reasons, reason);
+    }
+  }
+  else if (s)
+  {
+    if (*s == '+' || *s == '-')
+      op = *s++;
+    else
+      op = '\0';
+
+    new_reasons = _cupsArrayNewStrings(s);
+  }
+  else
+    return;
+
+ /*
+  * Compute the changes...
+  */
+
+  add[0]    = '\0';
+  addprefix = "STATE: +";
+  addptr    = add;
+  rem[0]    = '\0';
+  remprefix = "STATE: -";
+  remptr    = rem;
+
+  fprintf(stderr, "DEBUG2: op='%c', new_reasons=%d, state_reasons=%d\n",
+          op ? op : ' ', cupsArrayCount(new_reasons),
+         cupsArrayCount(state_reasons));
+
+  _cupsMutexLock(&state_mutex);
+
+  if (op == '+')
+  {
+   /*
+    * Add reasons...
+    */
+
+    for (reason = (char *)cupsArrayFirst(new_reasons);
+        reason;
+        reason = (char *)cupsArrayNext(new_reasons))
+    {
+      if (!cupsArrayFind(state_reasons, reason))
+      {
+        if (!strncmp(reason, "cups-remote-", 12))
+       {
+        /*
+         * If we are setting cups-remote-xxx, remove all other cups-remote-xxx
+         * keywords...
+         */
+
+         char  *temp;          /* Current reason in state_reasons */
+
+         cupsArraySave(state_reasons);
+
+         for (temp = (char *)cupsArrayFirst(state_reasons);
+              temp;
+              temp = (char *)cupsArrayNext(state_reasons))
+           if (!strncmp(temp, "cups-remote-", 12))
+           {
+             snprintf(remptr, sizeof(rem) - (remptr - rem), "%s%s", remprefix,
+                      temp);
+             remptr    += strlen(remptr);
+             remprefix = ",";
+
+             cupsArrayRemove(state_reasons, temp);
+             break;
+           }
+
+         cupsArrayRestore(state_reasons);
+       }
+
+        cupsArrayAdd(state_reasons, reason);
+
+        snprintf(addptr, sizeof(add) - (addptr - add), "%s%s", addprefix,
+                reason);
+       addptr    += strlen(addptr);
+       addprefix = ",";
+      }
+    }
+  }
+  else if (op == '-')
+  {
+   /*
+    * Remove reasons...
+    */
+
+    for (reason = (char *)cupsArrayFirst(new_reasons);
+        reason;
+        reason = (char *)cupsArrayNext(new_reasons))
+    {
+      if (cupsArrayFind(state_reasons, reason))
+      {
+       snprintf(remptr, sizeof(rem) - (remptr - rem), "%s%s", remprefix,
+                reason);
+       remptr    += strlen(remptr);
+       remprefix = ",";
+
+        cupsArrayRemove(state_reasons, reason);
+      }
+    }
+  }
+  else
+  {
+   /*
+    * Replace reasons...
+    */
+
+    for (reason = (char *)cupsArrayFirst(state_reasons);
+        reason;
+        reason = (char *)cupsArrayNext(state_reasons))
+    {
+      if (strncmp(reason, "cups-", 5) && !cupsArrayFind(new_reasons, reason))
+      {
+       snprintf(remptr, sizeof(rem) - (remptr - rem), "%s%s", remprefix,
+                reason);
+       remptr    += strlen(remptr);
+       remprefix = ",";
+
+        cupsArrayRemove(state_reasons, reason);
+      }
+    }
+
+    for (reason = (char *)cupsArrayFirst(new_reasons);
+        reason;
+        reason = (char *)cupsArrayNext(new_reasons))
+    {
+      if (!cupsArrayFind(state_reasons, reason))
+      {
+        cupsArrayAdd(state_reasons, reason);
+
+        snprintf(addptr, sizeof(add) - (addptr - add), "%s%s", addprefix,
+                reason);
+       addptr    += strlen(addptr);
+       addprefix = ",";
+      }
+    }
+  }
+
+  _cupsMutexUnlock(&state_mutex);
+
+ /*
+  * Report changes and return...
+  */
+
+  if (add[0] && rem[0])
+    fprintf(stderr, "%s\n%s\n", add, rem);
+  else if (add[0])
+    fprintf(stderr, "%s\n", add);
+  else if (rem[0])
+    fprintf(stderr, "%s\n", rem);
+}
+
+/*
+ * End of "$Id: ipp.c 9759 2011-05-11 03:24:33Z mike $".
  */
index d17493af34aace41b3fade83d4f14df2aec1de89..90446addfd7d4595b524ea6a84a91627c9882763 100644 (file)
@@ -141,6 +141,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
                timeout,                /* Timeout */
                contimeout,             /* Connection timeout */
                copies;                 /* Number of copies */
+  ssize_t      bytes = 0;              /* Initial bytes read */
+  char         buffer[16384];          /* Initial print buffer */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -431,8 +433,13 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
   */
 
   if (argc == 6)
+  {
     if (!backendWaitLoop(snmp_fd, &(addrlist->addr), 0, backendNetworkSideCB))
       return (CUPS_BACKEND_OK);
+    else if (mode == MODE_STANDARD &&
+             (bytes = read(0, buffer, sizeof(buffer))) <= 0)
+      return (CUPS_BACKEND_OK);
+  }
 
  /*
   * If we have 7 arguments, print the file named on the command-line.
@@ -454,7 +461,10 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
 
     _cupsLangPrintFilter(stderr, "INFO", _("Copying print data."));
 
-    backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, 
+    if (bytes > 0)
+      write(fd, buffer, bytes);
+
+    backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0,
                   backendNetworkSideCB);
   }
   else if (argc == 6)
index 86854b120a1f8af0536e081264c049b31012dc36..1d550e6e66afa489f967e76b8724f8549131b9bd 100644 (file)
 #define CUPS_DEVELOPER_EMPTY           2
 #define CUPS_MARKER_SUPPLY_LOW         4
 #define CUPS_MARKER_SUPPLY_EMPTY       8
-#define CUPS_MARKER_WASTE_ALMOST_FULL  16
-#define CUPS_MARKER_WASTE_FULL         32
-#define CUPS_OPC_NEAR_EOL              64
-#define CUPS_OPC_LIFE_OVER             128
-#define CUPS_TONER_LOW                 256
-#define CUPS_TONER_EMPTY               512
+#define CUPS_OPC_NEAR_EOL              16
+#define CUPS_OPC_LIFE_OVER             32
+#define CUPS_TONER_LOW                 64
+#define CUPS_TONER_EMPTY               128
 
 
 /*
@@ -172,8 +170,6 @@ static const backend_state_t const supply_states[] =
                          { CUPS_DEVELOPER_EMPTY, "developer-empty-warning" },
                          { CUPS_MARKER_SUPPLY_LOW, "marker-supply-low-report" },
                          { CUPS_MARKER_SUPPLY_EMPTY, "marker-supply-empty-warning" },
-                         { CUPS_MARKER_WASTE_ALMOST_FULL, "marker-waste-almost-full-report" },
-                         { CUPS_MARKER_WASTE_FULL, "marker-waste-full-warning" },
                          { CUPS_OPC_NEAR_EOL, "opc-near-eol-report" },
                          { CUPS_OPC_LIFE_OVER, "opc-life-over-warning" },
                          { CUPS_TONER_LOW, "toner-low-report" },
@@ -251,10 +247,6 @@ backendSNMPSupplies(
               break;
           case CUPS_TC_wasteToner :
           case CUPS_TC_wasteInk :
-              if (percent <= 1)
-                new_supply_state |= CUPS_MARKER_WASTE_FULL;
-              else
-                new_supply_state |= CUPS_MARKER_WASTE_ALMOST_FULL;
               break;
           case CUPS_TC_ink :
           case CUPS_TC_inkCartridge :
index d993dbabc27a1c54b53c8c7380390db0e64f7a0e..f6fc150ea69bff129ec3493f73c29e96a4a32f11 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * "$Id: socket.c 7881 2008-08-28 20:21:56Z mike $"
  *
- *   AppSocket backend for the Common UNIX Printing System (CUPS).
+ *   AppSocket backend for CUPS.
  *
  *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
@@ -91,7 +91,9 @@ main(int  argc,                               /* I - Number of command-line arguments (6 or 7) */
                start_count,            /* Page count via SNMP at start */
                page_count,             /* Page count via SNMP */
                have_supplies;          /* Printer supports supply levels? */
-  ssize_t      tbytes;                 /* Total number of bytes written */
+  ssize_t      bytes = 0,              /* Initial bytes read */
+               tbytes;                 /* Total number of bytes written */
+  char         buffer[1024];           /* Initial print buffer */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -297,8 +299,12 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
   */
 
   if (print_fd == 0)
+  {
     if (!backendWaitLoop(snmp_fd, &(addrlist->addr), 1, backendNetworkSideCB))
       return (CUPS_BACKEND_OK);
+    else if ((bytes = read(0, buffer, sizeof(buffer))) <= 0)
+      return (CUPS_BACKEND_OK);
+  }
 
  /*
   * Connect to the printer...
@@ -398,6 +404,9 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
   tbytes = 0;
 
+  if (bytes > 0)
+    tbytes += write(device_fd, buffer, bytes);
+
   while (copies > 0 && tbytes >= 0)
   {
     copies --;
index 63061fc1340550ad499b219f59ee7a11cc0c8182..2f00019979226a77737da60933a7b10ea64a3412 100644 (file)
@@ -271,9 +271,9 @@ static CFStringRef cfstr_create_trim(const char *cstr);
 static CFStringRef copy_value_for_key(CFStringRef deviceID, CFStringRef *keys);
 static kern_return_t load_classdriver(CFStringRef driverPath, printer_interface_t intf, classdriver_t ***printerDriver);
 static kern_return_t load_printerdriver(CFStringRef *driverBundlePath);
-static kern_return_t registry_close();
+static kern_return_t registry_close(void);
 static kern_return_t registry_open(CFStringRef *driverBundlePath);
-static kern_return_t unload_classdriver();
+static kern_return_t unload_classdriver(classdriver_t ***classdriver);
 static OSStatus copy_deviceid(classdriver_t **printer, CFStringRef *deviceID);
 static void *read_thread(void *reference);
 static void *sidechannel_thread(void *reference);
@@ -285,7 +285,7 @@ static void iterate_printers(iterator_callback_t callBack, void *userdata);
 static void parse_options(char *options, char *serial, int serial_size, UInt32 *location, Boolean *wait_eof);
 static void release_deviceinfo(CFStringRef *make, CFStringRef *model, CFStringRef *serial);
 static void setup_cfLanguage(void);
-static void soft_reset();
+static void soft_reset(void);
 static void status_timer_cb(CFRunLoopTimerRef timer, void *info);
 
 #if defined(__i386__) || defined(__x86_64__)
@@ -1567,7 +1567,7 @@ static kern_return_t registry_open(CFStringRef *driverBundlePath)
  * 'registry_close()' - Close the connection to the printer.
  */
 
-static kern_return_t registry_close()
+static kern_return_t registry_close(void)
 {
   if (g.classdriver != NULL)
     (*g.classdriver)->Close(g.classdriver);
@@ -2191,7 +2191,7 @@ static void parse_pserror(char *sockBuffer,
  * 'soft_reset()' - Send a soft reset to the device.
  */
 
-static void soft_reset()
+static void soft_reset(void)
 {
   fd_set         input_set;            /* Input set for select() */
   struct timeval  tv;                  /* Time value */
index 9e3f73d1154abaa89e03135e15fa29e24e16043b..24e49e423ad2dc008816b24450d6ec9a1550c369 100644 (file)
@@ -116,7 +116,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
               cupsSetUser(argv[i]);
            }
            break;
-           
+
         case 'P' : /* Printer */
            if (argv[i][2])
              dest = argv[i] + 2;
@@ -128,7 +128,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
              {
                httpClose(http);
                cupsFreeDests(num_dests, dests);
-               
+
                usage();
              }
 
@@ -507,6 +507,7 @@ show_jobs(const char *command,              /* I - Command name */
       if (!longstatus && jobcount == 0)
 #ifdef __osf__
        _cupsLangPuts(stdout,
+                     /* TRANSLATORS: Pri is job priority. */
                      _("Rank   Owner      Pri  Job        Files"
                        "                       Total Size"));
 #else
index 05fa23b38110c184446c9e3c11c0b42551e1e180..fdd1c47acabeaf1f14156ec1951444b3a532873d 100644 (file)
@@ -3666,14 +3666,18 @@ do_set_options(http_t *http,            /* I - HTTP connection */
       attr = ippFindAttribute(response, "job-sheets-default", IPP_TAG_ZERO);
 
       cgiSetVariable("KEYWORD", "job_sheets_start");
-      cgiSetVariable("KEYTEXT", cgiText(_("Starting Banner")));
+      cgiSetVariable("KEYTEXT",
+                     /* TRANSLATORS: Banner/cover sheet before the print job. */
+                     cgiText(_("Starting Banner")));
       cgiSetVariable("DEFCHOICE", attr != NULL ?
                                  attr->values[0].string.text : "");
 
       cgiCopyTemplateLang("option-pickone.tmpl");
 
       cgiSetVariable("KEYWORD", "job_sheets_end");
-      cgiSetVariable("KEYTEXT", cgiText(_("Ending Banner")));
+      cgiSetVariable("KEYTEXT",
+                     /* TRANSLATORS: Banner/cover sheet after the print job. */
+                     cgiText(_("Ending Banner")));
       cgiSetVariable("DEFCHOICE", attr != NULL && attr->num_values > 1 ?
                                  attr->values[1].string.text : "");
 
index 804546c9e9afbfd6592e89938728ae1413a21ebd..83e7301ec28d4060c2bb60d75875add86b224429 100644 (file)
 # PostScript filters
 #
 
-application/pdf                        application/vnd.cups-postscript 66      pdftops
+@DEFAULT_PDFTOPS@application/pdf                       application/vnd.cups-postscript 66      pdftops
 application/postscript         application/vnd.cups-postscript 66      pstops
-application/x-cshell           application/postscript          33      texttops
-application/x-csource          application/postscript          33      texttops
-application/x-perl             application/postscript          33      texttops
-application/x-shell            application/postscript          33      texttops
-text/plain                     application/postscript          33      texttops
-text/css                       application/postscript          33      texttops
-text/html                      application/postscript          33      texttops
-image/gif                      application/vnd.cups-postscript 66      imagetops
-image/png                      application/vnd.cups-postscript 66      imagetops
-image/jpeg                     application/vnd.cups-postscript 66      imagetops
-image/tiff                     application/vnd.cups-postscript 66      imagetops
-image/x-bitmap                 application/vnd.cups-postscript 66      imagetops
-image/x-photocd                        application/vnd.cups-postscript 66      imagetops
-image/x-portable-anymap                application/vnd.cups-postscript 66      imagetops
-image/x-portable-bitmap                application/vnd.cups-postscript 66      imagetops
-image/x-portable-graymap       application/vnd.cups-postscript 66      imagetops
-image/x-portable-pixmap                application/vnd.cups-postscript 66      imagetops
-image/x-sgi-rgb                        application/vnd.cups-postscript 66      imagetops
-image/x-xbitmap                        application/vnd.cups-postscript 66      imagetops
-image/x-xpixmap                        application/vnd.cups-postscript 66      imagetops
-#image/x-xwindowdump           application/vnd.cups-postscript 66      imagetops
-image/x-sun-raster             application/vnd.cups-postscript 66      imagetops
-application/vnd.cups-banner    application/postscript          33      bannertops
+@DEFAULT_TEXTTOPS@application/x-cshell         application/postscript          33      texttops
+@DEFAULT_TEXTTOPS@application/x-csource                application/postscript          33      texttops
+@DEFAULT_TEXTTOPS@application/x-perl           application/postscript          33      texttops
+@DEFAULT_TEXTTOPS@application/x-shell          application/postscript          33      texttops
+@DEFAULT_TEXTTOPS@text/plain                   application/postscript          33      texttops
+@DEFAULT_TEXTTOPS@text/css                     application/postscript          33      texttops
+@DEFAULT_TEXTTOPS@text/html                    application/postscript          33      texttops
+@DEFAULT_IMAGEFILTERS@image/gif                        application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/png                        application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/jpeg                       application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/tiff                       application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-bitmap                   application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-photocd                  application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-portable-anymap          application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-portable-bitmap          application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-portable-graymap application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-portable-pixmap          application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-sgi-rgb                  application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-xbitmap                  application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-xpixmap                  application/vnd.cups-postscript 66      imagetops
+@DEFAULT_IMAGEFILTERS@image/x-sun-raster               application/vnd.cups-postscript 66      imagetops
+@DEFAULT_BANNERTOPS@application/vnd.cups-banner        application/postscript          33      bannertops
 
 ########################################################################
 #
 # Raster filters...
 #
 
-image/gif                      application/vnd.cups-raster     100     imagetoraster
-image/png                      application/vnd.cups-raster     100     imagetoraster
-image/jpeg                     application/vnd.cups-raster     100     imagetoraster
-image/tiff                     application/vnd.cups-raster     100     imagetoraster
-image/x-bitmap                 application/vnd.cups-raster     100     imagetoraster
-image/x-photocd                        application/vnd.cups-raster     100     imagetoraster
-image/x-portable-anymap                application/vnd.cups-raster     100     imagetoraster
-image/x-portable-bitmap                application/vnd.cups-raster     100     imagetoraster
-image/x-portable-graymap       application/vnd.cups-raster     100     imagetoraster
-image/x-portable-pixmap                application/vnd.cups-raster     100     imagetoraster
-image/x-sgi-rgb                        application/vnd.cups-raster     100     imagetoraster
-image/x-xbitmap                        application/vnd.cups-raster     100     imagetoraster
-image/x-xpixmap                        application/vnd.cups-raster     100     imagetoraster
-#image/x-xwindowdump           application/vnd.cups-raster     100     imagetoraster
-image/x-sun-raster             application/vnd.cups-raster     100     imagetoraster
-
-# pstoraster is part of GPL Ghostscript...
-application/vnd.cups-postscript        application/vnd.cups-raster     100     pstoraster
+@DEFAULT_IMAGEFILTERS@image/gif                        application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/png                        application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/jpeg                       application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/tiff                       application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-bitmap                   application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-photocd                  application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-portable-anymap          application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-portable-bitmap          application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-portable-graymap application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-portable-pixmap          application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-sgi-rgb                  application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-xbitmap                  application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-xpixmap                  application/vnd.cups-raster     100     imagetoraster
+@DEFAULT_IMAGEFILTERS@image/x-sun-raster               application/vnd.cups-raster     100     imagetoraster
 
 # PWG Raster filter for IPP Everywhere...
 application/vnd.cups-raster    image/pwg-raster                100     rastertopwg
index 5d4fe5bd6b15c9ee773a43878e22dc66695b6944..88a2e43788c7ba0326082755be4ca1b78caf4e7e 100644 (file)
@@ -306,6 +306,7 @@ AC_SUBST(DBUS_NOTIFIERLIBS)
 dnl Extra platform-specific libraries...
 CUPS_DEFAULT_PRINTOPERATOR_AUTH="@SYSTEM"
 CUPS_SYSTEM_AUTHKEY=""
+INSTALLXPC=""
 LEGACY_BACKENDS="parallel"
 
 case $uname in
@@ -353,7 +354,7 @@ case $uname in
                AC_ARG_WITH(operkey, [  --with-operkey          set the default operator @AUTHKEY value],
                        default_operkey="$withval",
                        default_operkey="default")
+
                AC_CHECK_HEADER(Security/Authorization.h, [
                        AC_DEFINE(HAVE_AUTHORIZATION_H)
 
@@ -378,12 +379,18 @@ case $uname in
                if test $uversion -ge 100; then
                    AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
                fi
+
+               dnl Check for XPC support
+               AC_CHECK_HEADER(xpc/xpc.h,
+                       AC_DEFINE(HAVE_XPC)
+                       INSTALLXPC="install-xpc")
                 ;;
 esac
 
 AC_SUBST(CUPS_DEFAULT_PRINTOPERATOR_AUTH)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTOPERATOR_AUTH, "$CUPS_DEFAULT_PRINTOPERATOR_AUTH")
 AC_SUBST(CUPS_SYSTEM_AUTHKEY)
+AC_SUBST(INSTALLXPC)
 AC_SUBST(LEGACY_BACKENDS)
 
 dnl Check for build components
index 9985743870af157aca38db32c038300d11107e29..a568edb217edf2579d0bb0ba4841fea85bd362fb 100644 (file)
@@ -440,25 +440,35 @@ AC_ARG_ENABLE(texttops, [  --enable-texttops       always build the text filter
 
 if test "x$enable_bannertops" = xno; then
        BANNERTOPS=""
+       DEFAULT_BANNERTOPS="#"
 elif test "x$enable_bannertops" = xyes; then
        BANNERTOPS="bannertops"
+       DEFAULT_BANNERTOPS=""
 elif test $uname = Darwin; then
        BANNERTOPS=""
+       DEFAULT_BANNERTOPS="#"
 else
        BANNERTOPS="bannertops"
+       DEFAULT_BANNERTOPS=""
 fi
 
 if test "x$enable_texttops" = xno; then
        TEXTTOPS=""
+       DEFAULT_TEXTTOPS="#"
 elif test "x$enable_texttops" = xyes; then
        TEXTTOPS="texttops"
+       DEFAULT_TEXTTOPS=""
 elif test $uname = Darwin; then
        TEXTTOPS=""
+       DEFAULT_TEXTTOPS="#"
 else
        TEXTTOPS="texttops"
+       DEFAULT_TEXTTOPS=""
 fi
 
 AC_SUBST(BANNERTOPS)
+AC_SUBST(DEFAULT_BANNERTOPS)
+AC_SUBST(DEFAULT_TEXTTOPS)
 AC_SUBST(TEXTTOPS)
 
 dnl Fonts
index 7c61735b809477afab5f580ae35c7433a5b2e29c..dc109289031b6c6b833389fbd53cbaa494e596e8 100644 (file)
@@ -28,19 +28,26 @@ if test x$enable_gssapi != xno; then
                        Darwin)
                                # Mac OS X weak-links to the Kerberos framework...
                                LIBGSSAPI="-weak_framework Kerberos"
+                               AC_MSG_CHECKING(for GSS framework)
+                               if test -d /System/Library/Frameworks/GSS.framework; then
+                                       AC_MSG_RESULT(yes)
+                                       LIBGSSAPI="$LIBGSSAPI -weak_framework GSS"
+                               else
+                                       AC_MSG_RESULT(no)
+                               fi
                                ;;
                        SunOS*)
                                # Solaris has a non-standard krb5-config, don't use it!
                                AC_CHECK_LIB(gss, gss_display_status,
                                        AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
-                                       CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"         
-                                       CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"             
+                                       CFLAGS="`$KRB5CONFIG --cflags` $CFLAGS"
+                                       CPPFLAGS="`$KRB5CONFIG --cflags` $CPPFLAGS"
                                        LIBGSSAPI="-lgss `$KRB5CONFIG --libs`")
                                ;;
                        *)
                                # Other platforms just ask for GSSAPI
-                               CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"          
-                               CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"              
+                               CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
+                               CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
                                LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
                                ;;
                esac
@@ -63,26 +70,37 @@ if test x$enable_gssapi != xno; then
 
        if test "x$LIBGSSAPI" != x; then
                AC_CHECK_HEADER(krb5.h, AC_DEFINE(HAVE_KRB5_H))
-               AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
-               AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
-               AC_CHECK_HEADER(gssapi/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H))
-               AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_KRB5_H))
+               if test -d /System/Library/Frameworks/GSS.framework; then
+                       AC_CHECK_HEADER(GSS/gssapi.h, AC_DEFINE(HAVE_GSS_GSSAPI_H))
+                       AC_CHECK_HEADER(GSS/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GENERIC_H))
+                       AC_CHECK_HEADER(GSS/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_KRB5_H))
+                       AC_CHECK_HEADER(GSS/gssapi_spi.h, AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H))
+               else
+                       AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
+                       AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
+                       AC_CHECK_HEADER(gssapi/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GENERIC_H))
+                       AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_KRB5_H))
+               fi
 
                SAVELIBS="$LIBS"
                LIBS="$LIBS $LIBGSSAPI"
 
-               AC_CHECK_FUNC(gsskrb5_register_acceptor_identity, 
-                             AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY))
-               AC_CHECK_FUNC(krb5_cc_new_unique, AC_DEFINE(HAVE_KRB5_CC_NEW_UNIQUE))
-               AC_CHECK_FUNC(krb5_ipc_client_set_target_uid, AC_DEFINE(HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID))
+               AC_CHECK_FUNC(__ApplePrivate_gss_acquire_cred_ex_f,
+                             AC_DEFINE(HAVE_GSS_ACQUIRE_CRED_EX_F))
 
                AC_MSG_CHECKING(for GSS_C_NT_HOSTBASED_SERVICE)
-               if test $ac_cv_header_gssapi_gssapi_h = yes; then
+               if test x$ac_cv_header_gssapi_gssapi_h = xyes; then
                        AC_TRY_COMPILE([ #include <gssapi/gssapi.h> ],
                                       [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
                                       AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
                                       AC_MSG_RESULT(yes),
                                       AC_MSG_RESULT(no))
+               elif test x$ac_cv_header_gss_gssapi_h = xyes; then
+                       AC_TRY_COMPILE([ #include <GSS/gssapi.h> ],
+                                      [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
+                                      AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
+                                      AC_MSG_RESULT(yes),
+                                      AC_MSG_RESULT(no))
                else
                        AC_TRY_COMPILE([ #include <gssapi.h> ],
                                       [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
@@ -92,13 +110,6 @@ if test x$enable_gssapi != xno; then
                fi
 
                LIBS="$SAVELIBS"
-
-               AC_MSG_CHECKING(for Heimdal Kerberos)
-               AC_TRY_COMPILE([ #include <krb5.h> ],
-                              [ char *tmp = heimdal_version; ],
-                              AC_DEFINE(HAVE_HEIMDAL)
-                              AC_MSG_RESULT(yes),
-                              AC_MSG_RESULT(no))
        fi
 fi
 
index f25d58732d0a4b1d47ca4de4b4e10e0789bf72b6..6df7befe27a31c2811ea375348f281022bc619d3 100644 (file)
@@ -1,9 +1,9 @@
 dnl
 dnl "$Id: cups-image.m4 6649 2007-07-11 21:46:42Z mike $"
 dnl
-dnl   Image library/filter stuff for the Common UNIX Printing System (CUPS).
+dnl   Image library/filter stuff for CUPS.
 dnl
-dnl   Copyright 2007-2009 by Apple Inc.
+dnl   Copyright 2007-2011 by Apple Inc.
 dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
@@ -16,17 +16,20 @@ dnl
 dnl See if we want the image filters included at all...
 AC_ARG_ENABLE(image, [  --enable-image          always build the image filters])
 
+DEFAULT_IMAGEFILTERS="#"
 IMGFILTERS=""
 if test "x$enable_image" != xno; then
         AC_MSG_CHECKING(whether to build image filters)
         if test "x$enable_image" = xyes -o $uname != Darwin; then
                IMGFILTERS="imagetops imagetoraster"
+               DEFAULT_IMAGEFILTERS=""
                 AC_MSG_RESULT(yes)
         else
                 AC_MSG_RESULT(no)
         fi
 fi
 
+AC_SUBST(DEFAULT_IMAGEFILTERS)
 AC_SUBST(IMGFILTERS)
 
 dnl Check for image libraries...
index 0421aa73228e6a0f08593bc2fc3d94c51aaa9848..575a5bac1c0926441277a6eef27d6c6eb98c3623 100644 (file)
@@ -1,9 +1,9 @@
 dnl
 dnl "$Id: cups-pdf.m4 7449 2008-04-14 18:27:53Z mike $"
 dnl
-dnl   PDF filter configuration stuff for the Common UNIX Printing System (CUPS).
+dnl   PDF filter configuration stuff for CUPS.
 dnl
-dnl   Copyright 2007-2009 by Apple Inc.
+dnl   Copyright 2007-2011 by Apple Inc.
 dnl   Copyright 2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
@@ -79,8 +79,33 @@ case "x$with_pdftops" in
        ;;
 esac
 
+if test "x$CUPS_PDFTOPS" != x; then
+       AC_MSG_CHECKING(whether pdftops supports -origpagesizes)
+       if ($CUPS_PDFTOPS -h 2>&1 | grep -q -- -origpagesizes); then
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_PDFTOPS_WITH_ORIGPAGESIZES)
+       else
+               AC_MSG_RESULT(no)
+       fi
+
+       DEFAULT_PDFTOPS=""
+elif test "x$CUPS_GHOSTSCRIPT" != x; then
+       AC_MSG_CHECKING(whether gs supports the ps2write device)
+       if ($CUPS_GHOSTSCRIPT -h 2>&1 | grep -q ps2write); then
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GHOSTSCRIPT_PS2WRITE)
+       else
+               AC_MSG_RESULT(no)
+       fi
+
+       DEFAULT_PDFTOPS=""
+else
+       DEFAULT_PDFTOPS="#"
+fi
+
 AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
 AC_DEFINE_UNQUOTED(CUPS_GHOSTSCRIPT, "$CUPS_GHOSTSCRIPT")
+AC_SUBST(DEFAULT_PDFTOPS)
 AC_SUBST(PDFTOPS)
 
 dnl
index ce62dfd450a692ad64560c50d4cbcec91ad1deec..461d456da11345499d67244e275d68712e3bc192 100644 (file)
@@ -38,12 +38,15 @@ if test x$enable_ssl != xno; then
                AC_DEFINE(HAVE_CDSASSL)
 
                dnl Check for the various security headers...
+               AC_CHECK_HEADER(Security/SecureTransportPriv.h,
+                   AC_DEFINE(HAVE_SECURETRANSPORTPRIV_H))
                AC_CHECK_HEADER(Security/SecCertificate.h,
                    AC_DEFINE(HAVE_SECCERTIFICATE_H))
                AC_CHECK_HEADER(Security/SecItem.h,
                    AC_DEFINE(HAVE_SECITEM_H))
                AC_CHECK_HEADER(Security/SecItemPriv.h,
-                   AC_DEFINE(HAVE_SECITEMPRIV_H))
+                   AC_DEFINE(HAVE_SECITEMPRIV_H),,
+                   [#include <Security/SecItem.h>])
                AC_CHECK_HEADER(Security/SecPolicy.h,
                    AC_DEFINE(HAVE_SECPOLICY_H))
                AC_CHECK_HEADER(Security/SecPolicyPriv.h,
@@ -89,25 +92,17 @@ if test x$enable_ssl != xno; then
        AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
        AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
        if $PKGCONFIG --exists gnutls; then
-           if test "x$have_pthread" = xyes; then
-               AC_MSG_WARN([The current version of GNU TLS cannot be made thread-safe.])
-           else
-               have_ssl=1
-               SSLLIBS=`$PKGCONFIG --libs gnutls`
-               SSLFLAGS=`$PKGCONFIG --cflags gnutls`
-               AC_DEFINE(HAVE_SSL)
-               AC_DEFINE(HAVE_GNUTLS)
-           fi
+           have_ssl=1
+           SSLLIBS=`$PKGCONFIG --libs gnutls`
+           SSLFLAGS=`$PKGCONFIG --cflags gnutls`
+           AC_DEFINE(HAVE_SSL)
+           AC_DEFINE(HAVE_GNUTLS)
        elif test "x$LIBGNUTLSCONFIG" != x; then
-           if test "x$have_pthread" = xyes; then
-               AC_MSG_WARN([The current version of GNU TLS cannot be made thread-safe.])
-           else
-               have_ssl=1
-               SSLLIBS=`$LIBGNUTLSCONFIG --libs`
-               SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
-               AC_DEFINE(HAVE_SSL)
-               AC_DEFINE(HAVE_GNUTLS)
-           fi
+           have_ssl=1
+           SSLLIBS=`$LIBGNUTLSCONFIG --libs`
+           SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
+           AC_DEFINE(HAVE_SSL)
+           AC_DEFINE(HAVE_GNUTLS)
        fi
 
        if test $have_ssl = 1; then
@@ -156,13 +151,16 @@ if test x$enable_ssl != xno; then
     fi
 fi
 
+IPPALIASES="http"
 if test $have_ssl = 1; then
     AC_MSG_RESULT([    Using SSLLIBS="$SSLLIBS"])
     AC_MSG_RESULT([    Using SSLFLAGS="$SSLFLAGS"])
+    IPPALIASES="http https ipps"
 elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = xyes; then
     AC_MSG_ERROR([Unable to enable SSL support.])
 fi
 
+AC_SUBST(IPPALIASES)
 AC_SUBST(SSLFLAGS)
 AC_SUBST(SSLLIBS)
 
index 0f047a474a25005635b3fb96df4680c2f97bb87b..5517c440706104f11ae45b867a89ad527db335a2 100644 (file)
 #undef HAVE_STRINGS_H
 #undef HAVE_BSTRING_H
 
+
 /*
  * Do we have the long long type?
  */
 #  define CUPS_LLCAST  (long)
 #endif /* HAVE_LONG_LONG */
 
+
 /*
  * Do we have the strtoll() function?
  */
 #  define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
 #endif /* !HAVE_STRTOLL */
 
+
 /*
  * Do we have the strXXX() functions?
  */
  */
 
 #undef HAVE_AUTHORIZATION_H
+#undef HAVE_SECBASEPRIV_H
 #undef HAVE_SECCERTIFICATE_H
+#undef HAVE_SECIDENTITYSEARCHPRIV_H
 #undef HAVE_SECITEM_H
 #undef HAVE_SECITEMPRIV_H
 #undef HAVE_SECPOLICY_H
 #undef HAVE_SECPOLICYPRIV_H
-#undef HAVE_SECBASEPRIV_H
-#undef HAVE_SECIDENTITYSEARCHPRIV_H
+#undef HAVE_SECURETRANSPORTPRIV_H
 
 
 /*
  */
 
 #undef HAVE_PDFTOPS
+#undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES
 #define CUPS_PDFTOPS   "/usr/bin/pdftops"
 
 
  */
 
 #undef HAVE_GHOSTSCRIPT
+#undef HAVE_GHOSTSCRIPT_PS2WRITE
 #define CUPS_GHOSTSCRIPT "/usr/bin/gs"
 
 
 
 
 /*
- * Do we have MacOSX 10.4's mbr_XXX functions?
+ * Do we have Mac OS X 10.4's mbr_XXX functions?
  */
 
 #undef HAVE_MEMBERSHIP_H
 #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
 
 
-/*
- * Do we have the AppleTalk/at_proto.h header?
- */
-
-#undef HAVE_APPLETALK_AT_PROTO_H
-
-
 /*
  * Do we have the GSSAPI support library (for Kerberos support)?
  */
 
+#undef HAVE_GSS_ACQUIRE_CRED_EX_F
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
+#undef HAVE_GSS_GSSAPI_H
+#undef HAVE_GSS_GSSAPI_SPI_H
 #undef HAVE_GSSAPI
-#undef HAVE_GSSAPI_H
+#undef HAVE_GSSAPI_GENERIC_H
 #undef HAVE_GSSAPI_GSSAPI_H
-#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
-#undef HAVE_GSSAPI_GSSAPI_KRB5_H
-#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
-#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-#undef HAVE_KRB5_CC_NEW_UNIQUE
-#undef HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID
+#undef HAVE_GSSAPI_H
+#undef HAVE_GSSAPI_KRB5_H
 #undef HAVE_KRB5_H
-#undef HAVE_HEIMDAL
 
 
 /*
 #undef HAVE_COLORSYNCREGISTERDEVICE
 
 
+/*
+ * Do we have XPC?
+ */
+
+#undef HAVE_XPC
+
+
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*
index 38fdcb64520e06a6a9eaf87a152e9c9ccab304fb..6052bec01ebaf8654b9b397869fc18ff10659ca3 100644 (file)
@@ -110,6 +110,7 @@ HEADERS     =       \
                versioning.h
 
 HEADERSPRIV =  \
+               array-private.h \
                cups-private.h \
                debug-private.h \
                file-private.h \
index 0872d51e7ed65ea709767ccb7282defee29d7b9a..7246a7bd6edf336548a67bf45e386ae266ff95a3 100644 (file)
@@ -1,9 +1,9 @@
 <!--
   "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
 
-  Array API introduction for the Common UNIX Printing System (CUPS).
+  Array API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index ca251e654138070f59edbcd4c7f64f02fcc0a048..e60d03d75764d841f7376e3f2b40b4db30a68393 100644 (file)
@@ -1,9 +1,9 @@
 <!--
   "$Id: api-cups.shtml 7337 2008-02-22 04:44:04Z mike $"
 
-  CUPS API introduction for the Common UNIX Printing System (CUPS).
+  API introduction for CUPS.
 
-  Copyright 2007-2010 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -50,7 +50,7 @@ specific destination for printing:</p>
 int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&amp;dests);
 <a href='#cups_dest_t'>cups_dest_t</a> *dest = <a href='#cupsGetDest'>cupsGetDest</a>("name", NULL, num_dests, dests);
 
-/* do something wiith dest */
+/* do something with dest */
 
 <a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
 </pre>
index 843812ce5ef4760fffcd3a65a5a1f4dad3222a58..96bf0facb944f54ed70bc5f503ba5b7e3493eddc 100644 (file)
@@ -1,9 +1,9 @@
 <!--
   "$Id: api-filedir.shtml 7279 2008-01-31 01:50:44Z mike $"
 
-  File and directory API introduction for the Common UNIX Printing System (CUPS).
+  File and directory API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2005 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index e44c7063ab16826d7edacd7c19583e060d48454a..2e149f11fb29df66f091d3a9731a0077b6c7b465 100644 (file)
@@ -57,7 +57,7 @@ more detail.</p>
 <h3><a name="SECURITY">Security Considerations</a></h3>
 
 <p>It is always important to use security programming practices. Filters and
-most backends are run as a non-priviledged user, so the major security
+most backends are run as a non-privileged user, so the major security
 consideration is resource utilization - filters should not depend on unlimited
 amounts of CPU, memory, or disk space, and should protect against conditions
 that could lead to excess usage of any resource like infinite loops and
@@ -92,6 +92,22 @@ held. Filters, backends, and port monitors <em>must</em> catch
 file or return the printer to a known good state. The recommended behavior is to
 end the output on the current page.</p>
 
+<p>Filters and backends may also receive <code>SIGPIPE</code> when an upstream or downstream filter/backend exits with a non-zero status. Developers should generally <code>ignore SIGPIPE</code> at the beginning of <code>main()</code> with the following function call:</p>
+
+<pre class="example">
+#include &lt;signal.h&gt;>
+
+...
+
+int
+main(int argc, char *argv[])
+{
+  signal(SIGPIPE, SIG_IGN);
+
+  ...
+}
+</pre>
+
 <h3><a name="PERMISSIONS">File Permissions</a></h3>
 
 <p>For security reasons, CUPS will only run filters and backends that are owned
index ed559efafb5ff2230d3641aceb75612f09d255f5..d90d847d8b844fb83c5b6e68e5d441a718720720 100644 (file)
@@ -1,9 +1,9 @@
 <!--
   "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $"
 
-  HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
+  HTTP and IPP API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index dd1d6061d999f2293aeaba441c1a647d3d4e2de3..3ece1033ca6fb6825b77b93c7080b5be9f680a29 100644 (file)
@@ -1,10 +1,9 @@
 <!--
   "$Id: api-cups.header 7279 2008-01-31 01:50:44Z mike $"
 
-  Introduction to CUPS programming content for the Common UNIX Printing System
-  (CUPS).
+  Introduction to CUPS programming content for CUPS.
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2011 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
index ad393e106f2998e73aba1444a99d1b6d37b9e90b..ade717cafaa0abd1fc6c9ed6aab1966bbb173dfc 100644 (file)
@@ -1,9 +1,9 @@
 <!--
   "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
 
-  PPD API introduction for the Common UNIX Printing System (CUPS).
+  PPD API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
diff --git a/cups/array-private.h b/cups/array-private.h
new file mode 100644 (file)
index 0000000..f6b24e3
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * "$Id$"
+ *
+ *   Private array definitions for CUPS.
+ *
+ *   Copyright 2011 by Apple Inc.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
+ *
+ *   This file is subject to the Apple OS-Developed Software exception.
+ */
+
+#ifndef _CUPS_ARRAY_PRIVATE_H_
+#  define _CUPS_ARRAY_PRIVATE_H_
+
+/*
+ * Include necessary headers...
+ */
+
+#  include "array.h"
+
+
+/*
+ * C++ magic...
+ */
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif /* __cplusplus */
+
+
+/*
+ * Functions...
+ */
+
+extern int             _cupsArrayAddStrings(cups_array_t *a, const char *s)
+                                            _CUPS_API_1_5;
+extern cups_array_t    *_cupsArrayNewStrings(const char *s) _CUPS_API_1_5;
+
+#  ifdef __cplusplus
+}
+#  endif /* __cplusplus */
+#endif /* !_CUPS_ARRAY_PRIVATE_H_ */
+
+/*
+ * End of "$Id$".
+ */
index 5448472b3812a1562673087f974f9d37fa32d4db..07ff73c59f698228bf8afb12e8a17debcfe3db2a 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Sorted array routines for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *
  * Contents:
  *
- *   cupsArrayAdd()       - Add an element to the array.
- *   cupsArrayClear()     - Clear the array.
- *   cupsArrayCount()     - Get the number of elements in the array.
- *   cupsArrayCurrent()   - Return the current element in the array.
- *   cupsArrayDelete()    - Free all memory used by the array.
- *   cupsArrayDup()       - Duplicate the array.
- *   cupsArrayFind()      - Find an element in the array.
- *   cupsArrayFirst()     - Get the first element in the array.
- *   cupsArrayGetIndex()  - Get the index of the current element.
- *   cupsArrayGetInsert() - Get the index of the last inserted element.
- *   cupsArrayIndex()     - Get the N-th element in the array.
- *   cupsArrayInsert()    - Insert an element in the array.
- *   cupsArrayLast()      - Get the last element in the array.
- *   cupsArrayNew()       - Create a new array.
- *   cupsArrayNew2()      - Create a new array with hash.
- *   cupsArrayNew3()      - Create a new array with hash and/or free function.
- *   cupsArrayNext()      - Get the next element in the array.
- *   cupsArrayPrev()      - Get the previous element in the array.
- *   cupsArrayRemove()    - Remove an element from the array.
- *   cupsArrayRestore()   - Reset the current element to the last @link
- *                          cupsArraySave@.
- *   cupsArraySave()      - Mark the current element for a later @link
- *                          cupsArrayRestore@.
- *   cupsArrayUserData()  - Return the user data for an array.
- *   cups_array_add()     - Insert or append an element to the array...
- *   cups_array_find()    - Find an element in the array...
+ *   cupsArrayAdd()         - Add an element to the array.
+ *   _cupsArrayAddStrings() - Add zero or more comma-delimited strings to an
+ *                            array.
+ *   cupsArrayClear()       - Clear the array.
+ *   cupsArrayCount()       - Get the number of elements in the array.
+ *   cupsArrayCurrent()     - Return the current element in the array.
+ *   cupsArrayDelete()      - Free all memory used by the array.
+ *   cupsArrayDup()         - Duplicate the array.
+ *   cupsArrayFind()        - Find an element in the array.
+ *   cupsArrayFirst()       - Get the first element in the array.
+ *   cupsArrayGetIndex()    - Get the index of the current element.
+ *   cupsArrayGetInsert()   - Get the index of the last inserted element.
+ *   cupsArrayIndex()       - Get the N-th element in the array.
+ *   cupsArrayInsert()      - Insert an element in the array.
+ *   cupsArrayLast()        - Get the last element in the array.
+ *   cupsArrayNew()         - Create a new array.
+ *   cupsArrayNew2()        - Create a new array with hash.
+ *   cupsArrayNew3()        - Create a new array with hash and/or free function.
+ *   _cupsArrayNewStrings() - Create a new array of comma-delimited strings.
+ *   cupsArrayNext()        - Get the next element in the array.
+ *   cupsArrayPrev()        - Get the previous element in the array.
+ *   cupsArrayRemove()      - Remove an element from the array.
+ *   cupsArrayRestore()     - Reset the current element to the last @link
+ *                            cupsArraySave@.
+ *   cupsArraySave()        - Mark the current element for a later @link
+ *                            cupsArrayRestore@.
+ *   cupsArrayUserData()    - Return the user data for an array.
+ *   cups_array_add()       - Insert or append an element to the array.
+ *   cups_array_find()      - Find an element in the array.
  */
 
 /*
@@ -50,7 +53,7 @@
 
 #include "string-private.h"
 #include "debug-private.h"
-#include "array.h"
+#include "array-private.h"
 
 
 /*
@@ -134,6 +137,64 @@ cupsArrayAdd(cups_array_t *a,              /* I - Array */
 }
 
 
+/*
+ * '_cupsArrayAddStrings()' - Add zero or more comma-delimited strings to an
+ *                            array.
+ *
+ * Note: The array MUST be created using the @link _cupsArrayNewStrings@
+ * function. Duplicate strings are NOT added. If the string pointer "s" is NULL
+ * or the empty string, no strings are added to the array.
+ */
+
+int                                    /* O - 1 on success, 0 on failure */
+_cupsArrayAddStrings(cups_array_t *a,  /* I - Array */
+                     const char   *s)  /* I - Comma-delimited strings or NULL */
+{
+  char         *buffer,                /* Copy of string */
+               *start,                 /* Start of string */
+               *end;                   /* End of string */
+  int          status = 1;             /* Status of add */
+
+
+  if (!a || !s || !*s)
+    return (0);
+
+  if (!strchr(s, ','))
+  {
+   /*
+    * String doesn't contain a comma, so add it as a single value...
+    */
+
+    if (!cupsArrayFind(a, (void *)s))
+      status = cupsArrayAdd(a, (void *)s);
+  }
+  else if ((buffer = strdup(s)) == NULL)
+    status = 0;
+  else
+  {
+    for (start = end = buffer; *end; start = end)
+    {
+     /*
+      * Find the end of the current delimited string and see if we need to add
+      * it...
+      */
+
+      if ((end = strchr(start, ',')) != NULL)
+        *end++ = '\0';
+      else
+        end = start + strlen(start);
+
+      if (!cupsArrayFind(a, start))
+        status &= cupsArrayAdd(a, start);
+    }
+
+    free(buffer);
+  }
+
+  return (status);
+}
+
+
 /*
  * 'cupsArrayClear()' - Clear the array.
  *
@@ -712,6 +773,29 @@ cupsArrayNew3(cups_array_func_t  f,        /* I - Comparison function or @code NULL@ fo
 }
 
 
+/*
+ * '_cupsArrayNewStrings()' - Create a new array of comma-delimited strings.
+ *
+ * Note: The array automatically manages copies of the strings passed. If the
+ * string pointer "s" is NULL or the empty string, no strings are added to the
+ * newly created array.
+ */
+
+cups_array_t *                         /* O - Array */
+_cupsArrayNewStrings(const char *s)    /* I - Comma-delimited strings or NULL */
+{
+  cups_array_t *a;                     /* Array */
+
+
+  if ((a = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0,
+                         (cups_acopy_func_t)_cupsStrAlloc,
+                        (cups_afree_func_t)_cupsStrFree)) != NULL)
+    _cupsArrayAddStrings(a, s);
+
+  return (a);
+}
+
+
 /*
  * 'cupsArrayNext()' - Get the next element in the array.
  *
@@ -919,7 +1003,7 @@ cupsArrayUserData(cups_array_t *a) /* I - Array */
 
 
 /*
- * 'cups_array_add()' - Insert or append an element to the array...
+ * 'cups_array_add()' - Insert or append an element to the array.
  *
  * @since CUPS 1.2/Mac OS X 10.5@
  */
@@ -1100,7 +1184,7 @@ cups_array_add(cups_array_t *a,           /* I - Array */
 
 
 /*
- * 'cups_array_find()' - Find an element in the array...
+ * 'cups_array_find()' - Find an element in the array.
  */
 
 static int                             /* O - Index of match */
index 5d66ddd4a8f820a8ba62872154d1dad42ec47ddd..c74e1490fe223f0ed80b41e2e5b1e1a755348c97 100644 (file)
  *
  * Contents:
  *
- *   cupsDoAuthentication() - Authenticate a request.
- *   cups_get_gssname()     - Get GSSAPI name for authentication.
- *   cups_gss_printf()      - Show error messages from GSSAPI...
- *   cups_local_auth()      - Get the local authorization certificate if
- *                            available/applicable...
+ *   cupsDoAuthentication()        - Authenticate a request.
+ *   _cupsSetNegotiateAuthString() - Set the Kerberos authentication string.
+ *   cups_gss_acquire()            - Kerberos credentials callback.
+ *   cups_gss_getname()            - Get CUPS service credentials for
+ *                                   authentication.
+ *   cups_gss_printf()             - Show debug error messages from GSSAPI.
+ *   cups_local_auth()             - Get the local authorization certificate if
+ *                                   available/applicable.
  */
 
 /*
@@ -58,7 +61,42 @@ extern const char *cssmErrorString(int error);
  */
 
 #ifdef HAVE_GSSAPI
-static gss_name_t cups_get_gssname(http_t *http, const char *service_name);
+#  ifdef HAVE_GSS_ACQUIRE_CRED_EX_F
+#    ifdef HAVE_GSS_GSSAPI_SPI_H
+#      include <GSS/gssapi_spi.h>
+#    else
+typedef struct gss_auth_identity
+{
+  uint32_t type;
+  uint32_t flags;
+  char *username;
+  char *realm;
+  char *password;
+  gss_buffer_t *credentialsRef;
+} gss_auth_identity_desc;
+extern OM_uint32 gss_acquire_cred_ex_f(gss_status_id_t, const gss_name_t,
+                                      OM_uint32, OM_uint32, const gss_OID,
+                                      gss_cred_usage_t, gss_auth_identity_t,
+                                      void *, void (*)(void *, OM_uint32,
+                                                       gss_status_id_t,
+                                                       gss_cred_id_t,
+                                                       gss_OID_set,
+                                                       OM_uint32));
+#    endif /* HAVE_GSS_GSSAPI_SPI_H */
+#    include <dispatch/dispatch.h>
+typedef struct _cups_gss_acquire_s     /* Acquire callback data */
+{
+  dispatch_semaphore_t sem;            /* Synchronization semaphore */
+  OM_uint32            major;          /* Returned status code */
+  gss_cred_id_t                creds;          /* Returned credentials */
+} _cups_gss_acquire_t;
+
+static void    cups_gss_acquire(void *ctx, OM_uint32 major,
+                                gss_status_id_t status,
+                                gss_cred_id_t creds, gss_OID_set oids,
+                                OM_uint32 time_rec);
+#  endif /* HAVE_GSS_ACQUIRE_CRED_EX_F */
+static gss_name_t cups_gss_getname(http_t *http, const char *service_name);
 #  ifdef DEBUG
 static void    cups_gss_printf(OM_uint32 major_status, OM_uint32 minor_status,
                                const char *message);
@@ -193,7 +231,7 @@ cupsDoAuthentication(
     * Kerberos authentication...
     */
 
-    if (_cupsSetNegotiateAuthString(http))
+    if (_cupsSetNegotiateAuthString(http, method, resource))
     {
       http->status = HTTP_AUTHORIZATION_CANCELED;
       return (-1);
@@ -255,13 +293,14 @@ cupsDoAuthentication(
 
 int                                    /* O - 0 on success, -1 on error */
 _cupsSetNegotiateAuthString(
-    http_t *http)                      /* I - Connection to server */
+    http_t     *http,                  /* I - Connection to server */
+    const char *method,                        /* I - Request method ("GET", "POST", "PUT") */
+    const char *resource)              /* I - Resource path */
 {
   OM_uint32    minor_status,           /* Minor status code */
                major_status;           /* Major status code */
   gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
                                        /* Output token */
-  _cups_globals_t *cg = _cupsGlobals();        /* Thread globals */
 
 
 #  ifdef __APPLE__
@@ -280,10 +319,7 @@ _cupsSetNegotiateAuthString(
 
   if (http->gssname == GSS_C_NO_NAME)
   {
-    if (!cg->gss_service_name[0])
-      _cupsSetDefaults();
-
-    http->gssname = cups_get_gssname(http, cg->gss_service_name);
+    http->gssname = cups_gss_getname(http, _cupsGSSServiceName());
   }
 
   if (http->gssctx != GSS_C_NO_CONTEXT)
@@ -292,14 +328,96 @@ _cupsSetNegotiateAuthString(
     http->gssctx = GSS_C_NO_CONTEXT;
   }
 
-  major_status  = gss_init_sec_context(&minor_status, GSS_C_NO_CREDENTIAL,
-                                      &http->gssctx,
-                                      http->gssname, http->gssmech,
-                                      GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG,
-                                      GSS_C_INDEFINITE,
-                                      GSS_C_NO_CHANNEL_BINDINGS,
-                                      GSS_C_NO_BUFFER, &http->gssmech,
-                                      &output_token, NULL, NULL);
+  major_status = gss_init_sec_context(&minor_status, GSS_C_NO_CREDENTIAL,
+                                     &http->gssctx,
+                                     http->gssname, http->gssmech,
+                                     GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG,
+                                     GSS_C_INDEFINITE,
+                                     GSS_C_NO_CHANNEL_BINDINGS,
+                                     GSS_C_NO_BUFFER, &http->gssmech,
+                                     &output_token, NULL, NULL);
+
+#ifdef HAVE_GSS_ACQUIRE_CRED_EX_F
+  if (major_status == GSS_S_NO_CRED)
+  {
+   /*
+    * Ask the user for credentials...
+    */
+
+    char               prompt[1024],   /* Prompt for user */
+                       userbuf[256];   /* Kerberos username */
+    const char         *username,      /* Username string */
+                       *password;      /* Password string */
+    _cups_gss_acquire_t        data;           /* Callback data */
+    gss_auth_identity_desc identity;   /* Kerberos user identity */
+    _cups_globals_t    *cg = _cupsGlobals();
+                                       /* Per-thread global data */
+
+    if (!cg->lang_default)
+      cg->lang_default = cupsLangDefault();
+
+    snprintf(prompt, sizeof(prompt),
+             _cupsLangString(cg->lang_default, _("Password for %s on %s? ")),
+            cupsUser(), http->gssname);
+
+    if ((password = cupsGetPassword2(prompt, http, method, resource)) == NULL)
+      return (-1);
+
+   /*
+    * Try to acquire credentials...
+    */
+
+    username = cupsUser();
+    if (!strchr(username, '@'))
+    {
+      snprintf(userbuf, sizeof(userbuf), "%s@%s", username, http->gssname);
+      username = userbuf;
+    }
+
+    identity.type           = GSS_AUTH_IDENTITY_TYPE_1;
+    identity.flags          = 0;
+    identity.username       = (char *)username;
+    identity.realm          = (char *)"";
+    identity.password       = (char *)password;
+    identity.credentialsRef = NULL;
+
+    data.sem   = dispatch_semaphore_create(0);
+    data.major = 0;
+    data.creds = NULL;
+
+    if (data.sem)
+    {
+      major_status = gss_acquire_cred_ex_f(NULL, GSS_C_NO_NAME, 0,
+                                          GSS_C_INDEFINITE, GSS_KRB5_MECHANISM,
+                                          GSS_C_INITIATE, &identity, &data,
+                                          cups_gss_acquire);
+
+      if (major_status == GSS_S_COMPLETE)
+      {
+       dispatch_semaphore_wait(data.sem, DISPATCH_TIME_FOREVER);
+       major_status = data.major;
+      }
+
+      dispatch_release(data.sem);
+
+      if (major_status == GSS_S_COMPLETE)
+      {
+        OM_uint32      release_minor;  /* Minor status from releasing creds */
+
+       major_status = gss_init_sec_context(&minor_status, data.creds,
+                                           &http->gssctx,
+                                           http->gssname, http->gssmech,
+                                           GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG,
+                                           GSS_C_INDEFINITE,
+                                           GSS_C_NO_CHANNEL_BINDINGS,
+                                           GSS_C_NO_BUFFER, &http->gssmech,
+                                           &output_token, NULL, NULL);
+        gss_release_cred(&release_minor, &data.creds);
+      }
+    }
+  }
+  else
+#endif /* HAVE_GSS_ACQUIRED_CRED_EX_F */
 
   if (GSS_ERROR(major_status))
   {
@@ -310,7 +428,7 @@ _cupsSetNegotiateAuthString(
   }
 
 #ifdef DEBUG
-  if (major_status == GSS_S_CONTINUE_NEEDED)
+  else if (major_status == GSS_S_CONTINUE_NEEDED)
     cups_gss_printf(major_status, minor_status,
                    "_cupsSetNegotiateAuthString: Continuation needed!");
 #endif /* DEBUG */
@@ -353,12 +471,42 @@ _cupsSetNegotiateAuthString(
 }
 
 
+#  ifdef HAVE_GSS_ACQUIRE_CRED_EX_F
+/*
+ * 'cups_gss_acquire()' - Kerberos credentials callback.
+ */
+static void
+cups_gss_acquire(
+    void            *ctx,              /* I - Caller context */
+    OM_uint32       major,             /* I - Major error code */
+    gss_status_id_t status,            /* I - Status (unused) */
+    gss_cred_id_t   creds,             /* I - Credentials (if any) */
+    gss_OID_set     oids,              /* I - Mechanism OIDs (unused) */
+    OM_uint32       time_rec)          /* I - Timestamp (unused) */
+{
+  uint32_t             min;            /* Minor error code */
+  _cups_gss_acquire_t  *data;          /* Callback data */
+
+
+  (void)status;
+  (void)time_rec;
+
+  data        = (_cups_gss_acquire_t *)ctx;
+  data->major = major;
+  data->creds = creds;
+
+  gss_release_oid_set(&min, &oids);
+  dispatch_semaphore_signal(data->sem);
+}
+#  endif /* HAVE_GSS_ACQUIRE_CRED_EX_F */
+
+
 /*
- * 'cups_get_gssname()' - Get CUPS service credentials for authentication.
+ * 'cups_gss_getname()' - Get CUPS service credentials for authentication.
  */
 
 static gss_name_t                      /* O - Server name */
-cups_get_gssname(
+cups_gss_getname(
     http_t     *http,                  /* I - Connection to server */
     const char *service_name)          /* I - Service name */
 {
@@ -367,11 +515,10 @@ cups_get_gssname(
   OM_uint32      major_status,         /* Major status code */
                  minor_status;         /* Minor status code */
   gss_name_t     server_name;          /* Server name */
-  char           buf[1024],            /* Name buffer */
-                 fqdn[HTTP_MAX_URI];   /* Server name buffer */
+  char           buf[1024];            /* Name buffer */
 
 
-  DEBUG_printf(("7cups_get_gssname(http=%p, service_name=\"%s\")", http,
+  DEBUG_printf(("7cups_gss_getname(http=%p, service_name=\"%s\")", http,
                 service_name));
 
 
@@ -379,18 +526,54 @@ cups_get_gssname(
   * Get the hostname...
   */
 
-  httpGetHostname(http, fqdn, sizeof(fqdn));
+  if (!http->gsshost[0])
+  {
+    httpGetHostname(http, http->gsshost, sizeof(http->gsshost));
 
-  if (!strcmp(fqdn, "localhost"))
-    httpGetHostname(NULL, fqdn, sizeof(fqdn));
+    if (!strcmp(http->gsshost, "localhost"))
+    {
+      if (gethostname(http->gsshost, sizeof(http->gsshost)) < 0)
+      {
+       DEBUG_printf(("1cups_gss_getname: gethostname() failed: %s",
+                     strerror(errno)));
+       http->gsshost[0] = '\0';
+       return (NULL);
+      }
+
+      if (!strchr(http->gsshost, '.'))
+      {
+       /*
+       * The hostname is not a FQDN, so look it up...
+       */
+
+       struct hostent  *host;          /* Host entry to get FQDN */
+
+       if ((host = gethostbyname(http->gsshost)) != NULL && host->h_name)
+       {
+        /*
+         * Use the resolved hostname...
+         */
+
+         strlcpy(http->gsshost, host->h_name, sizeof(http->gsshost));
+       }
+       else
+       {
+         DEBUG_printf(("1cups_gss_getname: gethostbyname(\"%s\") failed.",
+                       http->gsshost));
+         http->gsshost[0] = '\0';
+         return (NULL);
+       }
+      }
+    }
+  }
 
  /*
-  * Get a server name we can use for authentication purposes...
+  * Get a service name we can use for authentication purposes...
   */
 
-  snprintf(buf, sizeof(buf), "%s@%s", service_name, fqdn);
+  snprintf(buf, sizeof(buf), "%s@%s", service_name, http->gsshost);
 
-  DEBUG_printf(("9cups_get_gssname: Looking up %s...", buf));
+  DEBUG_printf(("8cups_gss_getname: Looking up \"%s\".", buf));
 
   token.value  = buf;
   token.length = strlen(buf);
@@ -402,7 +585,7 @@ cups_get_gssname(
   if (GSS_ERROR(major_status))
   {
     cups_gss_printf(major_status, minor_status,
-                    "cups_get_gssname: gss_import_name() failed");
+                    "cups_gss_getname: gss_import_name() failed");
     return (NULL);
   }
 
@@ -412,7 +595,7 @@ cups_get_gssname(
 
 #  ifdef DEBUG
 /*
- * 'cups_gss_printf()' - Show debug error messages from GSSAPI...
+ * 'cups_gss_printf()' - Show debug error messages from GSSAPI.
  */
 
 static void
@@ -453,7 +636,7 @@ cups_gss_printf(OM_uint32  major_status,/* I - Major status code */
 
 /*
  * 'cups_local_auth()' - Get the local authorization certificate if
- *                       available/applicable...
+ *                       available/applicable.
  */
 
 static int                             /* O - 0 if available */
index 818455f452ba76c9e8f0002960d93fe4ad2f3eaa..db4ce22e55b6e0376199aa0fd44ded3962cc0934 100644 (file)
@@ -50,8 +50,10 @@ static void  quote_string(const char *s);
 const char *                           /* O - Device URI or @code NULL@ */
 cupsBackendDeviceURI(char **argv)      /* I - Command-line arguments */
 {
-  const char   *device_uri;            /* Device URI */
+  const char   *device_uri,            /* Device URI */
+               *auth_info_required;    /* AUTH_INFO_REQUIRED env var */
   _cups_globals_t *cg = _cupsGlobals();        /* Global info */
+  int          options;                /* Resolve options */
 
 
   if ((device_uri = getenv("DEVICE_URI")) == NULL)
@@ -62,8 +64,13 @@ cupsBackendDeviceURI(char **argv)    /* I - Command-line arguments */
     device_uri = argv[0];
   }
 
+  options = _HTTP_RESOLVE_STDERR;
+  if ((auth_info_required = getenv("AUTH_INFO_REQUIRED")) != NULL &&
+      !strcmp(auth_info_required, "negotiate"))
+    options |= _HTTP_RESOLVE_FQDN;
+
   return (_httpResolveURI(device_uri, cg->resolved_uri,
-                          sizeof(cg->resolved_uri), 1, NULL, NULL));
+                          sizeof(cg->resolved_uri), options, NULL, NULL));
 }
 
 
index 0de2a37e6e121dc61d6fc5449736eb2b05051f17..16f81ea0de68891716f870bf18ff834cc1bc5879 100644 (file)
@@ -183,13 +183,18 @@ extern const char *_cupsGetPassword(const char *prompt);
 extern void            _cupsGlobalLock(void);
 extern _cups_globals_t *_cupsGlobals(void);
 extern void            _cupsGlobalUnlock(void);
+#  ifdef HAVE_GSSAPI
+extern const char      *_cupsGSSServiceName(void);
+#  endif /* HAVE_GSSAPI */
 extern int             _cupsNextDelay(int current, int *previous);
 extern void            _cupsSetDefaults(void);
 extern void            _cupsSetError(ipp_status_t status, const char *message,
                                      int localize);
 extern void            _cupsSetHTTPError(http_status_t status);
 #  ifdef HAVE_GSSAPI
-extern int             _cupsSetNegotiateAuthString(http_t *http);
+extern int             _cupsSetNegotiateAuthString(http_t *http,
+                                                   const char *method,
+                                                   const char *resource);
 #  endif /* HAVE_GSSAPI */
 extern char            *_cupsUserDefault(char *name, size_t namesize);
 
index 8af8dd45bb755173ac16460588a4efd2f000509b..6fa7140c66a1d706ab480212661b549d4ff133b5 100644 (file)
@@ -169,7 +169,7 @@ httpAddrConnect(
   }
 
   if (!addrlist)
-    _cupsSetError(HTTP_SERVICE_UNAVAILABLE, _("Unable to connect to server"), 1);
+    _cupsSetError(IPP_SERVICE_UNAVAILABLE, _("Unable to connect to server"), 1);
 
   return (addrlist);
 }
index 05379a61370ddc809affd1a43c3e3ce15c71e163..7357dddf42172c329e055a052c349ac3058105f1 100644 (file)
 #  endif /* WIN32 */
 
 #  ifdef HAVE_GSSAPI
-#    ifdef HAVE_GSSAPI_GSSAPI_H
+#    ifdef HAVE_GSS_GSSAPI_H
+#      include <GSS/gssapi.h>
+#      ifdef HAVE_GSSAPI_GENERIC_H
+#        include <GSS/gssapi_generic.h>
+#      endif /* HAVE_GSSAPI_GENERIC_H */
+#      ifdef HAVE_GSSAPI_KRB5_H
+#        include <GSS/gssapi_krb5.h>
+#      endif /* HAVE_GSSAPI_KRB5_H */
+#    elif defined(HAVE_GSSAPI_GSSAPI_H)
 #      include <gssapi/gssapi.h>
-#    endif /* HAVE_GSSAPI_GSSAPI_H */
-#    ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
-#      include <gssapi/gssapi_generic.h>
-#    endif /* HAVE_GSSAPI_GSSAPI_GENERIC_H */
-#    ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
-#      include <gssapi/gssapi_krb5.h>
-#    endif /* HAVE_GSSAPI_GSSAPI_KRB5_H */
-#    ifdef HAVE_GSSAPI_H
+#      ifdef HAVE_GSSAPI_GENERIC_H
+#        include <gssapi/gssapi_generic.h>
+#      endif /* HAVE_GSSAPI_GENERIC_H */
+#      ifdef HAVE_GSSAPI_KRB5_H
+#        include <gssapi/gssapi_krb5.h>
+#      endif /* HAVE_GSSAPI_KRB5_H */
+#    elif defined(HAVE_GSSAPI_H)
 #      include <gssapi.h>
-#    endif /* HAVE_GSSAPI_H */
+#    endif /* HAVE_GSS_GSSAPI_H */
 #    ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
 #      define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
 #    endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
@@ -91,6 +98,9 @@ typedef int socklen_t;
 #    include <CoreFoundation/CoreFoundation.h>
 #    include <Security/Security.h>
 #    include <Security/SecureTransport.h>
+#    ifdef HAVE_SECURETRANSPORTPRIV_H
+#      include <Security/SecureTransportPriv.h>
+#    endif /* HAVE_SECURETRANSPORTPRIV_H */
 #    ifdef HAVE_SECITEM_H
 #      include <Security/SecItem.h>
 #    endif /* HAVE_SECITEM_H */
@@ -136,6 +146,16 @@ extern "C" {
 #  endif /* __cplusplus */
 
 
+/*
+ * Constants...
+ */
+
+
+#define _HTTP_RESOLVE_DEFAULT  0       /* Just resolve with default options */
+#define _HTTP_RESOLVE_STDERR   1       /* Log resolve progress to stderr */
+#define _HTTP_RESOLVE_FQDN     2       /* Resolve to a FQDN */
+
+
 /*
  * Types and functions for SSL support...
  */
@@ -215,7 +235,6 @@ typedef void *http_tls_t;
 typedef void *http_tls_credentials_t;
 #  endif /* HAVE_LIBSSL */
 
-
 typedef int (*_http_timeout_cb_t)(http_t *http, void *user_data);
 
 struct _http_s                         /**** HTTP connection structure. ****/
@@ -281,6 +300,9 @@ struct _http_s                              /**** HTTP connection structure. ****/
   _http_timeout_cb_t   timeout_cb;     /* Timeout callback @since CUPS 1.5@ */
   void                 *timeout_data;  /* User data pointer @since CUPS 1.5@ */
   struct timeval       timeout_value;  /* Timeout in seconds */
+#  ifdef HAVE_GSSAPI
+  char                 gsshost[256];   /* Hostname for Kerberos */
+#  endif /* HAVE_GSSAPI */
 };
 
 
@@ -365,7 +387,7 @@ extern char         *_httpEncodeURI(char *dst, const char *src,
 extern void            _httpFreeCredentials(http_tls_credentials_t credentials);
 extern ssize_t         _httpPeek(http_t *http, char *buffer, size_t length);
 extern const char      *_httpResolveURI(const char *uri, char *resolved_uri,
-                                        size_t resolved_size, int log,
+                                        size_t resolved_size, int options,
                                         int (*cb)(void *context),
                                         void *context);
 extern void            _httpSetTimeout(http_t *http, double timeout,
index f598bfbb5fc6ce1b706bde0fb5f848a51e4e26c7..e532b48f3e199ddb26e6dee76c85a051c5397085 100644 (file)
  *                          components.
  *   httpStatus()         - Return a short string describing a HTTP status code.
  *   _cups_hstrerror()    - hstrerror() emulation function for Solaris and
- *                          others...
+ *                          others.
  *   _httpDecodeURI()     - Percent-decode a HTTP request URI.
  *   _httpEncodeURI()     - Percent-encode a HTTP request URI.
  *   _httpResolveURI()    - Resolve a DNS-SD URI.
  *   http_copy_decode()   - Copy and decode a URI.
  *   http_copy_encode()   - Copy and encode a URI.
- *   resolve_callback()   - Build a device URI for the given service name.
+ *   http_resolve_cb()    - Build a device URI for the given service name.
  */
 
 /*
@@ -70,6 +70,7 @@ typedef struct _http_uribuf_s         /* URI buffer */
 {
   char         *buffer;                /* Pointer to buffer */
   size_t       bufsize;                /* Size of buffer */
+  int          options;                /* Options passed to _httpResolveURI */
 } _http_uribuf_t;
 
 
@@ -115,15 +116,15 @@ static char               *http_copy_encode(char *dst, const char *src,
                                          char *dstend, const char *reserved,
                                          const char *term, int encode);
 #ifdef HAVE_DNSSD
-static void DNSSD_API  resolve_callback(DNSServiceRef sdRef,
-                                        DNSServiceFlags flags,
-                                        uint32_t interfaceIndex,
-                                        DNSServiceErrorType errorCode,
-                                        const char *fullName,
-                                        const char *hostTarget,
-                                        uint16_t port, uint16_t txtLen,
-                                        const unsigned char *txtRecord,
-                                        void *context);
+static void DNSSD_API  http_resolve_cb(DNSServiceRef sdRef,
+                                       DNSServiceFlags flags,
+                                       uint32_t interfaceIndex,
+                                       DNSServiceErrorType errorCode,
+                                       const char *fullName,
+                                       const char *hostTarget,
+                                       uint16_t port, uint16_t txtLen,
+                                       const unsigned char *txtRecord,
+                                       void *context);
 #endif /* HAVE_DNSSD */
 
 
@@ -1319,7 +1320,7 @@ httpStatus(http_status_t status)  /* I - HTTP status code */
 
 #ifndef HAVE_HSTRERROR
 /*
- * '_cups_hstrerror()' - hstrerror() emulation function for Solaris and others...
+ * '_cups_hstrerror()' - hstrerror() emulation function for Solaris and others.
  */
 
 const char *                           /* O - Error string */
@@ -1382,7 +1383,7 @@ _httpResolveURI(
     const char *uri,                   /* I - DNS-SD URI */
     char       *resolved_uri,          /* I - Buffer for resolved URI */
     size_t     resolved_size,          /* I - Size of URI buffer */
-    int        logit,                  /* I - Log progress to stderr? */
+    int        options,                        /* I - Resolve options */
     int        (*cb)(void *context),   /* I - Continue callback function */
     void       *context)               /* I - Context pointer for callback */
 {
@@ -1416,7 +1417,7 @@ _httpResolveURI(
                      sizeof(resource)) < HTTP_URI_OK)
 #endif /* DEBUG */
   {
-    if (logit)
+    if (options & _HTTP_RESOLVE_STDERR)
       _cupsLangPrintFilter(stderr, "ERROR", _("Bad device-uri \"%s\"."), uri);
 
     DEBUG_printf(("6_httpResolveURI: httpSeparateURI returned %d!", status));
@@ -1449,7 +1450,7 @@ _httpResolveURI(
     struct timeval     stimeout;       /* Timeout value for select() */
 #endif /* HAVE_POLL */
 
-    if (logit)
+    if (options & _HTTP_RESOLVE_STDERR)
       fprintf(stderr, "DEBUG: Resolving \"%s\"...\n", hostname);
 
    /*
@@ -1484,14 +1485,14 @@ _httpResolveURI(
     if (domain)
       *domain++ = '\0';
 
-    uribuf.buffer  = resolved_uri;
-    uribuf.bufsize = resolved_size;
-
+    uribuf.buffer   = resolved_uri;
+    uribuf.bufsize  = resolved_size;
+    uribuf.options  = options;
     resolved_uri[0] = '\0';
 
     DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", "
                   "domain=\"%s\"\n", hostname, regtype, domain));
-    if (logit)
+    if (options & _HTTP_RESOLVE_STDERR)
     {
       fputs("STATE: +connecting-to-device\n", stderr);
       fprintf(stderr, "DEBUG: Resolving \"%s\", regtype=\"%s\", "
@@ -1504,7 +1505,7 @@ _httpResolveURI(
     {
       localref = ref;
       if (DNSServiceResolve(&localref, kDNSServiceFlagsShareConnection, 0,
-                           hostname, regtype, "local.", resolve_callback,
+                           hostname, regtype, "local.", http_resolve_cb,
                            &uribuf) == kDNSServiceErr_NoError)
       {
        int     fds;                    /* Number of ready descriptors */
@@ -1513,7 +1514,7 @@ _httpResolveURI(
 
        for (;;)
        {
-         if (logit)
+         if (options & _HTTP_RESOLVE_STDERR)
            _cupsLangPrintFilter(stderr, "INFO", _("Looking for printer."));
 
          if (cb && !(*cb)(context))
@@ -1561,17 +1562,19 @@ _httpResolveURI(
            * comes in, do an additional domain resolution...
            */
 
-           if (domainsent == 0 && strcasecmp(domain, "local."))
+           if (domainsent == 0 && (domain && strcasecmp(domain, "local.")))
            {
-             if (logit)
+             if (options & _HTTP_RESOLVE_STDERR)
                fprintf(stderr,
                        "DEBUG: Resolving \"%s\", regtype=\"%s\", "
-                       "domain=\"%s\"...\n", hostname, regtype, domain);
+                       "domain=\"%s\"...\n", hostname, regtype,
+                       domain ? domain : "");
   
              domainref = ref;
-             if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection, 0,
-                                   hostname, regtype, domain, resolve_callback,
-                                   &uribuf) == kDNSServiceErr_NoError)
+             if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection,
+                                   0, hostname, regtype, domain,
+                                   http_resolve_cb, &uribuf)
+                     == kDNSServiceErr_NoError)
                domainsent = 1;
            }
 
@@ -1580,7 +1583,8 @@ _httpResolveURI(
            * printer-state-reason...
            */
 
-           if (logit && offline == 0 && time(NULL) > (start_time + 5))
+           if ((options & _HTTP_RESOLVE_STDERR) && offline == 0 &&
+               time(NULL) > (start_time + 5))
            {
              fputs("STATE: +offline-report\n", stderr);
              offline = 1;
@@ -1605,7 +1609,7 @@ _httpResolveURI(
       DNSServiceRefDeallocate(ref);
     }
 
-    if (logit)
+    if (options & _HTTP_RESOLVE_STDERR)
     {
       if (uri)
         fprintf(stderr, "DEBUG: Resolved as \"%s\"...\n", uri);
@@ -1623,9 +1627,18 @@ _httpResolveURI(
     uri = NULL;
 #endif /* HAVE_DNSSD */
 
-    if (logit && !uri)
+    if ((options & _HTTP_RESOLVE_STDERR) && !uri)
       _cupsLangPrintFilter(stderr, "ERROR", _("Unable to find printer."));
   }
+  else
+  {
+   /*
+    * Nothing more to do...
+    */
+
+    strlcpy(resolved_uri, uri, resolved_size);
+    uri = resolved_uri;
+  }
 
   DEBUG_printf(("5_httpResolveURI: Returning \"%s\"", uri));
 
@@ -1752,11 +1765,11 @@ http_copy_encode(char       *dst,       /* O - Destination buffer */
 
 #ifdef HAVE_DNSSD
 /*
- * 'resolve_callback()' - Build a device URI for the given service name.
+ * 'http_resolve_cb()' - Build a device URI for the given service name.
  */
 
 static void DNSSD_API
-resolve_callback(
+http_resolve_cb(
     DNSServiceRef       sdRef,         /* I - Service reference */
     DNSServiceFlags     flags,         /* I - Results flags */
     uint32_t            interfaceIndex,        /* I - Interface number */
@@ -1768,25 +1781,35 @@ resolve_callback(
     const unsigned char *txtRecord,    /* I - TXT record data */
     void                *context)      /* I - Pointer to URI buffer */
 {
-  const char           *scheme;        /* URI scheme */
-  char                 rp[257];        /* Remote printer */
+  const char           *scheme,        /* URI scheme */
+                       *hostptr;       /* Pointer into hostTarget */
+  char                 rp[257],        /* Remote printer */
+                       fqdn[256];      /* FQDN of the .local name */
   const void           *value;         /* Value from TXT record */
   uint8_t              valueLen;       /* Length of value */
   _http_uribuf_t       *uribuf;        /* URI buffer */
 
 
-  DEBUG_printf(("7resolve_callback(sdRef=%p, flags=%x, interfaceIndex=%u, "
+  DEBUG_printf(("7http_resolve_cb(sdRef=%p, flags=%x, interfaceIndex=%u, "
                "errorCode=%d, fullName=\"%s\", hostTarget=\"%s\", port=%u, "
                "txtLen=%u, txtRecord=%p, context=%p)", sdRef, flags,
                interfaceIndex, errorCode, fullName, hostTarget, port, txtLen,
                txtRecord, context));
 
+  uribuf = (_http_uribuf_t *)context;
+
  /*
   * Figure out the scheme from the full name...
   */
 
-  if (strstr(fullName, "._ipp") || strstr(fullName, "._fax-ipp"))
+  if (strstr(fullName, "._ipps") || strstr(fullName, "._ipp-tls"))
+    scheme = "ipps";
+  else if (strstr(fullName, "._ipp") || strstr(fullName, "._fax-ipp"))
     scheme = "ipp";
+  else if (strstr(fullName, "._http."))
+    scheme = "http";
+  else if (strstr(fullName, "._https."))
+    scheme = "https";
   else if (strstr(fullName, "._printer."))
     scheme = "lpd";
   else if (strstr(fullName, "._pdl-datastream."))
@@ -1813,16 +1836,61 @@ resolve_callback(
     rp[0] = '\0';
 
  /*
-  * Assemble the final device URI...
+  * Lookup the FQDN if needed...
   */
 
-  uribuf = (_http_uribuf_t *)context;
+  if ((uribuf->options & _HTTP_RESOLVE_FQDN) &&
+      (hostptr = hostTarget + strlen(hostTarget) - 7) > hostTarget &&
+      !strcasecmp(hostptr, ".local."))
+  {
+   /*
+    * OK, we got a .local name but the caller needs a real domain.  Start by
+    * getting the IP address of the .local name and then do reverse-lookups...
+    */
+
+    http_addrlist_t    *addrlist,      /* List of addresses */
+                       *addr;          /* Current address */
+
+    DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget));
+
+    snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
+    if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
+    {
+      for (addr = addrlist; addr; addr = addr->next)
+      {
+        int error = getnameinfo(&(addr->addr.addr),
+                               httpAddrLength(&(addr->addr)),
+                               fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
+
+        if (!error)
+       {
+         DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
+
+         if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
+             strcasecmp(hostptr, ".local"))
+         {
+           hostTarget = fqdn;
+           break;
+         }
+       }
+#ifdef DEBUG
+       else
+         DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
+                       httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
+                       error));
+#endif /* DEBUG */
+      }
+    }
+  }
+
+ /*
+  * Assemble the final device URI...
+  */
 
   httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme,
                   NULL, hostTarget, ntohs(port), rp);
 
-  DEBUG_printf(("8resolve_callback: Resolved URI is \"%s\"...",
-                uribuf->buffer));
+  DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer));
 }
 #endif /* HAVE_DNSSD */
 
index 9cd7b9002666c2de4eede44f2aaa0d8328a00d34..36f47b715499ec594147f8fa37b7faedf8767022 100644 (file)
@@ -168,19 +168,6 @@ static int         http_setup_ssl(http_t *http);
 static void            http_shutdown_ssl(http_t *http);
 static int             http_upgrade(http_t *http);
 static int             http_write_ssl(http_t *http, const char *buf, int len);
-
-#  ifdef HAVE_GNUTLS
-#    ifdef HAVE_PTHREAD_H
-GCRY_THREAD_OPTION_PTHREAD_IMPL;
-#    endif /* HAVE_PTHREAD_H */
-
-#  elif defined(HAVE_LIBSSL)
-static _cups_mutex_t   *http_locks;    /* OpenSSL lock mutexes */
-
-static void            http_locking_cb(int mode, int type, const char *file,
-                                       int line);
-static unsigned long   http_threadid_cb(void);
-#  endif /* HAVE_GNUTLS */
 #endif /* HAVE_SSL */
 
 
@@ -1518,14 +1505,6 @@ httpInitialize(void)
 #endif /* WIN32 */
 
 #ifdef HAVE_GNUTLS
- /*
-  * Make sure we handle threading properly...
-  */
-
-#  ifdef HAVE_PTHREAD_H
-  gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
-#  endif /* HAVE_PTHREAD_H */
-
  /*
   * Initialize GNU TLS...
   */
@@ -1540,19 +1519,6 @@ httpInitialize(void)
   SSL_load_error_strings();
   SSL_library_init();
 
- /*
-  * Set the threading callbacks...
-  */
-
-  http_locks = calloc(CRYPTO_num_locks(), sizeof(_cups_mutex_t));
-#  ifdef HAVE_PTHREAD_H
-  for (i = 0; i < CRYPTO_num_locks(); i ++)
-    pthread_mutex_init(http_locks + i, NULL);
-#  endif /* HAVE_PTHREAD_H */
-
-  CRYPTO_set_id_callback(http_threadid_cb);
-  CRYPTO_set_locking_callback(http_locking_cb);
-
  /*
   * Using the current time is a dubious random seed, but on some systems
   * it is the best we can do (on others, this seed isn't even used...)
@@ -3494,25 +3460,6 @@ http_read_ssl(http_t *http,              /* I - Connection to server */
 #endif /* HAVE_SSL */
 
 
-#ifdef HAVE_LIBSSL
-/*
- * 'http_locking_cb()' - Lock/unlock a thread's mutex.
- */
-
-static void
-http_locking_cb(int        mode,       /* I - Lock mode */
-               int        type,        /* I - Lock type */
-               const char *file,       /* I - Source file */
-               int        line)        /* I - Line number */
-{
-  if (mode & CRYPTO_LOCK)
-    _cupsMutexLock(http_locks + type);
-  else
-    _cupsMutexUnlock(http_locks + type);
-}
-#endif /* HAVE_LIBSSL */
-
-
 /*
  * 'http_send()' - Send a request with all fields and the trailing blank line.
  */
@@ -4206,23 +4153,6 @@ http_shutdown_ssl(http_t *http)          /* I - Connection to server */
 #endif /* HAVE_SSL */
 
 
-#ifdef HAVE_LIBSSL
-/*
- * 'http_threadid_cb()' - Return the current thread ID.
- */
-
-static unsigned long                   /* O - Thread ID */
-http_threadid_cb(void)
-{
-#  ifdef HAVE_PTHREAD_H
-  return ((unsigned long)pthread_self());
-#  else
-  return (0);
-#  endif /* HAVE_PTHREAD_H */
-}
-#endif /* HAVE_LIBSSL */
-
-
 #ifdef HAVE_SSL
 /*
  * 'http_upgrade()' - Force upgrade to TLS encryption.
index 89ad18b6b16f8b8dc3ddb42398e6f92da12d802e..351043c38ff536f52d3818c27a750a14ba919dc8 100644 (file)
@@ -483,7 +483,6 @@ ppdOpen2(cups_file_t *fp)           /* I - File to read from */
   ppd_section_t                section;        /* Order dependency section */
   ppd_profile_t                *profile;       /* Pointer to color profile */
   char                 **filter;       /* Pointer to filter */
-  cups_lang_t          *language;      /* Default language */
   struct lconv         *loc;           /* Locale data */
   int                  ui_keyword;     /* Is this line a UI keyword? */
   cups_encoding_t      encoding;       /* Encoding of PPD file */
@@ -627,13 +626,6 @@ ppdOpen2(cups_file_t *fp)          /* I - File to read from */
   ppd->coptions       = cupsArrayNew((cups_array_func_t)ppd_compare_coptions,
                                      NULL);
 
- /*
-  * Get the default language for the user...
-  */
-
-  language = cupsLangDefault();
-  loc      = localeconv();
-
  /*
   * Read lines from the PPD file and add them to the file record...
   */
@@ -644,6 +636,7 @@ ppdOpen2(cups_file_t *fp)           /* I - File to read from */
   choice     = NULL;
   ui_keyword = 0;
   encoding   = CUPS_ISO8859_1;
+  loc        = localeconv();
 
   while ((mask = ppd_read(fp, &line, keyword, name, text, &string, 1, cg)) != 0)
   {
@@ -1951,8 +1944,6 @@ ppdOpen2(cups_file_t *fp)         /* I - File to read from */
   * Reset language preferences...
   */
 
-  cupsLangFree(language);
-
 #ifdef DEBUG
   if (!cupsFileEOF(fp))
     DEBUG_printf(("1ppdOpen2: Premature EOF at %lu...\n",
@@ -2023,8 +2014,6 @@ ppdOpen2(cups_file_t *fp)         /* I - File to read from */
 
   ppdClose(ppd);
 
-  cupsLangFree(language);
-
   return (NULL);
 }
 
index 0b61327d19980d03e4ceec10934fe3df809d6287..cc1038b50cc45722cd42f4d569fd3c89ce23dcff 100644 (file)
@@ -691,7 +691,7 @@ cupsSendRequest(http_t     *http,   /* I - Connection to server or @code CUPS_HTTP
       * "replay" attack...
       */
 
-      _cupsSetNegotiateAuthString(http);
+      _cupsSetNegotiateAuthString(http, "POST", resource);
     }
 #endif /* HAVE_GSSAPI */
 
index f711e9ab95bac0e900025389d7bd82df4f0014ae..959b6175fa38c66ae9d3d88c35dcabfd77c726f0 100644 (file)
@@ -465,14 +465,32 @@ main(int  argc,                           /* I - Number of command-line arguments */
     char       resolved[1024];         /* Resolved URI */
 
 
-    printf("_httpResolveURI(%s): ", argv[1]);
+    printf("_httpResolveURI(%s, _HTTP_RESOLVE_DEFAULT): ", argv[1]);
     fflush(stdout);
 
-    if (!_httpResolveURI(argv[1], resolved, sizeof(resolved), 1, NULL, NULL))
+    if (!_httpResolveURI(argv[1], resolved, sizeof(resolved),
+                         _HTTP_RESOLVE_DEFAULT, NULL, NULL))
     {
       puts("FAIL");
       return (1);
     }
+    else
+      printf("PASS (%s)\n", resolved);
+
+    printf("_httpResolveURI(%s, _HTTP_RESOLVE_FQDN): ", argv[1]);
+    fflush(stdout);
+
+    if (!_httpResolveURI(argv[1], resolved, sizeof(resolved),
+                         _HTTP_RESOLVE_FQDN, NULL, NULL))
+    {
+      puts("FAIL");
+      return (1);
+    }
+    else if (strstr(resolved, ".local:"))
+    {
+      printf("FAIL (%s)\n", resolved);
+      return (1);
+    }
     else
     {
       printf("PASS (%s)\n", resolved);
index 3b46d4cc8b81763176692195d86a5711cb3c8ff3..2013b74f5cda9d709429b9bd26477422bc119f7e 100644 (file)
@@ -31,6 +31,7 @@
  *   cupsSetUser()           - Set the default user name.
  *   cupsUser()              - Return the current user's name.
  *   _cupsGetPassword()      - Get a password from the user.
+ *   _cupsGSSServiceName()   - Get the GSS (Kerberos) service name.
  *   _cupsSetDefaults()      - Set the default server, port, and encryption.
  *   cups_read_client_conf() - Read a client.conf file.
  */
@@ -511,6 +512,25 @@ _cupsGetPassword(const char *prompt)       /* I - Prompt string */
 }
 
 
+#ifdef HAVE_GSSAPI
+/*
+ * '_cupsGSSServiceName()' - Get the GSS (Kerberos) service name.
+ */
+
+const char *
+_cupsGSSServiceName(void)
+{
+  _cups_globals_t *cg = _cupsGlobals();        /* Thread globals */
+
+
+  if (!cg->gss_service_name[0])
+    _cupsSetDefaults();
+
+  return (cg->gss_service_name);
+}
+#endif /* HAVE_GSSAPI */
+
+
 /*
  * '_cupsSetDefaults()' - Set the default server, port, and encryption.
  */
index 4e5c74035558a0eb65aff81df820b940f1f78091..fb565937b5e6bc7bdd6c9f011bb7487de3935846 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Printing utilities for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -1762,7 +1762,8 @@ cups_get_printer_uri(
     {
       httpSeparateURI(HTTP_URI_CODING_ALL,
                       _httpResolveURI(attr->values[0].string.text, uri,
-                                     sizeof(uri), 0, NULL, NULL),
+                                     sizeof(uri), _HTTP_RESOLVE_DEFAULT,
+                                     NULL, NULL),
                       scheme, sizeof(scheme), username, sizeof(username),
                      host, hostsize, port, resource, resourcesize);
       ippDelete(response);
index 6c57c13e417d9f1e3e9ba1446a39c22c881ac0fa..459f9c41705e50a10238c3a074ea9cd1e1943b8a 100644 (file)
@@ -415,9 +415,9 @@ div.contents ul.subcontents li {
 <!--
   "$Id$"
 
-  Array API introduction for the Common UNIX Printing System (CUPS).
+  Array API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index 19760cd85b5e6fe0ebf2fb1f18d4773bb711f97d..d9bea4eea8c34ac488ac2870f46a3093891716cf 100644 (file)
@@ -489,9 +489,9 @@ locale ID.">CF_RETURNS_RETAINED</a></li>
 <!--
   "$Id$"
 
-  CUPS API introduction for the Common UNIX Printing System (CUPS).
+  API introduction for CUPS.
 
-  Copyright 2007-2010 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -538,7 +538,7 @@ specific destination for printing:</p>
 int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&amp;dests);
 <a href='#cups_dest_t'>cups_dest_t</a> *dest = <a href='#cupsGetDest'>cupsGetDest</a>("name", NULL, num_dests, dests);
 
-/* do something wiith dest */
+/* do something with dest */
 
 <a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
 </pre>
index 45f5e33fca70a8e89ddf02fb7f60dba1a96b0d53..0b3713c8626c0eeb46a360cb6664b38db08395a0 100644 (file)
@@ -426,9 +426,9 @@ file.">cupsFileRewind</a></li>
 <!--
   "$Id$"
 
-  File and directory API introduction for the Common UNIX Printing System (CUPS).
+  File and directory API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2005 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index 904926fe246dc704c94910ccea4d4f34ed3eb9cd..e66df8daf2cab8a1cb32379ee576729c21877a0f 100644 (file)
@@ -484,7 +484,7 @@ more detail.</p>
 <h3><a name="SECURITY">Security Considerations</a></h3>
 
 <p>It is always important to use security programming practices. Filters and
-most backends are run as a non-priviledged user, so the major security
+most backends are run as a non-privileged user, so the major security
 consideration is resource utilization - filters should not depend on unlimited
 amounts of CPU, memory, or disk space, and should protect against conditions
 that could lead to excess usage of any resource like infinite loops and
@@ -519,6 +519,22 @@ held. Filters, backends, and port monitors <em>must</em> catch
 file or return the printer to a known good state. The recommended behavior is to
 end the output on the current page.</p>
 
+<p>Filters and backends may also receive <code>SIGPIPE</code> when an upstream or downstream filter/backend exits with a non-zero status. Developers should generally <code>ignore SIGPIPE</code> at the beginning of <code>main()</code> with the following function call:</p>
+
+<pre class="example">
+#include &lt;signal.h&gt;>
+
+...
+
+int
+main(int argc, char *argv[])
+{
+  signal(SIGPIPE, SIG_IGN);
+
+  ...
+}
+</pre>
+
 <h3><a name="PERMISSIONS">File Permissions</a></h3>
 
 <p>For security reasons, CUPS will only run filters and backends that are owned
index 40737993e4df878d9cf6aea4e654a504381ca136..263cb0263149e1f8eb619c3c6cb18b039800c304 100644 (file)
@@ -526,6 +526,7 @@ in seconds.">ippDateToTime</a></li>
        <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
 </ul></li>
 <li><a href="#TYPES">Data Types</a><ul class="code">
+       <li><a href="#gss_auth_identity_desc" title="Local functions...">gss_auth_identity_desc</a></li>
        <li><a href="#http_addr_t" title="Socket address union, which
 makes using IPv6 and other
 address types easier and
@@ -564,6 +565,7 @@ are server-oriented...">http_state_t</a></li>
        <li><a href="#ipp_value_t" title="Attribute Value">ipp_value_t</a></li>
 </ul></li>
 <li><a href="#STRUCTURES">Structures</a><ul class="code">
+       <li><a href="#gss_auth_identity" title="Local functions...">gss_auth_identity</a></li>
        <li><a href="#http_addrlist_s" title="Socket address list, which is
 used to enumerate all of the
 addresses that are associated
@@ -603,9 +605,9 @@ are server-oriented...">http_state_e</a></li>
 <!--
   "$Id$"
 
-  HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
+  HTTP and IPP API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
@@ -3339,6 +3341,11 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Current state</p>
 <h2 class="title"><a name="TYPES">Data Types</a></h2>
+<h3 class="typedef"><a name="gss_auth_identity_desc">gss_auth_identity_desc</a></h3>
+<p class="description">Local functions...</p>
+<p class="code">
+typedef struct <a href="#gss_auth_identity">gss_auth_identity</a> gss_auth_identity_desc;
+</p>
 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="http_addr_t">http_addr_t</a></h3>
 <p class="description">Socket address union, which
 makes using IPv6 and other
@@ -3492,6 +3499,25 @@ typedef enum <a href="#ipp_tag_e">ipp_tag_e</a> ipp_tag_t;
 typedef union <a href="#ipp_value_u">ipp_value_u</a> ipp_value_t;
 </p>
 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
+<h3 class="struct"><a name="gss_auth_identity">gss_auth_identity</a></h3>
+<p class="description">Local functions...</p>
+<p class="code">struct gss_auth_identity {<br>
+&nbsp;&nbsp;&nbsp;&nbsp;gss_buffer_t *credentialsRef;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;uint32_t flags;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;char *password;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;char *realm;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;uint32_t type;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;char *username;<br>
+};</p>
+<h4 class="members">Members</h4>
+<dl>
+<dt>credentialsRef </dt>
+<dt>flags </dt>
+<dt>password </dt>
+<dt>realm </dt>
+<dt>type </dt>
+<dt>username </dt>
+</dl>
 <h3 class="struct"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="http_addrlist_s">http_addrlist_s</a></h3>
 <p class="description">Socket address list, which is
 used to enumerate all of the
index c3c9a03e16243a999a649901cd8bbc588d2b5a51..90726bf6454e81477a22b7fbe98d7cbfa6660f50 100644 (file)
@@ -406,10 +406,9 @@ div.contents ul.subcontents li {
 <!--
   "$Id$"
 
-  Introduction to CUPS programming content for the Common UNIX Printing System
-  (CUPS).
+  Introduction to CUPS programming content for CUPS.
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2011 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
index 7ffe14f928dd4ceb92c436646077cfc0a598a623..626b25d127b93b5de8d2f019c7dd074c135ba8ee 100644 (file)
@@ -486,9 +486,9 @@ conflicts.">ppdMarkOption</a></li>
 <!--
   "$Id$"
 
-  PPD API introduction for the Common UNIX Printing System (CUPS).
+  PPD API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index 11ea0f2b7ebf804dd0abf18312b0243f22ae59bb..3659e1ae8b6a1ebc7c51b9ae780563ba02d31200 100644 (file)
@@ -436,9 +436,9 @@ page header structure.">cupsRasterWriteHeader2</a></li>
 <!--
   "$Id$"
 
-  Raster API introduction for the Common UNIX Printing System (CUPS).
+  Raster API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index 62c19eb07b9fe6dba2abb79e3953c1c5c7cab4d1..82c9b5ffe025cd47423ac1496ab0de7694df1206 100644 (file)
@@ -53,7 +53,7 @@ systems and network.</P>
 Kerberos on your system and setup a system as a KDC. Because this
 configuration is highly system and site-specific, please consult
 the following on-line resources provided by the creators of Kerberos
-at the Massachussetts Institute of Technology (MIT):</P>
+at the Massachusetts Institute of Technology (MIT):</P>
 
 <UL>
 
index 6b23810884f3b369c4b53a620dddb57903330c58..d02d4f4036cef12fd48bf1efbef134369811d2e9 100644 (file)
@@ -93,9 +93,9 @@ page on the device.</P>
 
 <PRE>
 socket://<i>ip-address-or-hostname</i>
-socket://<i>ip-address-or-hostname</i>?waiteof=false
+socket://<i>ip-address-or-hostname</i>/?waiteof=false
 socket://<i>ip-address-or-hostname</i>:<i>port-number</i>
-socket://<i>ip-address-or-hostname</i>:<i>port-number</i>?waiteof=false
+socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?waiteof=false
 </PRE>
 
 <P>The "waiteof" option controls whether the <tt>socket</tt> backend waits for the printer to complete the printing of the job. The default is to wait.</P>
index 83ca975286f8f5f295ef5899bca34d733bc33b87..0cfa74135469228f983fbce2311904e05eae772d 100644 (file)
@@ -324,7 +324,7 @@ lpr -o sides=one-sided filename
 
 <H3><A NAME="JOBSHEETS">Selecting the Banner Page(s)</A></H3>
 
-<P>The <CODE>-o jobsheets=start,end</CODE> option sets the banner
+<P>The <CODE>-o job-sheets=start,end</CODE> option sets the banner
 page(s) to use for a job:</P>
 
 <PRE CLASS="command">
index 3b931bcc33749b0dbac46c6a25fc53a4bac53357..ac83de413a00ebc3c7f43378f492d092b33dfea6 100644 (file)
@@ -114,9 +114,9 @@ to the access log file. The following levels are defined:</P>
   ...
   Allow from All
   Allow from None
-  Allow from *.domain.com
-  Allow from .domain.com
-  Allow from host.domain.com
+  Allow from *.example.com
+  Allow from .example.com
+  Allow from host.example.com
   Allow from nnn.*
   Allow from nnn.nnn.*
   Allow from nnn.nnn.nnn.*
@@ -133,8 +133,8 @@ to the access log file. The following levels are defined:</P>
 <H3>Description</H3>
 
 <P>The <CODE>Allow</CODE> directive specifies a hostname, IP
-address, or network that is allowed access to the server. 
-<CODE>Allow</CODE> directives are cummulative, so multiple
+address, or network that is allowed access to the server.
+<CODE>Allow</CODE> directives are cumulative, so multiple
 <CODE>Allow</CODE> directives can be used to allow access for
 multiple hosts or networks.</P>
 
@@ -342,7 +342,7 @@ default setting is <CODE>No</CODE>.</P>
 <PRE CLASS="command">
 BrowseAddress 255.255.255.255:631
 BrowseAddress 192.0.2.255:631
-BrowseAddress host.domain.com:631
+BrowseAddress host.example.com:631
 BrowseAddress @LOCAL
 BrowseAddress @IF(name)
 </PRE>
@@ -380,7 +380,7 @@ BrowseAllow from none
 BrowseAllow from 192.0.2
 BrowseAllow from 192.0.2.0/24
 BrowseAllow from 192.0.2.0/255.255.255.0
-BrowseAllow from *.domain.com
+BrowseAllow from *.example.com
 BrowseAllow from @LOCAL
 BrowseAllow from @IF(name)
 </PRE>
@@ -418,7 +418,7 @@ BrowseDeny from none
 BrowseDeny from 192.0.2
 BrowseDeny from 192.0.2.0/24
 BrowseDeny from 192.0.2.0/255.255.255.0
-BrowseDeny from *.domain.com
+BrowseDeny from *.example.com
 BrowseDeny from @LOCAL
 BrowseDeny from @IF(name)
 </PRE>
@@ -616,7 +616,7 @@ allow/deny processing. The default order is
 
 <PRE CLASS="command">
 BrowsePoll 192.0.2.2:631
-BrowsePoll host.domain.com:631
+BrowsePoll host.example.com:631
 </PRE>
 
 <H3>Description</H3>
@@ -698,8 +698,8 @@ requests for several seconds while polling the network.</P>
 BrowseRelay 193.0.2.1 192.0.2.255
 BrowseRelay 193.0.2.0/255.255.255.0 192.0.2.255
 BrowseRelay 193.0.2.0/24 192.0.2.255
-BrowseRelay *.domain.com 192.0.2.255
-BrowseRelay host.domain.com 192.0.2.255
+BrowseRelay *.example.com 192.0.2.255
+BrowseRelay host.example.com 192.0.2.255
 </PRE>
 
 <H3>Description</H3>
@@ -1048,9 +1048,9 @@ printers are shared (published) by default. The default is
   ..
   Deny from All
   Deny from None
-  Deny from *.domain.com
-  Deny from .domain.com
-  Deny from host.domain.com
+  Deny from *.example.com
+  Deny from .example.com
+  Deny from host.example.com
   Deny from nnn.*
   Deny from nnn.nnn.*
   Deny from nnn.nnn.nnn.*
@@ -1068,7 +1068,7 @@ printers are shared (published) by default. The default is
 
 <P>The <CODE>Deny</CODE> directive specifies a hostname, IP
 address, or network that is denied access to the server.
-<CODE>Deny</CODE> directives are cummulative, so multiple
+<CODE>Deny</CODE> directives are cumulative, so multiple
 <CODE>Deny</CODE> directives can be used to deny access for
 multiple hosts or networks.</P>
 
@@ -1779,11 +1779,11 @@ operations.</P>
 </TR>
 <TR>
        <TD>Get-Printer-Attributes</TD>
-       <TD>Gets informaion about a printer or class</TD>
+       <TD>Gets information about a printer or class</TD>
 </TR>
 <TR>
        <TD>Get-Subscription-Attributes</TD>
-       <TD>Gets informaion about a notification subscription</TD>
+       <TD>Gets information about a notification subscription</TD>
 </TR>
 <TR>
        <TD>Get-Subscriptions</TD>
@@ -1819,7 +1819,7 @@ operations.</P>
 </TR>
 <TR>
        <TD>Resume-Printer</TD>
-       <TD>Sets the printer-stae value for a printer to idle/processing</TD>
+       <TD>Sets the printer-state value for a printer to idle/processing</TD>
 </TR>
 <TR>
        <TD>Send-Document</TD>
@@ -2692,7 +2692,7 @@ appear inside a <A HREF="#Location"><CODE>Location</CODE></A> or
 <H3>Examples</H3>
 
 <PRE CLASS="command">
-RIPCache 8m
+RIPCache 128m
 RIPCache 1g
 RIPCache 2048k
 </PRE>
@@ -2703,7 +2703,7 @@ RIPCache 2048k
 memory cache used by Raster Image Processor ("RIP") filters such
 as <CODE>imagetoraster</CODE> and <CODE>pstoraster</CODE>. The
 size can be suffixed with a "k" for kilobytes, "m" for megabytes,
-or "g" for gigabytes. The default cache size is "8m", or 8
+or "g" for gigabytes. The default cache size is "128m", or 128
 megabytes.</P>
 
 
@@ -2743,7 +2743,7 @@ is generated only once on startup or on a restart. The default is
 <P>The <CODE>Satisfy</CODE> directive specifies whether all
 conditions must be satisfied to allow access to the resource. If
 set to <CODE>all</CODE>, then all authentication and access
-control conditions must be satified to allow access.</P>
+control conditions must be satisfied to allow access.</P>
 
 <P>Setting <CODE>Satisfy</CODE> to <CODE>any</CODE> allows a user
 to gain access if the authentication or access control
@@ -2780,18 +2780,14 @@ HREF="#ServerName"><CODE>ServerName</CODE></A>.</P>
 
 <PRE CLASS="command">
 ServerAlias althost
-ServerAlias althost.foo.com
-ServerAlias althost.bar.com
+ServerAlias foo.example.com
+ServerAlias bar.example.com
 ServerAlias *
 </PRE>
 
 <H3>Description</H3>
 
-<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the
-server is known by. By default it contains a list of all aliases associated
-with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name
-"*" can be used to allow any hostname when accessing CUPS via an external
-network interfaces.</P>
+<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the server is known by. By default it contains a list of all aliases associated with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name "*" can be used to allow any hostname when accessing CUPS via an external network interfaces.</P>
 
 <BLOCKQUOTE><B>Note</B>
 
@@ -2868,8 +2864,8 @@ encrypted connections.</P>
 <H3>Examples</H3>
 
 <PRE CLASS="command">
-ServerName foo.domain.com
-ServerName myserver.domain.com
+ServerName foo.example.com
+ServerName myserver.example.com
 </PRE>
 
 <H3>Description</H3>
index 16e8b409a3245a760e15238718798e2499039711..0b9513220bcbfe6e7029c72e98ab4b0e0b844126 100644 (file)
@@ -21,8 +21,8 @@ line.</P>
 <H3>Examples</H3>
 
 <PRE CLASS="command">
-Cc bigbrother@domain.com
-Cc John Doe &lt;jd@domain.com>
+Cc bigbrother@example.com
+Cc John Doe &lt;jd@example.com>
 </PRE>
 
 <H3>Description</H3>
@@ -37,8 +37,8 @@ default is to not send a copy to anyone but the subscriber.</P>
 <H3>Examples</H3>
 
 <PRE CLASS="command">
-From printserver@domain.com
-From Your Happy Printer &lt;printserver@domain.com>
+From printserver@example.com
+From Your Happy Printer &lt;printserver@example.com>
 </PRE>
 
 <H3>Description</H3>
@@ -73,7 +73,7 @@ default is <TT>/usr/sbin/sendmail</TT>.</P>
 <H3>Examples</H3>
 
 <PRE CLASS="command">
-SMTPServer mail.domain.com
+SMTPServer mail.example.com
 SMTPServer 192.168.2.1
 </PRE>
 
index 696b7827de7ba8eac695e7f61d224988268c0d21..c3967f1c235215b51eff3cbc6b92e167e358d417 100644 (file)
@@ -31,7 +31,7 @@ mechanisms.</p>
 
        <dd>Evaluates to the specified integer; the number can be preceded by
        a leading sign (+/-) followed by a decimal number (1234), octal number
-       (01234), or hexidecimal number (0x1234) using the same rules as C and
+       (01234), or hexadecimal number (0x1234) using the same rules as C and
        C++.</dd>
 
        <dt>(NAME NAME ... number number ...)</dt>
@@ -71,7 +71,7 @@ mechanisms.</p>
 </dl>
 
 <p>Printer driver information can be grouped and shared using
-curley braces ({ ... }); PPD files are written when a close
+curly braces ({ ... }); PPD files are written when a close
 brace or end-of-file is seen and a <a href="#PCFileName">PCFileName</a>
 directive has been defined.</p>
 
@@ -1798,8 +1798,7 @@ SimpleColorProfile 720dpi/Glossy 100 90 120 1.5 -5 5 10
 <h3>Description</h3>
 
 <p>The <code>SimpleColorProfile</code> directive creates a
-matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>
-using values chosen with the <code>cupsprofile(1)</code> utility. 
+matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>. 
 The resolution and mediatype arguments specify the
 <code>Resolution</code> and <code>MediaType</code> choices which use the
 profile; the hyphen (<code>-</code>) is used to specify that any
@@ -1860,7 +1859,7 @@ Throughput 10
 
 <h3>Description</h3>
 
-<p>The <code>Througput</code> directive sets the <code>Troughput</code>
+<p>The <code>Throughput</code> directive sets the <code>Throughput</code>
 attribute for the current printer driver. The pages-per-minute
 argument is a positive integer representing the peak number of
 pages per minute that the printer is capable of producing. Use a
index be7f11c6a8d0f73e5f854ceaffa7918cccef448f..db4aacee53796b8bce66c9d25d932468ead160df 100644 (file)
@@ -136,7 +136,7 @@ MaxRunTime 300
 
 <H3>Description</H3>
 
-<P>The <CODE>MaxRunTime</CODE> directive specifies the maxium
+<P>The <CODE>MaxRunTime</CODE> directive specifies the maximum
 number of seconds that the SNMP backend will spend looking for
 printer devices on the network.</P>
 
index 38fb42cc089fdc27eaf287048976bc90cac1d646..c86151d176f1ba6a67d9f21fa34e91d53ff14cd0 100644 (file)
@@ -12,7 +12,7 @@
 potential security risks - the CUPS server does not accept remote
 connections, and only accepts shared printer information from the
 local subnet. When you share printers and/or enable remote
-adminstration, you expose your system to potential unauthorized
+administration, you expose your system to potential unauthorized
 access. This help page provides an analysis of possible CUPS
 security concerns and describes how to better secure your
 server.</P>
@@ -20,7 +20,7 @@ server.</P>
 <H2 CLASS="title"><A NAME="AUTHENTICATION">Authentication Issues</A></H2>
 
 <P>When you enable remote administration, the server will use
-Basic authentication for adminstration tasks. The current CUPS
+Basic authentication for administration tasks. The current CUPS
 server supports Basic, Digest, Kerberos, and local certificate
 authentication:</P>
 
index 9cdc5af820a97e2ae85792fb174eeee539bb7d7b..65b096135bad6c98a4fb7d348ccf4d117d1cc388 100644 (file)
@@ -10,9 +10,9 @@
 <!--
   "$Id$"
 
-  Banner file format specification for the Common UNIX Printing System (CUPS).
+  Banner file format specification for CUPS.
 
-  Copyright 2008-2009 by Apple Inc.
+  Copyright 2008-2011 by Apple Inc.
 
   These coded instructions, statements, and computer programs are the
   property of Apple Inc. and are protected by Federal copyright
index 62f1f19b6423f10bf5d054ae296a589c57eae16c..92c0259ee29b17a1a9edc2a6d2173c750821f74c 100644 (file)
@@ -10,9 +10,9 @@
 <!--
   "$Id$"
 
-  CUPS Browse Protocol specification for the Common UNIX Printing System (CUPS).
+  CUPS Browse Protocol specification for CUPS.
 
-  Copyright 2008 by Apple Inc.
+  Copyright 2008-2011 by Apple Inc.
   Copyright 1997-2005 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
   file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
+<BLOCKQUOTE><B>Note:</B>
+
+<P>The CUPS Browse Protocol is deprecated and will no longer be used in a future release of CUPS.</P>
+
+</BLOCKQUOTE>
+
 <H1 CLASS="title">CUPS Browse Protocol</H1>
 
 <h2><a name='INTRO'>Introduction</a></h2>
index ab9a1329c168f6f859df81a457f2fd2d7f499859..47f56d31d3468b2ee700c307244fb3b84ffc1d56 100644 (file)
@@ -211,7 +211,7 @@ Detailed list of changes.
 
 <P>Primary development occurs on the <var>trunk</var> branch,
 with changes merged back to release branches as needed. Table 2
-shows the URLs developers use for the various CUPS subprojects
+shows the URLs developers use for the various CUPS sub-projects
 and branches:</P>
 
 <DIV CLASS="table"><TABLE SUMMARY="CUPS Subversion URLs">
@@ -232,30 +232,6 @@ and branches:</P>
        <TD><A HREF="http://svn.easysw.com/public/cups/tags/">https://svn.easysw.com/public/cups/tags/</A></TD>
        <TD>CUPS release tags (read-only)</TD>
 </TR>
-<TR>
-       <TD><A HREF="http://svn.easysw.com/public/cupsddk/trunk/">https://svn.easysw.com/public/cupsddk/trunk/</A></TD>
-       <TD>Primary CUPS DDK development branch</TD>
-</TR>
-<TR>
-       <TD><A HREF="http://svn.easysw.com/public/cupsddk/branches/">https://svn.easysw.com/public/cupsddk/branches/</A></TD>
-       <TD>CUPS DDK maintenance branches (merge-only)</TD>
-</TR>
-<TR>
-       <TD><A HREF="http://svn.easysw.com/public/cupsddk/tags/">https://svn.easysw.com/public/cupsddk/tags/</A></TD>
-       <TD>CUPS DDK release tags (read-only)</TD>
-</TR>
-<TR>
-       <TD><A HREF="http://svn.easysw.com/public/espgs/trunk/">https://svn.easysw.com/public/espgs/trunk/</A></TD>
-       <TD>Primary ESP Ghostscript development branch</TD>
-</TR>
-<TR>
-       <TD><A HREF="http://svn.easysw.com/public/espgs/branches/">https://svn.easysw.com/public/espgs/branches/</A></TD>
-       <TD>ESP Ghostscript maintenance branches (merge-only)</TD>
-</TR>
-<TR>
-       <TD><A HREF="http://svn.easysw.com/public/espgs/tags/">https://svn.easysw.com/public/espgs/tags/</A></TD>
-       <TD>ESP Ghostscript release tags (read-only)</TD>
-</TR>
 <TR>
        <TD><A HREF="http://svn.easysw.com/public/windows/trunk/">https://svn.easysw.com/public/windows/trunk/</A></TD>
        <TD>Primary CUPS Windows Driver development branch</TD>
@@ -283,7 +259,7 @@ created for developer snapshots.</P>
 <H3>Files and Directories</H3>
 
 <P>File and directory names may not exceed 16 characters in
-length to ensure compability with older UNIX filesystems. In
+length to ensure compatibility with older UNIX filesystems. In
 addition, to avoid problems with case-insensitive filesystems, 
 you may not use names which differ only by case, for example
 "ReadMe" and "README" are not allowed in the same directory.</P>
index 63170e005c978b34a57a6d7d21cabbc7e0adbd4a..06093574b6df9fa8844e2c086bdb24e55fe63f05 100644 (file)
 <!--
   "$Id$"
 
-  CUPS command file format specification for the Common UNIX Printing
-  System (CUPS).
+  CUPS command file format specification for CUPS.
 
-  Copyright 2007-2009 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
index efdc7b041a92042ef71ca0fe549887582823861a..8866c8304dfc59e8f7f8f8ae729181eb2dd1d95f 100644 (file)
@@ -10,9 +10,9 @@
 <!--
   "$Id$"
 
-  CUPS IPP specification for the Common UNIX Printing System (CUPS).
+  CUPS IPP specification for CUPS.
 
-  Copyright 2007-2009 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2007 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
index b13a1894e2d85f23a0a55413038bb24bad5c2e41..af64b7a9e0930ccec45e1a9bbf35f52d8797cdba 100644 (file)
@@ -10,9 +10,9 @@
 <!--
   "$Id$"
 
-  CUPS PostScript file specification for the Common UNIX Printing System (CUPS).
+  CUPS PostScript file specification for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
@@ -36,7 +36,7 @@ Adobe TechNote and this document will ensure that your PostScript
 output will work reliably.</p>
 
 <blockquote><b>Note:</b> While PostScript is currently the
-defacto-standard print job file format/language for UNIX-based
+de-facto standard print job file format/language for UNIX-based
 applications, it is slowly being phased out in favor of Adobe's
 Portable Document Format ("PDF") which offers many advantages
 over PostScript. Mac OS X uses PDF as the primary print job file
index 872fb72b697ea6af6af832015341929dfb212fc5..c4c4bbef121c48e52ff9b98d9dd4cfd147f3fd40 100644 (file)
@@ -1701,7 +1701,7 @@ list of locale names ("en", "en_US", "fr_CA", etc.)</p>
 <p>Example:</p>
 
 <pre class='command'>
-<em>*% Specify Canadian, UK, and US English, and Candian and French French</em>
+<em>*% Specify Canadian, UK, and US English, and Canadian and French French</em>
 *cupsLanguages: "en_CA en_UK en_US fr_CA fr_FR"
 </pre>
 
index 61e61d5ec77ae3f48eeca2345b44c16af86b479e..50fca220ac5248e1503be1c105f24f522ccf81ee 100644 (file)
 
 <H3>CUPS_CSPACE_RGBW</H3>
 
-<P>This color space provides a dedicated black text channel and uses the sRGB color space definition and whitepoint for the RGB color channels. The white channel is 0 for text (or "true") black, otherwise it must contain the maximum color value: 1 for 1-bit, 3 for 2-bit, 15 for 4-bit, 255 for 8-bit, or 65535 for 16-bit.</P>
+<P>This color space provides a dedicated black text channel and uses the sRGB color space definition and white point for the RGB color channels. The white channel is 0 for text (or "true") black, otherwise it must contain the maximum color value: 1 for 1-bit, 3 for 2-bit, 15 for 4-bit, 255 for 8-bit, or 65535 for 16-bit.</P>
 
 <H3>CUPS_CSPACE_KCMYcm</H3>
 
 
 <H3>CUPS_CSPACE_CIELab and CUPS_CSPACE_ICCn</H3>
 
-<P>These color spaces map a CIE Lab color value with a D65 whitepoint to either a 8- or 16-bit per color chunked (<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded (<CODE>CUPS_ORDER_BANDED</CODE>) and planar (<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not supported.</P>
+<P>These color spaces map a CIE Lab color value with a D65 white point to either a 8- or 16-bit per color chunked (<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded (<CODE>CUPS_ORDER_BANDED</CODE>) and planar (<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not supported.</P>
 
 <P>The values are encoded and decoded using the following formulas:</P>
 
 
 <H3>CUPS_CSPACE_CIEXYZ</H3>
 
-<P>These color spaces map a CIE XYZ color value with a D65 whitepoint to either a 8- or 16-bit per color chunked (<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded (<CODE>CUPS_ORDER_BANDED</CODE>) and planar (<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not supported.</P>
+<P>These color spaces map a CIE XYZ color value with a D65 white point to either a 8- or 16-bit per color chunked (<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded (<CODE>CUPS_ORDER_BANDED</CODE>) and planar (<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not supported.</P>
 
 <P>The values are encoded and decoded using the following formulas:</P>
 
index fd04da6472979a9ec564e2544289a476680df77f..06c099b55f1b6461faeb507fde62ff4fd3064795 100644 (file)
@@ -17,7 +17,7 @@ to evaluate the stability and compliance of CUPS.</P>
 
 <P>The test software and data files are located in the
 <VAR>test</VAR> subdirectory of the source distribution. A script
-is provided to compile the <CODE>ipptest</CODE> program and run
+is provided to compile the <CODE>ipptool</CODE> program and run
 all of the tests that follow, producing a success/fail
 report.</P>
 
index 8fa6efe23959ce65a7d6aa0be6ade596c07b11f5..a4ada4a70eab5429253824d0bc430a134e40ddbe 100644 (file)
@@ -141,7 +141,7 @@ subdirectories for each locale, e.g. "fr" for French, "de" for
 German, "fr_ca" for French in Canada, and so forth.</P>
 
 <P>Template files are HTML files with special formatting
-characters in them that allow substition of variables and arrays.
+characters in them that allow substitution of variables and arrays.
 The CUPS CGI programs (<CODE>admin.cgi</CODE>,
 <CODE>classes.cgi</CODE>, <CODE>help.cgi</CODE>,
 <CODE>jobs.cgi</CODE>, and <CODE>printers.cgi</CODE>) use these
@@ -441,7 +441,7 @@ translated all of the templates, add the locale to the
 </TR>
 <TR>
        <TD>subscription-added.tmpl</TD>
-       <TD>This template shows "subscription xyz added".</TD>
+       <TD>This template shows "subscription ... added".</TD>
 </TR>
 <TR>
        <TD>subscription-canceled.tmpl</TD>
@@ -466,7 +466,7 @@ translated all of the templates, add the locale to the
 <H3><A NAME="VARIABLE">Inserting Attributes and Values</A></H3>
 
 <P>Template files consist of HTML with variable substitutions for
-named inside curley braces "{name}". Variable names are generally
+named inside curly braces "{name}". Variable names are generally
 the IPP attribute names with the hyphen ("-") replaced by the
 underscore ("_") character. For example, the
 <TT>job-printer-uri</TT> attribute is renamed to
@@ -518,7 +518,7 @@ in the <CODE>job_id</CODE> array:</P>
 &lt;/TABLE&gt;
 </PRE>
 
-<P>Arrays can be nested, however all elements within the curley
+<P>Arrays can be nested, however all elements within the curly
 braces ("{" and "}") are indexed using the innermost array.</P>
 
 <H3>Conditional Tests</H3>
index 880042b07f4b54e54d9413a5ec3dda8aa385008a..a309022eae2025de708c5f7227d5a6dfd83b5844 100644 (file)
@@ -1,9 +1,9 @@
 <!--
   "$Id$"
 
-  Raster API introduction for the Common UNIX Printing System (CUPS).
+  Raster API introduction for CUPS.
 
-  Copyright 2007-2008 by Apple Inc.
+  Copyright 2007-2011 by Apple Inc.
   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 
   These coded instructions, statements, and computer programs are the
index 981dc30884a80eae073659f25267aa98563ee6dd..8c25568d5aab581a94b75df9c1d49686a2bca737 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * "$Id: image-colorspace.c 7720 2008-07-11 22:46:21Z mike $"
  *
- *   Colorspace conversions for the Common UNIX Printing System (CUPS).
+ *   Colorspace conversions for CUPS.
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1993-2006 by Easy Software Products.
  *
  *   The color saturation/hue matrix stuff is provided thanks to Mr. Paul
@@ -1308,7 +1308,7 @@ rgb_to_lab(cups_ib_t *val)                /* IO - Color value */
   else
     ciel = 903.3 * ciey_yn;
 
-  ciel = ciel;
+/*ciel = ciel;*/
   ciea = 500 * (cielab(ciex, D65_X) - cielab(ciey, D65_Y));
   cieb = 200 * (cielab(ciey, D65_Y) - cielab(ciez, D65_Z));
 
index 3edc5847ef0ec5b996c542e4ce22319495182436..6649753b1baeded88e240022f74c9f9f4b2f1dcd 100644 (file)
@@ -29,6 +29,7 @@
 #include "image.h"
 #include <math.h>
 #include <cups/language-private.h>
+#include <signal.h>
 
 
 /*
@@ -106,6 +107,12 @@ main(int  argc,                            /* I - Number of command-line arguments */
 
   setbuf(stderr, NULL);
 
+ /*
+  * Ignore broken pipe signals...
+  */
+
+  signal(SIGPIPE, SIG_IGN);
+
  /*
   * Check command-line...
   */
index 45a2dbdae6c02bcec97d6cb34f56d62f2873463b..69e552deff31e192b0006a41341626ff88f1cc15 100644 (file)
@@ -40,6 +40,7 @@
 #include <unistd.h>
 #include <math.h>
 #include <cups/language-private.h>
+#include <signal.h>
 
 
 /*
@@ -198,6 +199,12 @@ main(int  argc,                            /* I - Number of command-line arguments */
 
   setbuf(stderr, NULL);
 
+ /*
+  * Ignore broken pipe signals...
+  */
+
+  signal(SIGPIPE, SIG_IGN);
+
  /*
   * Check command-line...
   */
index a1092a7a678abdf921a733a3a6795ea89571db11..391c8d1450485e77f92c3c8ecb35d8143a95e4ba 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   PDF to PostScript filter front-end for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -93,6 +93,12 @@ main(int  argc,                              /* I - Number of command-line args */
 
   setbuf(stderr, NULL);
 
+ /*
+  * Ignore broken pipe signals...
+  */
+
+  signal(SIGPIPE, SIG_IGN);
+
  /*
   * Make sure we have the right number of arguments for CUPS!
   */
@@ -270,7 +276,11 @@ main(int  argc,                            /* I - Number of command-line args */
   pdf_argv[2] = (char *)"-dNOPAUSE";
   pdf_argv[3] = (char *)"-dBATCH";
   pdf_argv[4] = (char *)"-dSAFER";
+#  ifdef HAVE_GHOSTSCRIPT_PS2WRITE
+  pdf_argv[5] = (char *)"-sDEVICE=ps2write";
+#  else
   pdf_argv[5] = (char *)"-sDEVICE=pswrite";
+#  endif /* HAVE_GHOSTSCRIPT_PS2WRITE */
   pdf_argv[6] = (char *)"-sOUTPUTFILE=%stdout";
   pdf_argc    = 7;
 #endif /* HAVE_PDFTOPS */
@@ -335,7 +345,8 @@ main(int  argc,                             /* I - Number of command-line args */
            strcasecmp(val, "false") != 0)
          orientation = 1;
       }
-      else if ((val = cupsGetOption("orientation-requested", num_options, options)) != NULL)
+      else if ((val = cupsGetOption("orientation-requested", num_options,
+                                    options)) != NULL)
       {
        /*
        * Map IPP orientation values to 0 to 3:
@@ -389,6 +400,17 @@ main(int  argc,                            /* I - Number of command-line args */
       pdf_argv[pdf_argc++] = pdf_height;
 #endif /* HAVE_PDFTOPS */
     }
+#if defined(HAVE_PDFTOPS) && defined(HAVE_PDFTOPS_WITH_ORIGPAGESIZES)
+    else
+    {
+     /*
+      *  Use the page sizes of the original PDF document, this way documents
+      *  which contain pages of different sizes can be printed correctly
+      */
+
+      pdf_argv[pdf_argc++] = (char *)"-origpagesizes";
+    }
+#endif /* HAVE_PDFTOPS && HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
   }
 
 #ifdef HAVE_PDFTOPS
index 12ed2714bf6a7cc9129c284fc305c60b8a9b0abe..7a05c8f6ff288ce7dacf62de01c4811fa8607ddd 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   PostScript filter for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1993-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -253,6 +253,12 @@ main(int  argc,                            /* I - Number of command-line args */
 
   setbuf(stderr, NULL);
 
+ /*
+  * Ignore broken pipe signals...
+  */
+
+  signal(SIGPIPE, SIG_IGN);
+
  /*
   * Check command-line...
   */
@@ -608,7 +614,7 @@ copy_comments(cups_file_t  *fp,             /* I - File to read from */
   saw_bounding_box = 0;
   saw_for          = 0;
   saw_pages        = 0;
-  saw_title        = 0;        
+  saw_title        = 0;
 
   while (line[0] == '%')
   {
@@ -640,7 +646,7 @@ copy_comments(cups_file_t  *fp,             /* I - File to read from */
     {
       int      pages;                  /* Number of pages */
 
-      if (saw_pages) 
+      if (saw_pages)
        fputs("DEBUG: A duplicate %%Pages: comment was seen.\n", stderr);
 
       saw_pages = 1;
@@ -687,7 +693,7 @@ copy_comments(cups_file_t  *fp,             /* I - File to read from */
     }
     else if (!strncmp(line, "%%BoundingBox:", 14))
     {
-      if (saw_bounding_box) 
+      if (saw_bounding_box)
        fputs("DEBUG: A duplicate %%BoundingBox: comment was seen.\n", stderr);
       else if (strstr(line + 14, "(atend)"))
       {
@@ -750,11 +756,11 @@ copy_comments(cups_file_t  *fp,           /* I - File to read from */
       break;
   }
 
-  if (!saw_bounding_box) 
+  if (!saw_bounding_box)
     fputs("DEBUG: There wasn't a %%BoundingBox: comment in the header.\n",
           stderr);
 
-  if (!saw_pages) 
+  if (!saw_pages)
     fputs("DEBUG: There wasn't a %%Pages: comment in the header.\n", stderr);
 
   if (!saw_for)
@@ -1784,7 +1790,7 @@ copy_prolog(cups_file_t  *fp,             /* I - File to read from */
 
     if (!strncmp(line, "%%EndProlog", 11))
       linelen = cupsFileGetLine(fp, line, linesize);
-    else 
+    else
       fputs("DEBUG: The %%EndProlog comment is missing.\n", stderr);
   }
 
@@ -1825,7 +1831,7 @@ copy_setup(cups_file_t  *fp,              /* I - File to read from */
   }
 
   doc_puts(doc, "%%BeginSetup\n");
-  
+
   do_setup(doc, ppd);
 
   num_options = 0;
@@ -1855,7 +1861,7 @@ copy_setup(cups_file_t  *fp,              /* I - File to read from */
 
     if (!strncmp(line, "%%EndSetup", 10))
       linelen = cupsFileGetLine(fp, line, linesize);
-    else 
+    else
       fputs("DEBUG: The %%EndSetup comment is missing.\n", stderr);
   }
 
index 7e54b0ec388b6803c2e3e55b293745d8b24d431f..436b3096b5ede2a84879685904453017dd7c41b2 100644 (file)
@@ -639,6 +639,7 @@ cupsRasterWriteHeader2(
     fh.cupsBytesPerLine = htonl(r->header.cupsBytesPerLine);
     fh.cupsColorOrder   = htonl(r->header.cupsColorOrder);
     fh.cupsColorSpace   = htonl(r->header.cupsColorSpace);
+    fh.cupsNumColors    = htonl(r->header.cupsNumColors);
 
     return (cups_raster_io(r, (unsigned char *)&fh, sizeof(fh)) == sizeof(fh));
   }
index a0cf1e895d534aea3f6801792c45de4f1bf097a5..a1809636b407cf77571c6abcf33fad3b4a20e399 100644 (file)
@@ -1262,7 +1262,7 @@ list of locale names ("en", "en_US", "fr_CA", etc.)</p>
 <p>Example:</p>
 
 <pre class='command'>
-<em>*% Specify Canadian, UK, and US English, and Candian and French French</em>
+<em>*% Specify Canadian, UK, and US English, and Canadian and French French</em>
 *cupsLanguages: "en_CA en_UK en_US fr_CA fr_FR"
 </pre>
 
index 80871068d37d33b565186237cd437905f2aa850b..3043dc1826c27288c99e8493e6267425456d5d20 100644 (file)
@@ -30,7 +30,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.5\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2011-04-22 10:53-0700\n"
+"POT-Creation-Date: 2011-05-10 22:32-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -250,7 +250,7 @@ msgstr ""
 msgid "                REF: Pages 52-54, section 5.2."
 msgstr ""
 
-#: berkeley/lpq.c:553
+#: berkeley/lpq.c:554
 #, c-format
 msgid "        %-39.39s %.0f bytes"
 msgstr ""
@@ -1024,7 +1024,7 @@ msgstr ""
 msgid "  -C                      Send requests using chunking (default)."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1357 scheduler/cupsfilter.c:1384
+#: scheduler/cupsfilter.c:1439 scheduler/cupsfilter.c:1466
 msgid "  -D                      Remove the input file when finished."
 msgstr ""
 
@@ -1064,7 +1064,7 @@ msgstr ""
 msgid "  -I {filename,filters,none,profiles}"
 msgstr ""
 
-#: scheduler/cupsfilter.c:1386
+#: scheduler/cupsfilter.c:1468
 msgid "  -J title                Set title."
 msgstr ""
 
@@ -1072,7 +1072,7 @@ msgstr ""
 msgid "  -L                      Send requests using content-length."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1359 scheduler/cupsfilter.c:1387
+#: scheduler/cupsfilter.c:1441 scheduler/cupsfilter.c:1469
 msgid "  -P filename.ppd         Set PPD file."
 msgstr ""
 
@@ -1092,7 +1092,7 @@ msgstr ""
 msgid "  -U samba-user           Authenticate using the named SAMBA user."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1360 scheduler/cupsfilter.c:1388
+#: scheduler/cupsfilter.c:1442 scheduler/cupsfilter.c:1470
 msgid "  -U username             Set username for job."
 msgstr ""
 
@@ -1116,7 +1116,7 @@ msgstr ""
 msgid "  -a                      Export all printers."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1389
+#: scheduler/cupsfilter.c:1471
 msgid "  -a 'name=value ...'     Set option(s)."
 msgstr ""
 
@@ -1128,11 +1128,11 @@ msgstr ""
 msgid "  -c config-file          Load alternate configuration file."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1390
+#: scheduler/cupsfilter.c:1472
 msgid "  -c copies               Set number of copies."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1361
+#: scheduler/cupsfilter.c:1443
 msgid "  -c cupsd.conf           Set cupsd.conf file to use."
 msgstr ""
 
@@ -1144,11 +1144,11 @@ msgstr ""
 msgid "  -d output-dir           Specify the output directory."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1363 scheduler/cupsfilter.c:1391
+#: scheduler/cupsfilter.c:1445 scheduler/cupsfilter.c:1473
 msgid "  -d printer              Use the named printer."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1365 scheduler/cupsfilter.c:1393
+#: scheduler/cupsfilter.c:1447 scheduler/cupsfilter.c:1475
 msgid "  -e                      Use every filter from the PPD file."
 msgstr ""
 
@@ -1160,7 +1160,7 @@ msgstr ""
 msgid "  -f filename             Set default request filename."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1395
+#: scheduler/cupsfilter.c:1477
 msgid "  -f filename             Set file to be converted (otherwise stdin)."
 msgstr ""
 
@@ -1176,7 +1176,7 @@ msgstr ""
 msgid "  -h server[:port]        Specify server address."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1367 scheduler/cupsfilter.c:1397
+#: scheduler/cupsfilter.c:1449 scheduler/cupsfilter.c:1479
 msgid "  -i mime/type            Set input MIME type (otherwise auto-typed)."
 msgstr ""
 
@@ -1184,11 +1184,11 @@ msgstr ""
 msgid "  -i seconds              Repeat the last file with the given time interval."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1369
+#: scheduler/cupsfilter.c:1451
 msgid "  -j job-id[,N]           Filter file N from the specified job (default is file 1)."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1399
+#: scheduler/cupsfilter.c:1481
 msgid "  -j mime/type            Set output MIME type (otherwise application/pdf)."
 msgstr ""
 
@@ -1204,11 +1204,11 @@ msgstr ""
 msgid "  -m                      Use the ModelName value as the filename."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1371
+#: scheduler/cupsfilter.c:1453
 msgid "  -m mime/type            Set output MIME type (otherwise application/pdf)."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1373
+#: scheduler/cupsfilter.c:1455
 msgid "  -n copies               Set number of copies."
 msgstr ""
 
@@ -1216,7 +1216,7 @@ msgstr ""
 msgid "  -n count                Repeat the last file the given number of times."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1401
+#: scheduler/cupsfilter.c:1483
 msgid "  -o filename             Set file to be generated (otherwise stdout)."
 msgstr ""
 
@@ -1228,11 +1228,11 @@ msgstr ""
 msgid "  -o filename.ppd[.gz]    Set output file (otherwise stdout)."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1374
+#: scheduler/cupsfilter.c:1456
 msgid "  -o name=value           Set option(s)."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1375
+#: scheduler/cupsfilter.c:1457
 msgid "  -p filename.ppd         Set PPD file."
 msgstr ""
 
@@ -1260,11 +1260,11 @@ msgstr ""
 msgid "  -t                      Test the configuration file."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1376
+#: scheduler/cupsfilter.c:1458
 msgid "  -t title                Set title."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1377 scheduler/cupsfilter.c:1403
+#: scheduler/cupsfilter.c:1459 scheduler/cupsfilter.c:1485
 msgid "  -u                      Remove the PPD file when finished."
 msgstr ""
 
@@ -1350,12 +1350,12 @@ msgstr ""
 msgid " PASS"
 msgstr ""
 
-#: berkeley/lpq.c:559
+#: berkeley/lpq.c:560
 #, c-format
 msgid "%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes"
 msgstr ""
 
-#: berkeley/lpq.c:564
+#: berkeley/lpq.c:565
 #, c-format
 msgid "%-7s %-7.7s %-7d %-31.31s %.0f bytes"
 msgstr ""
@@ -1395,17 +1395,17 @@ msgstr ""
 msgid "%s is not implemented by the CUPS version of lpc."
 msgstr ""
 
-#: berkeley/lpq.c:650
+#: berkeley/lpq.c:651
 #, c-format
 msgid "%s is not ready"
 msgstr ""
 
-#: berkeley/lpq.c:643
+#: berkeley/lpq.c:644
 #, c-format
 msgid "%s is ready"
 msgstr ""
 
-#: berkeley/lpq.c:646
+#: berkeley/lpq.c:647
 #, c-format
 msgid "%s is ready and printing"
 msgstr ""
@@ -1437,13 +1437,16 @@ msgstr ""
 msgid "%s/%s not accepting requests since %s -"
 msgstr ""
 
-#: berkeley/lpq.c:551
+#: berkeley/lpq.c:552
 #, c-format
 msgid "%s: %-33.33s [job %d localhost]"
 msgstr ""
 
 #. TRANSLATORS: Message is "subject: error"
-#: cups/langprintf.c:86
+#: cups/langprintf.c:86 scheduler/cupsfilter.c:720 systemv/lpadmin.c:805
+#: systemv/lpadmin.c:856 systemv/lpadmin.c:906 systemv/lpadmin.c:962
+#: systemv/lpadmin.c:1060 systemv/lpadmin.c:1113 systemv/lpadmin.c:1170
+#: systemv/lpadmin.c:1481
 #, c-format
 msgid "%s: %s"
 msgstr ""
@@ -1571,7 +1574,7 @@ msgstr ""
 
 #: berkeley/lpq.c:111 berkeley/lpr.c:84 berkeley/lprm.c:104
 #: systemv/cancel.c:94 systemv/cupsaccept.c:101 systemv/lp.c:116
-#: systemv/lpadmin.c:387 systemv/lpstat.c:137
+#: systemv/lpadmin.c:438 systemv/lpstat.c:137
 #, c-format
 msgid "%s: Error - expected username after \"-U\" option."
 msgstr ""
@@ -1647,17 +1650,12 @@ msgstr ""
 msgid "%s: Expected job ID after \"-i\" option."
 msgstr ""
 
-#: scheduler/cupsfilter.c:562
-#, c-format
-msgid "%s: Filter \"%s\" not available: %s"
-msgstr ""
-
 #: systemv/lpstat.c:504 systemv/lpstat.c:543
 #, c-format
 msgid "%s: Invalid destination name in list \"%s\"."
 msgstr ""
 
-#: scheduler/cupsfilter.c:543
+#: scheduler/cupsfilter.c:575
 #, c-format
 msgid "%s: Invalid filter string \"%s\"."
 msgstr ""
@@ -1667,7 +1665,7 @@ msgstr ""
 msgid "%s: Need job ID (\"-i jobid\") before \"-H restart\"."
 msgstr ""
 
-#: scheduler/cupsfilter.c:457
+#: scheduler/cupsfilter.c:466
 #, c-format
 msgid "%s: No filter to convert from %s/%s to %s/%s."
 msgstr ""
@@ -1679,13 +1677,13 @@ msgstr ""
 
 #: berkeley/lpq.c:97 berkeley/lpr.c:70 berkeley/lprm.c:67 systemv/cancel.c:81
 #: systemv/cupsaccept.c:88 systemv/cupsaddsmb.c:86 systemv/lp.c:102
-#: systemv/lpadmin.c:233 systemv/lpinfo.c:88 systemv/lpmove.c:73
+#: systemv/lpadmin.c:239 systemv/lpinfo.c:88 systemv/lpmove.c:73
 #: systemv/lpstat.c:102 test/ipptool.c:278 test/ipptool.c:295
 #, c-format
 msgid "%s: Sorry, no encryption support."
 msgstr ""
 
-#: berkeley/lpq.c:295 scheduler/cupsfilter.c:1145 systemv/cancel.c:237
+#: berkeley/lpq.c:295 scheduler/cupsfilter.c:1227 systemv/cancel.c:237
 #: systemv/cupsaddsmb.c:144 systemv/cupsaddsmb.c:171
 #, c-format
 msgid "%s: Unable to connect to server."
@@ -1696,7 +1694,7 @@ msgstr ""
 msgid "%s: Unable to contact server."
 msgstr ""
 
-#: scheduler/cupsfilter.c:423
+#: scheduler/cupsfilter.c:432
 #, c-format
 msgid "%s: Unable to determine MIME type of \"%s\"."
 msgstr ""
@@ -1706,12 +1704,12 @@ msgstr ""
 msgid "%s: Unable to open %s: %s"
 msgstr ""
 
-#: scheduler/cupsfilter.c:607 ppdc/ppdmerge.cxx:112
+#: scheduler/cupsfilter.c:670 ppdc/ppdmerge.cxx:112
 #, c-format
 msgid "%s: Unable to open PPD file: %s on line %d."
 msgstr ""
 
-#: scheduler/cupsfilter.c:388
+#: scheduler/cupsfilter.c:397
 #, c-format
 msgid "%s: Unable to read MIME database from \"%s\" or \"%s\"."
 msgstr ""
@@ -1721,17 +1719,17 @@ msgstr ""
 msgid "%s: Unknown destination \"%s\"."
 msgstr ""
 
-#: scheduler/cupsfilter.c:434
+#: scheduler/cupsfilter.c:443
 #, c-format
 msgid "%s: Unknown destination MIME type %s/%s."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1351
+#: scheduler/cupsfilter.c:1433
 #, c-format
 msgid "%s: Unknown option \"%c\"."
 msgstr ""
 
-#: scheduler/cupsfilter.c:415
+#: scheduler/cupsfilter.c:424
 #, c-format
 msgid "%s: Unknown source MIME type %s/%s."
 msgstr ""
@@ -2707,7 +2705,7 @@ msgstr ""
 msgid "Accept Jobs"
 msgstr ""
 
-#: cups/http-support.c:1253
+#: cups/http-support.c:1254
 msgid "Accepted"
 msgstr ""
 
@@ -2740,7 +2738,7 @@ msgstr ""
 msgid "Always"
 msgstr ""
 
-#: backend/socket.c:127
+#: backend/socket.c:129
 msgid "AppSocket/HP JetDirect"
 msgstr ""
 
@@ -2835,7 +2833,7 @@ msgstr ""
 msgid "Bad PPD cache file."
 msgstr ""
 
-#: cups/http-support.c:1268
+#: cups/http-support.c:1269
 msgid "Bad Request"
 msgstr ""
 
@@ -2876,7 +2874,7 @@ msgstr ""
 msgid "Bad custom parameter"
 msgstr ""
 
-#: cups/http-support.c:1420 scheduler/ipp.c:2550
+#: cups/http-support.c:1421 scheduler/ipp.c:2550
 #, c-format
 msgid "Bad device-uri \"%s\"."
 msgstr ""
@@ -3031,7 +3029,7 @@ msgstr ""
 msgid "Boolean expected for waiteof option \"%s\"."
 msgstr ""
 
-#: filter/pstops.c:2107
+#: filter/pstops.c:2113
 msgid "Buffer overflow detected, aborting."
 msgstr ""
 
@@ -3047,7 +3045,7 @@ msgstr ""
 msgid "Cancel RSS Subscription"
 msgstr ""
 
-#: backend/ipp.c:1653
+#: backend/ipp.c:1793
 msgid "Canceling print job."
 msgstr ""
 
@@ -3100,15 +3098,15 @@ msgstr ""
 msgid "Community name uses indefinite length"
 msgstr ""
 
-#: backend/ipp.c:683 backend/lpd.c:858 backend/socket.c:389
+#: backend/ipp.c:762 backend/lpd.c:868 backend/socket.c:395
 msgid "Connected to printer."
 msgstr ""
 
-#: backend/ipp.c:590 backend/lpd.c:698 backend/socket.c:308
+#: backend/ipp.c:669 backend/lpd.c:708 backend/socket.c:314
 msgid "Connecting to printer."
 msgstr ""
 
-#: cups/http-support.c:1241
+#: cups/http-support.c:1242
 msgid "Continue"
 msgstr ""
 
@@ -3116,15 +3114,15 @@ msgstr ""
 msgid "Continuous"
 msgstr ""
 
-#: backend/lpd.c:1009 backend/lpd.c:1151
+#: backend/lpd.c:1019 backend/lpd.c:1161
 msgid "Control file sent successfully."
 msgstr ""
 
-#: backend/ipp.c:1070 backend/lpd.c:455
+#: backend/ipp.c:1186 backend/lpd.c:462
 msgid "Copying print data."
 msgstr ""
 
-#: cups/http-support.c:1250
+#: cups/http-support.c:1251
 msgid "Created"
 msgstr ""
 
@@ -3132,7 +3130,7 @@ msgstr ""
 msgid "Created On: "
 msgstr ""
 
-#: cups/ppd.c:1080 cups/ppd.c:1120 cups/ppd.c:1365 cups/ppd.c:1468
+#: cups/ppd.c:1073 cups/ppd.c:1113 cups/ppd.c:1358 cups/ppd.c:1461
 msgid "Custom"
 msgstr ""
 
@@ -3160,7 +3158,7 @@ msgstr ""
 msgid "Darkness"
 msgstr ""
 
-#: backend/lpd.c:1099
+#: backend/lpd.c:1109
 msgid "Data file sent successfully."
 msgstr ""
 
@@ -3263,7 +3261,8 @@ msgstr ""
 msgid "Empty PPD file."
 msgstr ""
 
-#: cgi-bin/admin.c:3676
+#. TRANSLATORS: Banner/cover sheet after the print job.
+#: cgi-bin/admin.c:3680
 msgid "Ending Banner"
 msgstr ""
 
@@ -3503,7 +3502,7 @@ msgstr ""
 msgid "Epson"
 msgstr ""
 
-#: cgi-bin/admin.c:3719
+#: cgi-bin/admin.c:3723
 msgid "Error Policy"
 msgstr ""
 
@@ -3560,7 +3559,7 @@ msgstr ""
 msgid "Executive"
 msgstr ""
 
-#: cups/http-support.c:1296
+#: cups/http-support.c:1297
 msgid "Expectation Failed"
 msgstr ""
 
@@ -3634,16 +3633,16 @@ msgstr ""
 msgid "Folio"
 msgstr ""
 
-#: cups/http-support.c:1275
+#: cups/http-support.c:1276
 msgid "Forbidden"
 msgstr ""
 
-#: filter/imagetoraster.c:1180
+#: filter/imagetoraster.c:1187
 #, c-format
 msgid "Formatting page %d."
 msgstr ""
 
-#: cups/ppd.c:708 cups/ppd.c:1269
+#: cups/ppd.c:701 cups/ppd.c:1262
 msgid "General"
 msgstr ""
 
@@ -3722,7 +3721,7 @@ msgstr ""
 msgid "Intellitech"
 msgstr ""
 
-#: cups/http-support.c:1302
+#: cups/http-support.c:1303
 msgid "Internal Server Error"
 msgstr ""
 
@@ -3746,11 +3745,11 @@ msgstr ""
 msgid "Internet Postage 3-Part - 2 1/4 x 7\""
 msgstr ""
 
-#: backend/ipp.c:262
+#: backend/ipp.c:293
 msgid "Internet Printing Protocol"
 msgstr ""
 
-#: cups/ppd.c:1387
+#: cups/ppd.c:1380
 msgid "JCL"
 msgstr ""
 
@@ -3904,7 +3903,7 @@ msgstr ""
 msgid "Jobs"
 msgstr ""
 
-#: backend/lpd.c:183
+#: backend/lpd.c:185
 msgid "LPD/LPR Host or Printer"
 msgstr ""
 
@@ -3953,7 +3952,7 @@ msgstr ""
 msgid "List Available Printers"
 msgstr ""
 
-#: filter/imagetoraster.c:660
+#: filter/imagetoraster.c:667
 msgid "Loading print file."
 msgstr ""
 
@@ -3965,7 +3964,7 @@ msgstr ""
 msgid "Long-Edge (Portrait)"
 msgstr ""
 
-#: cups/http-support.c:1517
+#: cups/http-support.c:1518
 msgid "Looking for printer."
 msgstr ""
 
@@ -3989,11 +3988,11 @@ msgstr ""
 msgid "Media Name: "
 msgstr ""
 
-#: cups/ppd.c:755 cups/ppd.c:1324
+#: cups/ppd.c:748 cups/ppd.c:1317
 msgid "Media Size"
 msgstr ""
 
-#: cups/ppd.c:759 cups/ppd.c:1328 ppdc/sample.c:268
+#: cups/ppd.c:752 cups/ppd.c:1321 ppdc/sample.c:268
 msgid "Media Source"
 msgstr ""
 
@@ -4001,7 +4000,7 @@ msgstr ""
 msgid "Media Tracking"
 msgstr ""
 
-#: cups/ppd.c:757 cups/ppd.c:1326 ppdc/sample.c:291
+#: cups/ppd.c:750 cups/ppd.c:1319 ppdc/sample.c:291
 msgid "Media Type"
 msgstr ""
 
@@ -4036,7 +4035,7 @@ msgstr ""
 
 #: cgi-bin/admin.c:737 cgi-bin/admin.c:2180 cgi-bin/admin.c:2265
 #: cgi-bin/admin.c:2904 cgi-bin/admin.c:3158 cgi-bin/admin.c:3269
-#: cgi-bin/admin.c:3975
+#: cgi-bin/admin.c:3979
 msgid "Missing form variable"
 msgstr ""
 
@@ -4111,7 +4110,7 @@ msgstr ""
 msgid "Move Job"
 msgstr ""
 
-#: cups/http-support.c:1259
+#: cups/http-support.c:1260
 msgid "Moved Permanently"
 msgstr ""
 
@@ -4139,11 +4138,11 @@ msgstr ""
 msgid "New Stylus Photo Series"
 msgstr ""
 
-#: cups/ppd.c:1916
+#: cups/ppd.c:1909
 msgid "No"
 msgstr ""
 
-#: cups/http-support.c:1256
+#: cups/http-support.c:1257
 msgid "No Content"
 msgstr ""
 
@@ -4226,11 +4225,11 @@ msgstr ""
 msgid "No printer name"
 msgstr ""
 
-#: cups/util.c:1788
+#: cups/util.c:1789
 msgid "No printer-uri found"
 msgstr ""
 
-#: cups/util.c:1773
+#: cups/util.c:1774
 msgid "No printer-uri found for class"
 msgstr ""
 
@@ -4270,11 +4269,11 @@ msgstr ""
 msgid "Normal"
 msgstr ""
 
-#: cups/http-support.c:1278
+#: cups/http-support.c:1279
 msgid "Not Found"
 msgstr ""
 
-#: cups/http-support.c:1290
+#: cups/http-support.c:1291
 msgid "Not Implemented"
 msgstr ""
 
@@ -4282,11 +4281,11 @@ msgstr ""
 msgid "Not Installed"
 msgstr ""
 
-#: cups/http-support.c:1265
+#: cups/http-support.c:1266
 msgid "Not Modified"
 msgstr ""
 
-#: cups/http-support.c:1293
+#: cups/http-support.c:1294
 msgid "Not Supported"
 msgstr ""
 
@@ -4302,7 +4301,7 @@ msgstr ""
 msgid "Note: this program only validates the DSC comments, not the PostScript itself."
 msgstr ""
 
-#: cups/http-support.c:1247 cups/ppd.c:338
+#: cups/http-support.c:1248 cups/ppd.c:338
 msgid "OK"
 msgstr ""
 
@@ -4331,11 +4330,11 @@ msgstr ""
 msgid "OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first"
 msgstr ""
 
-#: cgi-bin/admin.c:3746
+#: cgi-bin/admin.c:3750
 msgid "Operation Policy"
 msgstr ""
 
-#: filter/pstops.c:2255
+#: filter/pstops.c:2261
 #, c-format
 msgid "Option \"%s\" cannot be included via %%%%IncludeFeature."
 msgstr ""
@@ -4344,7 +4343,7 @@ msgstr ""
 msgid "Options Installed"
 msgstr ""
 
-#: scheduler/cupsfilter.c:1356 scheduler/cupsfilter.c:1383
+#: scheduler/cupsfilter.c:1438 scheduler/cupsfilter.c:1465
 #: scheduler/main.c:2187 systemv/cupsaddsmb.c:284 systemv/cupsctl.c:209
 #: systemv/cupstestdsc.c:429 systemv/cupstestppd.c:3616 test/ipptool.c:3827
 #: ppdc/ppdc.cxx:437 ppdc/ppdhtml.cxx:174 ppdc/ppdi.cxx:130
@@ -4364,7 +4363,7 @@ msgstr ""
 msgid "Out of memory."
 msgstr ""
 
-#: cups/ppd.c:761 cups/ppd.c:1330
+#: cups/ppd.c:754 cups/ppd.c:1323
 msgid "Output Mode"
 msgstr ""
 
@@ -4436,7 +4435,7 @@ msgstr ""
 msgid "ParamCustominTearInterval"
 msgstr ""
 
-#: cups/auth.c:156
+#: cups/auth.c:194 cups/auth.c:360
 #, c-format
 msgid "Password for %s on %s? "
 msgstr ""
@@ -4470,11 +4469,11 @@ msgstr ""
 msgid "Plain Paper"
 msgstr ""
 
-#: cgi-bin/admin.c:3418 cgi-bin/admin.c:3695
+#: cgi-bin/admin.c:3418 cgi-bin/admin.c:3699
 msgid "Policies"
 msgstr ""
 
-#: cgi-bin/admin.c:3425 cgi-bin/admin.c:3764 cgi-bin/admin.c:3777
+#: cgi-bin/admin.c:3425 cgi-bin/admin.c:3768 cgi-bin/admin.c:3781
 msgid "Port Monitor"
 msgstr ""
 
@@ -4534,20 +4533,20 @@ msgstr ""
 msgid "Print and Tear"
 msgstr ""
 
-#: backend/ipp.c:1320
+#: backend/ipp.c:1459
 #, c-format
 msgid "Print file accepted - job ID %d."
 msgstr ""
 
-#: backend/ipp.c:1313
+#: backend/ipp.c:1450
 msgid "Print file accepted - job ID unknown."
 msgstr ""
 
-#: backend/parallel.c:286 backend/socket.c:415 backend/usb-unix.c:195
+#: backend/parallel.c:286 backend/socket.c:424 backend/usb-unix.c:195
 msgid "Print file sent."
 msgstr ""
 
-#: backend/ipp.c:1277
+#: backend/ipp.c:1414
 msgid "Print file was not accepted."
 msgstr ""
 
@@ -4599,12 +4598,12 @@ msgstr ""
 msgid "Printer busy; will retry in 30 seconds."
 msgstr ""
 
-#: backend/lpd.c:607 backend/lpd.c:995 backend/lpd.c:1082 backend/lpd.c:1137
+#: backend/lpd.c:617 backend/lpd.c:1005 backend/lpd.c:1092 backend/lpd.c:1147
 #, c-format
 msgid "Printer did not respond after %d seconds."
 msgstr ""
 
-#: backend/ipp.c:791 backend/ipp.c:798
+#: backend/ipp.c:867 backend/ipp.c:874
 #, c-format
 msgid "Printer does not support IPP/%d.%d, trying IPP/%s."
 msgstr ""
@@ -4652,7 +4651,7 @@ msgstr ""
 msgid "Printing page %d, %d%% complete."
 msgstr ""
 
-#: filter/imagetops.c:810
+#: filter/imagetops.c:817
 #, c-format
 msgid "Printing page %d."
 msgstr ""
@@ -4669,15 +4668,16 @@ msgstr ""
 msgid "Quota limit reached."
 msgstr ""
 
-#: berkeley/lpq.c:514
+#: berkeley/lpq.c:515
 msgid "Rank    Owner   Job     File(s)                         Total Size"
 msgstr ""
 
-#: berkeley/lpq.c:510
+#. TRANSLATORS: Pri is job priority.
+#: berkeley/lpq.c:511
 msgid "Rank   Owner      Pri  Job        Files                       Total Size"
 msgstr ""
 
-#: backend/ipp.c:1632 backend/socket.c:466 driver/rastertoescpx.c:1923
+#: backend/ipp.c:1772 backend/socket.c:475 driver/rastertoescpx.c:1923
 #: driver/rastertopclx.c:1948 filter/rastertoepson.c:1152
 #: filter/rastertohp.c:881 filter/rastertolabel.c:1307
 msgid "Ready to print."
@@ -4687,12 +4687,12 @@ msgstr ""
 msgid "Reject Jobs"
 msgstr ""
 
-#: backend/lpd.c:1005 backend/lpd.c:1147
+#: backend/lpd.c:1015 backend/lpd.c:1157
 #, c-format
 msgid "Remote host did not accept control file (%d)."
 msgstr ""
 
-#: backend/lpd.c:1095
+#: backend/lpd.c:1105
 #, c-format
 msgid "Remote host did not accept data file (%d)."
 msgstr ""
@@ -4701,11 +4701,11 @@ msgstr ""
 msgid "Reprint After Error"
 msgstr ""
 
-#: cups/http-support.c:1281
+#: cups/http-support.c:1282
 msgid "Request Entity Too Large"
 msgstr ""
 
-#: cups/ppd.c:763 cups/ppd.c:1332 ppdc/sample.c:237
+#: cups/ppd.c:756 cups/ppd.c:1325 ppdc/sample.c:237
 msgid "Resolution"
 msgstr ""
 
@@ -4738,11 +4738,11 @@ msgstr ""
 msgid "SEQUENCE uses indefinite length"
 msgstr ""
 
-#: cups/http-support.c:1305
+#: cups/http-support.c:1306
 msgid "SSL/TLS Negotiation Error"
 msgstr ""
 
-#: cups/http-support.c:1262
+#: cups/http-support.c:1263
 msgid "See Other"
 msgstr ""
 
@@ -4772,7 +4772,7 @@ msgstr ""
 msgid "Server Stopped"
 msgstr ""
 
-#: cups/http-support.c:1299
+#: cups/http-support.c:1300
 msgid "Service Unavailable"
 msgstr ""
 
@@ -4789,11 +4789,11 @@ msgstr ""
 msgid "Set Class Options"
 msgstr ""
 
-#: cgi-bin/admin.c:3254 cgi-bin/admin.c:3428 cgi-bin/admin.c:3806
+#: cgi-bin/admin.c:3254 cgi-bin/admin.c:3428 cgi-bin/admin.c:3810
 msgid "Set Printer Options"
 msgstr ""
 
-#: cgi-bin/admin.c:3976 cgi-bin/admin.c:4020 cgi-bin/admin.c:4038
+#: cgi-bin/admin.c:3980 cgi-bin/admin.c:4024 cgi-bin/admin.c:4042
 msgid "Set Publishing"
 msgstr ""
 
@@ -4813,7 +4813,7 @@ msgstr ""
 msgid "Special Paper"
 msgstr ""
 
-#: backend/lpd.c:1046
+#: backend/lpd.c:1056
 #, c-format
 msgid "Spooling job, %.0f%% complete."
 msgstr ""
@@ -4822,7 +4822,8 @@ msgstr ""
 msgid "Standard"
 msgstr ""
 
-#: cgi-bin/admin.c:3669
+#. TRANSLATORS: Banner/cover sheet before the print job.
+#: cgi-bin/admin.c:3671
 msgid "Starting Banner"
 msgstr ""
 
@@ -4863,7 +4864,7 @@ msgstr ""
 msgid "Super B/A3"
 msgstr ""
 
-#: cups/http-support.c:1244
+#: cups/http-support.c:1245
 msgid "Switching Protocols"
 msgstr ""
 
@@ -4962,7 +4963,7 @@ msgstr ""
 msgid "The output bin is missing."
 msgstr ""
 
-#: filter/imagetoraster.c:459
+#: filter/imagetoraster.c:466
 msgid "The page setup information was not valid."
 msgstr ""
 
@@ -4982,11 +4983,11 @@ msgstr ""
 msgid "The paper tray needs to be filled."
 msgstr ""
 
-#: filter/imagetops.c:315 filter/imagetoraster.c:675
+#: filter/imagetops.c:322 filter/imagetoraster.c:682
 msgid "The print file could not be opened."
 msgstr ""
 
-#: backend/ipp.c:808
+#: backend/ipp.c:884
 msgid "The printer URI is incorrect or no longer exists."
 msgstr ""
 
@@ -4994,8 +4995,8 @@ msgstr ""
 msgid "The printer is almost out of ink."
 msgstr ""
 
-#: backend/ipp.c:656 backend/ipp.c:773 backend/ipp.c:851 backend/ipp.c:1129
-#: backend/ipp.c:1257 backend/lpd.c:832 backend/socket.c:368
+#: backend/ipp.c:735 backend/ipp.c:849 backend/ipp.c:950 backend/ipp.c:1245
+#: backend/ipp.c:1394 backend/lpd.c:842 backend/socket.c:374
 msgid "The printer is busy."
 msgstr ""
 
@@ -5007,8 +5008,8 @@ msgstr ""
 msgid "The printer is not connected."
 msgstr ""
 
-#: backend/ipp.c:634 backend/ipp.c:667 backend/ipp.c:769 backend/lpd.c:811
-#: backend/lpd.c:852 backend/socket.c:347 backend/socket.c:380
+#: backend/ipp.c:713 backend/ipp.c:746 backend/ipp.c:845 backend/lpd.c:821
+#: backend/lpd.c:862 backend/socket.c:353 backend/socket.c:386
 msgid "The printer is not responding."
 msgstr ""
 
@@ -5020,11 +5021,11 @@ msgstr ""
 msgid "The printer is out of toner."
 msgstr ""
 
-#: backend/ipp.c:649 backend/lpd.c:825 backend/socket.c:361
+#: backend/ipp.c:728 backend/lpd.c:835 backend/socket.c:367
 msgid "The printer is unreachable at this time."
 msgstr ""
 
-#: backend/ipp.c:643 backend/lpd.c:819 backend/socket.c:355
+#: backend/ipp.c:722 backend/lpd.c:829 backend/socket.c:361
 msgid "The printer may not exist or is unavailable at this time."
 msgstr ""
 
@@ -5114,14 +5115,6 @@ msgstr ""
 msgid "Thermal Transfer Media"
 msgstr ""
 
-#: backend/ipp.c:925 backend/ipp.c:934 backend/ipp.c:1157
-msgid "This printer does not conform to the IPP standard and may not work."
-msgstr ""
-
-#: backend/ipp.c:747 backend/ipp.c:866
-msgid "This printer does not conform to the IPP standard. Please contact the manufacturer of your printer for assistance."
-msgstr ""
-
 #: filter/bannertops.c:640
 msgid "Title: "
 msgstr ""
@@ -5164,7 +5157,7 @@ msgstr ""
 msgid "Tray 4"
 msgstr ""
 
-#: cups/http-support.c:1284
+#: cups/http-support.c:1285
 msgid "URI Too Long"
 msgstr ""
 
@@ -5217,7 +5210,7 @@ msgstr ""
 msgid "Unable to add class:"
 msgstr ""
 
-#: backend/ipp.c:1395
+#: backend/ipp.c:1534
 msgid "Unable to add document to print job."
 msgstr ""
 
@@ -5234,11 +5227,11 @@ msgstr ""
 msgid "Unable to allocate memory for file types."
 msgstr ""
 
-#: filter/pstops.c:450
+#: filter/pstops.c:456
 msgid "Unable to allocate memory for page info"
 msgstr ""
 
-#: filter/pstops.c:444
+#: filter/pstops.c:450
 msgid "Unable to allocate memory for pages array"
 msgstr ""
 
@@ -5246,11 +5239,11 @@ msgstr ""
 msgid "Unable to cancel RSS subscription:"
 msgstr ""
 
-#: backend/ipp.c:1674
+#: backend/ipp.c:1814
 msgid "Unable to cancel print job."
 msgstr ""
 
-#: cgi-bin/admin.c:4021
+#: cgi-bin/admin.c:4025
 msgid "Unable to change printer-is-shared attribute:"
 msgstr ""
 
@@ -5270,8 +5263,8 @@ msgstr ""
 msgid "Unable to connect to server"
 msgstr ""
 
-#: backend/ipp.c:612 backend/ipp.c:974 backend/lpd.c:791
-#: backend/parallel.c:219 backend/serial.c:241 backend/socket.c:327
+#: backend/ipp.c:691 backend/ipp.c:1090 backend/lpd.c:801
+#: backend/parallel.c:219 backend/serial.c:241 backend/socket.c:333
 #: backend/usb-unix.c:117
 msgid "Unable to contact printer, queuing on next printer in class."
 msgstr ""
@@ -5315,15 +5308,15 @@ msgstr ""
 msgid "Unable to copy interface script - %s"
 msgstr ""
 
-#: filter/imagetops.c:134 filter/imagetoraster.c:294
+#: filter/imagetops.c:141 filter/imagetoraster.c:301
 msgid "Unable to copy print file"
 msgstr ""
 
-#: backend/ipp.c:1764
+#: backend/ipp.c:1904
 msgid "Unable to create compressed print file"
 msgstr ""
 
-#: filter/imagetoraster.c:235
+#: filter/imagetoraster.c:242
 msgid "Unable to create pipes for filters"
 msgstr ""
 
@@ -5331,7 +5324,7 @@ msgstr ""
 msgid "Unable to create printer-uri"
 msgstr ""
 
-#: scheduler/cupsfilter.c:1160
+#: scheduler/cupsfilter.c:1242
 msgid "Unable to create temporary file"
 msgstr ""
 
@@ -5355,35 +5348,35 @@ msgstr ""
 msgid "Unable to edit cupsd.conf files larger than 1MB"
 msgstr ""
 
-#: cups/http.c:4086
+#: cups/http.c:4033
 msgid "Unable to establish a secure connection to host (certificate chain invalid)."
 msgstr ""
 
-#: cups/http.c:4076
+#: cups/http.c:4023
 msgid "Unable to establish a secure connection to host (certificate not yet valid)."
 msgstr ""
 
-#: cups/http.c:4071
+#: cups/http.c:4018
 msgid "Unable to establish a secure connection to host (expired certificate)."
 msgstr ""
 
-#: cups/http.c:4081
+#: cups/http.c:4028
 msgid "Unable to establish a secure connection to host (host name mismatch)."
 msgstr ""
 
-#: cups/http.c:4091
+#: cups/http.c:4038
 msgid "Unable to establish a secure connection to host (peer dropped connection before responding)."
 msgstr ""
 
-#: cups/http.c:4066
+#: cups/http.c:4013
 msgid "Unable to establish a secure connection to host (self-signed certificate)."
 msgstr ""
 
-#: cups/http.c:4061
+#: cups/http.c:4008
 msgid "Unable to establish a secure connection to host (untrusted certificate)."
 msgstr ""
 
-#: cups/http.c:4118
+#: cups/http.c:4065
 msgid "Unable to establish a secure connection to host."
 msgstr ""
 
@@ -5391,18 +5384,22 @@ msgstr ""
 msgid "Unable to find destination for job"
 msgstr ""
 
-#: cups/http-support.c:1627
+#: cups/http-support.c:1631
 msgid "Unable to find printer."
 msgstr ""
 
-#: filter/imagetoraster.c:259
+#: filter/imagetoraster.c:266
 msgid "Unable to fork filter"
 msgstr ""
 
-#: backend/ipp.c:1786
+#: backend/ipp.c:1926
 msgid "Unable to generate compressed print file"
 msgstr ""
 
+#: backend/ipp.c:2709
+msgid "Unable to get backend exit status."
+msgstr ""
+
 #: cgi-bin/classes.c:450
 msgid "Unable to get class list:"
 msgstr ""
@@ -5415,7 +5412,7 @@ msgstr ""
 msgid "Unable to get list of printer drivers:"
 msgstr ""
 
-#: backend/ipp.c:1482
+#: backend/ipp.c:1623
 msgid "Unable to get print job status."
 msgstr ""
 
@@ -5427,7 +5424,7 @@ msgstr ""
 msgid "Unable to get printer list:"
 msgstr ""
 
-#: backend/ipp.c:827
+#: backend/ipp.c:903
 msgid "Unable to get printer status."
 msgstr ""
 
@@ -5445,13 +5442,13 @@ msgstr ""
 msgid "Unable to install Windows 9x printer driver files (%d)."
 msgstr ""
 
-#: backend/ipp.c:549 backend/lpd.c:417 backend/socket.c:273
+#: backend/ipp.c:624 backend/lpd.c:419 backend/socket.c:275
 #, c-format
 msgid "Unable to locate printer \"%s\"."
 msgstr ""
 
-#: backend/dnssd.c:497 backend/ipp.c:294 backend/lpd.c:200
-#: backend/socket.c:169
+#: backend/dnssd.c:497 backend/ipp.c:310 backend/lpd.c:202
+#: backend/socket.c:171
 msgid "Unable to locate printer."
 msgstr ""
 
@@ -5483,7 +5480,7 @@ msgstr ""
 msgid "Unable to open charset file"
 msgstr ""
 
-#: backend/ipp.c:1770
+#: backend/ipp.c:1910
 msgid "Unable to open compressed print file"
 msgstr ""
 
@@ -5500,10 +5497,11 @@ msgstr ""
 msgid "Unable to open document #%d in job #%d."
 msgstr ""
 
-#: backend/ipp.c:1776 backend/lpd.c:476 backend/parallel.c:150
-#: backend/serial.c:190 backend/socket.c:156 backend/usb.c:237
-#: filter/bannertops.c:183 filter/gziptoany.c:71 filter/pstext.c:89
-#: filter/pstext.c:249 filter/pstext.c:266 filter/pstops.c:299
+#: backend/ipp.c:351 backend/ipp.c:1916 backend/lpd.c:486
+#: backend/parallel.c:150 backend/serial.c:190 backend/socket.c:158
+#: backend/usb.c:237 filter/bannertops.c:183 filter/gziptoany.c:71
+#: filter/pstext.c:89 filter/pstext.c:249 filter/pstext.c:266
+#: filter/pstops.c:305
 msgid "Unable to open print file"
 msgstr ""
 
@@ -5544,7 +5542,7 @@ msgstr ""
 msgid "Unable to run \"%s\": %s"
 msgstr ""
 
-#: filter/pstops.c:562
+#: filter/pstops.c:568
 msgid "Unable to see in file"
 msgstr ""
 
@@ -5556,8 +5554,8 @@ msgstr ""
 msgid "Unable to send data to printer."
 msgstr ""
 
-#: filter/imagetoraster.c:1238 filter/imagetoraster.c:1335
-#: filter/imagetoraster.c:1376
+#: filter/imagetoraster.c:1245 filter/imagetoraster.c:1342
+#: filter/imagetoraster.c:1383
 msgid "Unable to send raster data to the driver."
 msgstr ""
 
@@ -5566,7 +5564,7 @@ msgstr ""
 msgid "Unable to set Windows printer driver (%d)."
 msgstr ""
 
-#: cgi-bin/admin.c:3922
+#: cgi-bin/admin.c:3926
 msgid "Unable to set options:"
 msgstr ""
 
@@ -5574,6 +5572,10 @@ msgstr ""
 msgid "Unable to set server default:"
 msgstr ""
 
+#: backend/ipp.c:2570 backend/ipp.c:2645 backend/ipp.c:2653
+msgid "Unable to start backend process."
+msgstr ""
+
 #: cgi-bin/admin.c:1986
 msgid "Unable to upload cupsd.conf file:"
 msgstr ""
@@ -5591,7 +5593,7 @@ msgstr ""
 msgid "Unable to write uncompressed print data: %s"
 msgstr ""
 
-#: cups/http-support.c:1272
+#: cups/http-support.c:1273
 msgid "Unauthorized"
 msgstr ""
 
@@ -5599,41 +5601,41 @@ msgstr ""
 msgid "Units"
 msgstr ""
 
-#: cups/http-support.c:1312 cups/ppd.c:366
+#: cups/http-support.c:1313 cups/ppd.c:366
 msgid "Unknown"
 msgstr ""
 
-#: filter/pstops.c:2263
+#: filter/pstops.c:2269
 #, c-format
 msgid "Unknown choice \"%s\" for option \"%s\"."
 msgstr ""
 
-#: backend/ipp.c:408
+#: backend/ipp.c:493
 #, c-format
 msgid "Unknown encryption option value: \"%s\"."
 msgstr ""
 
-#: backend/lpd.c:346
+#: backend/lpd.c:348
 #, c-format
 msgid "Unknown file order: \"%s\"."
 msgstr ""
 
-#: backend/lpd.c:317
+#: backend/lpd.c:319
 #, c-format
 msgid "Unknown format character: \"%c\"."
 msgstr ""
 
-#: backend/ipp.c:455
+#: backend/ipp.c:540
 #, c-format
 msgid "Unknown option \"%s\" with value \"%s\"."
 msgstr ""
 
-#: filter/pstops.c:2246
+#: filter/pstops.c:2252
 #, c-format
 msgid "Unknown option \"%s\"."
 msgstr ""
 
-#: backend/lpd.c:332
+#: backend/lpd.c:334
 #, c-format
 msgid "Unknown print mode: \"%s\"."
 msgstr ""
@@ -5648,7 +5650,7 @@ msgstr ""
 msgid "Unknown printer-op-policy \"%s\"."
 msgstr ""
 
-#: backend/ipp.c:427
+#: backend/ipp.c:512
 #, c-format
 msgid "Unknown version option value: \"%s\"."
 msgstr ""
@@ -5658,7 +5660,7 @@ msgstr ""
 msgid "Unsupported baud rate: %s"
 msgstr ""
 
-#: filter/pstops.c:2454
+#: filter/pstops.c:2460
 #, c-format
 msgid "Unsupported brightness value %s, using brightness=100."
 msgstr ""
@@ -5688,7 +5690,7 @@ msgstr ""
 msgid "Unsupported format \"%s\"."
 msgstr ""
 
-#: filter/pstops.c:2536
+#: filter/pstops.c:2542
 #, c-format
 msgid "Unsupported gamma value %s, using gamma=1000."
 msgstr ""
@@ -5701,17 +5703,17 @@ msgstr ""
 msgid "Unsupported media value."
 msgstr ""
 
-#: filter/pstops.c:2580
+#: filter/pstops.c:2586
 #, c-format
 msgid "Unsupported number-up value %d, using number-up=1."
 msgstr ""
 
-#: filter/pstops.c:2614
+#: filter/pstops.c:2620
 #, c-format
 msgid "Unsupported number-up-layout value %s, using number-up-layout=lrtb."
 msgstr ""
 
-#: filter/pstops.c:2665
+#: filter/pstops.c:2671
 #, c-format
 msgid "Unsupported page-border value %s, using page-border=none."
 msgstr ""
@@ -5724,11 +5726,11 @@ msgstr ""
 msgid "Unsupported value type"
 msgstr ""
 
-#: cups/http-support.c:1287
+#: cups/http-support.c:1288
 msgid "Upgrade Required"
 msgstr ""
 
-#: systemv/lpadmin.c:617
+#: systemv/lpadmin.c:668
 msgid ""
 "Usage:\n"
 "\n"
@@ -5740,13 +5742,13 @@ msgid ""
 "                       [-u allow:user,user] [-u deny:user,user]"
 msgstr ""
 
-#: filter/pdftops.c:103
+#: filter/pdftops.c:109
 #, c-format
 msgid "Usage: %s job user title copies options [filename]"
 msgstr ""
 
-#: backend/dnssd.c:171 backend/ipp.c:268 backend/lpd.c:189
-#: backend/parallel.c:127 backend/serial.c:167 backend/socket.c:133
+#: backend/dnssd.c:171 backend/ipp.c:299 backend/lpd.c:191
+#: backend/parallel.c:127 backend/serial.c:167 backend/socket.c:135
 #: backend/usb.c:183 driver/commandtoescpx.c:57 driver/commandtopclx.c:57
 #: filter/textcommon.c:518 monitor/bcp.c:62 monitor/tbcp.c:61
 #, c-format
@@ -5754,12 +5756,12 @@ msgid "Usage: %s job-id user title copies options [file]"
 msgstr ""
 
 #: filter/bannertops.c:118 filter/commandtops.c:73 filter/gziptoany.c:50
-#: filter/imagetops.c:116 filter/imagetoraster.c:208 filter/pstops.c:263
+#: filter/imagetops.c:123 filter/imagetoraster.c:215 filter/pstops.c:269
 #, c-format
 msgid "Usage: %s job-id user title copies options file"
 msgstr ""
 
-#: scheduler/cupsfilter.c:1382
+#: scheduler/cupsfilter.c:1464
 msgid "Usage: convert [ options ]"
 msgstr ""
 
@@ -5775,7 +5777,7 @@ msgstr ""
 msgid "Usage: cupsd [options]"
 msgstr ""
 
-#: scheduler/cupsfilter.c:1355
+#: scheduler/cupsfilter.c:1437
 msgid "Usage: cupsfilter [ options ] filename"
 msgstr ""
 
@@ -5814,7 +5816,7 @@ msgid ""
 "       lppasswd [-g groupname] -x [username]"
 msgstr ""
 
-#: berkeley/lpq.c:669
+#: berkeley/lpq.c:670
 msgid "Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]"
 msgstr ""
 
@@ -5854,7 +5856,7 @@ msgstr ""
 msgid "Version uses indefinite length"
 msgstr ""
 
-#: backend/ipp.c:1419
+#: backend/ipp.c:1558
 msgid "Waiting for job to complete."
 msgstr ""
 
@@ -5862,7 +5864,7 @@ msgstr ""
 msgid "Waiting for printer to become available."
 msgstr ""
 
-#: backend/socket.c:435
+#: backend/socket.c:444
 msgid "Waiting for printer to finish."
 msgstr ""
 
@@ -5870,11 +5872,11 @@ msgstr ""
 msgid "Warning, no Windows 2000 printer drivers are installed."
 msgstr ""
 
-#: cups/http-support.c:1308
+#: cups/http-support.c:1309
 msgid "Web Interface is Disabled"
 msgstr ""
 
-#: cups/ppd.c:1914
+#: cups/ppd.c:1907
 msgid "Yes"
 msgstr ""
 
@@ -5907,7 +5909,7 @@ msgstr ""
 msgid "completed"
 msgstr ""
 
-#: scheduler/cupsfilter.c:346
+#: scheduler/cupsfilter.c:355
 msgid "convert: Use the -f option to specify a file to convert."
 msgstr ""
 
@@ -5965,21 +5967,21 @@ msgstr ""
 msgid "cupsd: launchd(8) support not compiled in, running in normal mode."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1133
+#: scheduler/cupsfilter.c:1215
 #, c-format
 msgid "cupsfilter: Invalid document number %d."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1127
+#: scheduler/cupsfilter.c:1209
 #, c-format
 msgid "cupsfilter: Invalid job ID %d."
 msgstr ""
 
-#: scheduler/cupsfilter.c:354
+#: scheduler/cupsfilter.c:363
 msgid "cupsfilter: Only one filename can be specified."
 msgstr ""
 
-#: scheduler/cupsfilter.c:1175
+#: scheduler/cupsfilter.c:1257
 #, c-format
 msgid "cupsfilter: Unable to get job file - %s"
 msgstr ""
@@ -6089,137 +6091,148 @@ msgstr ""
 msgid "job-printer-uri attribute missing."
 msgstr ""
 
-#: systemv/lpadmin.c:125 systemv/lpadmin.c:369
+#: systemv/lpadmin.c:131 systemv/lpadmin.c:375
 msgid "lpadmin: Class name can only contain printable characters."
 msgstr ""
 
-#: systemv/lpadmin.c:563
+#: systemv/lpadmin.c:614
 msgid "lpadmin: Expected PPD after \"-P\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:406
+#: systemv/lpadmin.c:457
 msgid "lpadmin: Expected allow/deny:userlist after \"-u\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:358
+#: systemv/lpadmin.c:364
 msgid "lpadmin: Expected class after \"-r\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:114
+#: systemv/lpadmin.c:120
 msgid "lpadmin: Expected class name after \"-c\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:507
+#: systemv/lpadmin.c:558
 msgid "lpadmin: Expected description after \"-D\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:440
+#: systemv/lpadmin.c:491
 msgid "lpadmin: Expected device URI after \"-v\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:523
+#: systemv/lpadmin.c:574
 msgid "lpadmin: Expected file type(s) after \"-I\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:196
+#: systemv/lpadmin.c:202
 msgid "lpadmin: Expected hostname after \"-h\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:215
+#: systemv/lpadmin.c:221
 msgid "lpadmin: Expected interface after \"-i\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:543
+#: systemv/lpadmin.c:594
 msgid "lpadmin: Expected location after \"-L\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:268
+#: systemv/lpadmin.c:274
 msgid "lpadmin: Expected model after \"-m\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:288
+#: systemv/lpadmin.c:417
+msgid "lpadmin: Expected name after \"-R\" option."
+msgstr ""
+
+#: systemv/lpadmin.c:294
 msgid "lpadmin: Expected name=value after \"-o\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:307
+#: systemv/lpadmin.c:313
 msgid "lpadmin: Expected printer after \"-p\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:158
+#: systemv/lpadmin.c:164
 msgid "lpadmin: Expected printer name after \"-d\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:474
+#: systemv/lpadmin.c:525
 msgid "lpadmin: Expected printer or class after \"-x\" option."
 msgstr ""
 
-#: systemv/lpadmin.c:939
+#: systemv/lpadmin.c:975
 msgid "lpadmin: No member names were seen."
 msgstr ""
 
-#: systemv/lpadmin.c:704
+#: systemv/lpadmin.c:762
 #, c-format
 msgid "lpadmin: Printer %s is already a member of class %s."
 msgstr ""
 
-#: systemv/lpadmin.c:953
+#: systemv/lpadmin.c:989
 #, c-format
 msgid "lpadmin: Printer %s is not a member of class %s."
 msgstr ""
 
-#: systemv/lpadmin.c:169 systemv/lpadmin.c:318 systemv/lpadmin.c:485
+#: systemv/lpadmin.c:175 systemv/lpadmin.c:324 systemv/lpadmin.c:536
 msgid "lpadmin: Printer name can only contain printable characters."
 msgstr ""
 
-#: systemv/lpadmin.c:99
+#: systemv/lpadmin.c:105
 msgid ""
 "lpadmin: Unable to add a printer to the class:\n"
 "         You must specify a printer name first."
 msgstr ""
 
-#: systemv/lpadmin.c:90 systemv/lpadmin.c:143 systemv/lpadmin.c:247
-#: systemv/lpadmin.c:333 systemv/lpadmin.c:459 systemv/lpadmin.c:596
+#: systemv/lpadmin.c:96 systemv/lpadmin.c:149 systemv/lpadmin.c:253
+#: systemv/lpadmin.c:339 systemv/lpadmin.c:393 systemv/lpadmin.c:510
+#: systemv/lpadmin.c:647
 #, c-format
 msgid "lpadmin: Unable to connect to server: %s"
 msgstr ""
 
-#: systemv/lpadmin.c:1235
+#: systemv/lpadmin.c:1332
 msgid "lpadmin: Unable to create temporary file"
 msgstr ""
 
-#: systemv/lpadmin.c:1245
+#: systemv/lpadmin.c:402
+msgid ""
+"lpadmin: Unable to delete option:\n"
+"         You must specify a printer name first."
+msgstr ""
+
+#: systemv/lpadmin.c:1342
 #, c-format
 msgid "lpadmin: Unable to open PPD file \"%s\" - %s"
 msgstr ""
 
-#: systemv/lpadmin.c:342
+#: systemv/lpadmin.c:348
 msgid ""
 "lpadmin: Unable to remove a printer from the class:\n"
 "         You must specify a printer name first."
 msgstr ""
 
-#: systemv/lpadmin.c:605
+#: systemv/lpadmin.c:656
 msgid ""
 "lpadmin: Unable to set the printer options:\n"
 "         You must specify a printer name first."
 msgstr ""
 
-#: systemv/lpadmin.c:423
+#: systemv/lpadmin.c:474
 #, c-format
 msgid "lpadmin: Unknown allow/deny option \"%s\"."
 msgstr ""
 
-#: systemv/lpadmin.c:578
+#: systemv/lpadmin.c:629
 #, c-format
 msgid "lpadmin: Unknown argument \"%s\"."
 msgstr ""
 
-#: systemv/lpadmin.c:573
+#: systemv/lpadmin.c:624
 #, c-format
 msgid "lpadmin: Unknown option \"%c\"."
 msgstr ""
 
-#: systemv/lpadmin.c:529
+#: systemv/lpadmin.c:580
 msgid "lpadmin: Warning - content type list ignored."
 msgstr ""
 
@@ -6372,7 +6385,7 @@ msgstr ""
 msgid "members of class %s:"
 msgstr ""
 
-#: berkeley/lpq.c:581
+#: berkeley/lpq.c:582
 msgid "no entries"
 msgstr ""
 
index 8f920c59c0768cb9d01b6434d7c3f91e40145bb3..a008ad292c28886b1ddd66305b7159d618feaeec 100644 (file)
 "%s: Error - unknown option \"%c\"." = "%s: Error - unknown option \"%c\".";
 "%s: Error - unknown option \"%s\"." = "%s: Error - unknown option \"%s\".";
 "%s: Expected job ID after \"-i\" option." = "%s: Expected job ID after \"-i\" option.";
-"%s: Filter \"%s\" not available: %s" = "%s: Filter \"%s\" not available: %s";
 "%s: Invalid destination name in list \"%s\"." = "%s: Invalid destination name in list \"%s\".";
 "%s: Invalid filter string \"%s\"." = "%s: Invalid filter string \"%s\".";
 "%s: Need job ID (\"-i jobid\") before \"-H restart\"." = "%s: Need job ID (\"-i jobid\") before \"-H restart\".";
 "EPL2 Label Printer" = "EPL2 Label Printer";
 "Edit Configuration File" = "Edit Configuration File";
 "Empty PPD file." = "Empty PPD file.";
+// TRANSLATORS: Banner/cover sheet after the print job.
 "Ending Banner" = "Ending Banner";
 "English" = "English";
 "Enter old password:" = "Enter old password:";
 "Quarto" = "Quarto";
 "Quota limit reached." = "Quota limit reached.";
 "Rank    Owner   Job     File(s)                         Total Size" = "Rank    Owner   Job     File(s)                         Total Size";
+// TRANSLATORS: Pri is job priority.
 "Rank   Owner      Pri  Job        Files                       Total Size" = "Rank   Owner      Pri  Job        Files                       Total Size";
 "Ready to print." = "Ready to print.";
 "Reject Jobs" = "Reject Jobs";
 "Special Paper" = "Special Paper";
 "Spooling job, %.0f%% complete." = "Spooling job, %.0f%% complete.";
 "Standard" = "Standard";
+// TRANSLATORS: Banner/cover sheet before the print job.
 "Starting Banner" = "Starting Banner";
 "Starting page %d." = "Starting page %d.";
 "Statement" = "Statement";
 "There is a paper jam." = "There is a paper jam.";
 "There was an unrecoverable USB error." = "There was an unrecoverable USB error.";
 "Thermal Transfer Media" = "Thermal Transfer Media";
-"This printer does not conform to the IPP standard and may not work." = "This printer does not conform to the IPP standard and may not work.";
-"This printer does not conform to the IPP standard. Please contact the manufacturer of your printer for assistance." = "This printer does not conform to the IPP standard. Please contact the manufacturer of your printer for assistance.";
 "Title: " = "Title: ";
 "Too many active jobs." = "Too many active jobs.";
 "Too many job-sheets values (%d > 2)." = "Too many job-sheets values (%d > 2).";
 "Unable to find printer." = "Unable to find printer.";
 "Unable to fork filter" = "Unable to fork filter";
 "Unable to generate compressed print file" = "Unable to generate compressed print file";
+"Unable to get backend exit status." = "Unable to get backend exit status.";
 "Unable to get class list:" = "Unable to get class list:";
 "Unable to get class status:" = "Unable to get class status:";
 "Unable to get list of printer drivers:" = "Unable to get list of printer drivers:";
 "Unable to set Windows printer driver (%d)." = "Unable to set Windows printer driver (%d).";
 "Unable to set options:" = "Unable to set options:";
 "Unable to set server default:" = "Unable to set server default:";
+"Unable to start backend process." = "Unable to start backend process.";
 "Unable to upload cupsd.conf file:" = "Unable to upload cupsd.conf file:";
 "Unable to use legacy USB class driver." = "Unable to use legacy USB class driver.";
 "Unable to write print data" = "Unable to write print data";
 "lpadmin: Expected interface after \"-i\" option." = "lpadmin: Expected interface after \"-i\" option.";
 "lpadmin: Expected location after \"-L\" option." = "lpadmin: Expected location after \"-L\" option.";
 "lpadmin: Expected model after \"-m\" option." = "lpadmin: Expected model after \"-m\" option.";
+"lpadmin: Expected name after \"-R\" option." = "lpadmin: Expected name after \"-R\" option.";
 "lpadmin: Expected name=value after \"-o\" option." = "lpadmin: Expected name=value after \"-o\" option.";
 "lpadmin: Expected printer after \"-p\" option." = "lpadmin: Expected printer after \"-p\" option.";
 "lpadmin: Expected printer name after \"-d\" option." = "lpadmin: Expected printer name after \"-d\" option.";
 "lpadmin: Unable to add a printer to the class:\n         You must specify a printer name first." = "lpadmin: Unable to add a printer to the class:\n         You must specify a printer name first.";
 "lpadmin: Unable to connect to server: %s" = "lpadmin: Unable to connect to server: %s";
 "lpadmin: Unable to create temporary file" = "lpadmin: Unable to create temporary file";
+"lpadmin: Unable to delete option:\n         You must specify a printer name first." = "lpadmin: Unable to delete option:\n         You must specify a printer name first.";
 "lpadmin: Unable to open PPD file \"%s\" - %s" = "lpadmin: Unable to open PPD file \"%s\" - %s";
 "lpadmin: Unable to remove a printer from the class:\n         You must specify a printer name first." = "lpadmin: Unable to remove a printer from the class:\n         You must specify a printer name first.";
 "lpadmin: Unable to set the printer options:\n         You must specify a printer name first." = "lpadmin: Unable to set the printer options:\n         You must specify a printer name first.";
index 675c8e082c75f1ed16a6210d3fa39b738effe920..9552c30f4860cb384a5a0d6e1edb5b8c7c57dee3 100644 (file)
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH lpadmin 8 "CUPS" "7 January 2011" "Apple Inc."
+.TH lpadmin 8 "CUPS" "10 May 2011" "Apple Inc."
 .SH NAME
 lpadmin \- configure cups printers and classes
 .SH SYNOPSIS
@@ -30,7 +30,11 @@ lpadmin \- configure cups printers and classes
 ] [ -h
 .I server[:port]
 ] -p
-.I destination option(s)
+.I destination
+[ -R
+.I name-default
+]
+.I option(s)
 .br
 .B lpadmin
 [ -E ] [-U
@@ -82,6 +86,18 @@ Sets a standard System V interface script or PPD file for the printer from the
 \fImodel\fR directory or using one of the driver interfaces. Use the \fI-m\fR
 option with the \fIlpinfo(8)\fR command to get a list of supported models.
 .TP 5
+-o cupsIPPSupplies=true
+.TP 5
+-o cupsIPPSupplies=false
+.br
+Specifies whether IPP supply level values should be reported.
+.TP 5
+-o cupsSNMPSupplies=true
+.TP 5
+-o cupsSNMPSupplies=false
+.br
+Specifies whether SNMP supply level (RFC 3805) values should be reported.
+.TP 5
 -o job-k-limit=value
 .br
 Sets the kilobyte limit for per-user quotas. The value is an
@@ -123,8 +139,8 @@ specified port monitor must be listed in the printer's PPD file.
 .TP 5
 -o printer-error-policy=name
 .br
-Sets the error policy to be used when the printer backend is 
-unable to send the job to the printer. The name must be one of 
+Sets the error policy to be used when the printer backend is
+unable to send the job to the printer. The name must be one of
 "abort-job", "retry-job", "retry-current-job", or "stop-printer". The default
 error policy is "stop-printer" for printers and "retry-current-job" for
 classes.
@@ -143,6 +159,10 @@ Sets the IPP operation policy associated with the destination. The
 name must be defined in the \fBcupsd.conf\fR in a Policy section.
 The default operation policy is "default".
 .TP 5
+-R name-default
+.br
+Deletes the named option from \fIprinter\fR.
+.TP 5
 -r class
 .br
 Removes the named \fIprinter\fR from \fIclass\fR.  If the
index ee2d64a49bcb8e5ba3ff61fdf9a342e58a99d43f..3bd9b1c2526eb8f218e9c5d7afae8d7f666bec4a 100644 (file)
@@ -263,9 +263,18 @@ $DSOLIBS=@DSOLIBS@
 f 0555 root sys $SBINDIR/cupsd scheduler/cupsd
 
 d 0755 root sys $SERVERBIN -
+%system darwin
+d 0755 root sys $SERVERBIN/apple -
+f 0555 root sys $SERVERBIN/apple/ipp backend/ipp
+l 0755 root sys $SERVERBIN/apple/http ipp
+l 0755 root sys $SERVERBIN/apple/https ipp
+l 0755 root sys $SERVERBIN/apple/ipps ipp
+%system all
 d 0755 root sys $SERVERBIN/backend -
 f 0500 root sys $SERVERBIN/backend/ipp backend/ipp
 l 0700 root sys $SERVERBIN/backend/http ipp
+l 0700 root sys $SERVERBIN/backend/https ipp
+l 0700 root sys $SERVERBIN/backend/ipps ipp
 f 0500 root sys $SERVERBIN/backend/lpd backend/lpd
 %if DNSSD_BACKEND
 f 0500 root sys $SERVERBIN/backend/dnssd backend/dnssd
index 4d99f2653e7710660af940c2c85b57ca19ccd6e0..d44357a08d23c88514b4a5b5de4f3443428de5d2 100644 (file)
@@ -559,6 +559,10 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
 
     strlcpy(username, authorization + 9, sizeof(username));
 
+#  ifdef HAVE_GSSAPI
+    con->gss_uid = CUPSD_UCRED_UID(peercred);
+#  endif /* HAVE_GSSAPI */
+
     cupsdLogMessage(CUPSD_LOG_DEBUG,
                     "cupsdAuthorize: Authorized as %s using PeerCred",
                    username);
@@ -1122,7 +1126,7 @@ cupsdAuthorize(cupsd_client_t *con)       /* I - Client connection */
     * to run as the correct user to get Kerberos credentials of its own.
     */
 
-    if (con->http.hostaddr->addr.sa_family == AF_LOCAL)
+    if (_httpAddrFamily(con->http.hostaddr) == AF_LOCAL)
     {
       cupsd_ucred_t    peercred;       /* Peer credentials */
       socklen_t                peersize;       /* Size of peer credentials */
@@ -1959,7 +1963,11 @@ cupsdIsAuthorized(cupsd_client_t *con,   /* I - Connection */
        return (HTTP_OK);               /* unless overridden with Satisfy */
     }
 
+
     if (con->type != type && type != CUPSD_AUTH_NONE &&
+#ifdef HAVE_GSSAPI
+        (type != CUPSD_AUTH_NEGOTIATE || con->gss_uid <= 0) &&
+#endif /* HAVE_GSSAPI */
         (con->type != CUPSD_AUTH_BASIC || type != CUPSD_AUTH_BASICDIGEST))
     {
       cupsdLogMessage(CUPSD_LOG_ERROR, "Authorized using %s, expected %s!",
index 2d8e171ae11c430e6ce4fbfd149533089e539c33..a2535ae7bf66902535298c4bee678133fa336a0b 100644 (file)
@@ -2588,8 +2588,15 @@ cupsdSendHeader(
       snprintf(auth_str, sizeof(auth_str), "Digest realm=\"CUPS\", nonce=\"%s\"",
               con->http.hostname);
 #ifdef HAVE_GSSAPI
-    else if (auth_type == CUPSD_AUTH_NEGOTIATE /* && con->gss_output_token.length == 0 */)
+    else if (auth_type == CUPSD_AUTH_NEGOTIATE)
+    {
+#  ifdef AF_LOCAL
+      if (_httpAddrFamily(con->http.hostaddr) == AF_LOCAL)
+        strlcpy(auth_str, "Basic realm=\"CUPS\"", sizeof(auth_str));
+      else
+#  endif /* AF_LOCAL */
       strlcpy(auth_str, "Negotiate", sizeof(auth_str));
+    }
 #endif /* HAVE_GSSAPI */
 
     if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE &&
@@ -2651,65 +2658,6 @@ cupsdSendHeader(
     }
   }
 
-#if 0 /* def HAVE_GSSAPI */
- /*
-  * WWW-Authenticate: Negotiate can be included even for
-  * non-401 replies...
-  */
-
-  if (con->gss_output_token.length > 0 && con->gss_output_token.length <= 65536)
-  {
-    OM_uint32  minor_status;           /* Minor status code */
-    int                bufsize;                /* Size of output token buffer */
-
-
-    bufsize = con->gss_output_token.length * 4 / 3 + 2;
-
-    if (bufsize > gss_bufsize)
-    {
-      char     *buf;                   /* New buffer */
-
-
-      bufsize = (bufsize + 1023) & 1023;/* Round up */
-
-      if (gss_buf)
-        buf = realloc(gss_buf, bufsize);
-      else
-        buf = malloc(bufsize);
-
-      if (!buf)
-      {
-       cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "Unable to allocate %d bytes for Kerberos credentials!",
-                       bufsize);
-       return (0);
-      }
-
-      gss_buf     = buf;
-      gss_bufsize = bufsize;
-    }
-
-    httpEncode64_2(gss_buf, gss_bufsize,
-                  con->gss_output_token.value,
-                  con->gss_output_token.length);
-    gss_release_buffer(&minor_status, &con->gss_output_token);
-
-    cupsdLogMessage(CUPSD_LOG_DEBUG,
-                   "cupsdSendHeader: WWW-Authenticate: Negotiate %s", gss_buf);
-
-    if (httpPrintf(HTTP(con), "WWW-Authenticate: Negotiate %s\r\n",
-                   gss_buf) < 0)
-      return (0);
-  }
-  else if (con->gss_output_token.length > 65536)
-  {
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "Kerberos credentials larger than 64k (%d)!",
-                   (int)con->gss_output_token.length);
-    return (0);
-  }
-#endif /* HAVE_GSSAPI */
-
   if (con->language && strcmp(con->language->language, "C"))
   {
     if (httpPrintf(HTTP(con), "Content-Language: %s\r\n",
index fceede104322f1d0151cb6c8a203ac7b1edd30d8..6359ea7c6930a74b73cd163b8aec7c2776a1f040 100644 (file)
@@ -21,6 +21,7 @@
  *   cupsdReadConfiguration() - Read the cupsd.conf file.
  *   get_address()            - Get an address + port number from a line.
  *   get_addr_and_mask()      - Get an IP address and netmask.
+ *   mime_error_cb()          - Log a MIME error.
  *   parse_aaa()              - Parse authentication, authorization, and access
  *                              control lines.
  *   parse_fatal_errors()     - Parse FatalErrors values in a string.
@@ -205,6 +206,7 @@ static const unsigned       zeros[4] =
 static http_addrlist_t *get_address(const char *value, int defport);
 static int             get_addr_and_mask(const char *value, unsigned *ip,
                                          unsigned *mask);
+static void            mime_error_cb(void *ctx, const char *message);
 static int             parse_aaa(cupsd_location_t *loc, char *line,
                                  char *value, int linenum);
 static int             parse_fatal_errors(const char *s);
@@ -541,7 +543,7 @@ cupsdReadConfiguration(void)
 
   cupsdClearString(&DefaultPaperSize);
 
-  cupsdSetString(&RIPCache, "8m");
+  cupsdSetString(&RIPCache, "128m");
 
   cupsdSetString(&TempDir, NULL);
 
@@ -847,13 +849,13 @@ cupsdReadConfiguration(void)
   * Make sure each of the log files exists and gets rotated as necessary...
   */
 
-  if (!strcmp(AccessLog, "syslog"))
+  if (strcmp(AccessLog, "syslog"))
     cupsdCheckLogFile(&AccessFile, AccessLog);
 
-  if (!strcmp(ErrorLog, "syslog"))
+  if (strcmp(ErrorLog, "syslog"))
     cupsdCheckLogFile(&ErrorFile, ErrorLog);
 
-  if (!strcmp(PageLog, "syslog"))
+  if (strcmp(PageLog, "syslog"))
     cupsdCheckLogFile(&PageFile, PageLog);
 
  /*
@@ -1379,7 +1381,10 @@ cupsdReadConfiguration(void)
     snprintf(temp, sizeof(temp), "%s/filter", ServerBin);
     snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
 
-    MimeDatabase = mimeLoadTypes(NULL, mimedir);
+    MimeDatabase = mimeNew();
+    mimeSetErrorCallback(MimeDatabase, mime_error_cb, NULL);
+
+    MimeDatabase = mimeLoadTypes(MimeDatabase, mimedir);
     MimeDatabase = mimeLoadTypes(MimeDatabase, ServerRoot);
     MimeDatabase = mimeLoadFilters(MimeDatabase, mimedir, temp);
     MimeDatabase = mimeLoadFilters(MimeDatabase, ServerRoot, temp);
@@ -1821,6 +1826,18 @@ get_addr_and_mask(const char *value,     /* I - String from config file */
 }
 
 
+/*
+ * 'mime_error_cb()' - Log a MIME error.
+ */
+
+static void
+mime_error_cb(void       *ctx,         /* I - Context pointer (unused) */
+              const char *message)     /* I - Message */
+{
+  cupsdLogMessage(CUPSD_LOG_ERROR, "%s", message);
+}
+
+
 /*
  * 'parse_aaa()' - Parse authentication, authorization, and access control lines.
  */
index 2bbc50a219e1c5f81b7f2863a9b9366d0d1b5a57..11b431fb08402e0a8c1a4a4ce25186b5b64b4df0 100644 (file)
@@ -299,7 +299,7 @@ cat_drv(const char *name,           /* I - PPD name */
   if ((datadir = getenv("CUPS_DATADIR")) == NULL)
     datadir = CUPS_DATADIR;
 
-  // Pull out the 
+  // Pull out the path to the .drv file...
   if (httpSeparateURI(HTTP_URI_CODING_ALL, name, scheme, sizeof(scheme),
                       userpass, sizeof(userpass), host, sizeof(host), &port,
                      resource, sizeof(resource)) < HTTP_URI_OK ||
@@ -548,6 +548,7 @@ cat_static(const char *name,                /* I - PPD name */
                *slash;                 /* Pointer to next slash */
 #endif /* __APPLE__ */
 
+
   if (name[0] == '/' || strstr(name, "../") || strstr(name, "/.."))
   {
    /*
@@ -598,6 +599,7 @@ cat_static(const char *name,                /* I - PPD name */
 
     snprintf(line, sizeof(line), "/%s", name);
   }
+  else
 
 #elif defined(__linux)
   if (!strncmp(name, "lsb/usr/", 8))
index d3ea64ef8fa517c1db38704f06ecce872d683121..35ac250b7cd0c4350eb4c5eda14bb465ccc027a7 100644 (file)
@@ -153,9 +153,8 @@ main(int  argc,                             /* I - Number of command-line args */
       if ((http = httpConnectEncrypt(argv[1], atoi(argv[2]),
                                      cupsEncryption())) == NULL)
       {
-       fprintf(stderr, "ERROR: %s Unable to connect to %s on port %s: %s\n",
-               prefix, argv[1], argv[2],
-               h_errno ? hstrerror(h_errno) : strerror(errno));
+       fprintf(stderr, "ERROR: %s Unable to connect to %s on port %s.\n",
+               prefix, argv[1], argv[2]);
       }
     }
 
index 94fc713fcbffac051f9919a36075b532ebcf7a23..da4687cbe4b2ca15f0eebe9e3cedf6d27fddad11 100644 (file)
  *
  * Contents:
  *
- *   main()            - Main entry for the test program.
- *   compare_pids()    - Compare two filter PIDs...
- *   escape_options()  - Convert an options array to a string.
- *   exec_filter()     - Execute a single filter.
- *   exec_filters()    - Execute filters for the given file and options.
- *   get_job_file()    - Get the specified job file.
- *   open_pipe()       - Create a pipe which is closed on exec.
- *   read_cupsd_conf() - Read the cupsd.conf file to get the filter settings.
- *   set_string()      - Copy and set a string.
- *   usage()           - Show program usage...
+ *   main()                - Main entry for the test program.
+ *   add_printer_filter()  - Add a single filters from a PPD file.
+ *   add_printer_filters() - Add filters from a PPD file.
+ *   check_cb()            - Callback function for _cupsFileCheck.
+ *   compare_pids()        - Compare two filter PIDs...
+ *   escape_options()      - Convert an options array to a string.
+ *   exec_filter()         - Execute a single filter.
+ *   exec_filters()        - Execute filters for the given file and options.
+ *   get_job_file()        - Get the specified job file.
+ *   open_pipe()           - Create a pipe which is closed on exec.
+ *   read_cupsd_conf()     - Read the cupsd.conf file to get the filter
+ *                           settings.
+ *   set_string()          - Copy and set a string.
+ *   sighandler()          - Signal catcher for when we print from stdin...
+ *   usage()               - Show program usage...
  */
 
 /*
@@ -31,6 +36,8 @@
  */
 
 #include <cups/cups-private.h>
+#include <cups/file-private.h>
+#include <cups/ppd-private.h>
 #include "mime.h"
 #include <limits.h>
 #include <unistd.h>
@@ -78,6 +85,8 @@ static mime_type_t    *add_printer_filters(const char *command,
                                             mime_t *mime, const char *printer,
                                             const char *ppdfile,
                                             mime_type_t **prefilter_type);
+static void            check_cb(void *context, _cups_fc_result_t result,
+                                const char *message);
 static int             compare_pids(mime_filter_t *a, mime_filter_t *b);
 static char            *escape_options(int num_options, cups_option_t *options);
 static int             exec_filter(const char *filter, char **argv,
@@ -525,24 +534,67 @@ add_printer_filter(
 {
   char         super[MIME_MAX_SUPER],  /* Super-type for filter */
                type[MIME_MAX_TYPE],    /* Type for filter */
+               dsuper[MIME_MAX_SUPER], /* Destination super-type for filter */
+               dtype[MIME_MAX_TYPE],   /* Destination type for filter */
+               dest[MIME_MAX_SUPER + MIME_MAX_TYPE + 2],
+                                       /* Destination super/type */
                program[1024];          /* Program/filter name */
   int          cost;                   /* Cost of filter */
-  mime_type_t  *temptype;              /* MIME type looping var */
-  char         filename[1024];         /* Full filter filename */
+  size_t       maxsize = 0;            /* Maximum supported file size */
+  mime_type_t  *temptype,              /* MIME type looping var */
+               *desttype;              /* Destination MIME type */
+  mime_filter_t        *filterptr;             /* MIME filter */
 
 
  /*
-  * Parse the filter string; it should be in the following format:
+  * Parse the filter string; it should be in one of the following formats:
   *
-  *     super/type cost program
+  *     source/type cost program
+  *     source/type cost maxsize(nnnn) program
+  *     source/type dest/type cost program
+  *     source/type dest/type cost maxsize(nnnn) program
   */
 
-  if (sscanf(filter, "%15[^/]/%31s%d%*[ \t]%1023[^\n]", super, type, &cost,
-             program) != 4)
+  if (sscanf(filter, "%15[^/]/%255s%*[ \t]%15[^/]/%255s%d%*[ \t]%1023[^\n]",
+             super, type, dsuper, dtype, &cost, program) == 6)
   {
-    _cupsLangPrintf(stderr, _("%s: Invalid filter string \"%s\"."), command,
-                    filter);
-    return;
+    snprintf(dest, sizeof(dest), "%s/%s/%s", filtertype->type, dsuper, dtype);
+
+    if ((desttype = mimeType(mime, "printer", dest)) == NULL)
+      desttype = mimeAddType(mime, "printer", dest);
+  }
+  else
+  {
+    if (sscanf(filter, "%15[^/]/%255s%d%*[ \t]%1023[^\n]", super, type, &cost,
+               program) == 4)
+    {
+      desttype = filtertype;
+    }
+    else
+    {
+      _cupsLangPrintf(stderr, _("%s: Invalid filter string \"%s\"."), command,
+                     filter);
+      return;
+    }
+  }
+
+  if (!strncmp(program, "maxsize(", 8))
+  {
+    char       *ptr;                   /* Pointer into maxsize(nnnn) program */
+
+    maxsize = strtoll(program + 8, &ptr, 10);
+
+    if (*ptr != ')')
+    {
+      printf("testmime: Invalid filter string \"%s\".\n", filter);
+      return;
+    }
+
+    ptr ++;
+    while (_cups_isspace(*ptr))
+      ptr ++;
+
+    _cups_strcpy(program, ptr);
   }
 
  /*
@@ -552,17 +604,16 @@ add_printer_filter(
 
   if (strcmp(program, "-"))
   {
+    char filename[1024];               /* Full path to program */
+
     if (program[0] == '/')
       strlcpy(filename, program, sizeof(filename));
     else
       snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, program);
 
-    if (access(filename, X_OK))
-    {
-      _cupsLangPrintf(stderr, _("%s: Filter \"%s\" not available: %s"),
-                      command, program, strerror(errno));
+    if (_cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !geteuid(), check_cb,
+                       (void *)command))
       return;
-    }
   }
 
  /*
@@ -575,7 +626,20 @@ add_printer_filter(
     if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||
          !strcasecmp(temptype->super, super)) &&
         (type[0] == '*' || !strcasecmp(temptype->type, type)))
-      mimeAddFilter(mime, temptype, filtertype, cost, program);
+    {
+      if (desttype != filtertype)
+      {
+        filterptr = mimeAddFilter(mime, temptype, desttype, cost, program);
+
+        if (!mimeFilterLookup(mime, desttype, filtertype))
+          mimeAddFilter(mime, desttype, filtertype, cost, "-");
+      }
+      else
+        filterptr = mimeAddFilter(mime, temptype, filtertype, cost, program);
+
+      if (filterptr)
+       filterptr->maxsize = maxsize;
+    }
 }
 
 
@@ -591,54 +655,72 @@ add_printer_filters(
     const char  *ppdfile,              /* I - PPD file */
     mime_type_t **prefilter_type)      /* O - Prefilter type */
 {
-  int        i;                        /* Looping var */
-  mime_type_t *printer_type;           /* Printer MIME type */
-  ppd_file_t  *ppd;                    /* PPD file data */
-  ppd_attr_t  *ppdattr;                        /* Current prefilter */
+  ppd_file_t   *ppd;                   /* PPD file data */
+  _ppd_cache_t *pc;                    /* Cache data for PPD */
+  const char   *value;                 /* Filter definition value */
+  mime_type_t  *printer_type;          /* Printer filter type */
 
 
-  *prefilter_type = NULL;
-
   if ((ppd = ppdOpenFile(ppdfile)) == NULL)
   {
-    ppd_status_t  status;              /* PPD load status */
+    ppd_status_t       status;         /* PPD load status */
+    int                        linenum;        /* Line number */
 
-    status = ppdLastError(&i);
+    status = ppdLastError(&linenum);
     _cupsLangPrintf(stderr, _("%s: Unable to open PPD file: %s on line %d."),
-                    command, ppdErrorString(status), i);
+                    command, ppdErrorString(status), linenum);
     return (NULL);
   }
 
-  printer_type = mimeAddType(mime, "printer", printer);
+  pc = _ppdCacheCreateWithPPD(ppd);
+  if (!pc)
+    return (NULL);
+
+  printer_type    = mimeAddType(mime, "printer", printer);
+  *prefilter_type = NULL;
 
-  if (ppd->num_filters > 0)
+  if (pc->filters)
   {
-    for (i = 0; i < ppd->num_filters; i ++)
-      add_printer_filter(command, mime, printer_type, ppd->filters[i]);
+    for (value = (const char *)cupsArrayFirst(pc->filters);
+         value;
+         value = (const char *)cupsArrayNext(pc->filters))
+      add_printer_filter(command, mime, printer_type, value);
   }
   else
   {
     add_printer_filter(command, mime, printer_type,
-                       "application/vnd.cups-command 0 commandtops");
+                       "application/vnd.cups-raw 0 -");
     add_printer_filter(command, mime, printer_type,
                        "application/vnd.cups-postscript 0 -");
   }
 
-  if ((ppdattr = ppdFindAttr(ppd, "cupsPreFilter", NULL)) != NULL)
+  if (pc->prefilters)
   {
     *prefilter_type = mimeAddType(mime, "prefilter", printer);
 
-    for (; ppdattr; ppdattr = ppdFindNextAttr(ppd, "cupsPreFilter", NULL))
-      if (ppdattr->value)
-       add_printer_filter(command, mime, *prefilter_type, ppdattr->value);
+    for (value = (const char *)cupsArrayFirst(pc->prefilters);
+         value;
+         value = (const char *)cupsArrayNext(pc->prefilters))
+      add_printer_filter(command, mime, *prefilter_type, value);
   }
-  else
-    *prefilter_type = NULL;
 
   return (printer_type);
 }
 
 
+/*
+ * 'check_cb()' - Callback function for _cupsFileCheck.
+ */
+
+static void
+check_cb(void              *context,   /* I - Context (command name) */
+         _cups_fc_result_t result,     /* I - Result of check */
+        const char        *message)    /* I - Localized message */
+{
+  _cupsLangPrintf(stderr, _("%s: %s"), (char *)context, message);
+}
+
+
 /*
  * 'compare_pids()' - Compare two filter PIDs...
  */
@@ -1257,7 +1339,7 @@ read_cupsd_conf(const char *filename)     /* I - File to read */
   else
     set_string(&FontPath, CUPS_FONTPATH);
 
-  set_string(&RIPCache, "8m");
+  set_string(&RIPCache, "128m");
 
   if ((temp = getenv("CUPS_SERVERBIN")) != NULL)
     set_string(&ServerBin, temp);
index 0d5e1eacea616ee04be0910443c8ac1b0af62185..0097658d2cec40f9fc6a9e3d1941b3dbca67b79c 100644 (file)
@@ -10371,7 +10371,7 @@ save_auth_info(
   }
 
 #ifdef HAVE_GSSAPI
-  if (con->have_gss && con->gss_uid > 0)
+  if (con->gss_uid > 0)
   {
     cupsFilePrintf(fp, "%d\n", (int)con->gss_uid);
     cupsdSetStringf(&job->auth_uid, "AUTH_UID=%d", (int)con->gss_uid);
index 14b71231fdd93dd02b647c5362cfb636d4978b85..193ced46ca0dc117ac937feda4a3151fff9680a9 100644 (file)
@@ -479,7 +479,7 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
                                        /* Job title string */
                        copies[255],    /* # copies string */
                        *options,       /* Options string */
-                       *envp[MAX_ENV + 20],
+                       *envp[MAX_ENV + 21],
                                        /* Environment variables */
                        charset[255],   /* CHARSET env variable */
                        class_name[255],/* CLASS env variable */
@@ -505,6 +505,8 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
                                        /* PRINTER_LOCATION env variable */
                        printer_name[255],
                                        /* PRINTER env variable */
+                       *printer_state_reasons = NULL,
+                                       /* PRINTER_STATE_REASONS env var */
                        rip_max_cache[255];
                                        /* RIP_MAX_CACHE env variable */
 
@@ -878,6 +880,32 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
   snprintf(printer_location, sizeof(printer_name), "PRINTER_LOCATION=%s",
            job->printer->location ? job->printer->location : "");
   snprintf(printer_name, sizeof(printer_name), "PRINTER=%s", job->printer->name);
+  if (job->printer->num_reasons > 0)
+  {
+    char       *psrptr;                /* Pointer into PRINTER_STATE_REASONS */
+    size_t     psrlen;                 /* Size of PRINTER_STATE_REASONS */
+
+    for (psrlen = 22, i = 0; i < job->printer->num_reasons; i ++)
+      psrlen += strlen(job->printer->reasons[i]) + 1;
+
+    if ((printer_state_reasons = malloc(psrlen)) != NULL)
+    {
+     /*
+      * All of these strcpy's are safe because we allocated the psr string...
+      */
+
+      strcpy(printer_state_reasons, "PRINTER_STATE_REASONS=");
+      for (psrptr = printer_state_reasons + 22, i = 0;
+           i < job->printer->num_reasons;
+          i ++)
+      {
+        if (i)
+         *psrptr++ = ',';
+       strcpy(psrptr, job->printer->reasons[i]);
+       psrptr += strlen(psrptr);
+      }
+    }
+  }
   snprintf(rip_max_cache, sizeof(rip_max_cache), "RIP_MAX_CACHE=%s", RIPCache);
 
   if (job->printer->num_auth_info_required == 1)
@@ -920,6 +948,8 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
   envp[envc ++] = printer_info;
   envp[envc ++] = printer_location;
   envp[envc ++] = printer_name;
+  envp[envc ++] = printer_state_reasons ? printer_state_reasons :
+                                          "PRINTER_STATE_REASONS=none";
   envp[envc ++] = banner_page ? "CUPS_FILETYPE=job-sheet" :
                                 "CUPS_FILETYPE=document";
 
@@ -1187,6 +1217,8 @@ cupsdContinueJob(cupsd_job_t *job)        /* I - Job */
   }
 
   free(argv);
+  if (printer_state_reasons)
+    free(printer_state_reasons);
 
   cupsdAddSelect(job->status_buffer->fd, (cupsd_selfunc_t)update_job, NULL,
                  job);
@@ -1223,6 +1255,9 @@ cupsdContinueJob(cupsd_job_t *job)        /* I - Job */
     free(argv);
   }
 
+  if (printer_state_reasons)
+    free(printer_state_reasons);
+
   cupsdClosePipe(job->print_pipes);
   cupsdClosePipe(job->back_pipes);
   cupsdClosePipe(job->side_pipes);
@@ -1757,6 +1792,9 @@ cupsdLoadJob(cupsd_job_t *job)            /* I - Job */
          cupsdSetStringf(&job->auth_domain, "AUTH_DOMAIN=%s", data);
        else if (!strcmp(destptr->auth_info_required[i], "password"))
          cupsdSetStringf(&job->auth_password, "AUTH_PASSWORD=%s", data);
+        else if (!strcmp(destptr->auth_info_required[i], "negotiate") &&
+                isdigit(line[0] & 255))
+         cupsdSetStringf(&job->auth_uid, "AUTH_UID=%s", line);
       }
 
       if (cupsFileGets(fp, line, sizeof(line)) && isdigit(line[0] & 255))
@@ -1833,8 +1871,9 @@ cupsdMoveJob(cupsd_job_t     *job,        /* I - Job */
   * Change the destination information...
   */
 
-  cupsdSetJobState(job, IPP_JOB_PENDING, CUPSD_JOB_DEFAULT,
-                   "Stopping job prior to move.");
+  if (job->state_value > IPP_JOB_HELD)
+    cupsdSetJobState(job, IPP_JOB_PENDING, CUPSD_JOB_DEFAULT,
+                    "Stopping job prior to move.");
 
   cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, oldp, job,
                 "Job #%d moved from %s to %s.", job->id, olddest,
index dfe99c290bcd1e4212e3f2489e9e38e0baa0d1ad..9d12ebb73ec36f5e4c118f78836fc46783924012 100644 (file)
@@ -12,8 +12,10 @@ _mimeFirstType
 _mimeLoad
 _mimeLoadFilters
 _mimeLoadTypes
+_mimeNew
 _mimeNextFilter
 _mimeNextType
 _mimeNumFilters
 _mimeNumTypes
+_mimeSetErrorCallback
 _mimeType
diff --git a/scheduler/mime-private.h b/scheduler/mime-private.h
new file mode 100644 (file)
index 0000000..ffd769f
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * "$Id$"
+ *
+ *   Private MIME type/conversion database definitions for CUPS.
+ *
+ *   Copyright 2011 by Apple Inc.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
+ */
+
+#ifndef _CUPS_MIME_PRIVATE_H_
+#  define _CUPS_MIME_PRIVATE_H_
+
+#  include "mime.h"
+
+
+/*
+ * C++ magic...
+ */
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif /* __cplusplus */
+
+
+/*
+ * Prototypes...
+ */
+
+extern void    _mimeError(mime_t *mime, const char *format, ...)
+#ifdef __GNUC__
+__attribute__ ((__format__ (__printf__, 2, 3)))
+#endif /* __GNUC__ */
+;
+
+
+#  ifdef __cplusplus
+}
+#  endif /* __cplusplus */
+#endif /* !_CUPS_MIME_PRIVATE_H_ */
+
+/*
+ * End of "$Id$".
+ */
index d1a905aa85faec3ac778046eec41849e71f46f86..fd7c12a4973bdee8a0a88832e67ab6b54973679f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: mime.c 7694 2008-06-26 00:23:20Z mike $"
+ * "$Id: mime.c 9750 2011-05-06 22:53:53Z mike $"
  *
  *   MIME database file routines for CUPS.
  *
  *
  * Contents:
  *
- *   mimeDelete()          - Delete (free) a MIME database.
- *   mimeDeleteFilter()    - Delete a filter from the MIME database.
- *   mimeDeleteType()      - Delete a type from the MIME database.
- *   mimeFirstFilter()     - Get the first filter in the MIME database.
- *   mimeFirstType()       - Get the first type in the MIME database.
- *   mimeLoad()            - Create a new MIME database from disk.
- *   mimeMerge()           - Merge a MIME database from disk with the current one.
- *   mimeNew()             - Create a new, empty MIME database.
- *   mimeNextFilter()      - Get the next filter in the MIME database.
- *   mimeNextType()        - Get the next type in the MIME database.
- *   mimeNumFilters()      - Get the number of filters in a MIME database.
- *   mimeNumTypes()        - Get the number of types in a MIME database.
- *   mime_add_fcache()     - Add a filter to the filter cache.
- *   mime_compare_fcache() - Compare two filter cache entries.
- *   mime_delete_fcache()  - Free all memory used by the filter cache.
- *   mime_delete_rules()   - Free all memory for the given rule tree.
- *   mime_load_convs()     - Load a xyz.convs file...
- *   mime_load_types()     - Load a xyz.types file...
+ *   mimeDelete()           - Delete (free) a MIME database.
+ *   mimeDeleteFilter()     - Delete a filter from the MIME database.
+ *   mimeDeleteType()       - Delete a type from the MIME database.
+ *   _mimeError()           - Show an error message.
+ *   mimeFirstFilter()      - Get the first filter in the MIME database.
+ *   mimeFirstType()        - Get the first type in the MIME database.
+ *   mimeLoad()             - Create a new MIME database from disk.
+ *   mimeLoadFilters()      - Load filter definitions from disk.
+ *   mimeLoadTypes()        - Load type definitions from disk.
+ *   mimeNew()              - Create a new, empty MIME database.
+ *   mimeNextFilter()       - Get the next filter in the MIME database.
+ *   mimeNextType()         - Get the next type in the MIME database.
+ *   mimeNumFilters()       - Get the number of filters in a MIME database.
+ *   mimeNumTypes()         - Get the number of types in a MIME database.
+ *   mimeSetErrorCallback() - Set the callback for error messages.
+ *   mime_add_fcache()      - Add a filter to the filter cache.
+ *   mime_compare_fcache()  - Compare two filter cache entries.
+ *   mime_delete_fcache()   - Free all memory used by the filter cache.
+ *   mime_delete_rules()    - Free all memory for the given rule tree.
+ *   mime_load_convs()      - Load a xyz.convs file.
+ *   mime_load_types()      - Load a xyz.types file.
  */
 
 /*
@@ -41,7 +44,7 @@
 #include <cups/string-private.h>
 #include <cups/debug-private.h>
 #include <cups/dir.h>
-#include "mime.h"
+#include "mime-private.h"
 
 
 /*
@@ -68,7 +71,6 @@ static void   mime_load_convs(mime_t *mime, const char *filename,
                                const char *filterpath,
                                cups_array_t *filtercache);
 static void    mime_load_types(mime_t *mime, const char *filename);
-static mime_t  *mime_new(void);
 
 
 /*
@@ -184,6 +186,30 @@ mimeDeleteType(mime_t      *mime,  /* I - MIME database */
 }
 
 
+/*
+ * '_mimeError()' - Show an error message.
+ */
+
+void
+_mimeError(mime_t     *mime,           /* I - MIME database */
+           const char *message,                /* I - Printf-style message string */
+          ...)                         /* I - Additional arguments as needed */
+{
+  va_list      ap;                     /* Argument pointer */
+  char         buffer[8192];           /* Message buffer */
+
+
+  if (mime->error_cb)
+  {
+    va_start(ap, message);
+    vsnprintf(buffer, sizeof(buffer), message, ap);
+    va_end(ap);
+
+    (*mime->error_cb)(mime->error_ctx, buffer);
+  }
+}
+
+
 /*
  * 'mimeFirstFilter()' - Get the first filter in the MIME database.
  */
@@ -296,6 +322,7 @@ mimeLoadFilters(mime_t     *mime,   /* I - MIME database */
   {
     DEBUG_printf(("1mimeLoadFilters: Unable to open \"%s\": %s", pathname,
                   strerror(errno)));
+    _mimeError(mime, "Unable to open \"%s\": %s", pathname, strerror(errno));
     return (mime);
   }
 
@@ -355,6 +382,7 @@ mimeLoadTypes(mime_t     *mime,             /* I - MIME database or @code NULL@ to create a
     DEBUG_printf(("1mimeLoadTypes: Unable to open \"%s\": %s", pathname,
                   strerror(errno)));
     DEBUG_printf(("1mimeLoadTypes: Returning %p.", mime));
+    _mimeError(mime, "Unable to open \"%s\": %s", pathname, strerror(errno));
     return (mime);
   }
 
@@ -363,7 +391,7 @@ mimeLoadTypes(mime_t     *mime,             /* I - MIME database or @code NULL@ to create a
   */
 
   if (!mime)
-    mime = mime_new();
+    mime = mimeNew();
 
   if (!mime)
   {
@@ -399,6 +427,17 @@ mimeLoadTypes(mime_t     *mime,            /* I - MIME database or @code NULL@ to create a
 }
 
 
+/*
+ * 'mimeNew()' - Create a new, empty MIME database.
+ */
+
+mime_t *                               /* O - MIME database */
+mimeNew(void)
+{
+  return ((mime_t *)calloc(1, sizeof(mime_t)));
+}
+
+
 /*
  * 'mimeNextFilter()' - Get the next filter in the MIME database.
  */
@@ -495,6 +534,24 @@ mimeNumTypes(mime_t *mime)         /* I - MIME database */
 }
 
 
+/*
+ * 'mimeSetErrorCallback()' - Set the callback for error messages.
+ */
+
+void
+mimeSetErrorCallback(
+    mime_t          *mime,             /* I - MIME database */
+    mime_error_cb_t cb,                        /* I - Callback function */
+    void            *ctx)              /* I - Context pointer for callback */
+{
+  if (mime)
+  {
+    mime->error_cb  = cb;
+    mime->error_ctx = ctx;
+  }
+}
+
+
 /*
  * 'mime_add_fcache()' - Add a filter to the filter cache.
  */
@@ -609,7 +666,7 @@ mime_delete_rules(mime_magic_t *rules)      /* I - Rules to free */
 
 
 /*
- * 'mime_load_convs()' - Load a xyz.convs file...
+ * 'mime_load_convs()' - Load a xyz.convs file.
  */
 
 static void
@@ -642,6 +699,7 @@ mime_load_convs(
   {
     DEBUG_printf(("3mime_load_convs: Unable to open \"%s\": %s", filename,
                   strerror(errno)));
+    _mimeError(mime, "Unable to open \"%s\": %s", filename, strerror(errno));
     return;
   }
 
@@ -741,6 +799,7 @@ mime_load_convs(
       {
         DEBUG_printf(("mime_load_convs: Filter %s not found in %s.", filter,
                      filterpath)); 
+        _mimeError(mime, "Filter \"%s\" not found.", filter);
         continue;
       }
     }
@@ -798,7 +857,7 @@ mime_load_convs(
 
 
 /*
- * 'mime_load_types()' - Load a xyz.types file...
+ * 'mime_load_types()' - Load a xyz.types file.
  */
 
 static void
@@ -825,6 +884,7 @@ mime_load_types(mime_t     *mime,   /* I - MIME database */
   {
     DEBUG_printf(("3mime_load_types: Unable to open \"%s\": %s", filename,
                   strerror(errno)));
+    _mimeError(mime, "Unable to open \"%s\": %s", filename, strerror(errno));
     return;
   }
 
@@ -896,16 +956,5 @@ mime_load_types(mime_t     *mime,  /* I - MIME database */
 
 
 /*
- * 'mime_new()' - Create a new, empty MIME database.
- */
-
-static mime_t *                                /* O - MIME database */
-mime_new(void)
-{
-  return ((mime_t *)calloc(1, sizeof(mime_t)));
-}
-
-
-/*
- * End of "$Id: mime.c 7694 2008-06-26 00:23:20Z mike $".
+ * End of "$Id: mime.c 9750 2011-05-06 22:53:53Z mike $".
  */
index e3f214b379fe1b8029a62ae220d01137dc54e8c5..4842c837cc54e946d7ddceed469ad1da46b7047a 100644 (file)
@@ -100,11 +100,15 @@ typedef struct _mime_filter_s             /**** MIME Conversion Filter Data ****/
   size_t       maxsize;                /* Maximum file size for this filter */
 } mime_filter_t;
 
+typedef void (*mime_error_cb_t)(void *ctx, const char *message);
+
 typedef struct _mime_s                 /**** MIME Database ****/
 {
-  cups_array_t *types;                 /* File types */
-  cups_array_t *filters;               /* Type conversion filters */
-  cups_array_t *srcs;                  /* Filters sorted by source type */
+  cups_array_t         *types;         /* File types */
+  cups_array_t         *filters;       /* Type conversion filters */
+  cups_array_t         *srcs;          /* Filters sorted by source type */
+  mime_error_cb_t      error_cb;       /* Error message callback */
+  void                 *error_ctx;     /* Pointer for callback */
 } mime_t;
 
 
@@ -113,6 +117,7 @@ typedef struct _mime_s                      /**** MIME Database ****/
  */
 
 extern void            mimeDelete(mime_t *mime);
+extern mime_t          *mimeNew(void) _CUPS_API_1_5;
 extern mime_t          *mimeLoad(const char *pathname, const char *filterpath);
 extern mime_t          *mimeLoadFilters(mime_t *mime, const char *pathname,
                                         const char *filterpath);
@@ -144,6 +149,8 @@ extern mime_filter_t        *mimeFilterLookup(mime_t *mime, mime_type_t *src,
 extern mime_filter_t   *mimeFirstFilter(mime_t *mime);
 extern mime_filter_t   *mimeNextFilter(mime_t *mime);
 extern int             mimeNumFilters(mime_t *mime);
+extern void            mimeSetErrorCallback(mime_t *mime, mime_error_cb_t cb,
+                                            void *context) _CUPS_API_1_5;
 
 #  ifdef __cplusplus
 }
index e686b6f8b38ef498ea0194087c60ee012418e3fe..25c49ef0a7817032984e4a9f292d86671c5cfae8 100644 (file)
@@ -160,51 +160,10 @@ cupsdCompareNames(const char *s,  /* I - First string */
 cups_array_t *                         /* O - CUPS array */
 cupsdCreateStringsArray(const char *s) /* I - Comma-delimited strings */
 {
-  cups_array_t *a;                     /* CUPS array */
-  const char   *start,                 /* Start of string */
-               *end;                   /* End of string */
-  char         buffer[8192];           /* New string */
-
-
-  if (!s)
+  if (!s || !*s)
     return (NULL);
-
-  if ((a = cupsArrayNew3((cups_array_func_t)strcmp, NULL,
-                         (cups_ahash_func_t)NULL, 0,
-                        (cups_acopy_func_t)_cupsStrAlloc,
-                        (cups_afree_func_t)_cupsStrFree)) != NULL)
-  {
-    for (start = end = s; *end; start = end + 1)
-    {
-     /*
-      * Find the end of the current delimited string...
-      */
-
-      if ((end = strchr(start, ',')) == NULL)
-      {
-       /*
-        * Last delimited string...
-       */
-
-        cupsArrayAdd(a, (char *)start);
-       break;
-      }
-
-     /*
-      * Copy the string and add it to the array...
-      */
-
-      if ((end - start + 1) > sizeof(buffer))
-        break;
-
-      memcpy(buffer, start, end - start);
-      buffer[end - start] = '\0';
-
-      cupsArrayAdd(a, buffer);
-    }
-  }
-
-  return (a);
+  else
+    return (_cupsArrayNewStrings(s));
 }
 
 
index b98476555fb767a5b46d6b3edbabab8819e46fd5..c31c045db5f33ae3206be5e4e15e8d0f14fb612a 100644 (file)
@@ -20,6 +20,7 @@
  * Include necessary headers...
  */
 
+#  include <cups/array-private.h>
 #  include <cups/file-private.h>
 #  include <signal.h>
 
index b2337167cfd0eeffcfacfbacfc0d7e65a75d6230..4794240b20a40da2e9ba0a59dd867b893aeeb82d 100644 (file)
@@ -19,7 +19,9 @@
  *   default_printer()           - Set the default printing destination.
  *   delete_printer()            - Delete a printer from the system.
  *   delete_printer_from_class() - Delete a printer from a class.
+ *   delete_printer_option()     - Delete a printer option.
  *   enable_printer()            - Enable a printer.
+ *   get_printer_type()          - Determine the printer type and URI.
  *   set_printer_options()       - Set the printer options and/or file.
  *   validate_name()             - Make sure the printer name only contains
  *                                 valid chars.
  * Local functions...
  */
 
-static int     add_printer_to_class(http_t *http, char *printer, char *pclass);
-static int     default_printer(http_t *http, char *printer);
-static int     delete_printer(http_t *http, char *printer);
-static int     delete_printer_from_class(http_t *http, char *printer,
-                                         char *pclass);
-static int     enable_printer(http_t *http, char *printer);
-static int     set_printer_options(http_t *http, char *printer,
-                                   int num_options, cups_option_t *options,
-                                   char *file);
-static int     validate_name(const char *name);
+static int             add_printer_to_class(http_t *http, char *printer, char *pclass);
+static int             default_printer(http_t *http, char *printer);
+static int             delete_printer(http_t *http, char *printer);
+static int             delete_printer_from_class(http_t *http, char *printer,
+                                                 char *pclass);
+static int             delete_printer_option(http_t *http, char *printer,
+                                             char *option);
+static int             enable_printer(http_t *http, char *printer);
+static cups_ptype_t    get_printer_type(http_t *http, char *printer, char *uri,
+                                        size_t urisize);
+static int             set_printer_options(http_t *http, char *printer,
+                                           int num_options, cups_option_t *options,
+                                           char *file);
+static int             validate_name(const char *name);
 
 
 /*
@@ -375,6 +381,51 @@ main(int  argc,                    /* I - Number of command-line arguments */
              return (1);
            break;
 
+        case 'R' : /* Remove option */
+           if (!http)
+           {
+              http = httpConnectEncrypt(cupsServer(), ippPort(),
+                                       cupsEncryption());
+
+             if (http == NULL)
+             {
+               _cupsLangPrintf(stderr,
+                               _("lpadmin: Unable to connect to server: %s"),
+                               strerror(errno));
+               return (1);
+             }
+            }
+
+           if (printer == NULL)
+           {
+             _cupsLangPuts(stderr,
+                           _("lpadmin: Unable to delete option:\n"
+                             "         You must specify a printer name "
+                             "first."));
+             return (1);
+           }
+
+           if (argv[i][2])
+             val = argv[i] + 2;
+           else
+           {
+             i ++;
+
+             if (i >= argc)
+             {
+               _cupsLangPuts(stderr,
+                             _("lpadmin: Expected name after \"-R\" "
+                               "option."));
+               return (1);
+             }
+
+             val = argv[i];
+           }
+
+            if (delete_printer_option(http, printer, val))
+             return (1);
+           break;
+
         case 'U' : /* Username */
            if (argv[i][2] != '\0')
              cupsSetUser(argv[i] + 2);
@@ -661,6 +712,7 @@ add_printer_to_class(http_t *http,  /* I - Server connection */
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   */
 
   request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
@@ -669,6 +721,8 @@ add_printer_to_class(http_t *http,  /* I - Server connection */
                    "localhost", 0, "/classes/%s", pclass);
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
 
  /*
   * Do the request and get back a response...
@@ -677,26 +731,30 @@ add_printer_to_class(http_t *http,        /* I - Server connection */
   response = cupsDoRequest(http, request, "/");
 
  /*
-  * Build a CUPS_ADD_CLASS request, which requires the following
+  * Build a CUPS_ADD_MODIFY_CLASS request, which requires the following
   * attributes:
   *
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   *    member-uris
   */
 
-  request = ippNewRequest(CUPS_ADD_CLASS);
+  request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
 
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
 
  /*
   * See if the printer is already in the class...
   */
 
   if (response != NULL &&
-      (members = ippFindAttribute(response, "member-names", IPP_TAG_NAME)) != NULL)
+      (members = ippFindAttribute(response, "member-names",
+                                  IPP_TAG_NAME)) != NULL)
     for (i = 0; i < members->num_values; i ++)
       if (strcasecmp(printer, members->values[i].string.text) == 0)
       {
@@ -716,7 +774,8 @@ add_printer_to_class(http_t *http,  /* I - Server connection */
                    "localhost", 0, "/printers/%s", printer);
 
   if (response != NULL &&
-      (members = ippFindAttribute(response, "member-uris", IPP_TAG_URI)) != NULL)
+      (members = ippFindAttribute(response, "member-uris",
+                                  IPP_TAG_URI)) != NULL)
   {
    /*
     * Add the printer to the existing list...
@@ -725,7 +784,8 @@ add_printer_to_class(http_t *http,  /* I - Server connection */
     attr = ippAddStrings(request, IPP_TAG_PRINTER, IPP_TAG_URI,
                          "member-uris", members->num_values + 1, NULL, NULL);
     for (i = 0; i < members->num_values; i ++)
-      attr->values[i].string.text = _cupsStrAlloc(members->values[i].string.text);
+      attr->values[i].string.text =
+          _cupsStrAlloc(members->values[i].string.text);
 
     attr->values[i].string.text = _cupsStrAlloc(uri);
   }
@@ -739,26 +799,15 @@ add_printer_to_class(http_t *http,        /* I - Server connection */
 
   ippDelete(response);
 
-  if ((response = cupsDoRequest(http, request, "/admin/")) == NULL)
-  {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
-
-    return (1);
-  }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
+  ippDelete(cupsDoRequest(http, request, "/admin/"));
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
-
-    ippDelete(response);
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     return (1);
   }
   else
-  {
-    ippDelete(response);
-
     return (0);
-  }
 }
 
 
@@ -770,8 +819,7 @@ static int                          /* O - 0 on success, 1 on fail */
 default_printer(http_t *http,          /* I - Server connection */
                 char   *printer)       /* I - Printer name */
 {
-  ipp_t                *request,               /* IPP Request */
-               *response;              /* IPP Response */
+  ipp_t                *request;               /* IPP Request */
   char         uri[HTTP_MAX_URI];      /* URI for printer/class */
 
 
@@ -784,6 +832,7 @@ default_printer(http_t *http,               /* I - Server connection */
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   */
 
   httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
@@ -793,31 +842,23 @@ default_printer(http_t *http,             /* I - Server connection */
 
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
 
  /*
   * Do the request and get back a response...
   */
 
-  if ((response = cupsDoRequest(http, request, "/admin/")) == NULL)
-  {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+  ippDelete(cupsDoRequest(http, request, "/admin/"));
 
-    return (1);
-  }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
-
-    ippDelete(response);
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     return (1);
   }
   else
-  {
-    ippDelete(response);
-
     return (0);
-  }
 }
 
 
@@ -829,8 +870,7 @@ static int                          /* O - 0 on success, 1 on fail */
 delete_printer(http_t *http,           /* I - Server connection */
                char   *printer)                /* I - Printer to delete */
 {
-  ipp_t                *request,               /* IPP Request */
-               *response;              /* IPP Response */
+  ipp_t                *request;               /* IPP Request */
   char         uri[HTTP_MAX_URI];      /* URI for printer/class */
 
 
@@ -843,6 +883,7 @@ delete_printer(http_t *http,                /* I - Server connection */
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   */
 
   request = ippNewRequest(CUPS_DELETE_PRINTER);
@@ -851,31 +892,23 @@ delete_printer(http_t *http,              /* I - Server connection */
                    "localhost", 0, "/printers/%s", printer);
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
 
  /*
   * Do the request and get back a response...
   */
 
-  if ((response = cupsDoRequest(http, request, "/admin/")) == NULL)
-  {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+  ippDelete(cupsDoRequest(http, request, "/admin/"));
 
-    return (1);
-  }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
-
-    ippDelete(response);
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     return (1);
   }
   else
-  {
-    ippDelete(response);
-
     return (0);
-  }
 }
 
 
@@ -907,6 +940,7 @@ delete_printer_from_class(
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   */
 
   request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
@@ -915,6 +949,8 @@ delete_printer_from_class(
                    "localhost", 0, "/classes/%s", pclass);
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
 
  /*
   * Do the request and get back a response...
@@ -923,7 +959,7 @@ delete_printer_from_class(
   if ((response = cupsDoRequest(http, request, "/classes/")) == NULL ||
       response->request.status.status_code == IPP_NOT_FOUND)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     ippDelete(response);
 
@@ -967,29 +1003,35 @@ delete_printer_from_class(
     *    attributes-charset
     *    attributes-natural-language
     *    printer-uri
+    *    requesting-user-name
     */
 
     request = ippNewRequest(CUPS_DELETE_CLASS);
 
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                 "printer-uri", NULL, uri);
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                 "requesting-user-name", NULL, cupsUser());
   }
   else
   {
    /*
-    * Build a CUPS_ADD_CLASS request, which requires the following
+    * Build a CUPS_ADD_MODIFY_CLASS request, which requires the following
     * attributes:
     *
     *    attributes-charset
     *    attributes-natural-language
     *    printer-uri
+    *    requesting-user-name
     *    member-uris
     */
 
-    request = ippNewRequest(CUPS_ADD_CLASS);
+    request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
 
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                 "printer-uri", NULL, uri);
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                 "requesting-user-name", NULL, cupsUser());
 
    /*
     * Delete the printer from the class...
@@ -1011,26 +1053,69 @@ delete_printer_from_class(
 
   ippDelete(response);
 
-  if ((response = cupsDoRequest(http, request, "/admin/")) == NULL)
+  ippDelete(cupsDoRequest(http, request, "/admin/"));
+
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     return (1);
   }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
-  {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+  else
+    return (0);
+}
 
-    ippDelete(response);
 
-    return (1);
-  }
+/*
+ * 'delete_printer_option()' - Delete a printer option.
+ */
+
+static int                             /* O - 0 on success, 1 on fail */
+delete_printer_option(http_t *http,    /* I - Server connection */
+                      char   *printer, /* I - Printer */
+                     char   *option)   /* I - Option to delete */
+{
+  ipp_t                *request;               /* IPP request */
+  char         uri[HTTP_MAX_URI];      /* URI for printer/class */
+
+
+ /*
+  * Build a CUPS_ADD_MODIFY_PRINTER or CUPS_ADD_MODIFY_CLASS request, which
+  * requires the following attributes:
+  *
+  *    attributes-charset
+  *    attributes-natural-language
+  *    printer-uri
+  *    requesting-user-name
+  *    option with deleteAttr tag
+  */
+
+  if (get_printer_type(http, printer, uri, sizeof(uri)) &
+          (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+    request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
   else
+    request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
+               "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+               "requesting-user-name", NULL, cupsUser());
+  ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_DELETEATTR, option, 0);
+
+ /*
+  * Do the request and get back a response...
+  */
+
+  ippDelete(cupsDoRequest(http, request, "/admin/"));
+
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    ippDelete(response);
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
-    return (0);
+    return (1);
   }
+  else
+    return (0);
 }
 
 
@@ -1042,60 +1127,113 @@ static int                             /* O - 0 on success, 1 on fail */
 enable_printer(http_t *http,           /* I - Server connection */
                char   *printer)                /* I - Printer to enable */
 {
-  ipp_t                *request,               /* IPP Request */
-               *response;              /* IPP Response */
+  ipp_t                *request;               /* IPP Request */
   char         uri[HTTP_MAX_URI];      /* URI for printer/class */
 
 
   DEBUG_printf(("enable_printer(%p, \"%s\")\n", http, printer));
 
  /*
-  * Build a CUPS_ADD_PRINTER request, which requires the following
-  * attributes:
+  * Build a CUPS_ADD_MODIFY_PRINTER or CUPS_ADD_MODIFY_CLASS request, which
+  * require the following attributes:
   *
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   *    printer-state
   *    printer-is-accepting-jobs
   */
 
-  request = ippNewRequest(CUPS_ADD_PRINTER);
+  if (get_printer_type(http, printer, uri, sizeof(uri)) &
+          (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+    request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
+  else
+    request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
 
-  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                   "localhost", 0, "/printers/%s", printer);
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
-
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+               "requesting-user-name", NULL, cupsUser());
   ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state",
                 IPP_PRINTER_IDLE);
-
   ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
 
  /*
   * Do the request and get back a response...
   */
 
-  if ((response = cupsDoRequest(http, request, "/admin/")) == NULL)
-  {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+  ippDelete(cupsDoRequest(http, request, "/admin/"));
 
-    return (1);
-  }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
-
-    ippDelete(response);
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     return (1);
   }
   else
+    return (0);
+}
+
+
+/*
+ * 'get_printer_type()' - Determine the printer type and URI.
+ */
+
+static cups_ptype_t                    /* O - printer-type value */
+get_printer_type(http_t *http,         /* I - Server connection */
+                 char   *printer,      /* I - Printer name */
+                char   *uri,           /* I - URI buffer */
+                 size_t urisize)       /* I - Size of URI buffer */
+{
+  ipp_t                        *request,       /* IPP request */
+                       *response;      /* IPP response */
+  ipp_attribute_t      *attr;          /* printer-type attribute */
+  cups_ptype_t         type;           /* printer-type value */
+
+
+ /*
+  * Build a GET_PRINTER_ATTRIBUTES request, which requires the following
+  * attributes:
+  *
+  *    attributes-charset
+  *    attributes-natural-language
+  *    printer-uri
+  *    requested-attributes
+  *    requesting-user-name
+  */
+
+  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, urisize, "ipp", NULL, "localhost",
+                   ippPort(), "/printers/%s", printer);
+
+  request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
+               "printer-uri", NULL, uri);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
+               "requested-attributes", NULL, "printer-type");
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+               "requesting-user-name", NULL, cupsUser());
+
+ /*
+  * Do the request...
+  */
+
+  response = cupsDoRequest(http, request, "/");
+  if ((attr = ippFindAttribute(response, "printer-type",
+                               IPP_TAG_ENUM)) != NULL)
   {
-    ippDelete(response);
+    type = (cups_ptype_t)attr->values[0].integer;
 
-    return (0);
+    if (type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+      httpAssembleURIf(HTTP_URI_CODING_ALL, uri, urisize, "ipp", NULL,
+                      "localhost", ippPort(), "/classes/%s", printer);
   }
+  else
+    type = CUPS_PRINTER_LOCAL;
+
+  ippDelete(response);
+
+  return (type);
 }
 
 
@@ -1111,10 +1249,7 @@ set_printer_options(
     cups_option_t *options,            /* I - Options */
     char          *file)               /* I - PPD file/interface script */
 {
-  ipp_t                *request,               /* IPP Request */
-               *response;              /* IPP Response */
-  ipp_attribute_t *attr;               /* IPP attribute */
-  ipp_op_t     op;                     /* Operation to perform */
+  ipp_t                *request;               /* IPP Request */
   const char   *ppdfile;               /* PPD filename */
   int          ppdchanged;             /* PPD changed? */
   ppd_file_t   *ppd;                   /* PPD file */
@@ -1127,59 +1262,16 @@ set_printer_options(
   cups_file_t  *in,                    /* PPD file */
                *out;                   /* Temporary file */
   const char   *protocol,              /* Old protocol option */
-               *customval;             /* Custom option value */
+               *customval,             /* Custom option value */
+               *boolval;               /* Boolean value */
+  int          wrote_ipp_supplies = 0, /* Wrote cupsIPPSupplies keyword? */
+               wrote_snmp_supplies = 0;/* Wrote cupsSNMPSupplies keyword? */
 
 
   DEBUG_printf(("set_printer_options(http=%p, printer=\"%s\", num_options=%d, "
                 "options=%p, file=\"%s\")\n", http, printer, num_options,
                options, file));
 
-  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                   "localhost", 0, "/printers/%s", printer);
-
- /*
-  * Build a GET_PRINTER_ATTRIBUTES request, which requires the following
-  * attributes:
-  *
-  *    attributes-charset
-  *    attributes-natural-language
-  *    printer-uri
-  *    requested-attributes
-  */
-
-  request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
-               "printer-uri", NULL, uri);
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
-               "requested-attributes", NULL, "printer-type");
-
- /*
-  * Do the request...
-  */
-
-  op = CUPS_ADD_MODIFY_PRINTER;
-
-  if ((response = cupsDoRequest(http, request, "/")) != NULL)
-  {
-   /*
-    * See what kind of printer or class it is...
-    */
-
-    if ((attr = ippFindAttribute(response, "printer-type",
-                                 IPP_TAG_ENUM)) != NULL)
-    {
-      if (attr->values[0].integer & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
-      {
-        op = CUPS_ADD_MODIFY_CLASS;
-       httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                        "localhost", 0, "/classes/%s", printer);
-      }
-    }
-
-    ippDelete(response);
-  }
-
  /*
   * Build a CUPS_ADD_MODIFY_PRINTER or CUPS_ADD_MODIFY_CLASS request, which
   * requires the following attributes:
@@ -1187,10 +1279,15 @@ set_printer_options(
   *    attributes-charset
   *    attributes-natural-language
   *    printer-uri
+  *    requesting-user-name
   *    other options
   */
 
-  request = ippNewRequest(op);
+  if (get_printer_type(http, printer, uri, sizeof(uri)) &
+          (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+    request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
+  else
+    request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
 
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
                "printer-uri", NULL, uri);
@@ -1215,7 +1312,7 @@ set_printer_options(
 
   if (file)
     ppdfile = file;
-  else if (op == CUPS_ADD_MODIFY_PRINTER)
+  else if (request->request.op.operation_id == CUPS_ADD_MODIFY_PRINTER)
     ppdfile = cupsGetPPD(printer);
   else
     ppdfile = NULL;
@@ -1256,7 +1353,27 @@ set_printer_options(
 
     while (cupsFileGets(in, line, sizeof(line)))
     {
-      if (strncmp(line, "*Default", 8))
+      if (!strncmp(line, "*cupsIPPSupplies:", 17) &&
+         (boolval = cupsGetOption("cupsIPPSupplies", num_options,
+                                  options)) != NULL)
+      {
+        wrote_ipp_supplies = 1;
+        cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
+                      (!strcasecmp(boolval, "true") ||
+                       !strcasecmp(boolval, "yes") ||
+                       !strcasecmp(boolval, "on")) ? "True" : "False");
+      }
+      else if (!strncmp(line, "*cupsSNMPSupplies:", 18) &&
+              (boolval = cupsGetOption("cupsSNMPSupplies", num_options,
+                                       options)) != NULL)
+      {
+        wrote_snmp_supplies = 1;
+        cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
+                      (!strcasecmp(boolval, "true") ||
+                       !strcasecmp(boolval, "yes") ||
+                       !strcasecmp(boolval, "on")) ? "True" : "False");
+      }
+      else if (strncmp(line, "*Default", 8))
         cupsFilePrintf(out, "%s\n", line);
       else
       {
@@ -1306,6 +1423,26 @@ set_printer_options(
       }
     }
 
+    if (!wrote_ipp_supplies &&
+       (boolval = cupsGetOption("cupsIPPSupplies", num_options,
+                                options)) != NULL)
+    {
+      cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
+                    (!strcasecmp(boolval, "true") ||
+                     !strcasecmp(boolval, "yes") ||
+                     !strcasecmp(boolval, "on")) ? "True" : "False");
+    }
+
+    if (!wrote_snmp_supplies &&
+        (boolval = cupsGetOption("cupsSNMPSupplies", num_options,
+                                options)) != NULL)
+    {
+      cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
+                    (!strcasecmp(boolval, "true") ||
+                     !strcasecmp(boolval, "yes") ||
+                     !strcasecmp(boolval, "on")) ? "True" : "False");
+    }
+
     cupsFileClose(in);
     cupsFileClose(out);
     ppdClose(ppd);
@@ -1341,7 +1478,7 @@ set_printer_options(
 
   if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    _cupsLangPrintf(stderr, "lpadmin: %s", cupsLastErrorString());
+    _cupsLangPrintf(stderr, _("%s: %s"), "lpadmin", cupsLastErrorString());
 
     return (1);
   }
index 5d1ce17e9f4cecafb75299e9d1761b0a7f626164..d12225772441e103eabc7f753ad2d94b72d083c8 100644 (file)
@@ -4114,8 +4114,8 @@ valid_job_attributes(
       respond_unsupported(client, attr);
     }
     else
-      fprintf(stderr, "%s Print-Job compression=\"%s\"\n", client->http.hostname,
-             attr->values[0].string.text);
+      fprintf(stderr, "%s Print-Job compression=\"%s\"\n",
+              client->http.hostname, attr->values[0].string.text);
   }
 
  /*
@@ -4187,7 +4187,9 @@ valid_job_attributes(
        break;
 
     if (i >= supported->num_values)
+    {
       respond_unsupported(client, attr);
+    }
   }
 
  /*
index 084d3954430b36d435a9350a8ef8b97697c67c1b..62ca08a1ceba78d0bcd1a735ee211226853fde2b 100755 (executable)
@@ -267,6 +267,8 @@ ln -s $root/filter/hpgltops /tmp/cups-$user/bin/filter
 ln -s $root/filter/pstops /tmp/cups-$user/bin/filter
 ln -s $root/filter/rastertoepson /tmp/cups-$user/bin/filter
 ln -s $root/filter/rastertohp /tmp/cups-$user/bin/filter
+ln -s $root/filter/rastertolabel /tmp/cups-$user/bin/filter
+ln -s $root/filter/rastertopwg /tmp/cups-$user/bin/filter
 ln -s $root/filter/texttops /tmp/cups-$user/bin/filter
 
 ln -s $root/data/classified /tmp/cups-$user/share/banners
@@ -286,6 +288,14 @@ ln -s $root/data/*.h /tmp/cups-$user/share/ppdc
 ln -s $root/data/*.defs /tmp/cups-$user/share/ppdc
 ln -s $root/templates /tmp/cups-$user/share
 
+if test -f $root/filter/imagetops; then
+       ln -s $root/filter/imagetops /tmp/cups-$user/bin/filter
+fi
+
+if test -f $root/filter/imagetoraster; then
+       ln -s $root/filter/imagetoraster /tmp/cups-$user/bin/filter
+fi
+
 #
 # Mac OS X filters and configuration files...
 #
@@ -301,6 +311,8 @@ if test `uname` = Darwin; then
        ln -s /usr/libexec/cups/filter/pstoappleps /tmp/cups-$user/bin/filter
        ln -s /usr/libexec/cups/filter/pstocupsraster /tmp/cups-$user/bin/filter
        ln -s /usr/libexec/cups/filter/pstopdffilter /tmp/cups-$user/bin/filter
+       ln -s /usr/libexec/cups/filter/rastertourf /tmp/cups-$user/bin/filter
+       ln -s /usr/libexec/cups/filter/xhtmltopdf /tmp/cups-$user/bin/filter
 
        if test -f /private/etc/cups/apple.types; then
                ln -s /private/etc/cups/apple.* /tmp/cups-$user/share/mime
@@ -308,8 +320,6 @@ if test `uname` = Darwin; then
                ln -s /usr/share/cups/mime/apple.* /tmp/cups-$user/share/mime
        fi
 else
-       ln -s $root/filter/imagetops /tmp/cups-$user/bin/filter
-       ln -s $root/filter/imagetoraster /tmp/cups-$user/bin/filter
        ln -s $root/filter/pdftops /tmp/cups-$user/bin/filter
 fi
 
diff --git a/tools/pdftops-darwin.sh b/tools/pdftops-darwin.sh
new file mode 100755 (executable)
index 0000000..07d3224
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Script to simulate Xpdf/Poppler's pdftops program.
+#
+
+options=""
+
+while test $# -gt 0; do
+       option="$1"
+       shift
+
+       case "$option" in
+               -expand)
+                       options="$options fit-to-page"
+                       ;;
+               -h)
+                       echo "Usage: pdftops [options] filename"
+                       echo "Options:"
+                       echo "  -expand"
+                       echo "  -h"
+                       echo "  -level1"
+                       echo "  -level2"
+                       echo "  -level3"
+                       echo "  -noembtt"
+                       echo "  -origpagesizes"
+                       echo "  -paperw width-points"
+                       echo "  -paperh length-points"
+                       echo ""
+                       echo "THIS IS A COMPATIBILITY WRAPPER"
+                       exit 0
+                       ;;
+               -paperw | -paperh)
+                       # Ignore width/length in points
+                       shift
+                       ;;
+               -*)
+                       # Ignore everything else
+                       ;;
+               *)
+                       /usr/libexec/cups/filter/cgpdftops job user title 1 "$options" "$option"
+                       exit $?
+                       ;;
+       esac
+done
index 00eebe22808e45f129cfbb64aae6dbd3502d1a2b..0cb8b4fb347bf4faaba36121d29ae0dcd23eb605 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * "$Id: config.h 6649 2007-07-11 21:46:42Z mike $"
  *
- *   Configuration file for CUPS.
+ *   Configuration file for CUPS on Windows.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
 /* #undef HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY */
 
 
+/*
+ * Do we have the SecPolicyCreateSSL function?
+ */
+
+/* #undef HAVE_SECPOLICYCREATESSL */
+
+
+/*
+ * Do we have the SecPolicyCreateSSL function?
+ */
+
+/* #undef HAVE_SECPOLICYCREATESSL */
+
+
+/*
+ * Do we have the cssmErrorString function?
+ */
+
+/* #undef HAVE_CSSMERRORSTRING */
+
+
 /*
  * Do we have the SLP library?
  */
 #define HAVE_DNSSD 1
 
 
+/*
+ * Does the "stat" structure contain the "st_gen" member?
+ */
+
+/* #undef HAVE_ST_GEN */
+
+
 /*
  * Do we have <sys/ioctl.h>?
  */
 
 
 /*
- * Do we have MacOSX 10.4's mbr_XXX functions()?
+ * Do we have Mac OS X 10.4's mbr_XXX functions?
  */
 
 /* #undef HAVE_MEMBERSHIP_H */
 
 
 /*
- * Do we have Darwin's notify_post() header and function?
+ * Do we have Darwin's notify_post header and function?
  */
 
 /* #undef HAVE_NOTIFY_H */
 
 
 /*
- * Do we have DBUS?
+ * Do we have Darwin's IOKit private headers?
  */
 
-/* #undef HAVE_DBUS */
-/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
+/* #undef HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */
 
 
 /*
- * Do we have the AppleTalk/at_proto.h header?
+ * Do we have DBUS?
  */
 
-/* #undef HAVE_APPLETALK_AT_PROTO_H */
+/* #undef HAVE_DBUS */
+/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
 
 
 /*
  * Do we have the GSSAPI support library (for Kerberos support)?
  */
 
+/* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
+/* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
+/* #undef HAVE_GSS_GSSAPI_H */
+/* #undef HAVE_GSS_GSSAPI_SPI_H */
 /* #undef HAVE_GSSAPI */
-/* #undef HAVE_GSSAPI_H */
+/* #undef HAVE_GSSAPI_GENERIC_H */
 /* #undef HAVE_GSSAPI_GSSAPI_H */
-/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
-/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
-/* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
-/* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
-/* #undef HAVE_KRB5_CC_NEW_UNIQUE */
-/* #undef HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID */
+/* #undef HAVE_GSSAPI_H */
+/* #undef HAVE_GSSAPI_KRB5_H */
 /* #undef HAVE_KRB5_H */
-/* #undef HAVE_HEIMDAL */
 
 
 /*
 /* #undef HAVE_TCPD_H */
 
 
+/*
+ * Do we have <iconv.h>?
+ */
+
+/* #undef HAVE_ICONV_H */
+
+
+/*
+ * Do we have statfs or statvfs and one of the corresponding headers?
+ */
+
+/* #undef HAVE_STATFS */
+/* #undef HAVE_STATVFS */
+/* #undef HAVE_SYS_MOUNT_H */
+/* #undef HAVE_SYS_STATFS_H */
+/* #undef HAVE_SYS_STATVFS_H */
+/* #undef HAVE_SYS_VFS_H */
+
+
+/*
+ * Location of Mac OS X localization bundle, if any.
+ */
+
+/* #undef CUPS_BUNDLEDIR */
+
+
+/*
+ * Do we have the ColorSyncRegisterDevice function?
+ */
+
+/* #undef HAVE_COLORSYNCREGISTERDEVICE */
+
+
+/*
+ * Do we have XPC?
+ */
+
+/* #undef HAVE_XPC */
+
+
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*
index 90ed268d71ad1b0d3bf98b8554f8114cdf42a0e2..208f545d7a5af7c163fb7a439cee6ea3664b94e1 100644 (file)
@@ -14,8 +14,9 @@
                        );
                        dependencies = (
                                726AD704135E8AA1002C930D /* PBXTargetDependency */,
-                               270CCDB2135E3CDE00007BE2 /* PBXTargetDependency */,
                                273BF6DE1333B6370022CAAB /* PBXTargetDependency */,
+                               278C58D6136B641D00836530 /* PBXTargetDependency */,
+                               270CCDB2135E3CDE00007BE2 /* PBXTargetDependency */,
                        );
                        name = Tests;
                        productName = Tests;
                276683FD1337F7B8000D33D0 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
                2766840F1337FA38000D33D0 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
                276684111337FA7C000D33D0 /* cupsaddsmb.c in Sources */ = {isa = PBXBuildFile; fileRef = 276684101337FA7C000D33D0 /* cupsaddsmb.c */; };
+               278C58D9136B645C00836530 /* libcups_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72F75A4C1336F31B004BB496 /* libcups_static.a */; };
+               278C58DE136B645C00836530 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58DA136B645C00836530 /* CoreFoundation.framework */; };
+               278C58DF136B645C00836530 /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58DB136B645C00836530 /* Kerberos.framework */; };
+               278C58E1136B645C00836530 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58DD136B645C00836530 /* SystemConfiguration.framework */; };
+               278C58E3136B647200836530 /* testhttp.c in Sources */ = {isa = PBXBuildFile; fileRef = 278C58E2136B647200836530 /* testhttp.c */; };
+               278C58E4136B649200836530 /* libcups_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72F75A4C1336F31B004BB496 /* libcups_static.a */; };
+               278C58E9136B64B000836530 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E5136B64AF00836530 /* CoreFoundation.framework */; };
+               278C58EA136B64B000836530 /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E6136B64B000836530 /* Kerberos.framework */; };
+               278C58EB136B64B000836530 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E7136B64B000836530 /* Security.framework */; };
+               278C58EC136B64B000836530 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E8136B64B000836530 /* SystemConfiguration.framework */; };
+               278C58F6136B652300836530 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58F4136B652300836530 /* Security.framework */; };
                720DD6CD1358FD720064AA82 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
                720DD6D31358FDDE0064AA82 /* snmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 720DD6D21358FDDE0064AA82 /* snmp.c */; };
                720DD6D413590AB90064AA82 /* ieee1284.c in Sources */ = {isa = PBXBuildFile; fileRef = 724379CA1334000E009631B9 /* ieee1284.c */; };
                72220FB913330BCE00FCA411 /* type.c in Sources */ = {isa = PBXBuildFile; fileRef = 72220FB513330BCE00FCA411 /* type.c */; };
                72220FBA13330BEE00FCA411 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
                72220FBF13330C1000FCA411 /* libcupsmime.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220FAC13330B2200FCA411 /* libcupsmime.dylib */; };
+               7234F4201378A16F00D3E9C9 /* array-private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7234F41F1378A16F00D3E9C9 /* array-private.h */; };
                724379081333E4A5009631B9 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
                7243790D1333E4E3009631B9 /* ipp.c in Sources */ = {isa = PBXBuildFile; fileRef = 7243790A1333E4E3009631B9 /* ipp.c */; };
                7243790E1333E4E3009631B9 /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = 7243790B1333E4E3009631B9 /* network.c */; };
                726AD70C135E8B11002C930D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F4B133306BB00FCA411 /* Security.framework */; };
                726AD70D135E8B11002C930D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F4C133306BB00FCA411 /* SystemConfiguration.framework */; };
                726AD70E135E8B5E002C930D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220F51133308C100FCA411 /* libiconv.dylib */; };
+               7271883D1374AB14001A2036 /* mime-private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7271883C1374AB14001A2036 /* mime-private.h */; };
                72F75A5C1336F988004BB496 /* cupstestppd.c in Sources */ = {isa = PBXBuildFile; fileRef = 72F75A5B1336F988004BB496 /* cupstestppd.c */; };
                72F75A671336FA38004BB496 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
                72F75A6C1336FA8A004BB496 /* error.c in Sources */ = {isa = PBXBuildFile; fileRef = 72F75A691336FA8A004BB496 /* error.c */; };
                        remoteGlobalIDString = 276684031337FA1D000D33D0;
                        remoteInfo = cupsaddsmb;
                };
+               278C58D5136B641D00836530 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 72BF96371333042100B1EAD7 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 278C58CA136B640300836530;
+                       remoteInfo = testhttp;
+               };
+               278C58D7136B642F00836530 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 72BF96371333042100B1EAD7 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 274FF6891333B1C400317ECB;
+                       remoteInfo = libcups_static;
+               };
                720DD6CE1358FD790064AA82 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 72BF96371333042100B1EAD7 /* Project object */;
                        );
                        runOnlyForDeploymentPostprocessing = 1;
                };
+               278C58C9136B640300836530 /* CopyFiles */ = {
+                       isa = PBXCopyFilesBuildPhase;
+                       buildActionMask = 2147483647;
+                       dstPath = /usr/share/man/man1/;
+                       dstSubfolderSpec = 0;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 1;
+               };
                720DD6C01358FD5F0064AA82 /* CopyFiles */ = {
                        isa = PBXCopyFilesBuildPhase;
                        buildActionMask = 2147483647;
 /* Begin PBXFileReference section */
                270CCDA7135E3C9E00007BE2 /* testmime */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmime; sourceTree = BUILT_PRODUCTS_DIR; };
                270CCDBB135E3D3E00007BE2 /* testmime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testmime.c; path = ../scheduler/testmime.c; sourceTree = "<group>"; };
+               2732E089137A3F5200FAFEF6 /* cancel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cancel.c; path = ../systemv/cancel.c; sourceTree = "<group>"; };
+               2732E08A137A3F5200FAFEF6 /* cupsaccept.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cupsaccept.c; path = ../systemv/cupsaccept.c; sourceTree = "<group>"; };
+               2732E08B137A3F5200FAFEF6 /* cupstestdsc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cupstestdsc.c; path = ../systemv/cupstestdsc.c; sourceTree = "<group>"; };
+               2732E08C137A3F5200FAFEF6 /* lp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lp.c; path = ../systemv/lp.c; sourceTree = "<group>"; };
+               2732E08D137A3F5200FAFEF6 /* lpadmin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpadmin.c; path = ../systemv/lpadmin.c; sourceTree = "<group>"; };
+               2732E08E137A3F5200FAFEF6 /* lpinfo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpinfo.c; path = ../systemv/lpinfo.c; sourceTree = "<group>"; };
+               2732E08F137A3F5200FAFEF6 /* lpmove.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpmove.c; path = ../systemv/lpmove.c; sourceTree = "<group>"; };
+               2732E090137A3F5200FAFEF6 /* lpoptions.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpoptions.c; path = ../systemv/lpoptions.c; sourceTree = "<group>"; };
+               2732E091137A3F5200FAFEF6 /* lppasswd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lppasswd.c; path = ../systemv/lppasswd.c; sourceTree = "<group>"; };
+               2732E092137A3F5200FAFEF6 /* lpstat.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = lpstat.c; path = ../systemv/lpstat.c; sourceTree = "<group>"; };
                273BF6BD1333B5000022CAAB /* testcups */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testcups; sourceTree = BUILT_PRODUCTS_DIR; };
                273BF6C61333B5370022CAAB /* testcups.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testcups.c; path = ../cups/testcups.c; sourceTree = "<group>"; };
                273BF6CB1333B5950022CAAB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
                276683F91337F7A9000D33D0 /* ipptool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ipptool.c; path = ../test/ipptool.c; sourceTree = "<group>"; };
                276684041337FA1D000D33D0 /* cupsaddsmb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cupsaddsmb; sourceTree = BUILT_PRODUCTS_DIR; };
                276684101337FA7C000D33D0 /* cupsaddsmb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cupsaddsmb.c; path = ../systemv/cupsaddsmb.c; sourceTree = "<group>"; };
+               278C58CB136B640300836530 /* testhttp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhttp; sourceTree = BUILT_PRODUCTS_DIR; };
+               278C58DA136B645C00836530 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
+               278C58DB136B645C00836530 /* Kerberos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kerberos.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kerberos.framework; sourceTree = DEVELOPER_DIR; };
+               278C58DD136B645C00836530 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
+               278C58E2136B647200836530 /* testhttp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhttp.c; path = ../cups/testhttp.c; sourceTree = "<group>"; };
+               278C58E5136B64AF00836530 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+               278C58E6136B64B000836530 /* Kerberos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kerberos.framework; path = /System/Library/Frameworks/Kerberos.framework; sourceTree = "<absolute>"; };
+               278C58E7136B64B000836530 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
+               278C58E8136B64B000836530 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = "<absolute>"; };
+               278C58F4136B652300836530 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
                27D3037C134148CB00F022B1 /* libcups_s.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; name = libcups_s.exp; path = ../cups/libcups_s.exp; sourceTree = "<group>"; };
                27D3037D134148CB00F022B1 /* libcups2.def */ = {isa = PBXFileReference; lastKnownFileType = text; name = libcups2.def; path = ../cups/libcups2.def; sourceTree = "<group>"; };
                720DD6C21358FD5F0064AA82 /* snmp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = snmp; sourceTree = BUILT_PRODUCTS_DIR; };
                72220F55133308EA00FCA411 /* Kerberos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kerberos.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kerberos.framework; sourceTree = DEVELOPER_DIR; };
                72220F5B13330A5A00FCA411 /* cupsd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cupsd; sourceTree = BUILT_PRODUCTS_DIR; };
                72220F6713330A8500FCA411 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = SDKs/MacOSX10.6.sdk/System/Library/Frameworks/ApplicationServices.framework; sourceTree = DEVELOPER_DIR; };
-               72220F6913330B0C00FCA411 /* auth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = auth.c; path = ../scheduler/auth.c; sourceTree = "<group>"; };
-               72220F6A13330B0C00FCA411 /* auth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = auth.h; path = ../scheduler/auth.h; sourceTree = "<group>"; };
-               72220F6B13330B0C00FCA411 /* banners.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = banners.c; path = ../scheduler/banners.c; sourceTree = "<group>"; };
-               72220F6C13330B0C00FCA411 /* banners.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = banners.h; path = ../scheduler/banners.h; sourceTree = "<group>"; };
-               72220F6D13330B0C00FCA411 /* cert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cert.c; path = ../scheduler/cert.c; sourceTree = "<group>"; };
-               72220F6E13330B0C00FCA411 /* cert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cert.h; path = ../scheduler/cert.h; sourceTree = "<group>"; };
-               72220F6F13330B0C00FCA411 /* classes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = classes.c; path = ../scheduler/classes.c; sourceTree = "<group>"; };
-               72220F7013330B0C00FCA411 /* classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = classes.h; path = ../scheduler/classes.h; sourceTree = "<group>"; };
-               72220F7113330B0C00FCA411 /* client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = client.c; path = ../scheduler/client.c; sourceTree = "<group>"; };
-               72220F7213330B0C00FCA411 /* client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = client.h; path = ../scheduler/client.h; sourceTree = "<group>"; };
-               72220F7313330B0C00FCA411 /* conf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = conf.c; path = ../scheduler/conf.c; sourceTree = "<group>"; };
-               72220F7413330B0C00FCA411 /* conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conf.h; path = ../scheduler/conf.h; sourceTree = "<group>"; };
-               72220F7513330B0C00FCA411 /* cupsd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cupsd.h; path = ../scheduler/cupsd.h; sourceTree = "<group>"; };
-               72220F7613330B0C00FCA411 /* dirsvc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dirsvc.c; path = ../scheduler/dirsvc.c; sourceTree = "<group>"; };
-               72220F7713330B0C00FCA411 /* dirsvc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dirsvc.h; path = ../scheduler/dirsvc.h; sourceTree = "<group>"; };
-               72220F7813330B0C00FCA411 /* env.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = env.c; path = ../scheduler/env.c; sourceTree = "<group>"; };
-               72220F7913330B0C00FCA411 /* ipp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ipp.c; path = ../scheduler/ipp.c; sourceTree = "<group>"; };
-               72220F7A13330B0C00FCA411 /* job.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = job.c; path = ../scheduler/job.c; sourceTree = "<group>"; };
-               72220F7B13330B0C00FCA411 /* job.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = job.h; path = ../scheduler/job.h; sourceTree = "<group>"; };
-               72220F7C13330B0C00FCA411 /* listen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = listen.c; path = ../scheduler/listen.c; sourceTree = "<group>"; };
-               72220F7D13330B0C00FCA411 /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = ../scheduler/log.c; sourceTree = "<group>"; };
-               72220F7E13330B0C00FCA411 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../scheduler/main.c; sourceTree = "<group>"; };
-               72220F7F13330B0C00FCA411 /* network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = network.c; path = ../scheduler/network.c; sourceTree = "<group>"; };
-               72220F8013330B0C00FCA411 /* network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network.h; path = ../scheduler/network.h; sourceTree = "<group>"; };
-               72220F8113330B0C00FCA411 /* policy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = policy.c; path = ../scheduler/policy.c; sourceTree = "<group>"; };
-               72220F8213330B0C00FCA411 /* policy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = policy.h; path = ../scheduler/policy.h; sourceTree = "<group>"; };
-               72220F8313330B0C00FCA411 /* printers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = printers.c; path = ../scheduler/printers.c; sourceTree = "<group>"; };
-               72220F8413330B0C00FCA411 /* printers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = printers.h; path = ../scheduler/printers.h; sourceTree = "<group>"; };
-               72220F8513330B0C00FCA411 /* process.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = process.c; path = ../scheduler/process.c; sourceTree = "<group>"; };
-               72220F8613330B0C00FCA411 /* quotas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = quotas.c; path = ../scheduler/quotas.c; sourceTree = "<group>"; };
-               72220F8713330B0C00FCA411 /* removefile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = removefile.c; path = ../scheduler/removefile.c; sourceTree = "<group>"; };
-               72220F8813330B0C00FCA411 /* select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = select.c; path = ../scheduler/select.c; sourceTree = "<group>"; };
-               72220F8913330B0C00FCA411 /* server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = server.c; path = ../scheduler/server.c; sourceTree = "<group>"; };
-               72220F8A13330B0C00FCA411 /* statbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = statbuf.c; path = ../scheduler/statbuf.c; sourceTree = "<group>"; };
-               72220F8B13330B0C00FCA411 /* statbuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = statbuf.h; path = ../scheduler/statbuf.h; sourceTree = "<group>"; };
-               72220F8C13330B0C00FCA411 /* subscriptions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = subscriptions.c; path = ../scheduler/subscriptions.c; sourceTree = "<group>"; };
-               72220F8D13330B0C00FCA411 /* subscriptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = subscriptions.h; path = ../scheduler/subscriptions.h; sourceTree = "<group>"; };
-               72220F8E13330B0C00FCA411 /* sysman.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysman.c; path = ../scheduler/sysman.c; sourceTree = "<group>"; };
-               72220F8F13330B0C00FCA411 /* sysman.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sysman.h; path = ../scheduler/sysman.h; sourceTree = "<group>"; };
+               72220F6913330B0C00FCA411 /* auth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = auth.c; path = ../scheduler/auth.c; sourceTree = SOURCE_ROOT; };
+               72220F6A13330B0C00FCA411 /* auth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = auth.h; path = ../scheduler/auth.h; sourceTree = SOURCE_ROOT; };
+               72220F6B13330B0C00FCA411 /* banners.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = banners.c; path = ../scheduler/banners.c; sourceTree = SOURCE_ROOT; };
+               72220F6C13330B0C00FCA411 /* banners.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = banners.h; path = ../scheduler/banners.h; sourceTree = SOURCE_ROOT; };
+               72220F6D13330B0C00FCA411 /* cert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cert.c; path = ../scheduler/cert.c; sourceTree = SOURCE_ROOT; };
+               72220F6E13330B0C00FCA411 /* cert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cert.h; path = ../scheduler/cert.h; sourceTree = SOURCE_ROOT; };
+               72220F6F13330B0C00FCA411 /* classes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = classes.c; path = ../scheduler/classes.c; sourceTree = SOURCE_ROOT; };
+               72220F7013330B0C00FCA411 /* classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = classes.h; path = ../scheduler/classes.h; sourceTree = SOURCE_ROOT; };
+               72220F7113330B0C00FCA411 /* client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = client.c; path = ../scheduler/client.c; sourceTree = SOURCE_ROOT; };
+               72220F7213330B0C00FCA411 /* client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = client.h; path = ../scheduler/client.h; sourceTree = SOURCE_ROOT; };
+               72220F7313330B0C00FCA411 /* conf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = conf.c; path = ../scheduler/conf.c; sourceTree = SOURCE_ROOT; };
+               72220F7413330B0C00FCA411 /* conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = conf.h; path = ../scheduler/conf.h; sourceTree = SOURCE_ROOT; };
+               72220F7513330B0C00FCA411 /* cupsd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cupsd.h; path = ../scheduler/cupsd.h; sourceTree = SOURCE_ROOT; };
+               72220F7613330B0C00FCA411 /* dirsvc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dirsvc.c; path = ../scheduler/dirsvc.c; sourceTree = SOURCE_ROOT; };
+               72220F7713330B0C00FCA411 /* dirsvc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dirsvc.h; path = ../scheduler/dirsvc.h; sourceTree = SOURCE_ROOT; };
+               72220F7813330B0C00FCA411 /* env.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = env.c; path = ../scheduler/env.c; sourceTree = SOURCE_ROOT; };
+               72220F7913330B0C00FCA411 /* ipp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ipp.c; path = ../scheduler/ipp.c; sourceTree = SOURCE_ROOT; };
+               72220F7A13330B0C00FCA411 /* job.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = job.c; path = ../scheduler/job.c; sourceTree = SOURCE_ROOT; };
+               72220F7B13330B0C00FCA411 /* job.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = job.h; path = ../scheduler/job.h; sourceTree = SOURCE_ROOT; };
+               72220F7C13330B0C00FCA411 /* listen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = listen.c; path = ../scheduler/listen.c; sourceTree = SOURCE_ROOT; };
+               72220F7D13330B0C00FCA411 /* log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = log.c; path = ../scheduler/log.c; sourceTree = SOURCE_ROOT; };
+               72220F7E13330B0C00FCA411 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../scheduler/main.c; sourceTree = SOURCE_ROOT; };
+               72220F7F13330B0C00FCA411 /* network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = network.c; path = ../scheduler/network.c; sourceTree = SOURCE_ROOT; };
+               72220F8013330B0C00FCA411 /* network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network.h; path = ../scheduler/network.h; sourceTree = SOURCE_ROOT; };
+               72220F8113330B0C00FCA411 /* policy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = policy.c; path = ../scheduler/policy.c; sourceTree = SOURCE_ROOT; };
+               72220F8213330B0C00FCA411 /* policy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = policy.h; path = ../scheduler/policy.h; sourceTree = SOURCE_ROOT; };
+               72220F8313330B0C00FCA411 /* printers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = printers.c; path = ../scheduler/printers.c; sourceTree = SOURCE_ROOT; };
+               72220F8413330B0C00FCA411 /* printers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = printers.h; path = ../scheduler/printers.h; sourceTree = SOURCE_ROOT; };
+               72220F8513330B0C00FCA411 /* process.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = process.c; path = ../scheduler/process.c; sourceTree = SOURCE_ROOT; };
+               72220F8613330B0C00FCA411 /* quotas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = quotas.c; path = ../scheduler/quotas.c; sourceTree = SOURCE_ROOT; };
+               72220F8713330B0C00FCA411 /* removefile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = removefile.c; path = ../scheduler/removefile.c; sourceTree = SOURCE_ROOT; };
+               72220F8813330B0C00FCA411 /* select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = select.c; path = ../scheduler/select.c; sourceTree = SOURCE_ROOT; };
+               72220F8913330B0C00FCA411 /* server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = server.c; path = ../scheduler/server.c; sourceTree = SOURCE_ROOT; };
+               72220F8A13330B0C00FCA411 /* statbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = statbuf.c; path = ../scheduler/statbuf.c; sourceTree = SOURCE_ROOT; };
+               72220F8B13330B0C00FCA411 /* statbuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = statbuf.h; path = ../scheduler/statbuf.h; sourceTree = SOURCE_ROOT; };
+               72220F8C13330B0C00FCA411 /* subscriptions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = subscriptions.c; path = ../scheduler/subscriptions.c; sourceTree = SOURCE_ROOT; };
+               72220F8D13330B0C00FCA411 /* subscriptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = subscriptions.h; path = ../scheduler/subscriptions.h; sourceTree = SOURCE_ROOT; };
+               72220F8E13330B0C00FCA411 /* sysman.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysman.c; path = ../scheduler/sysman.c; sourceTree = SOURCE_ROOT; };
+               72220F8F13330B0C00FCA411 /* sysman.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sysman.h; path = ../scheduler/sysman.h; sourceTree = SOURCE_ROOT; };
                72220FAC13330B2200FCA411 /* libcupsmime.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcupsmime.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
                72220FB213330BCE00FCA411 /* filter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filter.c; path = ../scheduler/filter.c; sourceTree = "<group>"; };
                72220FB313330BCE00FCA411 /* mime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mime.c; path = ../scheduler/mime.c; sourceTree = "<group>"; };
                72220FB413330BCE00FCA411 /* mime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mime.h; path = ../scheduler/mime.h; sourceTree = "<group>"; };
                72220FB513330BCE00FCA411 /* type.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = type.c; path = ../scheduler/type.c; sourceTree = "<group>"; };
+               7234F41F1378A16F00D3E9C9 /* array-private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "array-private.h"; path = "../cups/array-private.h"; sourceTree = "<group>"; };
                724378FD1333E43E009631B9 /* ipp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ipp; sourceTree = BUILT_PRODUCTS_DIR; };
                724379091333E4E3009631B9 /* backend-private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "backend-private.h"; path = "../backend/backend-private.h"; sourceTree = "<group>"; };
                7243790A1333E4E3009631B9 /* ipp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ipp.c; path = ../backend/ipp.c; sourceTree = "<group>"; };
                7263EE3913330EC500BA4D44 /* libldap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libldap.dylib; path = SDKs/MacOSX10.6.sdk/usr/lib/libldap.dylib; sourceTree = DEVELOPER_DIR; };
                726AD6F7135E88F0002C930D /* ippserver */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ippserver; sourceTree = BUILT_PRODUCTS_DIR; };
                726AD701135E8A90002C930D /* ippserver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ippserver.c; path = ../test/ippserver.c; sourceTree = "<group>"; };
+               7271881613746EA8001A2036 /* bannertops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = bannertops.c; path = ../filter/bannertops.c; sourceTree = "<group>"; };
+               7271881713746EA8001A2036 /* commandtops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = commandtops.c; path = ../filter/commandtops.c; sourceTree = "<group>"; };
+               7271881813746EA8001A2036 /* common.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../filter/common.c; sourceTree = "<group>"; };
+               7271881913746EA8001A2036 /* common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../filter/common.h; sourceTree = "<group>"; };
+               7271881A13746EA8001A2036 /* gziptoany.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = gziptoany.c; path = ../filter/gziptoany.c; sourceTree = "<group>"; };
+               7271881B13746EA8001A2036 /* imagetops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = imagetops.c; path = ../filter/imagetops.c; sourceTree = "<group>"; };
+               7271881C13746EA8001A2036 /* imagetoraster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = imagetoraster.c; path = ../filter/imagetoraster.c; sourceTree = "<group>"; };
+               7271881D13746EA8001A2036 /* pdftops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pdftops.c; path = ../filter/pdftops.c; sourceTree = "<group>"; };
+               7271881E13746EA8001A2036 /* pstext.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pstext.c; path = ../filter/pstext.c; sourceTree = "<group>"; };
+               7271881F13746EA8001A2036 /* pstext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pstext.h; path = ../filter/pstext.h; sourceTree = "<group>"; };
+               7271882013746EA8001A2036 /* pstops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pstops.c; path = ../filter/pstops.c; sourceTree = "<group>"; };
+               7271882113746EA8001A2036 /* rastertoepson.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = rastertoepson.c; path = ../filter/rastertoepson.c; sourceTree = "<group>"; };
+               7271882213746EA8001A2036 /* rastertohp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = rastertohp.c; path = ../filter/rastertohp.c; sourceTree = "<group>"; };
+               7271882313746EA8001A2036 /* rastertolabel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = rastertolabel.c; path = ../filter/rastertolabel.c; sourceTree = "<group>"; };
+               7271882413746EA8001A2036 /* textcommon.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = textcommon.c; path = ../filter/textcommon.c; sourceTree = "<group>"; };
+               7271882513746EA8001A2036 /* textcommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = textcommon.h; path = ../filter/textcommon.h; sourceTree = "<group>"; };
+               7271882613746EA8001A2036 /* texttops.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = texttops.c; path = ../filter/texttops.c; sourceTree = "<group>"; };
+               7271882B137498E4001A2036 /* image-bmp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-bmp.c"; path = "../filter/image-bmp.c"; sourceTree = "<group>"; };
+               7271882C137498E4001A2036 /* image-colorspace.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-colorspace.c"; path = "../filter/image-colorspace.c"; sourceTree = "<group>"; };
+               7271882D137498E4001A2036 /* image-gif.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-gif.c"; path = "../filter/image-gif.c"; sourceTree = "<group>"; };
+               7271882E137498E4001A2036 /* image-jpeg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-jpeg.c"; path = "../filter/image-jpeg.c"; sourceTree = "<group>"; };
+               7271882F137498E4001A2036 /* image-photocd.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-photocd.c"; path = "../filter/image-photocd.c"; sourceTree = "<group>"; };
+               72718830137498E4001A2036 /* image-pix.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-pix.c"; path = "../filter/image-pix.c"; sourceTree = "<group>"; };
+               72718831137498E4001A2036 /* image-png.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-png.c"; path = "../filter/image-png.c"; sourceTree = "<group>"; };
+               72718832137498E4001A2036 /* image-pnm.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-pnm.c"; path = "../filter/image-pnm.c"; sourceTree = "<group>"; };
+               72718833137498E4001A2036 /* image-private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "image-private.h"; path = "../filter/image-private.h"; sourceTree = "<group>"; };
+               72718834137498E4001A2036 /* image-sgi.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-sgi.c"; path = "../filter/image-sgi.c"; sourceTree = "<group>"; };
+               72718835137498E4001A2036 /* image-sgi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "image-sgi.h"; path = "../filter/image-sgi.h"; sourceTree = "<group>"; };
+               72718836137498E4001A2036 /* image-sgilib.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-sgilib.c"; path = "../filter/image-sgilib.c"; sourceTree = "<group>"; };
+               72718837137498E4001A2036 /* image-sun.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-sun.c"; path = "../filter/image-sun.c"; sourceTree = "<group>"; };
+               72718838137498E4001A2036 /* image-tiff.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-tiff.c"; path = "../filter/image-tiff.c"; sourceTree = "<group>"; };
+               72718839137498E4001A2036 /* image-zoom.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "image-zoom.c"; path = "../filter/image-zoom.c"; sourceTree = "<group>"; };
+               7271883A137498E4001A2036 /* image.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = image.c; path = ../filter/image.c; sourceTree = "<group>"; };
+               7271883B137498E4001A2036 /* image.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = image.h; path = ../filter/image.h; sourceTree = "<group>"; };
+               7271883C1374AB14001A2036 /* mime-private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "mime-private.h"; path = "../scheduler/mime-private.h"; sourceTree = "<group>"; };
                72F75A4C1336F31B004BB496 /* libcups_static.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libcups_static.a; sourceTree = BUILT_PRODUCTS_DIR; };
                72F75A521336F950004BB496 /* cupstestppd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cupstestppd; sourceTree = BUILT_PRODUCTS_DIR; };
                72F75A5B1336F988004BB496 /* cupstestppd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cupstestppd.c; path = ../systemv/cupstestppd.c; sourceTree = "<group>"; };
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               278C58E9136B64B000836530 /* CoreFoundation.framework in Frameworks */,
+                               278C58EA136B64B000836530 /* Kerberos.framework in Frameworks */,
+                               278C58EB136B64B000836530 /* Security.framework in Frameworks */,
+                               278C58EC136B64B000836530 /* SystemConfiguration.framework in Frameworks */,
                                270CCDB9135E3D0900007BE2 /* libcups_static.a in Frameworks */,
                                270CCDBA135E3D0900007BE2 /* libcupsmime.dylib in Frameworks */,
                        );
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               726AD72B135EAE1E002C930D /* libcups_static.dylib in Frameworks */,
+                               278C58E4136B649200836530 /* libcups_static.a in Frameworks */,
                                273BF6CE1333B5950022CAAB /* CoreFoundation.framework in Frameworks */,
                                273BF6D31333B5C30022CAAB /* Kerberos.framework in Frameworks */,
                                273BF6D41333B5C30022CAAB /* Security.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               278C58C8136B640300836530 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               278C58DE136B645C00836530 /* CoreFoundation.framework in Frameworks */,
+                               278C58DF136B645C00836530 /* Kerberos.framework in Frameworks */,
+                               278C58F6136B652300836530 /* Security.framework in Frameworks */,
+                               278C58E1136B645C00836530 /* SystemConfiguration.framework in Frameworks */,
+                               278C58D9136B645C00836530 /* libcups_static.a in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                720DD6BF1358FD5F0064AA82 /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                273BF6B81333B4A90022CAAB /* tests */ = {
                        isa = PBXGroup;
                        children = (
-                               270CCDBB135E3D3E00007BE2 /* testmime.c */,
                                273BF6C61333B5370022CAAB /* testcups.c */,
+                               278C58E2136B647200836530 /* testhttp.c */,
+                               270CCDBB135E3D3E00007BE2 /* testmime.c */,
                        );
                        name = tests;
                        sourceTree = "<group>";
                274FF67313333B0A00317ECB /* commands */ = {
                        isa = PBXGroup;
                        children = (
+                               2732E089137A3F5200FAFEF6 /* cancel.c */,
+                               2732E08A137A3F5200FAFEF6 /* cupsaccept.c */,
                                276684101337FA7C000D33D0 /* cupsaddsmb.c */,
                                276683681337AA00000D33D0 /* cupsctl.c */,
                                274FF68713333B6E00317ECB /* cupsfilter.c */,
+                               2732E08B137A3F5200FAFEF6 /* cupstestdsc.c */,
                                72F75A5B1336F988004BB496 /* cupstestppd.c */,
                                726AD701135E8A90002C930D /* ippserver.c */,
                                276683F91337F7A9000D33D0 /* ipptool.c */,
+                               2732E08C137A3F5200FAFEF6 /* lp.c */,
+                               2732E08D137A3F5200FAFEF6 /* lpadmin.c */,
+                               2732E08E137A3F5200FAFEF6 /* lpinfo.c */,
+                               2732E08F137A3F5200FAFEF6 /* lpmove.c */,
+                               2732E090137A3F5200FAFEF6 /* lpoptions.c */,
+                               2732E091137A3F5200FAFEF6 /* lppasswd.c */,
+                               2732E092137A3F5200FAFEF6 /* lpstat.c */,
                        );
                        name = commands;
                        sourceTree = "<group>";
                                720DD6C21358FD5F0064AA82 /* snmp */,
                                270CCDA7135E3C9E00007BE2 /* testmime */,
                                726AD6F7135E88F0002C930D /* ippserver */,
+                               278C58CB136B640300836530 /* testhttp */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                        isa = PBXGroup;
                        children = (
                                72220F471333063D00FCA411 /* config.h */,
+                               7234F41F1378A16F00D3E9C9 /* array-private.h */,
                                72220EC01333056300FCA411 /* cups-private.h */,
                                72220EC31333056300FCA411 /* debug-private.h */,
                                72220ED7133305BB00FCA411 /* file-private.h */,
                                72220EE4133305BB00FCA411 /* ipp-private.h */,
                                72220EE9133305BB00FCA411 /* language-private.h */,
                                72220EEE133305BB00FCA411 /* md5-private.h */,
+                               7271883C1374AB14001A2036 /* mime-private.h */,
                                72220EF5133305BB00FCA411 /* ppd-private.h */,
                                72220EF9133305BB00FCA411 /* pwg-private.h */,
                                72220EFE133305BB00FCA411 /* snmp-private.h */,
                72220FB113330B4A00FCA411 /* Frameworks */ = {
                        isa = PBXGroup;
                        children = (
-                               72F75A4C1336F31B004BB496 /* libcups_static.a */,
+                               278C58F4136B652300836530 /* Security.framework */,
+                               278C58E5136B64AF00836530 /* CoreFoundation.framework */,
+                               278C58E6136B64B000836530 /* Kerberos.framework */,
+                               278C58E7136B64B000836530 /* Security.framework */,
+                               278C58E8136B64B000836530 /* SystemConfiguration.framework */,
+                               278C58DA136B645C00836530 /* CoreFoundation.framework */,
+                               278C58DB136B645C00836530 /* Kerberos.framework */,
+                               278C58DD136B645C00836530 /* SystemConfiguration.framework */,
                                72220FAC13330B2200FCA411 /* libcupsmime.dylib */,
                                72220EAE1333047D00FCA411 /* libcups.dylib */,
                                72F75A611336F9A3004BB496 /* libcupsimage.dylib */,
                7258EADC134594A8009286F1 /* filters */ = {
                        isa = PBXGroup;
                        children = (
+                               7271881613746EA8001A2036 /* bannertops.c */,
+                               7271881713746EA8001A2036 /* commandtops.c */,
+                               7271881813746EA8001A2036 /* common.c */,
+                               7271881913746EA8001A2036 /* common.h */,
+                               7271881A13746EA8001A2036 /* gziptoany.c */,
+                               7271881B13746EA8001A2036 /* imagetops.c */,
+                               7271881C13746EA8001A2036 /* imagetoraster.c */,
+                               7271881D13746EA8001A2036 /* pdftops.c */,
+                               7271881E13746EA8001A2036 /* pstext.c */,
+                               7271881F13746EA8001A2036 /* pstext.h */,
+                               7271882013746EA8001A2036 /* pstops.c */,
+                               7271882113746EA8001A2036 /* rastertoepson.c */,
+                               7271882213746EA8001A2036 /* rastertohp.c */,
+                               7271882313746EA8001A2036 /* rastertolabel.c */,
                                7258EAEC134594EB009286F1 /* rastertopwg.c */,
+                               7271882413746EA8001A2036 /* textcommon.c */,
+                               7271882513746EA8001A2036 /* textcommon.h */,
+                               7271882613746EA8001A2036 /* texttops.c */,
                        );
                        name = filters;
                        sourceTree = "<group>";
                };
+               7271882A1374988C001A2036 /* Unused */ = {
+                       isa = PBXGroup;
+                       children = (
+                               7271882B137498E4001A2036 /* image-bmp.c */,
+                               7271882C137498E4001A2036 /* image-colorspace.c */,
+                               7271882D137498E4001A2036 /* image-gif.c */,
+                               7271882E137498E4001A2036 /* image-jpeg.c */,
+                               7271882F137498E4001A2036 /* image-photocd.c */,
+                               72718830137498E4001A2036 /* image-pix.c */,
+                               72718831137498E4001A2036 /* image-png.c */,
+                               72718832137498E4001A2036 /* image-pnm.c */,
+                               72718833137498E4001A2036 /* image-private.h */,
+                               72718834137498E4001A2036 /* image-sgi.c */,
+                               72718835137498E4001A2036 /* image-sgi.h */,
+                               72718836137498E4001A2036 /* image-sgilib.c */,
+                               72718837137498E4001A2036 /* image-sun.c */,
+                               72718838137498E4001A2036 /* image-tiff.c */,
+                               72718839137498E4001A2036 /* image-zoom.c */,
+                               7271883A137498E4001A2036 /* image.c */,
+                               7271883B137498E4001A2036 /* image.h */,
+                       );
+                       name = Unused;
+                       sourceTree = "<group>";
+               };
                72BF96351333042100B1EAD7 = {
                        isa = PBXGroup;
                        children = (
+                               72F75A4C1336F31B004BB496 /* libcups_static.a */,
                                72220FB113330B4A00FCA411 /* Frameworks */,
                                72220F45133305D000FCA411 /* Public Headers */,
                                72220F461333060C00FCA411 /* Private Headers */,
                72F75A681336FA42004BB496 /* libcupsimage */ = {
                        isa = PBXGroup;
                        children = (
+                               7271882A1374988C001A2036 /* Unused */,
                                72F75A691336FA8A004BB496 /* error.c */,
                                72F75A6A1336FA8A004BB496 /* interpret.c */,
                                72F75A6B1336FA8A004BB496 /* raster.c */,
                                72220F3B133305BB00FCA411 /* string-private.h in Headers */,
                                72220F3E133305BB00FCA411 /* thread-private.h in Headers */,
                                72220F481333063D00FCA411 /* config.h in Headers */,
+                               7234F4201378A16F00D3E9C9 /* array-private.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        buildActionMask = 2147483647;
                        files = (
                                72220FB813330BCE00FCA411 /* mime.h in Headers */,
+                               7271883D1374AB14001A2036 /* mime-private.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        productReference = 276684041337FA1D000D33D0 /* cupsaddsmb */;
                        productType = "com.apple.product-type.tool";
                };
+               278C58CA136B640300836530 /* testhttp */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 278C58D3136B640300836530 /* Build configuration list for PBXNativeTarget "testhttp" */;
+                       buildPhases = (
+                               278C58C7136B640300836530 /* Sources */,
+                               278C58C8136B640300836530 /* Frameworks */,
+                               278C58C9136B640300836530 /* CopyFiles */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               278C58D8136B642F00836530 /* PBXTargetDependency */,
+                       );
+                       name = testhttp;
+                       productName = testhttp;
+                       productReference = 278C58CB136B640300836530 /* testhttp */;
+                       productType = "com.apple.product-type.tool";
+               };
                720DD6C11358FD5F0064AA82 /* snmp */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = 720DD6CB1358FD600064AA82 /* Build configuration list for PBXNativeTarget "snmp" */;
                72BF96371333042100B1EAD7 /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
+                               LastUpgradeCheck = 0410;
                                ORGANIZATIONNAME = "Apple Inc.";
                        };
                        buildConfigurationList = 72BF963A1333042100B1EAD7 /* Build configuration list for PBXProject "CUPS" */;
                                720DD6C11358FD5F0064AA82 /* snmp */,
                                7243792F1333FB85009631B9 /* socket */,
                                273BF6BC1333B5000022CAAB /* testcups */,
+                               278C58CA136B640300836530 /* testhttp */,
                                270CCDA6135E3C9E00007BE2 /* testmime */,
                                7243795A1333FF1D009631B9 /* usb */,
                        );
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               278C58C7136B640300836530 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               278C58E3136B647200836530 /* testhttp.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                720DD6BE1358FD5F0064AA82 /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        target = 276684031337FA1D000D33D0 /* cupsaddsmb */;
                        targetProxy = 276684121337FA8D000D33D0 /* PBXContainerItemProxy */;
                };
+               278C58D6136B641D00836530 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 278C58CA136B640300836530 /* testhttp */;
+                       targetProxy = 278C58D5136B641D00836530 /* PBXContainerItemProxy */;
+               };
+               278C58D8136B642F00836530 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 274FF6891333B1C400317ECB /* libcups_static */;
+                       targetProxy = 278C58D7136B642F00836530 /* PBXContainerItemProxy */;
+               };
                720DD6CF1358FD790064AA82 /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = 72220EAD1333047D00FCA411 /* libcups */;
                        };
                        name = Release;
                };
+               278C58D1136B640300836530 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+                               COPY_PHASE_STRIP = NO;
+                               GCC_C_LANGUAGE_STANDARD = gnu99;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+                               GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+                               GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+                               GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.6;
+                               ONLY_ACTIVE_ARCH = YES;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SDKROOT = macosx;
+                       };
+                       name = Debug;
+               };
+               278C58D2136B640300836530 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               GCC_C_LANGUAGE_STANDARD = gnu99;
+                               GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+                               GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+                               GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.6;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                       };
+                       name = Release;
+               };
                720DD6C91358FD5F0064AA82 /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ARCHS = "$(NATIVE_ARCH_ACTUAL)";
+                               GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                HEADER_SEARCH_PATHS = (
                                        .,
                                        ..,
                                        "-D_CUPS_SOURCE",
                                        "-Wno-shorten-64-to-32",
                                );
-                               SDKROOT = macosx;
+                               SDKROOT = "";
                        };
                        name = Debug;
                };
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+                               GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                HEADER_SEARCH_PATHS = (
                                        .,
                                        ..,
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
+               278C58D3136B640300836530 /* Build configuration list for PBXNativeTarget "testhttp" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               278C58D1136B640300836530 /* Debug */,
+                               278C58D2136B640300836530 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
                720DD6CB1358FD600064AA82 /* Build configuration list for PBXNativeTarget "snmp" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
index 7ff88561d47c73de0c0a9d7c3f38073b14ee7d4c..fabfac8d1b890fd7bfd5e8a64fab7a958f4a4632 100644 (file)
  * Do we have the GSSAPI support library (for Kerberos support)?
  */
 
+/* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
+#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
+/* #undef HAVE_GSS_GSSAPI_H */
+/* #undef HAVE_GSS_GSSAPI_SPI_H */
 #define HAVE_GSSAPI 1
 #define HAVE_GSSAPI_H 1
 #define HAVE_GSSAPI_GSSAPI_H 1
 #define HAVE_GSSAPI_GSSAPI_GENERIC_H 1
 #define HAVE_GSSAPI_GSSAPI_KRB5_H 1
-/* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
-#define HAVE_KRB5_CC_NEW_UNIQUE 1
-#define HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID 1
 #define HAVE_KRB5_H 1
-/* #undef HAVE_HEIMDAL */
 
 
 /*
 #define HAVE_COLORSYNCREGISTERDEVICE 1
 
 
+/*
+ * Do we have XPC?
+ */
+
+/* #undef HAVE_XPC */
+
+
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*