]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Import CUPS v2.1.3 release-2.1.3
authorMichael Sweet <msweet@msweet-imac.local>
Tue, 15 Mar 2016 14:43:33 +0000 (10:43 -0400)
committerMichael Sweet <msweet@msweet-imac.local>
Tue, 15 Mar 2016 14:43:33 +0000 (10:43 -0400)
24 files changed:
CHANGES.txt
INSTALL.txt
README.txt
backend/lpd.c
config-scripts/cups-common.m4
configure
configure.ac
cups/cups.h
cups/dest.c
cups/encode.c
cups/testoptions.c
cups/usersys.c
filter/rastertolabel.c
notifier/testnotify.c
packaging/cups.spec
scheduler/client.c
scheduler/ipp.c
scheduler/job.c
scheduler/main.c
scheduler/org.cups.cupsd.plist
scheduler/subscriptions.c
templates/de/jobs-header.tmpl
test/ipptool.c
xcode/CUPS.xcodeproj/project.pbxproj

index 566a4e3ede13b7e804b46ea294046f6391ad84b2..6a1a1dbdf8c4d0203450b96621ece21e7ad59a20 100644 (file)
@@ -1,6 +1,25 @@
-CHANGES.txt - 2.1.2 - 2015-12-02
+CHANGES.txt - 2.1.3 - 2016-02-05
 --------------------------------
 
+CHANGES IN CUPS V2.1.3
+
+       - The default password function did not work on some platforms
+         (STR #4750)
+       - The scheduler should not exit under memory pressure
+         (<rdar://problem/23255001>)
+       - The EPL2 and ZPL sample drivers did not properly support the CutMedia
+         option.
+       - Pending subscriptions would prevent the scheduler from idle exiting
+         (STR #4754)
+       - Fixed some issues in ipptool for skipped tests
+         (<rdar://problem/24137160>)
+       - The "lp -H resume" command did not reset the "job-state-reasons"
+         attribute value (STR #4752)
+       - The scheduler did not allow access to resource files (icons, etc.)
+         when the web interface was disabled (STR #4755)
+       - Localization fix (STR #4756)
+
+
 CHANGES IN CUPS V2.1.2
 
        - Re-release of CUPS 2.1.1 as CUPS 2.1.2 due to error in tagging of the
index 762b88897b451f763df25aab2a12ed79ec6b8a65..baa2388fb7e3969ec7649357086c02179f8d66ce 100644 (file)
@@ -1,4 +1,4 @@
-INSTALL - CUPS v2.1.2 - 2015-12-02
+INSTALL - CUPS v2.1.3 - 2016-02-05
 ----------------------------------
 
 This file describes how to compile and install CUPS from source code. For more
index 91a3c189bc37a2e187cabab6e9395373b1785294..8f8459c9a72e9ca2b5e5265993da2ff21409fd94 100644 (file)
@@ -1,4 +1,4 @@
-README - CUPS v2.1.2 - 2015-12-02
+README - CUPS v2.1.3 - 2016-02-05
 ---------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt" instead...
index 33e84086c383085eb69853ed71dc035535e9aa88..7daa9a85d1aac92264f98966a3181f992494fe8d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $"
+ * "$Id: lpd.c 13040 2016-01-11 20:29:13Z msweet $"
  *
  * Line Printer Daemon backend for CUPS.
  *
@@ -1251,7 +1251,7 @@ rresvport_af(int *port,                   /* IO - Port number to bind to */
   */
 
   memset(&addr, 0, sizeof(addr));
-  addr.addr.sa_family = family;
+  addr.addr.sa_family = (sa_family_t)family;
 
  /*
   * Try to bind the socket to a reserved port...
@@ -1320,5 +1320,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $".
+ * End of "$Id: lpd.c 13040 2016-01-11 20:29:13Z msweet $".
  */
index 38a7af63a364cb4518778a1fa60a06d3cb68fdbb..812229590bb9740fca1b19cc4a853b9ed1134e81 100644 (file)
@@ -17,7 +17,7 @@ dnl Set the name of the config header file...
 AC_CONFIG_HEADER(config.h)
 
 dnl Version number information...
-CUPS_VERSION=2.1.2
+CUPS_VERSION=2.1.3
 
 case "$CUPS_VERSION" in
        *svn)
index 4170ff3adf4f498bcf9a53b57c22f1083b5d906d..908794c7617bff1daabcb4eb33ff4efaab8a6106 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for CUPS 2.1.2.
+# Generated by GNU Autoconf 2.68 for CUPS 2.1.3.
 #
 # Report bugs to <https://www.cups.org/str.php>.
 #
@@ -560,8 +560,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='CUPS'
 PACKAGE_TARNAME='cups'
-PACKAGE_VERSION='2.1.2'
-PACKAGE_STRING='CUPS 2.1.2'
+PACKAGE_VERSION='2.1.3'
+PACKAGE_STRING='CUPS 2.1.3'
 PACKAGE_BUGREPORT='https://www.cups.org/str.php'
 PACKAGE_URL='https://www.cups.org/'
 
@@ -1447,7 +1447,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures CUPS 2.1.2 to adapt to many kinds of systems.
+\`configure' configures CUPS 2.1.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1508,7 +1508,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of CUPS 2.1.2:";;
+     short | recursive ) echo "Configuration of CUPS 2.1.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1687,7 +1687,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-CUPS configure 2.1.2
+CUPS configure 2.1.3
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2151,7 +2151,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by CUPS $as_me 2.1.2, which was
+It was created by CUPS $as_me 2.1.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2526,7 +2526,7 @@ esac
 ac_config_headers="$ac_config_headers config.h"
 
 
-CUPS_VERSION=2.1.2
+CUPS_VERSION=2.1.3
 
 case "$CUPS_VERSION" in
        *svn)
@@ -10765,7 +10765,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by CUPS $as_me 2.1.2, which was
+This file was extended by CUPS $as_me 2.1.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10828,7 +10828,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-CUPS config.status 2.1.2
+CUPS config.status 2.1.3
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
index e6dc4fb1bb91834815f0b48321c0c6856ad60815..11ca7bb39445faa75b7a4e851f70021167ad6632 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: configure.ac 12998 2015-12-02 15:09:04Z msweet $"
+dnl "$Id: configure.ac 13031 2016-01-04 14:43:04Z msweet $"
 dnl
 dnl Configuration script for CUPS.
 dnl
-dnl Copyright 2007-2015 by Apple Inc.
+dnl Copyright 2007-2016 by Apple Inc.
 dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
 dnl
 dnl These coded instructions, statements, and computer programs are the
@@ -17,7 +17,7 @@ dnl We need at least autoconf 2.60...
 AC_PREREQ(2.60)
 
 dnl Package name and version...
-AC_INIT([CUPS], [2.1.2], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
+AC_INIT([CUPS], [2.1.3], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
 
 sinclude(config-scripts/cups-opsys.m4)
 sinclude(config-scripts/cups-common.m4)
@@ -95,5 +95,5 @@ AC_OUTPUT(Makedefs
 chmod +x cups-config
 
 dnl
-dnl End of "$Id: configure.ac 12998 2015-12-02 15:09:04Z msweet $".
+dnl End of "$Id: configure.ac 13031 2016-01-04 14:43:04Z msweet $".
 dnl
index dc000ab81265c6ebae09a92343356f3f68766b93..53768389281d887a87aafa31781bbb7672f6d972 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: cups.h 12998 2015-12-02 15:09:04Z msweet $"
+ * "$Id: cups.h 13031 2016-01-04 14:43:04Z msweet $"
  *
  * API definitions for CUPS.
  *
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -58,10 +58,10 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION                 2.0102
+#  define CUPS_VERSION                 2.0103
 #  define CUPS_VERSION_MAJOR           2
 #  define CUPS_VERSION_MINOR           1
-#  define CUPS_VERSION_PATCH           2
+#  define CUPS_VERSION_PATCH           3
 
 #  define CUPS_BC_FD                   3
                                        /* Back-channel file descriptor for
@@ -636,5 +636,5 @@ extern int          cupsSetServerCredentials(const char *path, const char *common_name,
 #endif /* !_CUPS_CUPS_H_ */
 
 /*
- * End of "$Id: cups.h 12998 2015-12-02 15:09:04Z msweet $".
+ * End of "$Id: cups.h 13031 2016-01-04 14:43:04Z msweet $".
  */
index 413fc271e1ea2e06ede93375a64d965bcfc2bb80..578d352b11adec7e402d69d5869351bcadc254aa 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: dest.c 12733 2015-06-12 01:21:05Z msweet $"
+ * "$Id: dest.c 13075 2016-01-29 21:14:05Z msweet $"
  *
  * User-defined destination (and option) support for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -122,7 +122,7 @@ typedef struct _cups_dnssd_resolve_s        /* Data for resolving URI */
 #ifdef __APPLE__
 static CFArrayRef      appleCopyLocations(void);
 static CFStringRef     appleCopyNetwork(void);
-static char            *appleGetPaperSize(char *name, int namesize);
+static char            *appleGetPaperSize(char *name, size_t namesize);
 static CFStringRef     appleGetPrinter(CFArrayRef locations,
                                        CFStringRef network, CFIndex *locindex);
 #endif /* __APPLE__ */
@@ -2491,8 +2491,8 @@ appleCopyNetwork(void)
  */
 
 static char *                          /* O - Default paper size */
-appleGetPaperSize(char *name,          /* I - Paper size name buffer */
-                  int  namesize)       /* I - Size of buffer */
+appleGetPaperSize(char   *name,                /* I - Paper size name buffer */
+                  size_t namesize)     /* I - Size of buffer */
 {
   CFStringRef  defaultPaperID;         /* Default paper ID */
   pwg_media_t  *pwgmedia;              /* PWG media size */
@@ -2501,8 +2501,7 @@ appleGetPaperSize(char *name,             /* I - Paper size name buffer */
   defaultPaperID = _cupsAppleCopyDefaultPaperID();
   if (!defaultPaperID ||
       CFGetTypeID(defaultPaperID) != CFStringGetTypeID() ||
-      !CFStringGetCString(defaultPaperID, name, namesize,
-                         kCFStringEncodingUTF8))
+      !CFStringGetCString(defaultPaperID, name, (CFIndex)namesize, kCFStringEncodingUTF8))
     name[0] = '\0';
   else if ((pwgmedia = pwgMediaForLegacy(name)) != NULL)
     strlcpy(name, pwgmedia->pwg, namesize);
@@ -3943,5 +3942,5 @@ cups_make_string(
 
 
 /*
- * End of "$Id: dest.c 12733 2015-06-12 01:21:05Z msweet $".
+ * End of "$Id: dest.c 13075 2016-01-29 21:14:05Z msweet $".
  */
index b43c4a3fc4e46a0f463e3000e3d1d633cb378043..26c5efe3fe366a03f34ec1406741a2b2fdad035a 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: encode.c 12668 2015-05-27 19:30:32Z msweet $"
+ * "$Id: encode.c 13064 2016-01-27 16:05:09Z msweet $"
  *
  * Option encoding routines for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -542,14 +542,13 @@ cupsEncodeOptions2(
        else if (*sep == ',' && !quote)
          count ++;
        else if (*sep == '\\' && sep[1])
-         sep ++;
+         sep += 2;
       }
     }
     else
       count = 1;
 
-    DEBUG_printf(("2cupsEncodeOptions2: option=\"%s\", count=%d",
-                  option->name, count));
+    DEBUG_printf(("2cupsEncodeOptions2: option=\"%s\", value=\"%s\", count=%d", option->name, option->value, count));
 
    /*
     * Allocate memory for the attribute values...
@@ -633,6 +632,7 @@ cupsEncodeOptions2(
            * Skip quoted character...
            */
 
+           memmove(sep, sep + 1, strlen(sep));
            sep ++;
          }
        }
@@ -853,5 +853,5 @@ compare_ipp_options(_ipp_option_t *a,       /* I - First option */
 
 
 /*
- * End of "$Id: encode.c 12668 2015-05-27 19:30:32Z msweet $".
+ * End of "$Id: encode.c 13064 2016-01-27 16:05:09Z msweet $".
  */
index d14b64f8db5107dd3d2aaf9ea9fa8ce5938c004b..5789e3b81d8ec11ad203d56c348bd11779f4aa80 100644 (file)
@@ -1,21 +1,17 @@
 /*
- * "$Id: testoptions.c 1992 2010-03-24 14:32:08Z msweet $"
+ * "$Id: testoptions.c 13061 2016-01-26 21:31:40Z msweet $"
  *
- *   Option test program for CUPS.
+ * Option unit test program for CUPS.
  *
- *   Copyright 2008-2010 by Apple Inc.
+ * Copyright 2008-2016 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/".
+ * 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.
- *
- * Contents:
- *
- *   main() - Test option processing functions.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
@@ -37,6 +33,9 @@ main(int  argc,                               /* I - Number of command-line arguments */
                num_options;            /* Number of options */
   cups_option_t        *options;               /* Options */
   const char   *value;                 /* Value of an option */
+  ipp_t                *request;               /* IPP request */
+  ipp_attribute_t *attr;               /* IPP attribute */
+  int          count;                  /* Number of attributes */
 
 
   if (argc == 1)
@@ -53,11 +52,12 @@ main(int  argc,                             /* I - Number of command-line arguments */
                                   "baz={param1=1 param2=2} "
                                   "foobar=FOO\\ BAR "
                                   "barfoo=barfoo "
-                                  "barfoo=\"\'BAR FOO\'\"", 0, &options);
+                                  "barfoo=\"\'BAR FOO\'\" "
+                                  "auth-info=user,pass\\\\,word\\\\\\\\", 0, &options);
 
-    if (num_options != 5)
+    if (num_options != 6)
     {
-      printf("FAIL (num_options=%d, expected 5)\n", num_options);
+      printf("FAIL (num_options=%d, expected 6)\n", num_options);
       status ++;
     }
     else if ((value = cupsGetOption("foo", num_options, options)) == NULL ||
@@ -91,6 +91,71 @@ main(int  argc,                              /* I - Number of command-line arguments */
       printf("FAIL (barfoo=\"%s\", expected \"\'BAR FOO\'\")\n", value);
       status ++;
     }
+    else if ((value = cupsGetOption("auth-info", num_options, options)) == NULL ||
+             strcmp(value, "user,pass\\,word\\\\"))
+    {
+      printf("FAIL (auth-info=\"%s\", expected \"user,pass\\,word\\\\\")\n", value);
+      status ++;
+    }
+    else
+      puts("PASS");
+
+    fputs("cupsEncodeOptions2: ", stdout);
+    request = ippNew();
+    ippSetOperation(request, IPP_OP_PRINT_JOB);
+
+    cupsEncodeOptions2(request, num_options, options, IPP_TAG_JOB);
+    for (count = 0, attr = ippFirstAttribute(request); attr; attr = ippNextAttribute(request), count ++);
+    if (count != 6)
+    {
+      printf("FAIL (%d attributes, expected 6)\n", count);
+      status ++;
+    }
+    else if ((attr = ippFindAttribute(request, "foo", IPP_TAG_ZERO)) == NULL)
+    {
+      puts("FAIL (Unable to find attribute \"foo\")");
+      status ++;
+    }
+    else if (ippGetValueTag(attr) != IPP_TAG_NAME)
+    {
+      printf("FAIL (\"foo\" of type %s, expected name)\n", ippTagString(ippGetValueTag(attr)));
+      status ++;
+    }
+    else if (ippGetCount(attr) != 1)
+    {
+      printf("FAIL (\"foo\" has %d values, expected 1)\n", (int)ippGetCount(attr));
+      status ++;
+    }
+    else if (strcmp(ippGetString(attr, 0, NULL), "1234"))
+    {
+      printf("FAIL (\"foo\" has value %s, expected 1234)\n", ippGetString(attr, 0, NULL));
+      status ++;
+    }
+    else if ((attr = ippFindAttribute(request, "auth-info", IPP_TAG_ZERO)) == NULL)
+    {
+      puts("FAIL (Unable to find attribute \"auth-info\")");
+      status ++;
+    }
+    else if (ippGetValueTag(attr) != IPP_TAG_TEXT)
+    {
+      printf("FAIL (\"auth-info\" of type %s, expected text)\n", ippTagString(ippGetValueTag(attr)));
+      status ++;
+    }
+    else if (ippGetCount(attr) != 2)
+    {
+      printf("FAIL (\"auth-info\" has %d values, expected 2)\n", (int)ippGetCount(attr));
+      status ++;
+    }
+    else if (strcmp(ippGetString(attr, 0, NULL), "user"))
+    {
+      printf("FAIL (\"auth-info\"[0] has value \"%s\", expected \"user\")\n", ippGetString(attr, 0, NULL));
+      status ++;
+    }
+    else if (strcmp(ippGetString(attr, 1, NULL), "pass,word\\"))
+    {
+      printf("FAIL (\"auth-info\"[1] has value \"%s\", expected \"pass,word\\\")\n", ippGetString(attr, 1, NULL));
+      status ++;
+    }
     else
       puts("PASS");
   }
@@ -112,5 +177,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: testoptions.c 1992 2010-03-24 14:32:08Z msweet $".
+ * End of "$Id: testoptions.c 13061 2016-01-26 21:31:40Z msweet $".
  */
index 7c0eb3bb908ec465c37922ce71478d1344aae927..55e6964a6ad832c11157b8afae189875f9374047 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: usersys.c 12817 2015-07-30 15:45:46Z msweet $"
+ * "$Id: usersys.c 13030 2016-01-04 14:35:45Z msweet $"
  *
  * User, system, and password routines for CUPS.
  *
@@ -710,6 +710,8 @@ _cupsGetPassword(const char *prompt)        /* I - Prompt string */
 
   noecho = original;
   noecho.c_lflag &= (tcflag_t)~(ICANON | ECHO | ECHOE | ISIG);
+  noecho.c_cc[VMIN]  = 1;
+  noecho.c_cc[VTIME] = 0;
 
   if (tcsetattr(tty, TCSAFLUSH, &noecho))
   {
@@ -1237,7 +1239,7 @@ cups_set_ssl_options(
 
   for (start = temp; *start; start = end)
   {
-   /* 
+   /*
     * Find end of keyword...
     */
 
@@ -1285,5 +1287,5 @@ cups_set_user(
 
 
 /*
- * End of "$Id: usersys.c 12817 2015-07-30 15:45:46Z msweet $".
+ * End of "$Id: usersys.c 13030 2016-01-04 14:35:45Z msweet $".
  */
index f5c6d12dbf4982ebe83fca378604c82cad63a780..afcac96ec5f7a70193339685a35bf29886b4dcf0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: rastertolabel.c 12945 2015-10-26 19:46:02Z msweet $"
+ * "$Id: rastertolabel.c 13022 2015-12-16 18:35:26Z msweet $"
  *
  * Label printer filter for CUPS.
  *
@@ -471,6 +471,13 @@ EndPage(ppd_file_t *ppd,           /* I - PPD file */
        */
 
         puts("P1");
+
+       /*
+        * Cut the label as needed...
+        */
+
+       if (header->CutMedia)
+         puts("C");
        break;
 
     case ZEBRA_ZPL :
@@ -602,6 +609,13 @@ EndPage(ppd_file_t *ppd,           /* I - PPD file */
 
         puts("^IDR:CUPS.GRF^FS");
        puts("^XZ");
+
+       /*
+        * Cut the label as needed...
+        */
+
+       if (header->CutMedia)
+         puts("^CN1");
         break;
 
     case ZEBRA_CPCL :
@@ -1267,5 +1281,5 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: rastertolabel.c 12945 2015-10-26 19:46:02Z msweet $".
+ * End of "$Id: rastertolabel.c 13022 2015-12-16 18:35:26Z msweet $".
  */
index 67441cee939332e1d7e77069635de6760072e9c2..e4db4c1f15a6db7b9b5221ec6a2cd72fbf0172d7 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: testnotify.c 10996 2013-05-29 11:51:34Z msweet $"
+ * "$Id: testnotify.c 13040 2016-01-11 20:29:13Z msweet $"
  *
  *   Test notifier for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2016 by Apple Inc.
  *   Copyright 1997-2005 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -115,7 +115,7 @@ print_attributes(ipp_t *ipp,                /* I - IPP request */
 
     ippAttributeString(attr, buffer, sizeof(buffer));
 
-    fprintf(stderr, "DEBUG: %*s%s (%s%s) %s", indent, "", attr->name,
+    fprintf(stderr, "DEBUG: %*s%s (%s%s) %s\n", indent, "", attr->name,
             attr->num_values > 1 ? "1setOf " : "",
            ippTagString(attr->value_tag), buffer);
   }
@@ -123,5 +123,5 @@ print_attributes(ipp_t *ipp,                /* I - IPP request */
 
 
 /*
- * End of "$Id: testnotify.c 10996 2013-05-29 11:51:34Z msweet $".
+ * End of "$Id: testnotify.c 13040 2016-01-11 20:29:13Z msweet $".
  */
index 2d5219bb9260eab6d75b60df1cd93ad86d802de3..ce06e07f52c365d56050ac60344a7c6e8506125e 100644 (file)
 
 Summary: CUPS
 Name: cups
-Version: 2.1.2
+Version: 2.1.3
 Release: 1
 Epoch: 1
 License: GPL
 Group: System Environment/Daemons
-Source: http://www.cups.org/software/2.1.2/cups-2.1.2-source.tar.bz2
+Source: http://www.cups.org/software/2.1.3/cups-2.1.3-source.tar.bz2
 Url: http://www.cups.org
 Packager: Anonymous <anonymous@foo.com>
 Vendor: Apple Inc.
index 3ec3b5c91f7af184b605a002f5a5dc97011a92ee..6a5e740b44e65d1549e4146ef9b9b2d3e07e9d49 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c 12978 2015-11-17 19:29:52Z msweet $"
+ * "$Id: client.c 13061 2016-01-26 21:31:40Z msweet $"
  *
  * Client routines for the CUPS scheduler.
  *
@@ -1156,29 +1156,28 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
                break;
              }
            }
-           else if (!WebInterface)
-           {
-            /*
-             * Web interface is disabled. Show an appropriate message...
-             */
-
-             if (!cupsdSendError(con, HTTP_STATUS_CUPS_WEBIF_DISABLED, CUPSD_AUTH_NONE))
-             {
-               cupsdCloseClient(con);
-               return;
-             }
-
-             break;
-           }
 
-           if ((!strncmp(con->uri, "/admin", 6) &&
-                 strncmp(con->uri, "/admin/conf/", 12) &&
-                 strncmp(con->uri, "/admin/log/", 11)) ||
+           if ((!strncmp(con->uri, "/admin", 6) && strcmp(con->uri, "/admin/conf/cupsd.conf") && strncmp(con->uri, "/admin/log/", 11)) ||
                 !strncmp(con->uri, "/printers", 9) ||
                 !strncmp(con->uri, "/classes", 8) ||
                 !strncmp(con->uri, "/help", 5) ||
                 !strncmp(con->uri, "/jobs", 5))
            {
+             if (!WebInterface)
+             {
+              /*
+               * Web interface is disabled. Show an appropriate message...
+               */
+
+               if (!cupsdSendError(con, HTTP_STATUS_CUPS_WEBIF_DISABLED, CUPSD_AUTH_NONE))
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
+
+               break;
+             }
+
             /*
              * Send CGI output...
              */
@@ -1245,20 +1244,14 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
              if (httpGetVersion(con->http) <= HTTP_VERSION_1_0)
                httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
            }
-            else if ((!strncmp(con->uri, "/admin/conf/", 12) &&
-                     (strchr(con->uri + 12, '/') ||
-                      strlen(con->uri) == 12)) ||
-                    (!strncmp(con->uri, "/admin/log/", 11) &&
-                     (strchr(con->uri + 11, '/') ||
-                      strlen(con->uri) == 11)))
+            else if (!strncmp(con->uri, "/admin/log/", 11) && (strchr(con->uri + 11, '/') || strlen(con->uri) == 11))
            {
             /*
              * GET can only be done to configuration files directly under
              * /admin/conf...
              */
 
-             cupsdLogClient(con, CUPSD_LOG_ERROR,
-                             "Request for subdirectory \"%s\"!", con->uri);
+             cupsdLogClient(con, CUPSD_LOG_ERROR, "Request for subdirectory \"%s\".", con->uri);
 
              if (!cupsdSendError(con, HTTP_STATUS_FORBIDDEN, CUPSD_AUTH_NONE))
              {
@@ -1396,9 +1389,7 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
 
              break;
            }
-           else if ((!strncmp(con->uri, "/admin", 6) &&
-                     strncmp(con->uri, "/admin/conf/", 12) &&
-                     strncmp(con->uri, "/admin/log/", 11)) ||
+           else if ((!strncmp(con->uri, "/admin", 6) && strncmp(con->uri, "/admin/log/", 11)) ||
                     !strncmp(con->uri, "/printers", 9) ||
                     !strncmp(con->uri, "/classes", 8) ||
                     !strncmp(con->uri, "/help", 5) ||
@@ -1648,9 +1639,7 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
              break;
            }
 
-           if ((!strncmp(con->uri, "/admin", 6) &&
-                strncmp(con->uri, "/admin/conf/", 12) &&
-                strncmp(con->uri, "/admin/log/", 11)) ||
+           if ((!strncmp(con->uri, "/admin", 6) && strcmp(con->uri, "/admin/conf/cupsd.conf") && strncmp(con->uri, "/admin/log/", 11)) ||
                !strncmp(con->uri, "/printers", 9) ||
                !strncmp(con->uri, "/classes", 8) ||
                !strncmp(con->uri, "/help", 5) ||
@@ -1670,12 +1659,7 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
 
               cupsdLogRequest(con, HTTP_STATUS_OK);
            }
-            else if ((!strncmp(con->uri, "/admin/conf/", 12) &&
-                     (strchr(con->uri + 12, '/') ||
-                      strlen(con->uri) == 12)) ||
-                    (!strncmp(con->uri, "/admin/log/", 11) &&
-                     (strchr(con->uri + 11, '/') ||
-                      strlen(con->uri) == 11)))
+            else if (!strncmp(con->uri, "/admin/log/", 11) && (strchr(con->uri + 11, '/') || strlen(con->uri) == 11))
            {
             /*
              * HEAD can only be done to configuration files under
@@ -4093,5 +4077,5 @@ write_pipe(cupsd_client_t *con)           /* I - Client connection */
 
 
 /*
- * End of "$Id: client.c 12978 2015-11-17 19:29:52Z msweet $".
+ * End of "$Id: client.c 13061 2016-01-26 21:31:40Z msweet $".
  */
index 763dc96bd65aca9e0b2953bd79999d094f05e3b2..b7c65fda3367ab026e8d13c63bd8647bb0a56817 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ipp.c 12978 2015-11-17 19:29:52Z msweet $"
+ * "$Id: ipp.c 13040 2016-01-11 20:29:13Z msweet $"
  *
  * IPP routines for the CUPS scheduler.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * This file contains Kerberos support code, copyright 2006 by
@@ -7308,6 +7308,12 @@ get_subscription_attrs(
                   "get_subscription_attrs(con=%p[%d], sub_id=%d)",
                   con, con->number, sub_id);
 
+ /*
+  * Expire subscriptions as needed...
+  */
+
+  cupsdExpireSubscriptions(NULL, NULL);
+
  /*
   * Is the subscription ID valid?
   */
@@ -7457,6 +7463,12 @@ get_subscriptions(cupsd_client_t  *con,  /* I - Client connection */
     return;
   }
 
+ /*
+  * Expire subscriptions as needed...
+  */
+
+  cupsdExpireSubscriptions(NULL, NULL);
+
  /*
   * Copy the subscription attributes to the response using the
   * requested-attributes attribute that may be provided by the client.
@@ -11169,5 +11181,5 @@ validate_user(cupsd_job_t    *job,      /* I - Job */
 
 
 /*
- * End of "$Id: ipp.c 12978 2015-11-17 19:29:52Z msweet $".
+ * End of "$Id: ipp.c 13040 2016-01-11 20:29:13Z msweet $".
  */
index 54ee4ed7ca012efa503b9738a648e64c3a2d1f80..0fb0362a06e9c3a65d6f0d6e57e51333c847c492 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.c 12856 2015-08-31 14:27:39Z msweet $"
+ * "$Id: job.c 13047 2016-01-13 19:16:12Z msweet $"
  *
  * Job management routines for the CUPS scheduler.
  *
@@ -2316,7 +2316,10 @@ cupsdSetJobHoldUntil(cupsd_job_t *job,   /* I - Job */
 
   }
 
-  ippSetString(job->attrs, &job->reasons, 0, "job-hold-until-specified");
+  if (strcmp(when, "no-hold"))
+    ippSetString(job->attrs, &job->reasons, 0, "job-hold-until-specified");
+  else
+    ippSetString(job->attrs, &job->reasons, 0, "none");
 
  /*
   * Update the hold time...
@@ -5341,5 +5344,5 @@ update_job_attrs(cupsd_job_t *job,        /* I - Job to update */
 
 
 /*
- * End of "$Id: job.c 12856 2015-08-31 14:27:39Z msweet $".
+ * End of "$Id: job.c 13047 2016-01-13 19:16:12Z msweet $".
  */
index b1aa50375d0859e4fd15d7ce1d22e9695527b144..0656d68d8b9fe17fc8d71a762ae21fff5c2fb24d 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: main.c 12700 2015-06-08 18:32:35Z msweet $"
+ * "$Id: main.c 13040 2016-01-11 20:29:13Z msweet $"
  *
  * Main loop for the CUPS scheduler.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * These coded instructions, statements, and computer programs are the
@@ -1573,7 +1573,6 @@ select_timeout(int fds)                   /* I - Number of descriptors returned */
   time_t               now;            /* Current time */
   cupsd_client_t       *con;           /* Client information */
   cupsd_job_t          *job;           /* Job information */
-  cupsd_subscription_t *sub;           /* Subscription information */
   const char           *why;           /* Debugging aid */
 
 
@@ -1710,19 +1709,6 @@ select_timeout(int fds)                  /* I - Number of descriptors returned */
   }
 #endif /* HAVE_MALLINFO */
 
- /*
-  * Expire subscriptions as needed...
-  */
-
-  for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
-       sub;
-       sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
-    if (!sub->job && sub->expire && sub->expire < timeout)
-    {
-      timeout = sub->expire;
-      why     = "expire subscription";
-    }
-
  /*
   * Adjust from absolute to relative time.  We add 1 second to the timeout since
   * events occur after the timeout expires, and limit the timeout to 86400
@@ -2189,5 +2175,5 @@ usage(int status)                 /* O - Exit status */
 
 
 /*
- * End of "$Id: main.c 12700 2015-06-08 18:32:35Z msweet $".
+ * End of "$Id: main.c 13040 2016-01-11 20:29:13Z msweet $".
  */
index c0755c47b2c4779de9d0a8523a844ca1ddf1b955..abc91333c33cce5c601a81149346b308b16391e1 100644 (file)
@@ -9,7 +9,7 @@
        <key>EnableTransactions</key>
        <true/>
        <key>EnablePressuredExit</key>
-       <true/>
+       <false/>
        <key>ExitTimeOut</key>
        <integer>60</integer>
        <key>KeepAlive</key>
index 5d0e8228e9c6c06e7fc2bcaf7a0f9026990103ef..cf8a90d6f884d556bf44336118e99de7bd5bf272 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: subscriptions.c 12978 2015-11-17 19:29:52Z msweet $"
+ * "$Id: subscriptions.c 13040 2016-01-11 20:29:13Z msweet $"
  *
  * Subscription routines for the CUPS scheduler.
  *
@@ -657,6 +657,8 @@ cupsdExpireSubscriptions(
   curtime = time(NULL);
   update  = 0;
 
+  cupsdLogMessage(CUPSD_LOG_INFO, "Expiring subscriptions...");
+
   for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
        sub;
        sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
@@ -1615,5 +1617,5 @@ cupsd_update_notifier(void)
 
 
 /*
- * End of "$Id: subscriptions.c 12978 2015-11-17 19:29:52Z msweet $".
+ * End of "$Id: subscriptions.c 13040 2016-01-11 20:29:13Z msweet $".
  */
index e3935fe558541897b1bac0e5b03870fe51c1431e..4855f6bb618c789a2178457d9f6fd2b014e01db3 100644 (file)
@@ -2,4 +2,4 @@
 {?which_jobs=completed?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="which_jobs" VALUE="completed"><INPUT TYPE="SUBMIT" VALUE="Fertige Aufträge anzeigen"></FORM>}
 {?which_jobs=all?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="which_jobs" VALUE="all"><INPUT TYPE="SUBMIT" VALUE="Alle Aufträge anzeigen"></FORM>}
 
-<P ALIGN="CENTER">{total=0?Keine Aufträge:Zeige {#job_id} von {total} {?which_jobs=?aktiven:{which_jobs=all?:beendeten}} {total=1?:s}Auftrag:Aufträgen}.</P>
+<P ALIGN="CENTER">{total=0?Keine Aufträge:Zeige {#job_id} von {total} {?which_jobs=?aktiven:{which_jobs=all?:beendeten}} {total=1?Auftrag:Aufträgen}}.</P>
index 64d827b66b123febb4f9327b1e037465858b8d1e..69c305a0ce1b04c7b721288d93b830d20f76af2e 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ipptool.c 12952 2015-10-28 17:22:39Z msweet $"
+ * "$Id: ipptool.c 13075 2016-01-29 21:14:05Z msweet $"
  *
  * ipptool command for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -868,7 +868,7 @@ do_tests(FILE         *outfile,             /* I - Output file */
                              (cups_afree_func_t)free);
   file_id[0] = '\0';
   pass       = 1;
-  linenum    = 1;
+  linenum    = 0;
   request_id = (CUPS_RAND() % 1000) * 137 + 1;
 
   while (!Cancel && get_token(fp, token, sizeof(token), &linenum) != NULL)
@@ -1744,7 +1744,7 @@ do_tests(FILE         *outfile,           /* I - Output file */
                    tokenptr = ptr;
                }
                else
-                 i = (int)strtol(tokenptr, &tokenptr, 0);
+                 i = (int)strtol(token, &tokenptr, 0);
 
                values[0] = i;
 
@@ -1780,10 +1780,10 @@ do_tests(FILE         *outfile,         /* I - Output file */
                attrptr = ippAddIntegers(request, group, value, attr, num_values, values);
              }
 
-             if (!tokenptr || *tokenptr)
+             if ((!token[0] || !tokenptr || *tokenptr) && !skip_test)
              {
-               print_fatal_error(outfile, "Bad %s value \"%s\" on line %d.",
-                                 ippTagString(value), token, linenum);
+               print_fatal_error(outfile, "Bad %s value \'%s\' for \"%s\" on line %d.",
+                                 ippTagString(value), token, attr, linenum);
                pass = 0;
                goto test_exit;
              }
@@ -1808,8 +1808,10 @@ do_tests(FILE         *outfile,          /* I - Output file */
                     _cups_strcasecmp(ptr, "dpcm") &&
                     _cups_strcasecmp(ptr, "other")))
                {
-                 print_fatal_error(outfile, "Bad resolution value \"%s\" on line %d.",
-                                   token, linenum);
+                 if (skip_test)
+                   break;
+
+                 print_fatal_error(outfile, "Bad resolution value \'%s\' for \"%s\" on line %d.", token, attr, linenum);
                  pass = 0;
                  goto test_exit;
                }
@@ -1839,8 +1841,10 @@ do_tests(FILE         *outfile,          /* I - Output file */
 
                 if ((num_vals & 1) || num_vals == 0)
                {
-                 print_fatal_error(outfile, "Bad rangeOfInteger value \"%s\" on line "
-                                   "%d.", token, linenum);
+                 if (skip_test)
+                   break;
+
+                 print_fatal_error(outfile, "Bad rangeOfInteger value \'%s\' for \"%s\" on line %d.", token, attr, linenum);
                  pass = 0;
                  goto test_exit;
                }
@@ -1867,10 +1871,11 @@ do_tests(FILE         *outfile,         /* I - Output file */
                  goto test_exit;
                }
               }
+              else if (skip_test)
+               break;
              else
              {
-               print_fatal_error(outfile, "Bad ATTR collection value on line %d.",
-                                 linenum);
+               print_fatal_error(outfile, "Bad ATTR collection value for \"%s\" on line %d.", attr, linenum);
                pass = 0;
                goto test_exit;
              }
@@ -1878,14 +1883,16 @@ do_tests(FILE         *outfile,         /* I - Output file */
              do
              {
                ipp_t   *col;                   /* Collection value */
-               long    pos = ftell(fp);        /* Save position of file */
+               long    savepos = ftell(fp);    /* Save position of file */
+               int     savelinenum = linenum;  /* Save line number */
 
                if (!get_token(fp, token, sizeof(token), &linenum))
                  break;
 
                if (strcmp(token, ","))
                {
-                 fseek(fp, pos, SEEK_SET);
+                 fseek(fp, savepos, SEEK_SET);
+                 linenum = savelinenum;
                  break;
                }
 
@@ -1911,8 +1918,7 @@ do_tests(FILE         *outfile,           /* I - Output file */
              break;
 
          default :
-             print_fatal_error(outfile, "Unsupported ATTR value tag %s on line %d.",
-                               ippTagString(value), linenum);
+             print_fatal_error(outfile, "Unsupported ATTR value tag %s for \"%s\" on line %d.", ippTagString(value), attr, linenum);
              pass = 0;
              goto test_exit;
 
@@ -1960,10 +1966,9 @@ do_tests(FILE         *outfile,          /* I - Output file */
              break;
        }
 
-       if (!attrptr)
+       if (!attrptr && !skip_test)
        {
-         print_fatal_error(outfile, "Unable to add attribute on line %d: %s", linenum,
-                           cupsLastErrorString());
+         print_fatal_error(outfile, "Unable to add attribute \"%s\" on line %d.", attr, linenum);
          pass = 0;
          goto test_exit;
        }
@@ -2657,7 +2662,7 @@ do_tests(FILE         *outfile,           /* I - Output file */
              http->error != ETIMEDOUT)
 #endif /* WIN32 */
          {
-           if (httpReconnect(http))
+           if (httpReconnect2(http, 30000, NULL))
              prev_pass = 0;
          }
          else if (status == HTTP_STATUS_ERROR || status == HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED)
@@ -2684,13 +2689,13 @@ do_tests(FILE         *outfile,         /* I - Output file */
          http->error != ETIMEDOUT)
 #endif /* WIN32 */
       {
-       if (httpReconnect(http))
+       if (httpReconnect2(http, 30000, NULL))
          prev_pass = 0;
       }
       else if (status == HTTP_STATUS_ERROR)
       {
         if (!Cancel)
-          httpReconnect(http);
+          httpReconnect2(http, 30000, NULL);
 
        prev_pass = 0;
       }
@@ -3869,6 +3874,11 @@ get_collection(FILE         *outfile,    /* I  - Output file */
            break;
       }
     }
+    else
+    {
+      print_fatal_error(outfile, "Unexpected token %s seen on line %d.", token, *linenum);
+      goto col_error;
+    }
   }
 
   return (col);
@@ -6191,5 +6201,5 @@ with_value_from(
 
 
 /*
- * End of "$Id: ipptool.c 12952 2015-10-28 17:22:39Z msweet $".
+ * End of "$Id: ipptool.c 13075 2016-01-29 21:14:05Z msweet $".
  */
index 6f85ea915268045a901fe26ea58a6ca1a16db7d5..3dda13f67c41a8e90d6262acffac4196e04d8993 100644 (file)
                                CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
                                CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
                                DEBUG_INFORMATION_FORMAT = dwarf;
+                               ENABLE_TESTABILITY = YES;
                                GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;