]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror changes from trunk.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 27 Feb 2014 15:57:59 +0000 (15:57 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 27 Feb 2014 15:57:59 +0000 (15:57 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11642 a1ca3aef-8c08-0410-bb20-df032aa958be

17 files changed:
CHANGES.txt
config-scripts/cups-common.m4
config.h.in
cups/encode.c
cups/file-private.h
cups/file.c
cups/file.h
cups/http-addr.c
cups/http-addrlist.c
cups/thread-private.h
cups/thread.c
cups/usersys.c
man/ipptool.man
man/ipptoolfile.man
scheduler/client.c
scheduler/dirsvc.c
scheduler/main.c

index 4ce1a1b375a2123be7fc5abc92d6bb830d1205c1..db26a4c3e14c395f4ce8de69c2cda5c1d745d679 100644 (file)
@@ -1,10 +1,21 @@
-CHANGES.txt - 1.7.2 - 2014-02-19
+CHANGES.txt - 1.7.2 - 2014-02-24
 --------------------------------
 
 CHANGES IN CUPS V1.7.2
 
        - Security: The scheduler now blocks URLs containing embedded HTML
          (STR #4356)
+       - Documentation fixes (STR #3259, STR #4346)
+       - "lp -i job-id -H hold" did not work (STR #nnn)
+       - CUPS didn't compile on older platforms (STR #4338)
+       - Several libcups files did not have the Apple license exception
+         notice (STR #4361)
+       - Fixed a D-BUS threading issue that caused the scheduler to crash
+         (STR #4347)
+       - The scheduler now automatically reconnects to Avahi as needed
+         (STR #4370)
+       - The scheduler did not handle GET requests for the log files properly
+         (STR #3265)
        - The dnssd backend did not always report all discovered printers using
          Avahi (STR #4365)
        - The Zebra printer driver did not properly handle negative "label top"
index e7a52ee1534d358f69d6e22171800d7749aff59b..d570588697579803d38ba9d1964598a4d62262e4 100644 (file)
@@ -303,16 +303,11 @@ fi
 LIBS="$SAVELIBS"
 
 dnl Check for DBUS support
-if test -d /etc/dbus-1; then
-       DBUSDIR="/etc/dbus-1"
-else
-       DBUSDIR=""
-fi
-
 AC_ARG_ENABLE(dbus, [  --disable-dbus           build without DBUS support])
 AC_ARG_WITH(dbusdir, [  --with-dbusdir          set DBUS configuration directory ],
        DBUSDIR="$withval")
 
+DBUSDIR=""
 DBUS_NOTIFIER=""
 DBUS_NOTIFIERLIBS=""
 
@@ -329,7 +324,12 @@ if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
                LIBS="$LIBS $DBUS_NOTIFIERLIBS"
                AC_CHECK_FUNC(dbus_message_iter_init_append,
                              AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
+               AC_CHECK_FUNC(dbus_threads_init,
+                             AC_DEFINE(HAVE_DBUS_THREADS_INIT))
                LIBS="$SAVELIBS"
+               if test -d /etc/dbus-1; then
+                       DBUSDIR="/etc/dbus-1"
+               fi
        else
                AC_MSG_RESULT(no)
        fi
index e708598aca0c4bb2d2c1cdd7fcf128dc4a0d3bc5..09c4d058de8b1c02205ced29d50ad25a2f8786a0 100644 (file)
 
 #undef HAVE_DBUS
 #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
+#undef HAVE_DBUS_THREADS_INIT
 
 
 /*
index 64b21f3c8440744820f3f01a326cf895e9cdcd5c..efdb4f7ad412d020be7cd454c2383b524ada2982 100644 (file)
@@ -43,6 +43,8 @@ static const ipp_op_t ipp_job_creation[] =
   IPP_OP_PRINT_URI,
   IPP_OP_VALIDATE_JOB,
   IPP_OP_CREATE_JOB,
+  IPP_OP_HOLD_JOB,
+  IPP_OP_SET_JOB_ATTRIBUTES,
   IPP_OP_CUPS_NONE
 };
 
@@ -52,6 +54,8 @@ static const ipp_op_t ipp_doc_creation[] =
   IPP_OP_PRINT_URI,
   IPP_OP_SEND_DOCUMENT,
   IPP_OP_SEND_URI,
+  IPP_OP_SET_JOB_ATTRIBUTES,
+  IPP_OP_SET_DOCUMENT_ATTRIBUTES,
   IPP_OP_CUPS_NONE
 };
 
index 60a25014889d751fab56e0ab219e12f636f0babf..64e6a92656ee320b5359fdf91aed1d273939c297 100644 (file)
@@ -16,6 +16,8 @@
  *   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_FILE_PRIVATE_H_
index c76758d9d193bdefd7fdf6e30b935176d38b26ee..293cfea7bce118daff179e374407b44fd8b2e2f0 100644 (file)
@@ -16,6 +16,8 @@
  * 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.
  */
 
 /*
index a3defede1409e2e6cf2164cff72715d5a6deb974..1a58dc57a4ed75287d94bf4dc9cebbd6a206977f 100644 (file)
@@ -16,6 +16,8 @@
  *   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_FILE_H_
index 747837228e664f9f7cecd5f281a21cc2a5c1988d..47db9ac96b0a6212d611efaff7b80adf22e877e1 100644 (file)
@@ -11,6 +11,8 @@
  * 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.
  */
 
 /*
index 013e15c6801608a94da417e6b669b83b3e7d749c..66c5721358942c65f0c0ef0578cb75e8544f00f5 100644 (file)
@@ -11,6 +11,8 @@
  * 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.
  */
 
 /*
index b16eec187d10103855681fd3930b3a47b42a19ec..d7e170b6c026694ce7c9ec3c65545dc5af7c6132 100644 (file)
@@ -10,6 +10,8 @@
  *   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_THREAD_PRIVATE_H_
index da1882e9de063ebc5bc0bc1db7eab240830d3664..848e8610704553268343b8e8fe91d55797080508 100644 (file)
@@ -11,6 +11,8 @@
  *   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:
  *
  *   _cupsMutexInit()    - Initialize a mutex.
index 16617e900c74bbc0a670697357de2fbfac2347bc..695138d822eaad4070e7add80948e3b71a26a6d7 100644 (file)
@@ -703,7 +703,10 @@ _cupsGetPassword(const char *prompt)       /* I - Prompt string */
 
   while ((passbytes = read(tty, &passch, 1)) == 1)
   {
-    if (passch == noecho.c_cc[VEOL] || passch == noecho.c_cc[VEOL2] ||
+    if (passch == noecho.c_cc[VEOL] ||
+#  ifdef VEOL2
+        passch == noecho.c_cc[VEOL2] ||
+#  endif /* VEOL2 */
         passch == 0x0A || passch == 0x0D)
     {
      /*
index 75567c11b8ade0d0736a5a192687191f6f08a87a..33e30f010f9dbc6c37ca3e8c9f0253bc4f9402a5 100644 (file)
@@ -1,17 +1,17 @@
 .\"
 .\" "$Id$"
 .\"
-.\"   ipptool man page for CUPS.
+.\" ipptool man page for CUPS.
 .\"
-.\"   Copyright 2010-2013 by Apple Inc.
+.\" Copyright 2010-2014 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/".
 .\"
-.TH ipptool 1 "CUPS" "13 May 2013" "Apple Inc."
+.TH ipptool 1 "CUPS" "20 February 2014" "Apple Inc."
 .SH NAME
 ipptool - perform internet printing protocol requests
 .SH SYNOPSIS
@@ -42,8 +42,10 @@ The following options are recognized by \fIipptool\fR:
 .TP 5
 --help
 Shows program help.
+.TP 5
 --stop-after-include-error
 Tells \fIipptool\fR to stop if an error occurs in an included file. Normally \fIipptool\fR will continue with subsequent tests after the INCLUDE directive.
+.TP 5
 --version
 Shows the version of \fIipptool\fR being used.
 .TP 5
@@ -150,11 +152,15 @@ The following standard files are available:
     validate-job.test
 .fi
 .SH SEE ALSO
-\fIipptoolfile(5)\fR,
+\fIipptoolfile(5)\fR, RFC 2911,
 .br
 http://localhost:631/help
+.br
+http://www.iana.org/assignments/ipp-registrations
+.br
+http://www.pwg.org/ipp
 .SH COPYRIGHT
-Copyright 2007-2013 by Apple Inc.
+Copyright 2007-2014 by Apple Inc.
 .\"
 .\" End of "$Id$".
 .\"
index d3fbfb6724d5ecf798ac8c885cea107504fea77f..4b0246fbfa059e6f42a0263d086da389373a204a 100644 (file)
@@ -1,17 +1,17 @@
 .\"
 .\" "$Id$"
 .\"
-.\"   ipptoolfile man page for CUPS.
+.\" ipptoolfile man page for CUPS.
 .\"
-.\"   Copyright 2010-2013 by Apple Inc.
+.\" Copyright 2010-2014 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/".
 .\"
-.TH ipptoolfile 5 "CUPS" "13 May 2013" "Apple Inc."
+.TH ipptoolfile 5 "CUPS" "20 February 2014" "Apple Inc."
 .SH NAME
 ipptoolfile \- ipptool file format
 
@@ -152,7 +152,7 @@ The following directives are understood in a test:
 .TP 5
 ATTR tag attribute-name value(s)
 Adds an attribute to the test request. Values are separated by the comma (",")
-character - escape commas using the "\" character.
+character - escape commas using the "\" character. Common attributes and values are listed in the IANA IPP registry - see references below.
 .TP 5
 ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ]
 Adds a collection attribute to the test request. Member attributes follow the
@@ -614,12 +614,15 @@ $username
 Inserts the username from the URI provided to \fIipptool\fR, if any.
 
 .SH SEE ALSO
-\fIipptool(1)\fR,
+\fIipptool(1)\fR, RFC 2911,
 .br
 http://localhost:631/help
-
+.br
+http://www.iana.org/assignments/ipp-registrations
+.br
+http://www.pwg.org/ipp
 .SH COPYRIGHT
-Copyright 2007-2013 by Apple Inc.
+Copyright 2007-2014 by Apple Inc.
 .\"
 .\" End of "$Id$".
 .\"
index d453bbef08e3fc55b2d08ea61668bb06a7d2e20b..b86625d0dc3cf2733b5ce0fd8fdcfaad8018d190 100644 (file)
@@ -1,46 +1,19 @@
 /*
  * "$Id$"
  *
- *   Client routines for the CUPS scheduler.
+ * Client routines for the CUPS scheduler.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
- *   This file contains Kerberos support code, copyright 2006 by
- *   Jelmer Vernooij.
+ * This file contains Kerberos support code, copyright 2006 by
+ * Jelmer Vernooij.
  *
- *   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/".
- *
- * Contents:
- *
- *   cupsdAcceptClient()    - Accept a new client.
- *   cupsdCloseAllClients() - Close all remote clients immediately.
- *   cupsdCloseClient()     - Close a remote client.
- *   cupsdFlushHeader()     - Flush the header fields to the client.
- *   cupsdReadClient()     - Read data from a client.
- *   cupsdSendCommand()     - Send output from a command via HTTP.
- *   cupsdSendError()      - Send an error message via HTTP.
- *   cupsdSendHeader()     - Send an HTTP request.
- *   cupsdUpdateCGI()      - Read status messages from CGI scripts and
- *                           programs.
- *   cupsdWriteClient()     - Write data to a client as needed.
- *   check_if_modified()    - Decode an "If-Modified-Since" line.
- *   compare_clients()     - Compare two client connections.
- *   data_ready()          - Check whether data is available from a client.
- *   get_file()            - Get a filename and state info.
- *   install_cupsd_conf()    - Install a configuration file.
- *   is_cgi()              - Is the resource a CGI script/program?
- *   is_path_absolute()     - Is a path absolute and free of relative elements
- *                           (i.e. "..").
- *   pipe_command()        - Pipe the output of a command to the remote
- *                           client.
- *   valid_host()          - Is the Host: field valid?
- *   write_file()          - Send a file via HTTP.
- *   write_pipe()          - Flag that data is available on the CGI pipe.
+ * 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/".
  */
 
 /*
@@ -2884,6 +2857,17 @@ cupsdWriteClient(cupsd_client_t *con)    /* I - Client connection */
     con->file_ready = 0;
   }
 
+  bytes = (ssize_t)(sizeof(con->header) - (size_t)con->header_used);
+
+  if (!con->pipe_pid && bytes > con->http.data_remaining)
+  {
+   /*
+    * Limit GET bytes to original size of file (STR #3265)...
+    */
+
+    bytes = (ssize_t)con->http.data_remaining;
+  }
+
   if (con->response && con->response->state != IPP_DATA)
   {
     int wused = con->http.wused;       /* Previous write buffer use */
@@ -2926,8 +2910,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
                     con->http.fd, (int)bytes, con->http.state,
                     CUPS_LLCAST con->http.data_remaining);
   }
-  else if ((bytes = read(con->file, con->header + con->header_used,
-                        sizeof(con->header) - con->header_used)) > 0)
+  else if ((bytes = read(con->file, con->header + con->header_used, (size_t)bytes)) > 0)
   {
     con->header_used += bytes;
 
index f372c00c89ea97fc0c6931f208bd6b59c5ef3f64..9a2d2b56d1de4736f949376ffa9f26516354a218 100644 (file)
@@ -223,8 +223,7 @@ cupsdStartBrowsing(void)
     {
       int error;                       /* Error code, if any */
 
-      DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), 0,
-                                     NULL, NULL, &error);
+      DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, NULL, NULL, &error);
 
       if (DNSSDClient == NULL)
       {
index 5a8da815e5a99ef22127ea7106d69b0c182fc886..7fd89257f85c314e3bffb8a7c36254d9c33a6009 100644 (file)
@@ -506,6 +506,14 @@ main(int  argc,                            /* I - Number of command-line args */
   setlocale(LC_TIME, "");
 #endif /* LC_TIME */
 
+#ifdef HAVE_DBUS_THREADS_INIT
+ /*
+  * Enable threading support for D-BUS...
+  */
+
+  dbus_threads_init();
+#endif /* HAVE_DBUS_THREADS_INIT */
+
  /*
   * Set the maximum number of files...
   */