Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet cc8b71bfa1 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.5rc1@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
25 arquivos alterados com 390 adições e 91 exclusões
+19 -1
Ver Arquivo
@@ -1,6 +1,24 @@
CHANGES.txt - 2011-05-26
CHANGES.txt - 2011-06-14
------------------------
CHANGES IN CUPS V1.5rc1
- Compile fixes (STR #3849, STR #3850)
- The scheduler didn't check for empty values for several configuration
directives (STR #3861)
- ipptool didn't generate valid XML when a test was skipped.
- Added additional error checking to the 1284 device ID code (STR #3858)
- Fixed some compatibility issues migrating from the old usblp backend
to the libusb backend (STR #3860)
- Fixed the wake-from-sleep printing behavior on Mac OS X.
- The scheduler incorrectly allowed jobs to be held from a terminating
state.
- The cups-driverd program could crash when a PPD was renamed.
- The dnssd backend took too long to discover printers on large or busy
networks with the new default timeout used by lpinfo and the web
interface. This resulted in "lost" printers.
CHANGES IN CUPS V1.5b2
- Documentation updates.
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
INSTALL - CUPS v1.5b2 - 2011-05-26
----------------------------------
INSTALL - CUPS v1.5rc1 - 2011-06-14
-----------------------------------
This file describes how to compile and install CUPS from source code. For more
information on CUPS see the file called "README.txt". A complete change log can
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
README - CUPS v1.5b2 - 2011-05-26
---------------------------------
README - CUPS v1.5rc1 - 2011-06-14
----------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
instead...
+53 -9
Ver Arquivo
@@ -44,6 +44,7 @@ typedef enum
{
CUPS_DEVICE_PRINTER = 0, /* lpd://... */
CUPS_DEVICE_IPP, /* ipp://... */
CUPS_DEVICE_IPPS, /* ipps://... */
CUPS_DEVICE_FAX_IPP, /* ipp://... */
CUPS_DEVICE_PDL_DATASTREAM, /* socket://... */
CUPS_DEVICE_RIOUSBPRINT /* riousbprint://... */
@@ -123,9 +124,11 @@ main(int argc, /* I - Number of command-line args */
fax_ipp_ref, /* IPP fax service reference */
ipp_ref, /* IPP service reference */
ipp_tls_ref, /* IPP w/TLS service reference */
ipps_ref, /* IPP service reference */
local_fax_ipp_ref, /* Local IPP fax service reference */
local_ipp_ref, /* Local IPP service reference */
local_ipp_tls_ref, /* Local IPP w/TLS service reference */
local_ipps_ref, /* Local IPP service reference */
local_printer_ref, /* Local LPD service reference */
pdl_datastream_ref, /* AppSocket service reference */
printer_ref, /* LPD service reference */
@@ -215,6 +218,10 @@ main(int argc, /* I - Number of command-line args */
DNSServiceBrowse(&ipp_tls_ref, kDNSServiceFlagsShareConnection, 0,
"_ipp-tls._tcp", NULL, browse_callback, devices);
ipps_ref = main_ref;
DNSServiceBrowse(&ipp_ref, kDNSServiceFlagsShareConnection, 0,
"_ipps._tcp", NULL, browse_callback, devices);
local_fax_ipp_ref = main_ref;
DNSServiceBrowse(&local_fax_ipp_ref, kDNSServiceFlagsShareConnection,
kDNSServiceInterfaceIndexLocalOnly,
@@ -230,6 +237,11 @@ main(int argc, /* I - Number of command-line args */
kDNSServiceInterfaceIndexLocalOnly,
"_ipp-tls._tcp", NULL, browse_local_callback, devices);
local_ipps_ref = main_ref;
DNSServiceBrowse(&local_ipp_ref, kDNSServiceFlagsShareConnection,
kDNSServiceInterfaceIndexLocalOnly,
"_ipps._tcp", NULL, browse_local_callback, devices);
local_printer_ref = main_ref;
DNSServiceBrowse(&local_printer_ref, kDNSServiceFlagsShareConnection,
kDNSServiceInterfaceIndexLocalOnly,
@@ -256,8 +268,8 @@ main(int argc, /* I - Number of command-line args */
FD_ZERO(&input);
FD_SET(fd, &input);
timeout.tv_sec = 1;
timeout.tv_usec = 0;
timeout.tv_sec = 0;
timeout.tv_usec = 250000;
if (select(fd + 1, &input, NULL, NULL, &timeout) < 0)
continue;
@@ -280,19 +292,26 @@ main(int argc, /* I - Number of command-line args */
cups_device_t *best; /* Best matching device */
char device_uri[1024]; /* Device URI */
int count; /* Number of queries */
int sent; /* Number of sent */
for (device = (cups_device_t *)cupsArrayFirst(devices),
best = NULL, count = 0;
best = NULL, count = 0, sent = 0;
device;
device = (cups_device_t *)cupsArrayNext(devices))
{
if (device->sent)
sent ++;
if (device->ref)
count ++;
if (!device->ref && !device->sent)
{
/*
* Found the device, now get the TXT record(s) for it...
*/
if (count < 10)
if (count < 20)
{
device->ref = main_ref;
@@ -338,6 +357,8 @@ main(int argc, /* I - Number of command-line args */
best->name, best->device_id, NULL);
best->sent = 1;
best = device;
sent ++;
}
else if (best->priority > device->priority ||
(best->priority == device->priority &&
@@ -345,10 +366,17 @@ main(int argc, /* I - Number of command-line args */
{
best->sent = 1;
best = device;
sent ++;
}
else
{
device->sent = 1;
sent ++;
}
}
}
if (best)
{
@@ -361,7 +389,11 @@ main(int argc, /* I - Number of command-line args */
cupsBackendReport("network", device_uri, best->make_and_model,
best->name, best->device_id, NULL);
best->sent = 1;
sent ++;
}
if (sent == cupsArrayCount(devices))
break;
}
}
@@ -558,9 +590,11 @@ get_device(cups_array_t *devices, /* I - Device array */
key.name = (char *)serviceName;
if (!strcmp(regtype, "_ipp._tcp.") ||
!strcmp(regtype, "_ipp-tls._tcp."))
if (!strcmp(regtype, "_ipp._tcp."))
key.type = CUPS_DEVICE_IPP;
else if (!strcmp(regtype, "_ipps._tcp.") ||
!strcmp(regtype, "_ipp-tls._tcp."))
key.type = CUPS_DEVICE_IPPS;
else if (!strcmp(regtype, "_fax-ipp._tcp."))
key.type = CUPS_DEVICE_FAX_IPP;
else if (!strcmp(regtype, "_printer._tcp."))
@@ -680,9 +714,11 @@ query_callback(
if ((ptr = strstr(name, "._")) != NULL)
*ptr = '\0';
if (strstr(fullName, "_ipp._tcp.") ||
strstr(fullName, "_ipp-tls._tcp."))
if (strstr(fullName, "_ipp._tcp."))
dkey.type = CUPS_DEVICE_IPP;
else if (strstr(fullName, "_ipps._tcp.") ||
strstr(fullName, "_ipp-tls._tcp."))
dkey.type = CUPS_DEVICE_IPPS;
else if (strstr(fullName, "_fax-ipp._tcp."))
dkey.type = CUPS_DEVICE_FAX_IPP;
else if (strstr(fullName, "_printer._tcp."))
@@ -754,9 +790,16 @@ query_callback(
if (data < datanext)
memcpy(value, data, datanext - data);
value[datanext - data] = '\0';
fprintf(stderr, "DEBUG2: query_callback: \"%s=%s\".\n",
key, value);
}
else
{
fprintf(stderr, "DEBUG2: query_callback: \"%s\" with no value.\n",
key);
continue;
}
if (!_cups_strncasecmp(key, "usb_", 4))
{
@@ -800,6 +843,7 @@ query_callback(
else if (!_cups_strcasecmp(key, "priority"))
device->priority = atoi(value);
else if ((device->type == CUPS_DEVICE_IPP ||
device->type == CUPS_DEVICE_IPPS ||
device->type == CUPS_DEVICE_PRINTER) &&
!_cups_strcasecmp(key, "printer-type"))
{
+21 -3
Ver Arquivo
@@ -65,6 +65,7 @@ backendGetDeviceID(
# if defined(__sun) && defined(ECPPIOC_GETDEVID)
struct ecpp_device_id did; /* Device ID buffer */
# endif /* __sun && ECPPIOC_GETDEVID */
char *ptr; /* Pointer into device ID */
DEBUG_printf(("backendGetDeviceID(fd=%d, device_id=%p, device_id_size=%d, "
@@ -186,7 +187,7 @@ backendGetDeviceID(
* and then limit the length to the size of our buffer...
*/
if (length > device_id_size)
if (length > device_id_size || length < 14)
length = (((unsigned)device_id[1] & 255) << 8) +
((unsigned)device_id[0] & 255);
@@ -224,11 +225,12 @@ backendGetDeviceID(
device_id[length] = '\0';
}
}
# ifdef DEBUG
else
{
DEBUG_printf(("backendGetDeviceID: ioctl failed - %s\n",
strerror(errno)));
# endif /* DEBUG */
*device_id = '\0';
}
# endif /* __linux */
# if defined(__sun) && defined(ECPPIOC_GETDEVID)
@@ -256,6 +258,22 @@ backendGetDeviceID(
# endif /* __sun && ECPPIOC_GETDEVID */
}
/*
* Check whether device ID is valid. Turn line breaks and tabs to spaces and
* reject device IDs with non-printable characters.
*/
for (ptr = device_id; *ptr; ptr ++)
if (_cups_isspace(*ptr))
*ptr = ' ';
else if ((*ptr & 255) < ' ' || *ptr == 127)
{
DEBUG_printf(("backendGetDeviceID: Bad device_id character %d.",
*ptr & 255));
*device_id = '\0';
break;
}
DEBUG_printf(("backendGetDeviceID: device_id=\"%s\"\n", device_id));
if (scheme && uri)
+1 -4
Ver Arquivo
@@ -436,10 +436,7 @@ backendWaitLoop(
{
fd_set input; /* Input set for reading */
time_t curtime, /* Current time */
snmp_update = 0;
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
snmp_update = 0; /* Last SNMP status update */
fprintf(stderr, "DEBUG: backendWaitLoop(snmp_fd=%d, addr=%p, side_cb=%p)\n",
+92 -1
Ver Arquivo
@@ -505,6 +505,7 @@ make_device_uri(
*mdl, /* Model */
*des, /* Description */
*sern; /* Serial number */
size_t mfglen; /* Length of manufacturer string */
char tempmfg[256], /* Temporary manufacturer string */
tempsern[256], /* Temporary serial number string */
*tempptr; /* Pointer into temp string */
@@ -584,6 +585,16 @@ make_device_uri(
mfg = tempmfg;
}
mfglen = strlen(mfg);
if (!strncasecmp(mdl, mfg, mfglen) && _cups_isspace(mdl[mfglen]))
{
mdl += mfglen + 1;
while (_cups_isspace(*mdl))
mdl ++;
}
/*
* Generate the device URI from the manufacturer, model, serial number,
* and interface number...
@@ -736,7 +747,87 @@ print_cb(usb_printer_t *printer, /* I - Printer */
const char *device_id, /* I - IEEE-1284 device ID */
const void *data) /* I - User data (make, model, S/N) */
{
return (!strcmp((char *)data, device_uri));
char requested_uri[1024], /* Requested URI */
*requested_ptr, /* Pointer into requested URI */
detected_uri[1024], /* Detected URI */
*detected_ptr; /* Pointer into detected URI */
/*
* If we have an exact match, stop now...
*/
if (!strcmp((char *)data, device_uri))
return (1);
/*
* Work on copies of the URIs...
*/
strlcpy(requested_uri, (char *)data, sizeof(requested_uri));
strlcpy(detected_uri, device_uri, sizeof(detected_uri));
/*
* libusb-discovered URIs can have an "interface" specification and this
* never happens for usblp-discovered URIs, so remove the "interface"
* specification from the URI which we are checking currently. This way a
* queue for a usblp-discovered printer can now be accessed via libusb.
*
* Similarly, strip "?serial=NNN...NNN" as needed.
*/
if ((requested_ptr = strstr(requested_uri, "?interface=")) == NULL)
requested_ptr = strstr(requested_uri, "&interface=");
if ((detected_ptr = strstr(detected_uri, "?interface=")) == NULL)
detected_ptr = strstr(detected_uri, "&interface=");
if (!requested_ptr && detected_ptr)
{
/*
* Strip "[?&]interface=nnn" from the detected printer.
*/
*detected_ptr = '\0';
}
else if (requested_ptr && !detected_ptr)
{
/*
* Strip "[?&]interface=nnn" from the requested printer.
*/
*requested_ptr = '\0';
}
if ((requested_ptr = strstr(requested_uri, "?serial=?")) != NULL)
{
/*
* Strip "?serial=?" from the requested printer. This is a special
* case, as "?serial=?" means no serial number and not the serial
* number '?'. This is not covered by the checks below...
*/
*requested_ptr = '\0';
}
if ((requested_ptr = strstr(requested_uri, "?serial=")) == NULL &&
(detected_ptr = strstr(detected_uri, "?serial=")) != NULL)
{
/*
* Strip "?serial=nnn" from the detected printer.
*/
*detected_ptr = '\0';
}
else if (requested_ptr && !detected_ptr)
{
/*
* Strip "?serial=nnn" from the requested printer.
*/
*requested_ptr = '\0';
}
return (!strcmp(requested_uri, detected_uri));
}
+4 -4
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 9810 2011-05-26 12:34:56Z mike $"
dnl "$Id: cups-common.m4 9818 2011-06-10 21:16:18Z mike $"
dnl
dnl Common configuration stuff for CUPS.
dnl
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
CUPS_VERSION="1.5b2"
CUPS_VERSION="1.5rc1"
CUPS_REVISION=""
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -406,7 +406,7 @@ AC_ARG_WITH(components, [ --with-components set components to build:
case "$COMPONENTS" in
all)
BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data locale man doc examples templates"
BUILDDIRS="filter backend berkeley cgi-bin driver monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates"
;;
core)
@@ -421,5 +421,5 @@ esac
AC_SUBST(BUILDDIRS)
dnl
dnl End of "$Id: cups-common.m4 9810 2011-05-26 12:34:56Z mike $".
dnl End of "$Id: cups-common.m4 9818 2011-06-10 21:16:18Z mike $".
dnl
+3 -3
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 9809 2011-05-26 12:24:20Z mike $"
dnl "$Id: cups-compiler.m4 9818 2011-06-10 21:16:18Z mike $"
dnl
dnl Compiler stuff for CUPS.
dnl
@@ -162,7 +162,7 @@ if test -n "$GCC"; then
else
AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wno-tautological-compare"
CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
AC_TRY_COMPILE(,,
[OPTIM="$OPTIM -Wno-tautological-compare"
AC_MSG_RESULT(yes)],
@@ -560,5 +560,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 9809 2011-05-26 12:24:20Z mike $".
dnl End of "$Id: cups-compiler.m4 9818 2011-06-10 21:16:18Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -270,7 +270,7 @@ cupsResolveConflicts(
* Resolver loop!
*/
DEBUG_printf(("1ppdResolveConflicts: Resolver loop with %s!",
DEBUG_printf(("1cupsResolveConflicts: Resolver loop with %s!",
consts->resolver));
goto error;
}
@@ -278,14 +278,14 @@ cupsResolveConflicts(
if ((resolver = ppdFindAttr(ppd, "cupsUIResolver",
consts->resolver)) == NULL)
{
DEBUG_printf(("1ppdResolveConflicts: Resolver %s not found!",
DEBUG_printf(("1cupsResolveConflicts: Resolver %s not found!",
consts->resolver));
goto error;
}
if (!resolver->value)
{
DEBUG_printf(("1ppdResolveConflicts: Resolver %s has no value!",
DEBUG_printf(("1cupsResolveConflicts: Resolver %s has no value!",
consts->resolver));
goto error;
}
@@ -507,7 +507,7 @@ cupsResolveConflicts(
if (!changed)
{
DEBUG_puts("1ppdResolveConflicts: Unable to automatically resolve "
DEBUG_puts("1cupsResolveConflicts: Unable to automatically resolve "
"constraint!");
goto error;
}
+2
Ver Arquivo
@@ -39,6 +39,7 @@
* cupsFilePeekChar() - Peek at the next character from a file.
* cupsFilePrintf() - Write a formatted string.
* cupsFilePutChar() - Write a character.
* cupsFilePutConf() - Write a configuration line.
* cupsFilePuts() - Write a string.
* cupsFileRead() - Read from a file.
* cupsFileRewind() - Set the current file position to the beginning of
@@ -52,6 +53,7 @@
* cupsFileWrite() - Write to a file.
* cups_compress() - Compress a buffer of data.
* cups_fill() - Fill the input buffer.
* cups_open() - Safely open a file for writing.
* cups_read() - Read from a file descriptor.
* cups_write() - Write to a file descriptor.
*/
+1 -1
Ver Arquivo
@@ -466,7 +466,7 @@ _httpAssembleUUID(const char *server, /* I - Server name */
snprintf(data, sizeof(data), "%s:%d:%s:%d:%04x:%04x", server,
port, name ? name : server, number,
CUPS_RAND() & 0xffff, CUPS_RAND() & 0xffff);
(unsigned)CUPS_RAND() & 0xffff, (unsigned)CUPS_RAND() & 0xffff);
_cupsMD5Init(&md5state);
_cupsMD5Append(&md5state, (unsigned char *)data, strlen(data));
+8 -5
Ver Arquivo
@@ -171,16 +171,17 @@ cupsCharsetToUTF8(
if (map_to_utf8 != (iconv_t)-1)
{
char *altdestptr = (char *)dest; /* Silence bogus GCC type-punned */
srclen = strlen(src);
outBytesLeft = maxout - 1;
iconv(map_to_utf8, (char **)&src, &srclen, (char **)&destptr,
&outBytesLeft);
*destptr = '\0';
iconv(map_to_utf8, (char **)&src, &srclen, &altdestptr, &outBytesLeft);
*altdestptr = '\0';
_cupsMutexUnlock(&map_mutex);
return ((int)(destptr - dest));
return ((int)(altdestptr - (char *)dest));
}
_cupsMutexUnlock(&map_mutex);
@@ -295,10 +296,12 @@ cupsUTF8ToCharset(
if (map_from_utf8 != (iconv_t)-1)
{
char *altsrc = (char *)src; /* Silence bogus GCC type-punned */
srclen = strlen((char *)src);
outBytesLeft = maxout - 1;
iconv(map_from_utf8, (char **)&src, &srclen, &destptr, &outBytesLeft);
iconv(map_from_utf8, &altsrc, &srclen, &destptr, &outBytesLeft);
*destptr = '\0';
_cupsMutexUnlock(&map_mutex);
+4 -2
Ver Arquivo
@@ -341,7 +341,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
"$Id: spec-ppd.html 9803 2011-05-26 02:11:20Z mike $"
"$Id: spec-ppd.html 9813 2011-06-01 17:00:27Z mike $"
PPD extension documentation for CUPS.
@@ -604,9 +604,10 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
<h4>Customizing the Profile Selection Keywords</h4>
<p>The <tt>MediaType</tt> and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
<p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier1</tt>, <tt>cupsICCQualifier2</tt>, and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
<pre class='command'>
*cupsICCQualifier1: MainKeyword1
*cupsICCQualifier2: MainKeyword2
*cupsICCQualifier3: MainKeyword3
</pre>
@@ -614,6 +615,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
<p>The default mapping is as follows:</p>
<pre class='command'>
*cupsICCQualifier1: ColorModel
*cupsICCQualifier2: MediaType
*cupsICCQualifier3: Resolution
</pre>
+3 -1
Ver Arquivo
@@ -165,9 +165,10 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
<h4>Customizing the Profile Selection Keywords</h4>
<p>The <tt>MediaType</tt> and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
<p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier1</tt>, <tt>cupsICCQualifier2</tt>, and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
<pre class='command'>
*cupsICCQualifier1: MainKeyword1
*cupsICCQualifier2: MainKeyword2
*cupsICCQualifier3: MainKeyword3
</pre>
@@ -175,6 +176,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
<p>The default mapping is as follows:</p>
<pre class='command'>
*cupsICCQualifier1: ColorModel
*cupsICCQualifier2: MediaType
*cupsICCQualifier3: Resolution
</pre>
+5 -5
Ver Arquivo
@@ -5,7 +5,7 @@
#
# Original version by Jason McMullan <jmcc@ontv.com>.
#
# Copyright 2007-2010 by Apple Inc.
# Copyright 2007-2011 by Apple Inc.
# Copyright 1999-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -79,7 +79,7 @@ Requires: %{name}-libs = %{epoch}:%{version}
%description
CUPS is the standards-based, open source printing system developed by
Apple Inc. for Mac OS¨ X and other UNIX¨-like operating systems.
Apple Inc. for Mac OS® X and other UNIX®-like operating systems.
%description devel
This package provides the CUPS headers and development environment.
@@ -190,10 +190,11 @@ rm -rf $RPM_BUILD_ROOT
%dir /usr/lib/cups
%dir /usr/lib/cups/backend
/usr/lib/cups/backend/http
/usr/lib/cups/backend/https
%attr(0700,root,root) /usr/lib/cups/backend/ipp
/usr/lib/cups/backend/ipps
%attr(0700,root,root) /usr/lib/cups/backend/lpd
/usr/lib/cups/backend/parallel
/usr/lib/cups/backend/scsi
/usr/lib/cups/backend/serial
/usr/lib/cups/backend/snmp
/usr/lib/cups/backend/socket
@@ -203,6 +204,7 @@ rm -rf $RPM_BUILD_ROOT
%dir /usr/lib/cups/daemon
/usr/lib/cups/daemon/cups-deviced
/usr/lib/cups/daemon/cups-driverd
/usr/lib/cups/daemon/cups-exec
/usr/lib/cups/daemon/cups-polld
%dir /usr/lib/cups/driver
%dir /usr/lib/cups/filter
@@ -288,8 +290,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/man/man5/*.conf.5.gz
/usr/share/man/man5/ipptoolfile.5.gz
/usr/share/man/man5/mime.*.5.gz
%dir /usr/share/man/man7
/usr/share/man/man7/drv*
%dir /usr/share/man/man8
/usr/share/man/man8/accept.8.gz
/usr/share/man/man8/cupsaddsmb.8.gz
+1 -1
Ver Arquivo
@@ -3220,7 +3220,7 @@ encrypt_client(cupsd_client_t *con) /* I - Client to encrypt */
gnutls_certificate_set_x509_key_file(*credentials, ServerCertificate,
ServerKey, GNUTLS_X509_FMT_PEM);
gnutls_init(&con->http.tls), GNUTLS_SERVER);
gnutls_init(&con->http.tls, GNUTLS_SERVER);
gnutls_set_default_priority(con->http.tls);
gnutls_credentials_set(con->http.tls, GNUTLS_CRD_CERTIFICATE, *credentials);
gnutls_transport_set_ptr(con->http.tls, (gnutls_transport_ptr)HTTP(con));
+14 -2
Ver Arquivo
@@ -2593,11 +2593,11 @@ read_configuration(cups_file_t *fp) /* I - File to read from */
"FaxRetryLimit is deprecated; use "
"JobRetryLimit on line %d.", linenum);
}
else if (!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")
else if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")
#ifdef HAVE_SSL
|| !_cups_strcasecmp(line, "SSLPort") || !_cups_strcasecmp(line, "SSLListen")
#endif /* HAVE_SSL */
)
) && value)
{
/*
* Add listening address(es) to the list...
@@ -3740,6 +3740,12 @@ read_location(cups_file_t *fp, /* I - Configuration file */
else if (!_cups_strcasecmp(line, "</Limit>") ||
!_cups_strcasecmp(line, "</LimitExcept>"))
loc = parent;
else if (!value)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
if (FatalErrors & CUPSD_FATAL_CONFIG)
return (0);
}
else if (!parse_aaa(loc, line, value, linenum))
{
cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -3889,6 +3895,12 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
op = NULL;
}
else if (!value)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
if (FatalErrors & CUPSD_FATAL_CONFIG)
return (0);
}
else if (!_cups_strcasecmp(line, "JobPrivateAccess") ||
!_cups_strcasecmp(line, "JobPrivateValues") ||
!_cups_strcasecmp(line, "SubscriptionPrivateAccess") ||
+7 -2
Ver Arquivo
@@ -750,8 +750,11 @@ compare_ppds(const ppd_info_t *p0, /* I - First PPD file */
else if ((diff = cupsdCompareNames(p0->record.make_and_model,
p1->record.make_and_model)) != 0)
return (diff);
else if ((diff = strcmp(p0->record.languages[0],
p1->record.languages[0])) != 0)
return (diff);
else
return (strcmp(p0->record.languages[0], p1->record.languages[0]));
return (compare_names(p0, p1));
}
@@ -1408,7 +1411,9 @@ load_drv(const char *filename, /* I - Actual filename */
* Add a dummy entry for the file...
*/
add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0,
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0,
"/%s", name);
add_ppd(name, uri, "", "", "", "", "", "", mtime, size, 0,
PPD_TYPE_DRV, "drv");
ChangedPPD = 1;
+16
Ver Arquivo
@@ -8885,6 +8885,22 @@ hold_job(cupsd_client_t *con, /* I - Client connection */
return;
}
/*
* See if the job is in a state that allows holding...
*/
if (job->state_value > IPP_JOB_STOPPED)
{
/*
* Return a "not-possible" error...
*/
send_ipp_status(con, IPP_NOT_POSSIBLE,
_("Job #%d is finished and cannot be altered."),
job->id);
return;
}
/*
* Hold the job and return...
*/
+7 -7
Ver Arquivo
@@ -2330,14 +2330,14 @@ cupsdSetJobState(
if (!cupsdLoadJob(job))
return;
/*
* Don't do anything if the state is unchanged and we aren't purging the
* job...
*/
/*
* Don't do anything if the state is unchanged and we aren't purging the
* job...
*/
oldstate = job->state_value;
if (newstate == oldstate && action != CUPSD_JOB_PURGE)
return;
oldstate = job->state_value;
if (newstate == oldstate && action != CUPSD_JOB_PURGE)
return;
/*
* Stop any processes that are working on the current job...
+83
Ver Arquivo
@@ -76,6 +76,9 @@
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
#endif /* HAVE_SYS_VFS_H */
#ifdef __APPLE__
# include <asl.h>
#endif /* __APPLE__ */
/*
@@ -90,6 +93,7 @@ static int compare_printers(void *first, void *second, void *data);
static void delete_printer_filters(cupsd_printer_t *p);
static void dirty_printer(cupsd_printer_t *p);
static void load_ppd(cupsd_printer_t *p);
static void log_ipp_conformance(cupsd_printer_t *p, const char *reason);
static ipp_t *new_media_col(_pwg_size_t *size, const char *source,
const char *type);
#ifdef __sgi
@@ -2757,6 +2761,10 @@ cupsdSetPrinterReasons(
if (i >= p->num_reasons)
{
if (!strncmp(reason, "cups-ipp-missing-", 17) ||
!strncmp(reason, "cups-ipp-wrong-", 15))
log_ipp_conformance(p, reason);
if (i >= (int)(sizeof(p->reasons) / sizeof(p->reasons[0])))
{
cupsdLogMessage(CUPSD_LOG_ALERT,
@@ -5074,6 +5082,81 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
}
/*
* 'log_ipp_conformance()' - Log an IPP conformance issue with a printer.
*/
static void
log_ipp_conformance(
cupsd_printer_t *p, /* I - Printer */
const char *reason) /* I - Printer state reason */
{
const char *message; /* Message to log */
#ifdef __APPLE__
aslmsg aslm; /* Apple System Log message */
#endif /* __APPLE__ */
/*
* Strip the leading "cups-ipp-" from the reason and create a log message for
* it...
*/
reason += 9;
if (!strcmp(reason, "missing-cancel-job"))
message = "Printer does not support REQUIRED Cancel-Job operation.";
else if (!strcmp(reason, "missing-get-job-attributes"))
message = "Printer does not support REQUIRED Get-Job-Attributes operation.";
else if (!strcmp(reason, "missing-print-job"))
message = "Printer does not support REQUIRED Print-Job operation.";
else if (!strcmp(reason, "missing-validate-job"))
message = "Printer does not support REQUIRED Validate-Job operation.";
else if (!strcmp(reason, "missing-get-printer-attributes"))
message = "Printer does not support REQUIRED Get-Printer-Attributes operation.";
else if (!strcmp(reason, "missing-job-history"))
message = "Printer does not provide REQUIRED job history.";
else if (!strcmp(reason, "missing-job-id"))
message = "Printer does not provide REQUIRED job-id attribute.";
else if (!strcmp(reason, "missing-job-state"))
message = "Printer does not provide REQUIRED job-state attribute.";
else if (!strcmp(reason, "missing-operations-supported"))
message = "Printer does not provide REQUIRED operations-supported "
"attribute.";
else if (!strcmp(reason, "missing-printer-is-accepting-jobs"))
message = "Printer does not provide REQUIRED printer-is-accepting-jobs "
"attribute.";
else if (!strcmp(reason, "missing-printer-state-reasons"))
message = "Printer does not provide REQUIRED printer-state-reasons "
"attribute.";
else if (!strcmp(reason, "wrong-http-version"))
message = "Printer does not use REQUIRED HTTP/1.1 transport.";
else
message = "Unknown IPP conformance failure.";
cupsdLogMessage(CUPSD_LOG_WARN, "%s: %s", p->name, message);
#ifdef __APPLE__
/*
* Report the failure information to Apple if the user opts into providing
* feedback to Apple...
*/
aslm = asl_new(ASL_TYPE_MSG);
if (aslm)
{
asl_set(aslm, "com.apple.message.domain", "com.apple.printing.ipp.conformance");
asl_set(aslm, "com.apple.message.domain_scope", "com.apple.printing.ipp.conformance");
asl_set(aslm, "com.apple.message.signature", reason);
asl_set(aslm, "com.apple.message.signature2",
p->make_model ? p->make_model : "Unknown");
asl_log(NULL, aslm, ASL_LEVEL_NOTICE, "%s: %s",
p->make_model ? p->make_model : "Unknown", message);
asl_free(aslm);
}
#endif /* __APPLE__ */
}
/*
* 'new_media_col()' - Create a media-col collection value.
*/
+18 -16
Ver Arquivo
@@ -196,6 +196,10 @@ cupsdSetBusyState(void)
if (job)
newbusy |= 2;
cupsdLogMessage(CUPSD_LOG_DEBUG,
"cupsdSetBusyState: newbusy=\"%s\", busy=\"%s\"",
busy_text[newbusy], busy_text[busy]);
/*
* Manage state changes...
*/
@@ -213,25 +217,23 @@ cupsdSetBusyState(void)
vtran = 0;
}
#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
}
#ifdef kIOPMAssertionTypeDenySystemSleep
if ((busy & 2) && !dark_wake)
{
cupsdLogMessage(CUPSD_LOG_DEBUG2, "Asserting dark wake.");
IOPMAssertionCreateWithName(kIOPMAssertionTypeDenySystemSleep,
kIOPMAssertionLevelOn,
CFSTR("org.cups.cupsd"), &dark_wake);
}
else if (!(busy & 2) && dark_wake)
{
cupsdLogMessage(CUPSD_LOG_DEBUG2, "Releasing dark wake assertion.");
IOPMAssertionRelease(dark_wake);
dark_wake = 0;
}
#endif /* kIOPMAssertionTypeDenySystemSleep */
cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetBusyState: %s", busy_text[busy]);
if (cupsArrayCount(PrintingJobs) > 0 && !dark_wake)
{
cupsdLogMessage(CUPSD_LOG_DEBUG, "Asserting dark wake.");
IOPMAssertionCreateWithName(kIOPMAssertionTypeDenySystemSleep,
kIOPMAssertionLevelOn,
CFSTR("org.cups.cupsd"), &dark_wake);
}
else if (cupsArrayCount(PrintingJobs) == 0 && dark_wake)
{
cupsdLogMessage(CUPSD_LOG_DEBUG, "Releasing dark wake assertion.");
IOPMAssertionRelease(dark_wake);
dark_wake = 0;
}
#endif /* kIOPMAssertionTypeDenySystemSleep */
}
+18 -14
Ver Arquivo
@@ -1,9 +1,9 @@
#
# "$Id: ipp-1.1.test 9405 2010-12-08 07:13:22Z mike $"
# "$Id: ipp-1.1.test 9830 2011-06-14 21:11:17Z mike $"
#
# IPP/1.1 test suite.
#
# Copyright 2007-2010 by Apple Inc.
# Copyright 2007-2011 by Apple Inc.
# Copyright 2001-2006 by Easy Software Products. All rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -17,6 +17,10 @@
# ./ipptool -f filename -t printer-uri ipp-1.1.test
#
# Regular expression for IPP URI schemes
# Matches strings beginning with ipp:// or ipps://
DEFINE IPP_URI_SCHEME "/^ipps?://.+$$/"
# Test that a request-id value of 0 is not accepted.
#
# Required by: RFC 2911 section 3.1.1
@@ -87,7 +91,7 @@
ATTR uri printer-uri $uri
STATUS successful-ok
EXPECT printer-uri-supported OF-TYPE uri
EXPECT printer-uri-supported OF-TYPE uri WITH-VALUE "$IPP_URI_SCHEME"
}
@@ -144,7 +148,7 @@
STATUS successful-ok
STATUS client-error-document-format-not-supported
EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag
EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
WITH-VALUE >0
EXPECT job-state OF-TYPE enum COUNT 1 IN-GROUP job-attributes-tag
@@ -237,7 +241,7 @@
EXPECT printer-state OF-TYPE enum IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE 3,4,5
EXPECT printer-state-reasons OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT printer-up-time OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported
EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-security-supported WITH-VALUE "$IPP_URI_SCHEME"
EXPECT queued-job-count OF-TYPE integer IN-GROUP printer-attributes-tag COUNT 1
EXPECT uri-authentication-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
EXPECT uri-security-supported OF-TYPE keyword IN-GROUP printer-attributes-tag SAME-COUNT-AS uri-authentication-supported
@@ -260,7 +264,7 @@
STATUS successful-ok
EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag
EXPECT printer-uri-supported OF-TYPE uri IN-GROUP printer-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
EXPECT !printer-name
}
@@ -279,7 +283,7 @@
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
EXPECT !job-printer-uri
EXPECT !job-more-info
EXPECT !job-name
@@ -337,7 +341,7 @@
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
@@ -395,7 +399,7 @@
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
EXPECT !job-printer-uri
EXPECT !job-more-info
EXPECT !job-name
@@ -515,7 +519,7 @@
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
EXPECT !job-printer-uri
EXPECT !job-more-info
EXPECT !job-name
@@ -575,7 +579,7 @@
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
EXPECT !job-printer-uri
EXPECT !job-more-info
EXPECT !job-name
@@ -655,7 +659,7 @@
STATUS successful-ok
STATUS client-error-document-format-not-supported
EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag
EXPECT job-uri OF-TYPE uri COUNT 1 IN-GROUP job-attributes-tag WITH-VALUE "$IPP_URI_SCHEME"
EXPECT job-id OF-TYPE integer COUNT 1 IN-GROUP job-attributes-tag
WITH-VALUE >0
EXPECT job-state OF-TYPE enum COUNT 1 IN-GROUP job-attributes-tag
@@ -700,7 +704,7 @@
STATUS successful-ok
EXPECT job-id OF-TYPE integer IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE >0
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1 WITH-VALUE "$IPP_URI_SCHEME"
EXPECT job-printer-uri OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT ?job-more-info OF-TYPE uri IN-GROUP job-attributes-tag COUNT 1
EXPECT job-name OF-TYPE name IN-GROUP job-attributes-tag COUNT 1
@@ -744,5 +748,5 @@
#
# End of "$Id: ipp-1.1.test 9405 2010-12-08 07:13:22Z mike $".
# End of "$Id: ipp-1.1.test 9830 2011-06-14 21:11:17Z mike $".
#
+2 -2
Ver Arquivo
@@ -2569,11 +2569,11 @@ do_tests(_cups_vars_t *vars, /* I - Variables */
puts("</array>");
}
skip_error:
if (Output == _CUPS_OUTPUT_PLIST)
puts("</dict>");
skip_error:
ippDelete(response);
response = NULL;