Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 8b4e44a962 |
+2
-97
@@ -1,100 +1,5 @@
|
||||
CHANGES - 2.2.12 - 2019-08-15
|
||||
=============================
|
||||
|
||||
|
||||
Changes in CUPS v2.2.12
|
||||
-----------------------
|
||||
|
||||
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
|
||||
- The `cupsctl` command now prevents setting "cups-files.conf" directives
|
||||
(Issue #5530)
|
||||
- Updated the systemd service file for cupsd (Issue #5551)
|
||||
- The `cupsCheckDestSupported` function did not check octetString values
|
||||
correctly (Issue #5557)
|
||||
- The scheduler did not encode octetString values like "job-password" correctly
|
||||
for the print filters (Issue #5558)
|
||||
- Restored minimal support for the `Emulators` keyword in PPD files to allow
|
||||
old Samsung printer drivers to continue to work (Issue #5562)
|
||||
- Timed out job submission now yields an error (Issue #5570)
|
||||
- The footer in the web interface covered some content on small displays
|
||||
(Issue #5574)
|
||||
- The libusb-based USB backend now enforces read limits, improving print speed
|
||||
in many cases (Issue #5583)
|
||||
- Fixed some compatibility issues with old releases of CUPS (Issue #5587)
|
||||
- Fixed a bug in the scheduler job cleanup code (Issue #5588)
|
||||
- "make" failed with GZIP options (Issue #5595)
|
||||
- Added FIPS-140 workarounds for GNU TLS (Issue #5601, Issue #5622)
|
||||
- The scheduler no longer provides a default value for the description
|
||||
(Issue #5603)
|
||||
- The `lpadmin` command did not always update the PPD file for changes to the
|
||||
`cupsIPPSupplies` and `cupsSNMPSupplies` keywords (Issue #5610)
|
||||
- The scheduler now uses both the group's membership list as well as the
|
||||
various OS-specific membership functions to determine whether a user belongs
|
||||
to a named group (Issue #5613)
|
||||
- Added USB quirks rule for HP LaserJet 1015 (Issue #5617)
|
||||
- Fixed some PPD parser issues (Issue #5623, Issue #5624)
|
||||
- The IPP parser no longer allows invalid member attributes in collections
|
||||
(Issue #5630)
|
||||
- Fixed IPP buffer overflow (rdar://50035411)
|
||||
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
|
||||
- Fixed DoS issues in the scheduler (rdar://51373929)
|
||||
- The scheduler would restart continuously when idle and printers were not
|
||||
shared (rdar://52561199)
|
||||
- Fixed a command ordering issue in the Zebra ZPL driver.
|
||||
- Fixed a memory leak in `ppdOpen`.
|
||||
|
||||
|
||||
Changes in CUPS v2.2.11
|
||||
-----------------------
|
||||
|
||||
- Running ppdmerge with the same input and output filenames did not work as
|
||||
advertised (Issue #5455)
|
||||
- Fixed a potential memory leak when reading at the end of a file (Issue #5473)
|
||||
- Fixed potential unaligned accesses in the string pool (Issue #5474)
|
||||
- Fixed a potential memory leak when loading a PPD file (Issue #5475)
|
||||
- Added a USB quirks rule for the Lexmark E120n (Issue #5478)
|
||||
- Updated the USB quirks rule for Zebra label printers (Issue #5395)
|
||||
- Fixed a compile error on Linux (Issue #5483)
|
||||
- The lpadmin command, web interface, and scheduler all queried an IPP
|
||||
Everywhere printer differently, resulting in different PPDs for the same
|
||||
printer (Issue #5484)
|
||||
- Fixed an issue with the self-signed certificates generated by GNU TLS
|
||||
(Issue #5506)
|
||||
- The `ippValidateAttribute` function did not catch all instances of invalid
|
||||
UTF-8 strings (Issue #5509)
|
||||
- Non-Kerberized printing to Windows via IPP was broken (Issue #5515)
|
||||
- The scheduler no longer stops a printer if an error occurs when a job is
|
||||
canceled or aborted (Issue #5517)
|
||||
- Added a USB quirks rule for the DYMO 450 Turbo (Issue #5521)
|
||||
- Added a USB quirks rule for Xerox printers (Issue #5523)
|
||||
- The scheduler's self-signed certificate did not include all of the alternate
|
||||
names for the server when using GNU TLS (Issue #5525)
|
||||
- Fixed compiler warnings with newer versions of GCC (Issue #5532, Issue #5533)
|
||||
- Fixed some PPD caching and IPP Everywhere PPD accounting/password bugs
|
||||
(Issue #5535)
|
||||
- Fixed `PreserveJobHistory` bug with time values (Issue #5538)
|
||||
- Media size matching now uses a tolerance of 0.5mm (rdar://33822024)
|
||||
- The lpadmin command would hang with a bad PPD file (rdar://41495016)
|
||||
- Fixed a potential crash bug in cups-driverd (rdar://46625579)
|
||||
- Fixed a performance regression with large PPDs (rdar://47040759)
|
||||
- The scheduler did not always idle exit as quickly as it could.
|
||||
|
||||
|
||||
Changes in CUPS v2.2.10
|
||||
-----------------------
|
||||
|
||||
- CVE-2018-4300: Linux session cookies used a predictable random number seed.
|
||||
- The `lpoptions` command now works with IPP Everywhere printers that have not
|
||||
yet been added as local queues (Issue #5045)
|
||||
- Added USB quirk rules (Issue #5395, Issue #5443)
|
||||
- The generated PPD files for IPP Everywhere printers did not contain the
|
||||
cupsManualCopies keyword (Issue #5433)
|
||||
- Kerberos credentials might be truncated (Issue #5435)
|
||||
- The handling of `MaxJobTime 0` did not match the documentation (Issue #5438)
|
||||
- Incorporated the page accounting changes from CUPS 2.3 (Issue #5439)
|
||||
- Fixed a bug adding a queue with the `-E` option (Issue #5440)
|
||||
- Fixed a crash bug when mapping PPD duplex options to IPP attributes
|
||||
(rdar://46183976)
|
||||
CHANGES - 2.2.9 - 2018-11-09
|
||||
============================
|
||||
|
||||
|
||||
Changes in CUPS v2.2.9
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
INSTALL - CUPS v2.2.12 - 2019-08-15
|
||||
===================================
|
||||
INSTALL - CUPS v2.2.9 - 2018-11-08
|
||||
==================================
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
information on CUPS see the file called "README.md". A complete change log can
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Common makefile definitions for CUPS.
|
||||
#
|
||||
# Copyright 2007-2019 by Apple Inc.
|
||||
# Copyright 2007-2018 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -29,7 +29,7 @@ CHMOD = @CHMOD@
|
||||
CXX = @LIBTOOL_CXX@ @CXX@
|
||||
DSO = @DSO@
|
||||
DSOXX = @DSOXX@
|
||||
GZIPPROG = @GZIPPROG@
|
||||
GZIP = @GZIP@
|
||||
INSTALL = @INSTALL@
|
||||
LD = @LD@
|
||||
LD_CC = @LD_CC@
|
||||
|
||||
+5
-6
@@ -1,5 +1,5 @@
|
||||
README - CUPS v2.2.12 - 2019-08-15
|
||||
==================================
|
||||
README - CUPS v2.2.9 - 2018-11-08
|
||||
=================================
|
||||
|
||||
Looking for compile instructions? Read the file `INSTALL.md` instead...
|
||||
|
||||
@@ -22,9 +22,8 @@ included with CUPS to support many Dymo, EPSON, HP, Intellitech, OKIDATA, and
|
||||
Zebra printers. Many more drivers are available online and (in some cases) on
|
||||
the driver CD-ROM that came with your printer.
|
||||
|
||||
CUPS 2.2.x is licensed under the GNU General Public License and GNU Library
|
||||
General Public License versions 2. See the file "LICENSE.txt" for more
|
||||
information.
|
||||
CUPS is licensed under the GNU General Public License and GNU Library General
|
||||
Public License versions 2. See the file "LICENSE.txt" for more information.
|
||||
|
||||
|
||||
READING THE DOCUMENTATION
|
||||
@@ -149,7 +148,7 @@ This will prevent the filters from misinterpreting your print file.
|
||||
LEGAL STUFF
|
||||
-----------
|
||||
|
||||
CUPS is copyright © 2007-2019 by Apple Inc. CUPS and the CUPS logo are
|
||||
CUPS is copyright © 2007-2018 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
+2
-3
@@ -2217,9 +2217,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
else if (ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED)
|
||||
fputs("JOBSTATE: account-authorization-failed\n", stderr);
|
||||
|
||||
if (job_canceled)
|
||||
return (CUPS_BACKEND_OK);
|
||||
else if (ipp_status == IPP_STATUS_ERROR_NOT_AUTHORIZED || ipp_status == IPP_STATUS_ERROR_FORBIDDEN || ipp_status == IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED)
|
||||
if (ipp_status == IPP_STATUS_ERROR_NOT_AUTHORIZED || ipp_status == IPP_STATUS_ERROR_FORBIDDEN ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED)
|
||||
return (CUPS_BACKEND_AUTH_REQUIRED);
|
||||
else if (ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED ||
|
||||
|
||||
@@ -140,8 +140,8 @@
|
||||
# Samsung ML-2160 Series (https://bugzilla.redhat.com/show_bug.cgi?id=873123)
|
||||
0x04e8 0x330f unidir
|
||||
|
||||
# All Zebra devices (https://bugs.launchpad.net/bugs/1001028) (Issue #5395)
|
||||
0x0a5f unidir no-reattach
|
||||
# All Zebra devices (https://bugs.launchpad.net/bugs/1001028)
|
||||
0x0a5f unidir
|
||||
|
||||
# Canon CP-10
|
||||
0x04a9 0x304a blacklist
|
||||
@@ -242,9 +242,6 @@
|
||||
# All Intermec devices (Issue #4553)
|
||||
0x067e no-reattach
|
||||
|
||||
# HP LaserJet 1015 (Issue #5617)
|
||||
0x03f0 0x0e17 delay-close
|
||||
|
||||
# HP LaserJet 1150 (Issue #4549)
|
||||
0x03f0 0x0f17 delay-close
|
||||
|
||||
@@ -290,15 +287,3 @@
|
||||
|
||||
# Lexmark MS317dn
|
||||
0x043d 0x0226 no-reattach
|
||||
|
||||
# Star TSP743 (Issue #5443)
|
||||
0x0519 0x0001 delay-close
|
||||
|
||||
# Lexmark E120n (Issue #5478)
|
||||
0x043d 0x00cc no-reattach
|
||||
|
||||
# All Xerox printers (Issue #5523)
|
||||
0x0924 no-reattach
|
||||
|
||||
# Dymo 450 Turbo (Issue #5521)
|
||||
0x0922 0x0021 unidir
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -1746,7 +1746,8 @@ static void *read_thread(void *reference)
|
||||
* Make sure this loop executes no more than once every 250 miliseconds...
|
||||
*/
|
||||
|
||||
if ((g.wait_eof || !g.read_thread_stop))
|
||||
if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) &&
|
||||
(g.wait_eof || !g.read_thread_stop))
|
||||
{
|
||||
gettimeofday(&now, NULL);
|
||||
if (timercmp(&now, &end, <))
|
||||
|
||||
+8
-23
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Administration CGI for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -767,7 +767,7 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
attr = ippAddStrings(request, IPP_TAG_PRINTER, IPP_TAG_URI, "member-uris",
|
||||
num_printers, NULL, NULL);
|
||||
for (i = 0; i < num_printers; i ++)
|
||||
ippSetString(request, &attr, i, cgiGetArray("MEMBER_URIS", i));
|
||||
attr->values[i].string.text = _cupsStrAlloc(cgiGetArray("MEMBER_URIS", i));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2413,7 +2413,7 @@ do_list_printers(http_t *http) /* I - HTTP connection */
|
||||
attr;
|
||||
attr = ippFindNextAttribute(response, "device-uri", IPP_TAG_URI))
|
||||
{
|
||||
cupsArrayAdd(printer_devices, strdup(attr->values[0].string.text));
|
||||
cupsArrayAdd(printer_devices, _cupsStrAlloc(attr->values[0].string.text));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2551,7 +2551,7 @@ do_list_printers(http_t *http) /* I - HTTP connection */
|
||||
for (printer_device = (char *)cupsArrayFirst(printer_devices);
|
||||
printer_device;
|
||||
printer_device = (char *)cupsArrayNext(printer_devices))
|
||||
free(printer_device);
|
||||
_cupsStrFree(printer_device);
|
||||
|
||||
cupsArrayDelete(printer_devices);
|
||||
}
|
||||
@@ -2948,7 +2948,7 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
|
||||
* Add the name...
|
||||
*/
|
||||
|
||||
ippSetString(request, &attr, i, ptr);
|
||||
attr->values[i].string.text = _cupsStrAlloc(ptr);
|
||||
|
||||
/*
|
||||
* Advance to the next name...
|
||||
@@ -3410,9 +3410,6 @@ do_set_options(http_t *http, /* I - HTTP connection */
|
||||
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_POINTS :
|
||||
if (!_cups_strncasecmp(option->defchoice, "Custom.", 7))
|
||||
{
|
||||
@@ -3760,8 +3757,8 @@ do_set_options(http_t *http, /* I - HTTP connection */
|
||||
|
||||
attr = ippAddStrings(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
|
||||
"job-sheets-default", 2, NULL, NULL);
|
||||
ippSetString(request, &attr, 0, cgiGetVariable("job_sheets_start"));
|
||||
ippSetString(request, &attr, 1, cgiGetVariable("job_sheets_end"));
|
||||
attr->values[0].string.text = _cupsStrAlloc(cgiGetVariable("job_sheets_start"));
|
||||
attr->values[1].string.text = _cupsStrAlloc(cgiGetVariable("job_sheets_end"));
|
||||
|
||||
if ((var = cgiGetVariable("printer_error_policy")) != NULL)
|
||||
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
|
||||
@@ -4012,9 +4009,6 @@ get_option_value(
|
||||
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_REAL :
|
||||
@@ -4093,9 +4087,6 @@ get_option_value(
|
||||
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_REAL :
|
||||
@@ -4229,11 +4220,6 @@ get_printer_ppd(const char *uri, /* I - Printer URI */
|
||||
host[256], /* Hostname */
|
||||
resource[256]; /* Resource path */
|
||||
int port; /* Port number */
|
||||
static const char * const pattrs[] = /* Printer attributes we need */
|
||||
{
|
||||
"all",
|
||||
"media-col-database"
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
@@ -4274,7 +4260,6 @@ get_printer_ppd(const char *uri, /* I - Printer URI */
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
if (!_ppdCreateFromIPP(buffer, bufsize, response))
|
||||
|
||||
+23
-23
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* CGI form variable and array functions for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2005 by Easy Software Products.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
typedef struct /**** Form variable structure ****/
|
||||
{
|
||||
char *name; /* Name of variable */
|
||||
const char *name; /* Name of variable */
|
||||
int nvalues, /* Number of values */
|
||||
avalues; /* Number of values allocated */
|
||||
char **values; /* Value(s) of variable */
|
||||
const char **values; /* Value(s) of variable */
|
||||
} _cgi_var_t;
|
||||
|
||||
|
||||
@@ -139,10 +139,10 @@ cgiClearVariables(void)
|
||||
|
||||
for (v = form_vars, i = form_count; i > 0; v ++, i --)
|
||||
{
|
||||
free(v->name);
|
||||
_cupsStrFree(v->name);
|
||||
for (j = 0; j < v->nvalues; j ++)
|
||||
if (v->values[j])
|
||||
free(v->values[j]);
|
||||
_cupsStrFree(v->values[j]);
|
||||
}
|
||||
|
||||
form_count = 0;
|
||||
@@ -168,7 +168,7 @@ cgiGetArray(const char *name, /* I - Name of array variable */
|
||||
if (element < 0 || element >= var->nvalues)
|
||||
return (NULL);
|
||||
|
||||
return (strdup(var->values[element]));
|
||||
return (_cupsStrRetain(var->values[element]));
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ cgiGetVariable(const char *name) /* I - Name of variable */
|
||||
var->values[var->nvalues - 1]));
|
||||
#endif /* DEBUG */
|
||||
|
||||
return ((var == NULL) ? NULL : strdup(var->values[var->nvalues - 1]));
|
||||
return ((var == NULL) ? NULL : _cupsStrRetain(var->values[var->nvalues - 1]));
|
||||
}
|
||||
|
||||
|
||||
@@ -382,9 +382,10 @@ cgiSetArray(const char *name, /* I - Name of variable */
|
||||
{
|
||||
if (element >= var->avalues)
|
||||
{
|
||||
char **temp; /* Temporary pointer */
|
||||
const char **temp; /* Temporary pointer */
|
||||
|
||||
temp = (char **)realloc((void *)(var->values), sizeof(char *) * (size_t)(element + 16));
|
||||
temp = (const char **)realloc((void *)(var->values),
|
||||
sizeof(char *) * (size_t)(element + 16));
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
@@ -400,9 +401,9 @@ cgiSetArray(const char *name, /* I - Name of variable */
|
||||
var->nvalues = element + 1;
|
||||
}
|
||||
else if (var->values[element])
|
||||
free((char *)var->values[element]);
|
||||
_cupsStrFree((char *)var->values[element]);
|
||||
|
||||
var->values[element] = strdup(value);
|
||||
var->values[element] = _cupsStrAlloc(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,9 +460,10 @@ cgiSetSize(const char *name, /* I - Name of variable */
|
||||
|
||||
if (size >= var->avalues)
|
||||
{
|
||||
char **temp; /* Temporary pointer */
|
||||
const char **temp; /* Temporary pointer */
|
||||
|
||||
temp = (char **)realloc((void *)(var->values), sizeof(char *) * (size_t)(size + 16));
|
||||
temp = (const char **)realloc((void *)(var->values),
|
||||
sizeof(char *) * (size_t)(size + 16));
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
@@ -478,7 +480,7 @@ cgiSetSize(const char *name, /* I - Name of variable */
|
||||
{
|
||||
for (i = size; i < var->nvalues; i ++)
|
||||
if (var->values[i])
|
||||
free((void *)(var->values[i]));
|
||||
_cupsStrFree((void *)(var->values[i]));
|
||||
}
|
||||
|
||||
var->nvalues = size;
|
||||
@@ -513,9 +515,9 @@ cgiSetVariable(const char *name, /* I - Name of variable */
|
||||
{
|
||||
for (i = 0; i < var->nvalues; i ++)
|
||||
if (var->values[i])
|
||||
free((char *)var->values[i]);
|
||||
_cupsStrFree((char *)var->values[i]);
|
||||
|
||||
var->values[0] = strdup(value);
|
||||
var->values[0] = _cupsStrAlloc(value);
|
||||
var->nvalues = 1;
|
||||
}
|
||||
}
|
||||
@@ -561,10 +563,10 @@ cgi_add_variable(const char *name, /* I - Variable name */
|
||||
if ((var->values = calloc((size_t)element + 1, sizeof(char *))) == NULL)
|
||||
return;
|
||||
|
||||
var->name = strdup(name);
|
||||
var->name = _cupsStrAlloc(name);
|
||||
var->nvalues = element + 1;
|
||||
var->avalues = element + 1;
|
||||
var->values[element] = strdup(value);
|
||||
var->values[element] = _cupsStrAlloc(value);
|
||||
|
||||
form_count ++;
|
||||
}
|
||||
@@ -596,7 +598,7 @@ cgi_find_variable(const char *name) /* I - Name of variable */
|
||||
if (form_count < 1 || name == NULL)
|
||||
return (NULL);
|
||||
|
||||
key.name = (char *)name;
|
||||
key.name = name;
|
||||
|
||||
return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t),
|
||||
(int (*)(const void *, const void *))cgi_compare_variables));
|
||||
@@ -1205,7 +1207,6 @@ cgi_set_sid(void)
|
||||
const char *remote_addr, /* REMOTE_ADDR */
|
||||
*server_name, /* SERVER_NAME */
|
||||
*server_port; /* SERVER_PORT */
|
||||
struct timeval curtime; /* Current time */
|
||||
|
||||
|
||||
if ((remote_addr = getenv("REMOTE_ADDR")) == NULL)
|
||||
@@ -1215,8 +1216,7 @@ cgi_set_sid(void)
|
||||
if ((server_port = getenv("SERVER_PORT")) == NULL)
|
||||
server_port = "SERVER_PORT";
|
||||
|
||||
gettimeofday(&curtime, NULL);
|
||||
CUPS_SRAND(curtime.tv_sec + curtime.tv_usec);
|
||||
CUPS_SRAND(time(NULL));
|
||||
snprintf(buffer, sizeof(buffer), "%s:%s:%s:%02X%02X%02X%02X%02X%02X%02X%02X",
|
||||
remote_addr, server_name, server_port,
|
||||
(unsigned)CUPS_RAND() & 255, (unsigned)CUPS_RAND() & 255,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2019 by Apple Inc.
|
||||
dnl Copyright 2007-2017 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
|
||||
@@ -42,11 +42,7 @@ AC_PROG_CXX(clang++ c++ g++)
|
||||
AC_PROG_RANLIB
|
||||
AC_PATH_PROG(AR,ar)
|
||||
AC_PATH_PROG(CHMOD,chmod)
|
||||
AC_PATH_PROG(GZIPPROG,gzip)
|
||||
AC_MSG_CHECKING(for install-sh script)
|
||||
INSTALL="`pwd`/install-sh"
|
||||
AC_SUBST(INSTALL)
|
||||
AC_MSG_RESULT(using $INSTALL)
|
||||
AC_PATH_PROG(GZIP,gzip)
|
||||
AC_PATH_PROG(LD,ld)
|
||||
AC_PATH_PROG(LN,ln)
|
||||
AC_PATH_PROG(MKDIR,mkdir)
|
||||
@@ -55,7 +51,6 @@ AC_PATH_PROG(RM,rm)
|
||||
AC_PATH_PROG(RMDIR,rmdir)
|
||||
AC_PATH_PROG(SED,sed)
|
||||
AC_PATH_PROG(XDGOPEN,xdg-open)
|
||||
|
||||
if test "x$XDGOPEN" = x; then
|
||||
CUPS_HTMLVIEW="htmlview"
|
||||
else
|
||||
@@ -63,6 +58,11 @@ else
|
||||
fi
|
||||
AC_SUBST(CUPS_HTMLVIEW)
|
||||
|
||||
AC_MSG_CHECKING(for install-sh script)
|
||||
INSTALL="`pwd`/install-sh"
|
||||
AC_SUBST(INSTALL)
|
||||
AC_MSG_RESULT(using $INSTALL)
|
||||
|
||||
if test "x$AR" = x; then
|
||||
AC_MSG_ERROR([Unable to find required library archive command.])
|
||||
fi
|
||||
@@ -266,14 +266,14 @@ dnl ZLIB
|
||||
INSTALL_GZIP=""
|
||||
LIBZ=""
|
||||
AC_CHECK_HEADER(zlib.h,
|
||||
AC_CHECK_LIB(z, gzgets,[
|
||||
AC_CHECK_LIB(z, gzgets,
|
||||
AC_DEFINE(HAVE_LIBZ)
|
||||
LIBZ="-lz"
|
||||
LIBS="$LIBS -lz"
|
||||
AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_INFLATECOPY))
|
||||
if test "x$GZIPPROG" != x; then
|
||||
if test "x$GZIP" != z; then
|
||||
INSTALL_GZIP="-z"
|
||||
fi]))
|
||||
fi))
|
||||
AC_SUBST(INSTALL_GZIP)
|
||||
AC_SUBST(LIBZ)
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ if test -n "$GCC"; then
|
||||
# doesn't trigger...
|
||||
gccversion=`$CC --version | head -1 | awk '{print $NF}'`
|
||||
case "$gccversion" in
|
||||
7.* | 8.*)
|
||||
7.*)
|
||||
OPTIM="$OPTIM -Wno-format-truncation -Wno-tautological-compare"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -80,7 +80,6 @@ if test x$enable_ssl != xno; then
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS $SSLLIBS"
|
||||
AC_CHECK_FUNC(gnutls_fips140_set_mode, AC_DEFINE(HAVE_GNUTLS_FIPS140_SET_MODE))
|
||||
AC_CHECK_FUNC(gnutls_transport_set_pull_timeout_function, AC_DEFINE(HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION))
|
||||
AC_CHECK_FUNC(gnutls_priority_set_direct, AC_DEFINE(HAVE_GNUTLS_PRIORITY_SET_DIRECT))
|
||||
LIBS="$SAVELIBS"
|
||||
|
||||
@@ -303,13 +303,6 @@
|
||||
#undef HAVE_SSL
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_fips140_set_mode function?
|
||||
*/
|
||||
|
||||
#undef HAVE_GNUTLS_FIPS140_SET_MODE
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_transport_set_pull_timeout_function function?
|
||||
*/
|
||||
|
||||
externo
+145
-159
@@ -1,11 +1,13 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for CUPS 2.2.12.
|
||||
# Generated by GNU Autoconf 2.68 for CUPS 2.2.9.
|
||||
#
|
||||
# Report bugs to <https://github.com/apple/cups/issues>.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
#
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -134,31 +136,6 @@ export LANGUAGE
|
||||
# CDPATH.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
# Use a proper internal environment variable to ensure we don't fall
|
||||
# into an infinite loop, continuously re-executing ourselves.
|
||||
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
|
||||
_as_can_reexec=no; export _as_can_reexec;
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
|
||||
# Admittedly, this is quite paranoid, since all the known shells bail
|
||||
# out after a failed `exec'.
|
||||
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
|
||||
as_fn_exit 255
|
||||
fi
|
||||
# We don't want this to propagate to other subprocesses.
|
||||
{ _as_can_reexec=; unset _as_can_reexec;}
|
||||
if test "x$CONFIG_SHELL" = x; then
|
||||
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
|
||||
emulate sh
|
||||
@@ -192,8 +169,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
|
||||
else
|
||||
exitcode=1; echo positional parameters were not saved.
|
||||
fi
|
||||
test x\$exitcode = x0 || exit 1
|
||||
test -x / || exit 1"
|
||||
test x\$exitcode = x0 || exit 1"
|
||||
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
|
||||
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
|
||||
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
|
||||
@@ -238,25 +214,21 @@ IFS=$as_save_IFS
|
||||
|
||||
|
||||
if test "x$CONFIG_SHELL" != x; then :
|
||||
export CONFIG_SHELL
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
|
||||
# Admittedly, this is quite paranoid, since all the known shells bail
|
||||
# out after a failed `exec'.
|
||||
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
|
||||
exit 255
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
export CONFIG_SHELL
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
|
||||
fi
|
||||
|
||||
if test x$as_have_required = xno; then :
|
||||
@@ -359,14 +331,6 @@ $as_echo X"$as_dir" |
|
||||
|
||||
|
||||
} # as_fn_mkdir_p
|
||||
|
||||
# as_fn_executable_p FILE
|
||||
# -----------------------
|
||||
# Test if FILE is an executable regular file.
|
||||
as_fn_executable_p ()
|
||||
{
|
||||
test -f "$1" && test -x "$1"
|
||||
} # as_fn_executable_p
|
||||
# as_fn_append VAR VALUE
|
||||
# ----------------------
|
||||
# Append the text in VALUE to the end of the definition contained in VAR. Take
|
||||
@@ -488,10 +452,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
|
||||
chmod +x "$as_me.lineno" ||
|
||||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
|
||||
|
||||
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
|
||||
# already done that, so ensure we don't try to do so again and fall
|
||||
# in an infinite loop. This has already happened in practice.
|
||||
_as_can_reexec=no; export _as_can_reexec
|
||||
# Don't try to exec as it changes $[0], causing all sort of problems
|
||||
# (the dirname of $[0] is not the place where we might find the
|
||||
# original and so on. Autoconf is especially sensitive to this).
|
||||
@@ -526,16 +486,16 @@ if (echo >conf$$.file) 2>/dev/null; then
|
||||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -pR'
|
||||
as_ln_s='cp -p'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -pR'
|
||||
as_ln_s='cp -p'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -pR'
|
||||
as_ln_s='cp -p'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
@@ -547,8 +507,28 @@ else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in #(
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
@@ -580,8 +560,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='CUPS'
|
||||
PACKAGE_TARNAME='cups'
|
||||
PACKAGE_VERSION='2.2.12'
|
||||
PACKAGE_STRING='CUPS 2.2.12'
|
||||
PACKAGE_VERSION='2.2.9'
|
||||
PACKAGE_STRING='CUPS 2.2.9'
|
||||
PACKAGE_BUGREPORT='https://github.com/apple/cups/issues'
|
||||
PACKAGE_URL='https://www.cups.org/'
|
||||
|
||||
@@ -762,6 +742,7 @@ LIBPAPER
|
||||
LIBMALLOC
|
||||
PKGCONFIG
|
||||
INSTALLSTATIC
|
||||
INSTALL
|
||||
CUPS_HTMLVIEW
|
||||
XDGOPEN
|
||||
SED
|
||||
@@ -771,8 +752,7 @@ MV
|
||||
MKDIR
|
||||
LN
|
||||
LD
|
||||
INSTALL
|
||||
GZIPPROG
|
||||
GZIP
|
||||
CHMOD
|
||||
AR
|
||||
RANLIB
|
||||
@@ -1395,6 +1375,8 @@ target=$target_alias
|
||||
if test "x$host_alias" != x; then
|
||||
if test "x$build_alias" = x; then
|
||||
cross_compiling=maybe
|
||||
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
|
||||
If a cross compiler is detected then cross compile mode will be used" >&2
|
||||
elif test "x$build_alias" != "x$host_alias"; then
|
||||
cross_compiling=yes
|
||||
fi
|
||||
@@ -1480,7 +1462,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.2.12 to adapt to many kinds of systems.
|
||||
\`configure' configures CUPS 2.2.9 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1545,7 +1527,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of CUPS 2.2.12:";;
|
||||
short | recursive ) echo "Configuration of CUPS 2.2.9:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1726,10 +1708,10 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
CUPS configure 2.2.12
|
||||
generated by GNU Autoconf 2.69
|
||||
CUPS configure 2.2.9
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
This configure script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it.
|
||||
_ACEOF
|
||||
@@ -1880,7 +1862,7 @@ $as_echo "$ac_try_echo"; } >&5
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext && {
|
||||
test "$cross_compiling" = yes ||
|
||||
test -x conftest$ac_exeext
|
||||
$as_test_x conftest$ac_exeext
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
@@ -2190,8 +2172,8 @@ 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.2.12, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
It was created by CUPS $as_me 2.2.9, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
||||
@@ -2681,7 +2663,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_CODE_SIGN="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -2711,7 +2693,7 @@ done
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION="2.2.12"
|
||||
CUPS_VERSION="2.2.9"
|
||||
CUPS_REVISION=""
|
||||
CUPS_BUILD="cups-$CUPS_VERSION"
|
||||
|
||||
@@ -2757,7 +2739,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_AWK="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -2805,7 +2787,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -2849,7 +2831,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3293,7 +3275,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
struct stat;
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
@@ -3543,7 +3526,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3587,7 +3570,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_CXX="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3789,7 +3772,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3829,7 +3812,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_RANLIB="ranlib"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3882,7 +3865,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3922,7 +3905,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -3948,12 +3931,12 @@ fi
|
||||
set dummy gzip; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_GZIPPROG+:} false; then :
|
||||
if ${ac_cv_path_GZIP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $GZIPPROG in
|
||||
case $GZIP in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_GZIPPROG="$GZIPPROG" # Let the user override the test with a path.
|
||||
ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
@@ -3962,8 +3945,8 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_GZIPPROG="$as_dir/$ac_word$ac_exec_ext"
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
@@ -3974,22 +3957,16 @@ IFS=$as_save_IFS
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
GZIPPROG=$ac_cv_path_GZIPPROG
|
||||
if test -n "$GZIPPROG"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIPPROG" >&5
|
||||
$as_echo "$GZIPPROG" >&6; }
|
||||
GZIP=$ac_cv_path_GZIP
|
||||
if test -n "$GZIP"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
|
||||
$as_echo "$GZIP" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install-sh script" >&5
|
||||
$as_echo_n "checking for install-sh script... " >&6; }
|
||||
INSTALL="`pwd`/install-sh"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $INSTALL" >&5
|
||||
$as_echo "using $INSTALL" >&6; }
|
||||
# Extract the first word of "ld", so it can be a program name with args.
|
||||
set dummy ld; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
@@ -4008,7 +3985,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4048,7 +4025,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4088,7 +4065,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4128,7 +4105,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4168,7 +4145,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4208,7 +4185,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4248,7 +4225,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4288,7 +4265,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_XDGOPEN="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4310,7 +4287,6 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "x$XDGOPEN" = x; then
|
||||
CUPS_HTMLVIEW="htmlview"
|
||||
else
|
||||
@@ -4318,6 +4294,13 @@ else
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install-sh script" >&5
|
||||
$as_echo_n "checking for install-sh script... " >&6; }
|
||||
INSTALL="`pwd`/install-sh"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $INSTALL" >&5
|
||||
$as_echo "using $INSTALL" >&6; }
|
||||
|
||||
if test "x$AR" = x; then
|
||||
as_fn_error $? "Unable to find required library archive command." "$LINENO" 5
|
||||
fi
|
||||
@@ -4358,7 +4341,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4401,7 +4384,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -4811,7 +4794,7 @@ do
|
||||
for ac_prog in grep ggrep; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
|
||||
as_fn_executable_p "$ac_path_GREP" || continue
|
||||
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
|
||||
# Check for GNU ac_path_GREP and select it if it is found.
|
||||
# Check for GNU $ac_path_GREP
|
||||
case `"$ac_path_GREP" --version 2>&1` in
|
||||
@@ -4877,7 +4860,7 @@ do
|
||||
for ac_prog in egrep; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
|
||||
as_fn_executable_p "$ac_path_EGREP" || continue
|
||||
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
|
||||
# Check for GNU ac_path_EGREP and select it if it is found.
|
||||
# Check for GNU $ac_path_EGREP
|
||||
case `"$ac_path_EGREP" --version 2>&1` in
|
||||
@@ -5718,8 +5701,7 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzgets" >&5
|
||||
$as_echo "$ac_cv_lib_z_gzgets" >&6; }
|
||||
if test "x$ac_cv_lib_z_gzgets" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
|
||||
$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
|
||||
|
||||
LIBZ="-lz"
|
||||
LIBS="$LIBS -lz"
|
||||
@@ -5764,7 +5746,7 @@ if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
|
||||
|
||||
fi
|
||||
|
||||
if test "x$GZIPPROG" != x; then
|
||||
if test "x$GZIP" != z; then
|
||||
INSTALL_GZIP="-z"
|
||||
fi
|
||||
fi
|
||||
@@ -7021,7 +7003,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
# doesn't trigger...
|
||||
gccversion=`$CC --version | head -1 | awk '{print $NF}'`
|
||||
case "$gccversion" in
|
||||
7.* | 8.*)
|
||||
7.*)
|
||||
OPTIM="$OPTIM -Wno-format-truncation -Wno-tautological-compare"
|
||||
;;
|
||||
esac
|
||||
@@ -7783,7 +7765,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -7826,7 +7808,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_ac_pt_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -8378,7 +8360,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -8421,7 +8403,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -8480,12 +8462,6 @@ fi
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS $SSLLIBS"
|
||||
ac_fn_c_check_func "$LINENO" "gnutls_fips140_set_mode" "ac_cv_func_gnutls_fips140_set_mode"
|
||||
if test "x$ac_cv_func_gnutls_fips140_set_mode" = xyes; then :
|
||||
$as_echo "#define HAVE_GNUTLS_FIPS140_SET_MODE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "gnutls_transport_set_pull_timeout_function" "ac_cv_func_gnutls_transport_set_pull_timeout_function"
|
||||
if test "x$ac_cv_func_gnutls_transport_set_pull_timeout_function" = xyes; then :
|
||||
$as_echo "#define HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION 1" >>confdefs.h
|
||||
@@ -8986,8 +8962,6 @@ _ACEOF
|
||||
esac
|
||||
rm -rf conftest*
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -10029,7 +10003,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -10094,7 +10068,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -10159,7 +10133,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_PHPCGI="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -10200,7 +10174,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_PHP="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -10270,7 +10244,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@@ -10740,16 +10714,16 @@ if (echo >conf$$.file) 2>/dev/null; then
|
||||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -pR'
|
||||
as_ln_s='cp -p'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -pR'
|
||||
as_ln_s='cp -p'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -pR'
|
||||
as_ln_s='cp -p'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
@@ -10809,16 +10783,28 @@ else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
|
||||
# as_fn_executable_p FILE
|
||||
# -----------------------
|
||||
# Test if FILE is an executable regular file.
|
||||
as_fn_executable_p ()
|
||||
{
|
||||
test -f "$1" && test -x "$1"
|
||||
} # as_fn_executable_p
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in #(
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
@@ -10839,8 +10825,8 @@ 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.2.12, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
This file was extended by CUPS $as_me 2.2.9, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
@@ -10902,11 +10888,11 @@ _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.2.12
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
CUPS config.status 2.2.9
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
This config.status script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
@@ -10995,7 +10981,7 @@ fi
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
if \$ac_cs_recheck; then
|
||||
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
|
||||
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
|
||||
shift
|
||||
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
|
||||
CONFIG_SHELL='$SHELL'
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2019 by Apple Inc.
|
||||
dnl Copyright 2007-2018 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
|
||||
@@ -15,7 +15,7 @@ dnl We need at least autoconf 2.60...
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
dnl Package name and version...
|
||||
AC_INIT([CUPS], [2.2.12], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
|
||||
AC_INIT([CUPS], [2.2.9], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
|
||||
|
||||
sinclude(config-scripts/cups-opsys.m4)
|
||||
sinclude(config-scripts/cups-common.m4)
|
||||
|
||||
+19
-55
@@ -52,9 +52,6 @@ static const char *cups_auth_param(const char *scheme, const char *name, char *v
|
||||
static const char *cups_auth_scheme(const char *www_authenticate, char *scheme, size_t schemesize);
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
# define CUPS_GSS_OK 0 /* Successfully set credentials */
|
||||
# define CUPS_GSS_NONE -1 /* No credentials */
|
||||
# define CUPS_GSS_FAIL -2 /* Failed credentials/authentication */
|
||||
# ifdef HAVE_GSS_ACQUIRE_CRED_EX_F
|
||||
# ifdef HAVE_GSS_GSSAPI_SPI_H
|
||||
# include <GSS/gssapi_spi.h>
|
||||
@@ -181,8 +178,6 @@ cupsDoAuthentication(
|
||||
* Check the scheme name...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("2cupsDoAuthentication: Trying scheme \"%s\"...", scheme));
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if (!_cups_strcasecmp(scheme, "Negotiate"))
|
||||
{
|
||||
@@ -190,36 +185,18 @@ cupsDoAuthentication(
|
||||
* Kerberos authentication...
|
||||
*/
|
||||
|
||||
int gss_status; /* Auth status */
|
||||
|
||||
if ((gss_status = _cupsSetNegotiateAuthString(http, method, resource)) == CUPS_GSS_FAIL)
|
||||
if (_cupsSetNegotiateAuthString(http, method, resource))
|
||||
{
|
||||
DEBUG_puts("1cupsDoAuthentication: Negotiate failed.");
|
||||
http->status = HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED;
|
||||
return (-1);
|
||||
}
|
||||
else if (gss_status == CUPS_GSS_NONE)
|
||||
{
|
||||
DEBUG_puts("2cupsDoAuthentication: No credentials for Negotiate.");
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_puts("2cupsDoAuthentication: Using Negotiate.");
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_GSSAPI */
|
||||
if (_cups_strcasecmp(scheme, "Basic") && _cups_strcasecmp(scheme, "Digest"))
|
||||
{
|
||||
/*
|
||||
* Other schemes not yet supported...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("2cupsDoAuthentication: Scheme \"%s\" not yet supported.", scheme));
|
||||
continue;
|
||||
}
|
||||
continue; /* Not supported (yet) */
|
||||
|
||||
/*
|
||||
* See if we should retry the current username:password...
|
||||
@@ -249,7 +226,6 @@ cupsDoAuthentication(
|
||||
|
||||
if ((password = cupsGetPassword2(prompt, http, method, resource)) == NULL)
|
||||
{
|
||||
DEBUG_puts("1cupsDoAuthentication: User canceled password request.");
|
||||
http->status = HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED;
|
||||
return (-1);
|
||||
}
|
||||
@@ -279,7 +255,6 @@ cupsDoAuthentication(
|
||||
|
||||
char encode[256]; /* Base64 buffer */
|
||||
|
||||
DEBUG_puts("2cupsDoAuthentication: Using Basic.");
|
||||
httpEncode64_2(encode, sizeof(encode), http->userpass, (int)strlen(http->userpass));
|
||||
httpSetAuthString(http, "Basic", encode);
|
||||
break;
|
||||
@@ -298,22 +273,19 @@ cupsDoAuthentication(
|
||||
cups_auth_param(schemedata, "realm", http->realm, sizeof(http->realm));
|
||||
|
||||
if (_httpSetDigestAuthString(http, nonce, method, resource))
|
||||
{
|
||||
DEBUG_puts("2cupsDoAuthentication: Using Basic.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (http->authstring)
|
||||
{
|
||||
DEBUG_printf(("1cupsDoAuthentication: authstring=\"%s\".", http->authstring));
|
||||
DEBUG_printf(("1cupsDoAuthentication: authstring=\"%s\"", http->authstring));
|
||||
|
||||
return (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_puts("1cupsDoAuthentication: No supported schemes.");
|
||||
DEBUG_printf(("1cupsDoAuthentication: Unknown auth type: \"%s\"", www_auth));
|
||||
http->status = HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED;
|
||||
|
||||
return (-1);
|
||||
@@ -326,7 +298,7 @@ cupsDoAuthentication(
|
||||
* '_cupsSetNegotiateAuthString()' - Set the Kerberos authentication string.
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, negative on error */
|
||||
int /* O - 0 on success, -1 on error */
|
||||
_cupsSetNegotiateAuthString(
|
||||
http_t *http, /* I - Connection to server */
|
||||
const char *method, /* I - Request method ("GET", "POST", "PUT") */
|
||||
@@ -351,16 +323,10 @@ _cupsSetNegotiateAuthString(
|
||||
{
|
||||
DEBUG_puts("1_cupsSetNegotiateAuthString: Weak-linked GSSAPI/Kerberos "
|
||||
"framework is not present");
|
||||
return (CUPS_GSS_NONE);
|
||||
return (-1);
|
||||
}
|
||||
# endif /* __APPLE__ */
|
||||
|
||||
if (!strcmp(http->hostname, "localhost") || http->hostname[0] == '/' || isdigit(http->hostname[0] & 255) || !strchr(http->hostname, '.'))
|
||||
{
|
||||
DEBUG_printf(("1_cupsSetNegotiateAuthString: Kerberos not available for host \"%s\".", http->hostname));
|
||||
return (CUPS_GSS_NONE);
|
||||
}
|
||||
|
||||
if (http->gssname == GSS_C_NO_NAME)
|
||||
{
|
||||
http->gssname = cups_gss_getname(http, _cupsGSSServiceName());
|
||||
@@ -405,7 +371,7 @@ _cupsSetNegotiateAuthString(
|
||||
cupsUser(), http->gsshost);
|
||||
|
||||
if ((password = cupsGetPassword2(prompt, http, method, resource)) == NULL)
|
||||
return (CUPS_GSS_FAIL);
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Try to acquire credentials...
|
||||
@@ -459,20 +425,18 @@ _cupsSetNegotiateAuthString(
|
||||
}
|
||||
# endif /* HAVE_GSS_ACQUIRED_CRED_EX_F */
|
||||
|
||||
if (major_status == GSS_S_NO_CRED)
|
||||
if (GSS_ERROR(major_status))
|
||||
{
|
||||
cups_gss_printf(major_status, minor_status, "_cupsSetNegotiateAuthString: No credentials");
|
||||
return (CUPS_GSS_NONE);
|
||||
}
|
||||
else if (GSS_ERROR(major_status))
|
||||
{
|
||||
cups_gss_printf(major_status, minor_status, "_cupsSetNegotiateAuthString: Unable to initialize security context");
|
||||
return (CUPS_GSS_FAIL);
|
||||
cups_gss_printf(major_status, minor_status,
|
||||
"_cupsSetNegotiateAuthString: Unable to initialize "
|
||||
"security context");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
# ifdef DEBUG
|
||||
else if (major_status == GSS_S_CONTINUE_NEEDED)
|
||||
cups_gss_printf(major_status, minor_status, "_cupsSetNegotiateAuthString: Continuation needed");
|
||||
cups_gss_printf(major_status, minor_status,
|
||||
"_cupsSetNegotiateAuthString: Continuation needed!");
|
||||
# endif /* DEBUG */
|
||||
|
||||
if (output_token.length > 0 && output_token.length <= 65536)
|
||||
@@ -483,7 +447,7 @@ _cupsSetNegotiateAuthString(
|
||||
*/
|
||||
|
||||
int authsize = 10 + /* "Negotiate " */
|
||||
(((int)output_token.length * 4 / 3 + 3) & ~3) + 1;
|
||||
(int)output_token.length * 4 / 3 + 1 + 1;
|
||||
/* Base64 + nul */
|
||||
|
||||
httpSetAuthString(http, NULL, NULL);
|
||||
@@ -506,10 +470,10 @@ _cupsSetNegotiateAuthString(
|
||||
"large - %d bytes!", (int)output_token.length));
|
||||
gss_release_buffer(&minor_status, &output_token);
|
||||
|
||||
return (CUPS_GSS_FAIL);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
return (CUPS_GSS_OK);
|
||||
return (0);
|
||||
}
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
|
||||
@@ -239,7 +239,8 @@ extern http_t *_cupsConnect(void);
|
||||
extern char *_cupsCreateDest(const char *name, const char *info, const char *device_id, const char *device_uri, char *uri, size_t urisize);
|
||||
extern int _cupsGet1284Values(const char *device_id,
|
||||
cups_option_t **values);
|
||||
extern const char *_cupsGetDestResource(cups_dest_t *dest, unsigned flags, char *resource, size_t resourcesize);
|
||||
extern const char *_cupsGetDestResource(cups_dest_t *dest, char *resource,
|
||||
size_t resourcesize);
|
||||
extern int _cupsGetDests(http_t *http, ipp_op_t op,
|
||||
const char *name, cups_dest_t **dests,
|
||||
cups_ptype_t type, cups_ptype_t mask);
|
||||
|
||||
+2
-2
@@ -47,10 +47,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0212
|
||||
# define CUPS_VERSION 2.0209
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 12
|
||||
# define CUPS_VERSION_PATCH 9
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
|
||||
+73
-138
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Destination option/media support for CUPS.
|
||||
*
|
||||
* Copyright 2012-2019 by Apple Inc.
|
||||
* Copyright 2012-2017 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -83,7 +83,6 @@ cupsCheckDestSupported(
|
||||
ipp_res_t units_value; /* Resolution units */
|
||||
ipp_attribute_t *attr; /* Attribute */
|
||||
_ipp_value_t *attrval; /* Current attribute value */
|
||||
_ipp_option_t *map; /* Option mapping information */
|
||||
|
||||
|
||||
/*
|
||||
@@ -129,10 +128,10 @@ cupsCheckDestSupported(
|
||||
*/
|
||||
|
||||
pwg_media_t *pwg; /* Current PWG media size info */
|
||||
int min_width, /* Minimum width */
|
||||
min_length, /* Minimum length */
|
||||
max_width, /* Maximum width */
|
||||
max_length; /* Maximum length */
|
||||
int min_width, /* Minimum width */
|
||||
min_length, /* Minimum length */
|
||||
max_width, /* Maximum width */
|
||||
max_length; /* Maximum length */
|
||||
|
||||
/*
|
||||
* Get the minimum and maximum size...
|
||||
@@ -175,14 +174,9 @@ cupsCheckDestSupported(
|
||||
* Check literal values...
|
||||
*/
|
||||
|
||||
map = _ippFindOption(option);
|
||||
|
||||
switch (attr->value_tag)
|
||||
{
|
||||
case IPP_TAG_INTEGER :
|
||||
if (map && map->value_tag == IPP_TAG_STRING)
|
||||
return (strlen(value) <= (size_t)attr->values[0].integer);
|
||||
|
||||
case IPP_TAG_ENUM :
|
||||
int_value = atoi(value);
|
||||
|
||||
@@ -195,10 +189,7 @@ cupsCheckDestSupported(
|
||||
return (attr->values[0].boolean);
|
||||
|
||||
case IPP_TAG_RANGE :
|
||||
if (map && map->value_tag == IPP_TAG_STRING)
|
||||
int_value = (int)strlen(value);
|
||||
else
|
||||
int_value = atoi(value);
|
||||
int_value = atoi(value);
|
||||
|
||||
for (i = 0; i < attr->num_values; i ++)
|
||||
if (int_value >= attr->values[i].range.lower &&
|
||||
@@ -581,7 +572,6 @@ cupsCopyDestInfo(
|
||||
cups_dest_t *dest) /* I - Destination */
|
||||
{
|
||||
cups_dinfo_t *dinfo; /* Destination information */
|
||||
unsigned dflags; /* Destination flags */
|
||||
ipp_t *request, /* Get-Printer-Attributes request */
|
||||
*response; /* Supported attributes */
|
||||
int tries, /* Number of tries so far */
|
||||
@@ -591,7 +581,6 @@ cupsCopyDestInfo(
|
||||
char resource[1024]; /* Resource path */
|
||||
int version; /* IPP version */
|
||||
ipp_status_t status; /* Status of request */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
|
||||
static const char * const requested_attrs[] =
|
||||
{ /* Requested attributes */
|
||||
"job-template",
|
||||
@@ -600,35 +589,14 @@ cupsCopyDestInfo(
|
||||
};
|
||||
|
||||
|
||||
DEBUG_printf(("cupsCopyDestInfo(http=%p, dest=%p(%s))", (void *)http, (void *)dest, dest ? dest->name : ""));
|
||||
DEBUG_printf(("cupsCopyDestSupported(http=%p, dest=%p(%s))", (void *)http, (void *)dest, dest ? dest->name : ""));
|
||||
|
||||
/*
|
||||
* Get the default connection as needed...
|
||||
*/
|
||||
|
||||
if (!http)
|
||||
{
|
||||
DEBUG_puts("1cupsCopyDestInfo: Default server connection.");
|
||||
http = _cupsConnect();
|
||||
dflags = CUPS_DEST_FLAGS_NONE;
|
||||
}
|
||||
#ifdef AF_LOCAL
|
||||
else if (httpAddrFamily(http->hostaddr) == AF_LOCAL)
|
||||
{
|
||||
DEBUG_puts("1cupsCopyDestInfo: Connection to server (domain socket).");
|
||||
dflags = CUPS_DEST_FLAGS_NONE;
|
||||
}
|
||||
#endif /* AF_LOCAL */
|
||||
else if ((strcmp(http->hostname, cg->server) && cg->server[0] != '/') || cg->ipp_port != httpAddrPort(http->hostaddr))
|
||||
{
|
||||
DEBUG_printf(("1cupsCopyDestInfo: Connection to device (%s).", http->hostname));
|
||||
dflags = CUPS_DEST_FLAGS_DEVICE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_printf(("1cupsCopyDestInfo: Connection to server (%s).", http->hostname));
|
||||
dflags = CUPS_DEST_FLAGS_NONE;
|
||||
}
|
||||
http = _cupsConnect();
|
||||
|
||||
/*
|
||||
* Range check input...
|
||||
@@ -641,11 +609,8 @@ cupsCopyDestInfo(
|
||||
* Get the printer URI and resource path...
|
||||
*/
|
||||
|
||||
if ((uri = _cupsGetDestResource(dest, dflags, resource, sizeof(resource))) == NULL)
|
||||
{
|
||||
DEBUG_puts("1cupsCopyDestInfo: Unable to get resource.");
|
||||
if ((uri = _cupsGetDestResource(dest, resource, sizeof(resource))) == NULL)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the supported attributes...
|
||||
@@ -663,25 +628,28 @@ cupsCopyDestInfo(
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
|
||||
ippSetVersion(request, version / 10, version % 10);
|
||||
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());
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(requested_attrs) / sizeof(requested_attrs[0])), NULL, requested_attrs);
|
||||
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());
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"requested-attributes",
|
||||
(int)(sizeof(requested_attrs) / sizeof(requested_attrs[0])),
|
||||
NULL, requested_attrs);
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
status = cupsLastError();
|
||||
|
||||
if (status > IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED)
|
||||
{
|
||||
DEBUG_printf(("1cupsCopyDestInfo: Get-Printer-Attributes for '%s' returned %s (%s)", dest->name, ippErrorString(status), cupsLastErrorString()));
|
||||
DEBUG_printf(("cupsCopyDestSupported: Get-Printer-Attributes for '%s' "
|
||||
"returned %s (%s)", dest->name, ippErrorString(status),
|
||||
cupsLastErrorString()));
|
||||
|
||||
ippDelete(response);
|
||||
response = NULL;
|
||||
|
||||
if ((status == IPP_STATUS_ERROR_BAD_REQUEST || status == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED) && version > 11)
|
||||
{
|
||||
if (status == IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED && version > 11)
|
||||
version = 11;
|
||||
}
|
||||
else if (status == IPP_STATUS_ERROR_BUSY)
|
||||
{
|
||||
sleep((unsigned)delay);
|
||||
@@ -697,10 +665,7 @@ cupsCopyDestInfo(
|
||||
while (!response && tries < 10);
|
||||
|
||||
if (!response)
|
||||
{
|
||||
DEBUG_puts("1cupsCopyDestInfo: Unable to get printer attributes.");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate a cups_dinfo_t structure and return it...
|
||||
@@ -713,8 +678,6 @@ cupsCopyDestInfo(
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cupsCopyDestInfo: version=%d, uri=\"%s\", resource=\"%s\".", version, uri, resource));
|
||||
|
||||
dinfo->version = version;
|
||||
dinfo->uri = uri;
|
||||
dinfo->resource = _cupsStrAlloc(resource);
|
||||
@@ -975,10 +938,10 @@ cupsGetDestMediaByIndex(
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (nsize->key)
|
||||
strlcpy(size->media, nsize->key, sizeof(size->media));
|
||||
else if (nsize->size_name)
|
||||
if (nsize->size_name)
|
||||
strlcpy(size->media, nsize->size_name, sizeof(size->media));
|
||||
else if (nsize->key)
|
||||
strlcpy(size->media, nsize->key, sizeof(size->media));
|
||||
else if ((pwg = pwgMediaForSize(nsize->width, nsize->length)) != NULL)
|
||||
strlcpy(size->media, pwg->pwg, sizeof(size->media));
|
||||
else
|
||||
@@ -1239,19 +1202,25 @@ cupsGetDestMediaDefault(
|
||||
* Get the default media size, if any...
|
||||
*/
|
||||
|
||||
if ((media = cupsGetOption("media", dest->num_options, dest->options)) == NULL)
|
||||
if ((media = cupsGetOption("media", dest->num_options,
|
||||
dest->options)) == NULL)
|
||||
media = "na_letter_8.5x11in";
|
||||
|
||||
if (cupsGetDestMediaByName(http, dest, dinfo, media, flags, size))
|
||||
return (1);
|
||||
|
||||
if (strcmp(media, "na_letter_8.5x11in") && cupsGetDestMediaByName(http, dest, dinfo, "iso_a4_210x297mm", flags, size))
|
||||
if (strcmp(media, "na_letter_8.5x11in") &&
|
||||
cupsGetDestMediaByName(http, dest, dinfo, "iso_a4_210x297mm", flags,
|
||||
size))
|
||||
return (1);
|
||||
|
||||
if (strcmp(media, "iso_a4_210x297mm") && cupsGetDestMediaByName(http, dest, dinfo, "na_letter_8.5x11in", flags, size))
|
||||
if (strcmp(media, "iso_a4_210x297mm") &&
|
||||
cupsGetDestMediaByName(http, dest, dinfo, "na_letter_8.5x11in", flags,
|
||||
size))
|
||||
return (1);
|
||||
|
||||
if ((flags & CUPS_MEDIA_FLAGS_BORDERLESS) && cupsGetDestMediaByName(http, dest, dinfo, "na_index_4x6in", flags, size))
|
||||
if ((flags & CUPS_MEDIA_FLAGS_BORDERLESS) &&
|
||||
cupsGetDestMediaByName(http, dest, dinfo, "na_index_4x6in", flags, size))
|
||||
return (1);
|
||||
|
||||
/*
|
||||
@@ -1544,7 +1513,6 @@ cups_create_media_db(
|
||||
pwg_media_t *pwg; /* PWG media info */
|
||||
cups_array_t *db; /* New media database array */
|
||||
_cups_media_db_t mdb; /* Media entry */
|
||||
char media_key[256]; /* Synthesized media-key value */
|
||||
|
||||
|
||||
db = cupsArrayNew3((cups_array_func_t)cups_compare_media_db,
|
||||
@@ -1645,92 +1613,61 @@ cups_create_media_db(
|
||||
}
|
||||
}
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-color", IPP_TAG_ZERO)) != NULL && (media_attr->value_tag == IPP_TAG_NAME || media_attr->value_tag == IPP_TAG_NAMELANG || media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-color",
|
||||
IPP_TAG_ZERO)) != NULL &&
|
||||
(media_attr->value_tag == IPP_TAG_NAME ||
|
||||
media_attr->value_tag == IPP_TAG_NAMELANG ||
|
||||
media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
mdb.color = media_attr->values[0].string.text;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-info", IPP_TAG_TEXT)) != NULL)
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-info",
|
||||
IPP_TAG_TEXT)) != NULL)
|
||||
mdb.info = media_attr->values[0].string.text;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-key", IPP_TAG_ZERO)) != NULL && (media_attr->value_tag == IPP_TAG_NAME || media_attr->value_tag == IPP_TAG_NAMELANG || media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-key",
|
||||
IPP_TAG_ZERO)) != NULL &&
|
||||
(media_attr->value_tag == IPP_TAG_NAME ||
|
||||
media_attr->value_tag == IPP_TAG_NAMELANG ||
|
||||
media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
mdb.key = media_attr->values[0].string.text;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-size-name", IPP_TAG_ZERO)) != NULL && (media_attr->value_tag == IPP_TAG_NAME || media_attr->value_tag == IPP_TAG_NAMELANG || media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-size-name",
|
||||
IPP_TAG_ZERO)) != NULL &&
|
||||
(media_attr->value_tag == IPP_TAG_NAME ||
|
||||
media_attr->value_tag == IPP_TAG_NAMELANG ||
|
||||
media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
mdb.size_name = media_attr->values[0].string.text;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-source", IPP_TAG_ZERO)) != NULL && (media_attr->value_tag == IPP_TAG_NAME || media_attr->value_tag == IPP_TAG_NAMELANG || media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-source",
|
||||
IPP_TAG_ZERO)) != NULL &&
|
||||
(media_attr->value_tag == IPP_TAG_NAME ||
|
||||
media_attr->value_tag == IPP_TAG_NAMELANG ||
|
||||
media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
mdb.source = media_attr->values[0].string.text;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-type", IPP_TAG_ZERO)) != NULL && (media_attr->value_tag == IPP_TAG_NAME || media_attr->value_tag == IPP_TAG_NAMELANG || media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-type",
|
||||
IPP_TAG_ZERO)) != NULL &&
|
||||
(media_attr->value_tag == IPP_TAG_NAME ||
|
||||
media_attr->value_tag == IPP_TAG_NAMELANG ||
|
||||
media_attr->value_tag == IPP_TAG_KEYWORD))
|
||||
mdb.type = media_attr->values[0].string.text;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-bottom-margin", IPP_TAG_INTEGER)) != NULL)
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-bottom-margin",
|
||||
IPP_TAG_INTEGER)) != NULL)
|
||||
mdb.bottom = media_attr->values[0].integer;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-left-margin", IPP_TAG_INTEGER)) != NULL)
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-left-margin",
|
||||
IPP_TAG_INTEGER)) != NULL)
|
||||
mdb.left = media_attr->values[0].integer;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-right-margin", IPP_TAG_INTEGER)) != NULL)
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-right-margin",
|
||||
IPP_TAG_INTEGER)) != NULL)
|
||||
mdb.right = media_attr->values[0].integer;
|
||||
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-top-margin", IPP_TAG_INTEGER)) != NULL)
|
||||
if ((media_attr = ippFindAttribute(val->collection, "media-top-margin",
|
||||
IPP_TAG_INTEGER)) != NULL)
|
||||
mdb.top = media_attr->values[0].integer;
|
||||
|
||||
if (!mdb.key)
|
||||
{
|
||||
if (!mdb.size_name && (pwg = pwgMediaForSize(mdb.width, mdb.length)) != NULL)
|
||||
mdb.size_name = (char *)pwg->pwg;
|
||||
|
||||
if (!mdb.size_name)
|
||||
{
|
||||
/*
|
||||
* Use a CUPS-specific identifier if we don't have a size name...
|
||||
*/
|
||||
|
||||
if (flags & CUPS_MEDIA_FLAGS_READY)
|
||||
snprintf(media_key, sizeof(media_key), "cups-media-ready-%d", i + 1);
|
||||
else
|
||||
snprintf(media_key, sizeof(media_key), "cups-media-%d", i + 1);
|
||||
}
|
||||
else if (mdb.source)
|
||||
{
|
||||
/*
|
||||
* Generate key using size name, source, and type (if set)...
|
||||
*/
|
||||
|
||||
if (mdb.type)
|
||||
snprintf(media_key, sizeof(media_key), "%s_%s_%s", mdb.size_name, mdb.source, mdb.type);
|
||||
else
|
||||
snprintf(media_key, sizeof(media_key), "%s_%s", mdb.size_name, mdb.source);
|
||||
}
|
||||
else if (mdb.type)
|
||||
{
|
||||
/*
|
||||
* Generate key using size name and type...
|
||||
*/
|
||||
|
||||
snprintf(media_key, sizeof(media_key), "%s_%s", mdb.size_name, mdb.type);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Key is just the size name...
|
||||
*/
|
||||
|
||||
strlcpy(media_key, mdb.size_name, sizeof(media_key));
|
||||
}
|
||||
|
||||
/*
|
||||
* Append "_borderless" for borderless media...
|
||||
*/
|
||||
|
||||
if (!mdb.bottom && !mdb.left && !mdb.right && !mdb.top)
|
||||
strlcat(media_key, "_borderless", sizeof(media_key));
|
||||
|
||||
mdb.key = media_key;
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cups_create_media_db: Adding media: key=\"%s\", width=%d, length=%d, source=\"%s\", type=\"%s\".", mdb.key, mdb.width, mdb.length, mdb.source, mdb.type));
|
||||
|
||||
cupsArrayAdd(db, &mdb);
|
||||
}
|
||||
|
||||
@@ -2090,14 +2027,12 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
|
||||
* Return the matching size...
|
||||
*/
|
||||
|
||||
if (best->key)
|
||||
strlcpy(size->media, best->key, sizeof(size->media));
|
||||
else if (best->size_name)
|
||||
if (best->size_name)
|
||||
strlcpy(size->media, best->size_name, sizeof(size->media));
|
||||
else if (pwg && pwg->pwg)
|
||||
strlcpy(size->media, pwg->pwg, sizeof(size->media));
|
||||
else if (best->key)
|
||||
strlcpy(size->media, best->key, sizeof(size->media));
|
||||
else
|
||||
strlcpy(size->media, "unknown", sizeof(size->media));
|
||||
strlcpy(size->media, pwg->pwg, sizeof(size->media));
|
||||
|
||||
size->width = best->width;
|
||||
size->length = best->length;
|
||||
|
||||
+331
-236
@@ -79,6 +79,7 @@ typedef enum _cups_dnssd_state_e /* Enumerated device state */
|
||||
_CUPS_DNSSD_QUERY,
|
||||
_CUPS_DNSSD_PENDING,
|
||||
_CUPS_DNSSD_ACTIVE,
|
||||
_CUPS_DNSSD_LOCAL,
|
||||
_CUPS_DNSSD_INCOMPATIBLE,
|
||||
_CUPS_DNSSD_ERROR
|
||||
} _cups_dnssd_state_t;
|
||||
@@ -98,10 +99,6 @@ typedef struct _cups_dnssd_data_s /* Enumeration data */
|
||||
cups_ptype_t type, /* Printer type filter */
|
||||
mask; /* Printer type mask */
|
||||
cups_array_t *devices; /* Devices found so far */
|
||||
int num_dests; /* Number of lpoptions destinations */
|
||||
cups_dest_t *dests; /* lpoptions destinations */
|
||||
char def_name[1024], /* Default printer name, if any */
|
||||
*def_instance; /* Default printer instance, if any */
|
||||
} _cups_dnssd_data_t;
|
||||
|
||||
typedef struct _cups_dnssd_device_s /* Enumerated device */
|
||||
@@ -128,10 +125,8 @@ typedef struct _cups_dnssd_resolve_s /* Data for resolving URI */
|
||||
|
||||
typedef struct _cups_getdata_s
|
||||
{
|
||||
int num_dests; /* Number of destinations */
|
||||
cups_dest_t *dests; /* Destinations */
|
||||
char def_name[1024], /* Default printer name, if any */
|
||||
*def_instance; /* Default printer instance, if any */
|
||||
int num_dests; /* Number of destinations */
|
||||
cups_dest_t *dests; /* Destinations */
|
||||
} _cups_getdata_t;
|
||||
|
||||
typedef struct _cups_namedata_s
|
||||
@@ -197,6 +192,14 @@ static _cups_dnssd_device_t *
|
||||
const char *regtype,
|
||||
const char *replyDomain);
|
||||
# ifdef HAVE_DNSSD
|
||||
static void cups_dnssd_local_cb(DNSServiceRef sdRef,
|
||||
DNSServiceFlags flags,
|
||||
uint32_t interfaceIndex,
|
||||
DNSServiceErrorType errorCode,
|
||||
const char *serviceName,
|
||||
const char *regtype,
|
||||
const char *replyDomain,
|
||||
void *context);
|
||||
static void cups_dnssd_query_cb(DNSServiceRef sdRef,
|
||||
DNSServiceFlags flags,
|
||||
uint32_t interfaceIndex,
|
||||
@@ -234,7 +237,9 @@ static int cups_find_dest(const char *name, const char *instance,
|
||||
static int cups_get_cb(_cups_getdata_t *data, unsigned flags, cups_dest_t *dest);
|
||||
static char *cups_get_default(const char *filename, char *namebuf,
|
||||
size_t namesize, const char **instance);
|
||||
static int cups_get_dests(const char *filename, const char *match_name, const char *match_inst, int load_all, int user_default_set, int num_dests, cups_dest_t **dests);
|
||||
static int cups_get_dests(const char *filename, const char *match_name,
|
||||
const char *match_inst, int user_default_set,
|
||||
int num_dests, cups_dest_t **dests);
|
||||
static char *cups_make_string(ipp_attribute_t *attr, char *buffer,
|
||||
size_t bufsize);
|
||||
static int cups_name_cb(_cups_namedata_t *data, unsigned flags, cups_dest_t *dest);
|
||||
@@ -569,7 +574,7 @@ _cupsAppleSetUseLastPrinter(
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsConnectDest()' - Open a connection to the destination.
|
||||
* 'cupsConnectDest()' - Open a conection to the destination.
|
||||
*
|
||||
* Connect to the destination, returning a new @code http_t@ connection object
|
||||
* and optionally the resource path to use for the destination. These calls
|
||||
@@ -578,7 +583,7 @@ _cupsAppleSetUseLastPrinter(
|
||||
* returns 0. The caller is responsible for calling @link httpClose@ on the
|
||||
* returned connection.
|
||||
*
|
||||
* Starting with CUPS 2.2.4, the caller can pass @code CUPS_DEST_FLAGS_DEVICE@
|
||||
* Starting with CUPS 2.2.4, the caller can pass @code CUPS_DEST_FLAGS_DEVICE@
|
||||
* for the "flags" argument to connect directly to the device associated with
|
||||
* the destination. Otherwise, the connection is made to the CUPS scheduler
|
||||
* associated with the destination.
|
||||
@@ -846,8 +851,6 @@ cupsCopyDest(cups_dest_t *dest, /* I - Destination to copy */
|
||||
|
||||
if (new_dest)
|
||||
{
|
||||
new_dest->is_default = dest->is_default;
|
||||
|
||||
if ((new_dest->options = calloc(sizeof(cups_option_t), (size_t)dest->num_options)) == NULL)
|
||||
return (cupsRemoveDest(dest->name, dest->instance, num_dests, dests));
|
||||
|
||||
@@ -1100,23 +1103,20 @@ cupsGetDest(const char *name, /* I - Destination name or @code NULL@ for the d
|
||||
* '_cupsGetDestResource()' - Get the resource path and URI for a destination.
|
||||
*/
|
||||
|
||||
const char * /* O - URI */
|
||||
const char * /* O - Printer URI */
|
||||
_cupsGetDestResource(
|
||||
cups_dest_t *dest, /* I - Destination */
|
||||
unsigned flags, /* I - Destination flags */
|
||||
char *resource, /* I - Resource buffer */
|
||||
size_t resourcesize) /* I - Size of resource buffer */
|
||||
{
|
||||
const char *uri, /* URI */
|
||||
*device_uri, /* Device URI */
|
||||
*printer_uri; /* Printer URI */
|
||||
const char *uri; /* Printer URI */
|
||||
char scheme[32], /* URI scheme */
|
||||
userpass[256], /* Username and password (unused) */
|
||||
hostname[256]; /* Hostname */
|
||||
int port; /* Port number */
|
||||
|
||||
|
||||
DEBUG_printf(("_cupsGetDestResource(dest=%p(%s), flags=%u, resource=%p, resourcesize=%d)", (void *)dest, dest->name, flags, (void *)resource, (int)resourcesize));
|
||||
DEBUG_printf(("_cupsGetDestResource(dest=%p(%s), resource=%p, resourcesize=%d)", (void *)dest, dest->name, (void *)resource, (int)resourcesize));
|
||||
|
||||
/*
|
||||
* Range check input...
|
||||
@@ -1132,46 +1132,25 @@ _cupsGetDestResource(
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab the printer and device URIs...
|
||||
* Grab the printer URI...
|
||||
*/
|
||||
|
||||
device_uri = cupsGetOption("device-uri", dest->num_options, dest->options);
|
||||
printer_uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options);
|
||||
|
||||
DEBUG_printf(("1_cupsGetDestResource: device-uri=\"%s\", printer-uri-supported=\"%s\".", device_uri, printer_uri));
|
||||
|
||||
if ((uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) == NULL)
|
||||
{
|
||||
if ((uri = cupsGetOption("device-uri", dest->num_options, dest->options)) != NULL)
|
||||
{
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
if (((flags & CUPS_DEST_FLAGS_DEVICE) || !printer_uri) && strstr(device_uri, "._tcp"))
|
||||
{
|
||||
if ((device_uri = cups_dnssd_resolve(dest, device_uri, 5000, NULL, NULL, NULL)) != NULL)
|
||||
{
|
||||
DEBUG_printf(("1_cupsGetDestResource: Resolved device-uri=\"%s\".", device_uri));
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_puts("1_cupsGetDestResource: Unable to resolve device.");
|
||||
|
||||
if (resource)
|
||||
*resource = '\0';
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(ENOENT), 0);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
if (strstr(uri, "._tcp"))
|
||||
uri = cups_dnssd_resolve(dest, uri, 5000, NULL, NULL, NULL);
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
}
|
||||
|
||||
if (flags & CUPS_DEST_FLAGS_DEVICE)
|
||||
{
|
||||
uri = device_uri;
|
||||
}
|
||||
else if (printer_uri)
|
||||
{
|
||||
uri = printer_uri;
|
||||
}
|
||||
else
|
||||
{
|
||||
uri = _cupsCreateDest(dest->name, cupsGetOption("printer-info", dest->num_options, dest->options), NULL, device_uri, resource, resourcesize);
|
||||
if (uri)
|
||||
{
|
||||
DEBUG_printf(("1_cupsGetDestResource: Resolved printer-uri-supported=\"%s\"", uri));
|
||||
|
||||
uri = _cupsCreateDest(dest->name, cupsGetOption("printer-info", dest->num_options, dest->options), NULL, uri, resource, resourcesize);
|
||||
}
|
||||
|
||||
if (uri)
|
||||
{
|
||||
@@ -1181,24 +1160,30 @@ _cupsGetDestResource(
|
||||
|
||||
uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_puts("1_cupsGetDestResource: No printer-uri-supported found.");
|
||||
|
||||
if (resource)
|
||||
*resource = '\0';
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(ENOENT), 0);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (!uri)
|
||||
else
|
||||
{
|
||||
DEBUG_puts("1_cupsGetDestResource: No printer-uri-supported or device-uri found.");
|
||||
DEBUG_printf(("1_cupsGetDestResource: printer-uri-supported=\"%s\"", uri));
|
||||
|
||||
if (resource)
|
||||
*resource = '\0';
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme),
|
||||
userpass, sizeof(userpass), hostname, sizeof(hostname),
|
||||
&port, resource, (int)resourcesize) < HTTP_URI_STATUS_OK)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Bad printer-uri."), 1);
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(ENOENT), 0);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
else if (httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass, sizeof(userpass), hostname, sizeof(hostname), &port, resource, (int)resourcesize) < HTTP_URI_STATUS_OK)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Bad URI."), 1);
|
||||
|
||||
return (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_printf(("1_cupsGetDestResource: resource=\"%s\"", resource));
|
||||
@@ -1286,12 +1271,6 @@ cupsGetDestWithURI(const char *name, /* I - Desired printer name or @code NULL@
|
||||
name = resource + 10;
|
||||
info = temp;
|
||||
}
|
||||
else if (!strncmp(resource, "/ipp/print/", 11))
|
||||
{
|
||||
snprintf(temp, sizeof(temp), "%s @ %s", resource + 11, hostname);
|
||||
name = resource + 11;
|
||||
info = temp;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = hostname;
|
||||
@@ -1652,6 +1631,16 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
cups_dest_t **dests) /* O - Destinations */
|
||||
{
|
||||
_cups_getdata_t data; /* Enumeration data */
|
||||
cups_dest_t *dest; /* Current destination */
|
||||
const char *home; /* HOME environment variable */
|
||||
char filename[1024]; /* Local ~/.cups/lpoptions file */
|
||||
const char *defprinter; /* Default printer */
|
||||
char name[1024], /* Copy of printer name */
|
||||
*instance, /* Pointer to instance name */
|
||||
*user_default; /* User default printer */
|
||||
int num_reals; /* Number of real queues */
|
||||
cups_dest_t *reals; /* Real queues */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsGetDests2(http=%p, dests=%p)", (void *)http, (void *)dests));
|
||||
@@ -1707,6 +1696,107 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
cups_enum_dests(http, 0, _CUPS_DNSSD_GET_DESTS, NULL, 0, 0, (cups_dest_cb_t)cups_get_cb, &data);
|
||||
}
|
||||
|
||||
/*
|
||||
* Make a copy of the "real" queues for a later sanity check...
|
||||
*/
|
||||
|
||||
if (data.num_dests > 0)
|
||||
{
|
||||
num_reals = data.num_dests;
|
||||
reals = calloc((size_t)num_reals, sizeof(cups_dest_t));
|
||||
|
||||
if (reals)
|
||||
memcpy(reals, data.dests, (size_t)num_reals * sizeof(cups_dest_t));
|
||||
else
|
||||
num_reals = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
num_reals = 0;
|
||||
reals = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab the default destination...
|
||||
*/
|
||||
|
||||
if ((user_default = _cupsUserDefault(name, sizeof(name))) != NULL)
|
||||
defprinter = name;
|
||||
else if ((defprinter = cupsGetDefault2(http)) != NULL)
|
||||
{
|
||||
strlcpy(name, defprinter, sizeof(name));
|
||||
defprinter = name;
|
||||
}
|
||||
|
||||
if (defprinter)
|
||||
{
|
||||
/*
|
||||
* Separate printer and instance name...
|
||||
*/
|
||||
|
||||
if ((instance = strchr(name, '/')) != NULL)
|
||||
*instance++ = '\0';
|
||||
|
||||
/*
|
||||
* Lookup the printer and instance and make it the default...
|
||||
*/
|
||||
|
||||
if ((dest = cupsGetDest(name, instance, data.num_dests, data.dests)) != NULL)
|
||||
dest->is_default = 1;
|
||||
}
|
||||
else
|
||||
instance = NULL;
|
||||
|
||||
/*
|
||||
* Load the /etc/cups/lpoptions and ~/.cups/lpoptions files...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
|
||||
data.num_dests = cups_get_dests(filename, NULL, NULL, user_default != NULL, data.num_dests, &data.dests);
|
||||
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
{
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
|
||||
|
||||
data.num_dests = cups_get_dests(filename, NULL, NULL, user_default != NULL, data.num_dests, &data.dests);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate the current default destination - this prevents old
|
||||
* Default lines in /etc/cups/lpoptions and ~/.cups/lpoptions from
|
||||
* pointing to a non-existent printer or class...
|
||||
*/
|
||||
|
||||
if (num_reals)
|
||||
{
|
||||
/*
|
||||
* See if we have a default printer...
|
||||
*/
|
||||
|
||||
if ((dest = cupsGetDest(NULL, NULL, data.num_dests, data.dests)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Have a default; see if it is real...
|
||||
*/
|
||||
|
||||
if (!cupsGetDest(dest->name, NULL, num_reals, reals))
|
||||
{
|
||||
/*
|
||||
* Remove the non-real printer from the list, since we don't want jobs
|
||||
* going to an unexpected printer... (<rdar://problem/14216472>)
|
||||
*/
|
||||
|
||||
data.num_dests = cupsRemoveDest(dest->name, dest->instance, data.num_dests, &data.dests);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Free memory...
|
||||
*/
|
||||
|
||||
free(reals);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the number of destinations...
|
||||
*/
|
||||
@@ -1793,9 +1883,6 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
|
||||
|
||||
dest_name = cups_get_default(filename, defname, sizeof(defname), &instance);
|
||||
|
||||
if (dest_name)
|
||||
set_as_default = 2;
|
||||
}
|
||||
|
||||
if (!dest_name)
|
||||
@@ -1806,9 +1893,6 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
|
||||
dest_name = cups_get_default(filename, defname, sizeof(defname), &instance);
|
||||
|
||||
if (dest_name)
|
||||
set_as_default = 3;
|
||||
}
|
||||
|
||||
if (!dest_name)
|
||||
@@ -1817,8 +1901,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
* No locally-set default destination, ask the server...
|
||||
*/
|
||||
|
||||
op = IPP_OP_CUPS_GET_DEFAULT;
|
||||
set_as_default = 4;
|
||||
op = IPP_OP_CUPS_GET_DEFAULT;
|
||||
|
||||
DEBUG_puts("1cupsGetNamedDest: Asking server for default printer...");
|
||||
}
|
||||
@@ -1849,36 +1932,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
dest = data.dest;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (set_as_default)
|
||||
{
|
||||
default :
|
||||
break;
|
||||
|
||||
case 1 : /* Set from env vars */
|
||||
if (getenv("LPDEST"))
|
||||
_cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("LPDEST environment variable names default destination that does not exist."), 1);
|
||||
else if (getenv("PRINTER"))
|
||||
_cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("PRINTER environment variable names default destination that does not exist."), 1);
|
||||
else
|
||||
_cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("No default destination."), 1);
|
||||
break;
|
||||
|
||||
case 2 : /* Set from ~/.cups/lpoptions */
|
||||
_cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("~/.cups/lpoptions file names default destination that does not exist."), 1);
|
||||
break;
|
||||
|
||||
case 3 : /* Set from /etc/cups/lpoptions */
|
||||
_cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("/etc/cups/lpoptions file names default destination that does not exist."), 1);
|
||||
break;
|
||||
|
||||
case 4 : /* Set from server */
|
||||
_cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("No default destination."), 1);
|
||||
break;
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cupsGetNamedDest: Got dest=%p", (void *)dest));
|
||||
@@ -1894,13 +1948,13 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
|
||||
cups_get_dests(filename, dest_name, instance, 0, 1, 1, &dest);
|
||||
cups_get_dests(filename, dest_name, instance, 1, 1, &dest);
|
||||
|
||||
if (home)
|
||||
{
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
|
||||
|
||||
cups_get_dests(filename, dest_name, instance, 0, 1, 1, &dest);
|
||||
cups_get_dests(filename, dest_name, instance, 1, 1, &dest);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2075,6 +2129,12 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
#ifndef _WIN32
|
||||
if (getuid())
|
||||
{
|
||||
/*
|
||||
* Merge in server defaults...
|
||||
*/
|
||||
|
||||
num_temps = cups_get_dests(filename, NULL, NULL, 0, num_temps, &temps);
|
||||
|
||||
/*
|
||||
* Point to user defaults...
|
||||
*/
|
||||
@@ -2135,7 +2195,8 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
else
|
||||
wrote = 0;
|
||||
|
||||
temp = cupsGetDest(dest->name, NULL, num_temps, temps);
|
||||
if ((temp = cupsGetDest(dest->name, dest->instance, num_temps, temps)) == NULL)
|
||||
temp = cupsGetDest(dest->name, NULL, num_temps, temps);
|
||||
|
||||
for (j = dest->num_options, option = dest->options; j > 0; j --, option ++)
|
||||
{
|
||||
@@ -2143,14 +2204,19 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
* See if this option is a printer attribute; if so, skip it...
|
||||
*/
|
||||
|
||||
if ((match = _ippFindOption(option->name)) != NULL && match->group_tag == IPP_TAG_PRINTER)
|
||||
if ((match = _ippFindOption(option->name)) != NULL &&
|
||||
match->group_tag == IPP_TAG_PRINTER)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* See if the server options match these; if so, don't write 'em.
|
||||
* See if the server/global options match these; if so, don't
|
||||
* write 'em.
|
||||
*/
|
||||
|
||||
if (temp && (val = cupsGetOption(option->name, temp->num_options, temp->options)) != NULL && !_cups_strcasecmp(val, option->value))
|
||||
if (temp &&
|
||||
(val = cupsGetOption(option->name, temp->num_options,
|
||||
temp->options)) != NULL &&
|
||||
!_cups_strcasecmp(val, option->value))
|
||||
continue;
|
||||
|
||||
/*
|
||||
@@ -2167,7 +2233,10 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
|
||||
if (option->value[0])
|
||||
{
|
||||
if (strchr(option->value, ' ') || strchr(option->value, '\\') || strchr(option->value, '\"') || strchr(option->value, '\''))
|
||||
if (strchr(option->value, ' ') ||
|
||||
strchr(option->value, '\\') ||
|
||||
strchr(option->value, '\"') ||
|
||||
strchr(option->value, '\''))
|
||||
{
|
||||
/*
|
||||
* Quote the value...
|
||||
@@ -2218,7 +2287,9 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
|
||||
if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) != NULL)
|
||||
{
|
||||
CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, dest->name, kCFStringEncodingUTF8);
|
||||
CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault,
|
||||
dest->name,
|
||||
kCFStringEncodingUTF8);
|
||||
/* Default printer name */
|
||||
|
||||
if (name)
|
||||
@@ -2649,7 +2720,22 @@ cups_dnssd_browse_cb(
|
||||
* This object is new on the network.
|
||||
*/
|
||||
|
||||
cups_dnssd_get_device(data, name, type, domain);
|
||||
if (flags & AVAHI_LOOKUP_RESULT_LOCAL)
|
||||
{
|
||||
/*
|
||||
* This comes from the local machine so ignore it.
|
||||
*/
|
||||
|
||||
DEBUG_printf(("cups_dnssd_browse_cb: Ignoring local service \"%s\".", name));
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Create a device entry for it if it doesn't yet exist.
|
||||
*/
|
||||
|
||||
cups_dnssd_get_device(data, name, type, domain);
|
||||
}
|
||||
break;
|
||||
|
||||
case AVAHI_BROWSER_REMOVE :
|
||||
@@ -2870,6 +2956,66 @@ cups_dnssd_get_device(
|
||||
}
|
||||
|
||||
|
||||
# ifdef HAVE_DNSSD
|
||||
/*
|
||||
* 'cups_dnssd_local_cb()' - Browse for local printers.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_dnssd_local_cb(
|
||||
DNSServiceRef sdRef, /* I - Service reference */
|
||||
DNSServiceFlags flags, /* I - Option flags */
|
||||
uint32_t interfaceIndex, /* I - Interface number */
|
||||
DNSServiceErrorType errorCode, /* I - Error, if any */
|
||||
const char *serviceName, /* I - Name of service/device */
|
||||
const char *regtype, /* I - Type of service */
|
||||
const char *replyDomain, /* I - Service domain */
|
||||
void *context) /* I - Devices array */
|
||||
{
|
||||
_cups_dnssd_data_t *data = (_cups_dnssd_data_t *)context;
|
||||
/* Enumeration data */
|
||||
_cups_dnssd_device_t *device; /* Device */
|
||||
|
||||
|
||||
DEBUG_printf(("5cups_dnssd_local_cb(sdRef=%p, flags=%x, interfaceIndex=%d, errorCode=%d, serviceName=\"%s\", regtype=\"%s\", replyDomain=\"%s\", context=%p)", (void *)sdRef, flags, interfaceIndex, errorCode, serviceName, regtype, replyDomain, context));
|
||||
|
||||
/*
|
||||
* Only process "add" data...
|
||||
*/
|
||||
|
||||
if (errorCode != kDNSServiceErr_NoError || !(flags & kDNSServiceFlagsAdd))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Get the device...
|
||||
*/
|
||||
|
||||
device = cups_dnssd_get_device(data, serviceName, regtype, replyDomain);
|
||||
|
||||
/*
|
||||
* Hide locally-registered devices...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("6cups_dnssd_local_cb: Hiding local printer '%s'.",
|
||||
serviceName));
|
||||
|
||||
if (device->ref)
|
||||
{
|
||||
DNSServiceRefDeallocate(device->ref);
|
||||
device->ref = 0;
|
||||
}
|
||||
|
||||
if (device->state == _CUPS_DNSSD_ACTIVE)
|
||||
{
|
||||
DEBUG_printf(("6cups_dnssd_local_cb: Remove callback for \"%s\".", device->dest.name));
|
||||
(*data->cb)(data->user_data, CUPS_DEST_FLAGS_REMOVED, &device->dest);
|
||||
}
|
||||
|
||||
device->state = _CUPS_DNSSD_LOCAL;
|
||||
}
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
|
||||
# ifdef HAVE_AVAHI
|
||||
/*
|
||||
* 'cups_dnssd_poll_cb()' - Wait for input on the specified file descriptors.
|
||||
@@ -2919,9 +3065,9 @@ cups_dnssd_poll_cb(
|
||||
* 'cups_dnssd_query_cb()' - Process query data.
|
||||
*/
|
||||
|
||||
# ifdef HAVE_DNSSD
|
||||
static void
|
||||
cups_dnssd_query_cb(
|
||||
# ifdef HAVE_DNSSD
|
||||
DNSServiceRef sdRef, /* I - Service reference */
|
||||
DNSServiceFlags flags, /* I - Data flags */
|
||||
uint32_t interfaceIndex, /* I - Interface */
|
||||
@@ -2932,7 +3078,11 @@ cups_dnssd_query_cb(
|
||||
uint16_t rdlen, /* I - Length of record data */
|
||||
const void *rdata, /* I - Record data */
|
||||
uint32_t ttl, /* I - Time-to-live */
|
||||
void *context) /* I - Enumeration data */
|
||||
{
|
||||
# else /* HAVE_AVAHI */
|
||||
static void
|
||||
cups_dnssd_query_cb(
|
||||
AvahiRecordBrowser *browser, /* I - Record browser */
|
||||
AvahiIfIndex interfaceIndex,
|
||||
/* I - Interface index (unused) */
|
||||
@@ -2944,13 +3094,13 @@ cups_dnssd_query_cb(
|
||||
const void *rdata, /* I - TXT record */
|
||||
size_t rdlen, /* I - Length of TXT record */
|
||||
AvahiLookupResultFlags flags, /* I - Flags */
|
||||
# endif /* HAVE_DNSSD */
|
||||
void *context) /* I - Enumeration data */
|
||||
void *context) /* I - Enumeration data */
|
||||
{
|
||||
# if defined(DEBUG) && defined(HAVE_AVAHI)
|
||||
# ifdef DEBUG
|
||||
AvahiClient *client = avahi_record_browser_get_client(browser);
|
||||
/* Client information */
|
||||
# endif /* DEBUG && HAVE_AVAHI */
|
||||
# endif /* DEBUG */
|
||||
# endif /* HAVE_DNSSD */
|
||||
_cups_dnssd_data_t *data = (_cups_dnssd_data_t *)context;
|
||||
/* Enumeration data */
|
||||
char serviceName[256],/* Service name */
|
||||
@@ -3393,26 +3543,29 @@ cups_enum_dests(
|
||||
cups_dest_cb_t cb, /* I - Callback function */
|
||||
void *user_data) /* I - User data */
|
||||
{
|
||||
int i, j, /* Looping vars */
|
||||
int i, /* Looping var */
|
||||
num_dests; /* Number of destinations */
|
||||
cups_dest_t *dests = NULL, /* Destinations */
|
||||
*dest, /* Current destination */
|
||||
*user_dest; /* User destination */
|
||||
cups_option_t *option; /* Current option */
|
||||
char *user_default; /* User default printer */
|
||||
*dest; /* Current destination */
|
||||
const char *defprinter; /* Default printer */
|
||||
char name[1024], /* Copy of printer name */
|
||||
*instance, /* Pointer to instance name */
|
||||
*user_default; /* User default printer */
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
int count, /* Number of queries started */
|
||||
completed, /* Number of completed queries */
|
||||
remaining; /* Remainder of timeout */
|
||||
struct timeval curtime; /* Current time */
|
||||
_cups_dnssd_data_t data; /* Data for callback */
|
||||
_cups_dnssd_data_t data; /* Data for callback */
|
||||
_cups_dnssd_device_t *device; /* Current device */
|
||||
# ifdef HAVE_DNSSD
|
||||
int nfds, /* Number of files responded */
|
||||
main_fd; /* File descriptor for lookups */
|
||||
DNSServiceRef ipp_ref = NULL; /* IPP browser */
|
||||
DNSServiceRef ipp_ref = NULL, /* IPP browser */
|
||||
local_ipp_ref = NULL; /* Local IPP browser */
|
||||
# ifdef HAVE_SSL
|
||||
DNSServiceRef ipps_ref = NULL; /* IPPS browser */
|
||||
DNSServiceRef ipps_ref = NULL, /* IPPS browser */
|
||||
local_ipps_ref = NULL; /* Local IPPS browser */
|
||||
# endif /* HAVE_SSL */
|
||||
# ifdef HAVE_POLL
|
||||
struct pollfd pfd; /* Polling data */
|
||||
@@ -3427,12 +3580,7 @@ cups_enum_dests(
|
||||
AvahiServiceBrowser *ipps_ref = NULL; /* IPPS browser */
|
||||
# endif /* HAVE_SSL */
|
||||
# endif /* HAVE_DNSSD */
|
||||
#else
|
||||
_cups_getdata_t data; /* Data for callback */
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
const char *home; /* HOME environment variable */
|
||||
char filename[1024]; /* Local lpoptions file */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
|
||||
|
||||
|
||||
DEBUG_printf(("cups_enum_dests(flags=%x, msec=%d, cancel=%p, type=%x, mask=%x, cb=%p, user_data=%p)", flags, msec, (void *)cancel, type, mask, (void *)cb, (void *)user_data));
|
||||
@@ -3449,48 +3597,13 @@ cups_enum_dests(
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the /etc/cups/lpoptions and ~/.cups/lpoptions files...
|
||||
*/
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
if ((user_default = _cupsUserDefault(data.def_name, sizeof(data.def_name))) == NULL)
|
||||
{
|
||||
const char *defprinter = cupsGetDefault2(http);
|
||||
/* Server default, if any */
|
||||
|
||||
if (defprinter)
|
||||
strlcpy(data.def_name, defprinter, sizeof(data.def_name));
|
||||
}
|
||||
|
||||
if (data.def_name[0])
|
||||
{
|
||||
/*
|
||||
* Separate printer and instance name...
|
||||
*/
|
||||
|
||||
if ((data.def_instance = strchr(data.def_name, '/')) != NULL)
|
||||
*data.def_instance++ = '\0';
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cups_enum_dests: def_name=\"%s\", def_instance=\"%s\"", data.def_name, data.def_instance));
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
|
||||
data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
|
||||
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
{
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
|
||||
|
||||
data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get ready to enumerate...
|
||||
*/
|
||||
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
data.type = type;
|
||||
data.mask = mask;
|
||||
data.cb = cb;
|
||||
@@ -3506,17 +3619,29 @@ cups_enum_dests(
|
||||
|
||||
num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &dests, type, mask);
|
||||
|
||||
if (data.def_name[0])
|
||||
if ((user_default = _cupsUserDefault(name, sizeof(name))) != NULL)
|
||||
defprinter = name;
|
||||
else if ((defprinter = cupsGetDefault2(http)) != NULL)
|
||||
{
|
||||
strlcpy(name, defprinter, sizeof(name));
|
||||
defprinter = name;
|
||||
}
|
||||
|
||||
if (defprinter)
|
||||
{
|
||||
/*
|
||||
* Lookup the named default printer and instance and make it the default...
|
||||
* Separate printer and instance name...
|
||||
*/
|
||||
|
||||
if ((dest = cupsGetDest(data.def_name, data.def_instance, num_dests, dests)) != NULL)
|
||||
{
|
||||
DEBUG_printf(("1cups_enum_dests: Setting is_default on \"%s/%s\".", dest->name, dest->instance));
|
||||
if ((instance = strchr(name, '/')) != NULL)
|
||||
*instance++ = '\0';
|
||||
|
||||
/*
|
||||
* Lookup the printer and instance and make it the default...
|
||||
*/
|
||||
|
||||
if ((dest = cupsGetDest(name, instance, num_dests, dests)) != NULL)
|
||||
dest->is_default = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = num_dests, dest = dests;
|
||||
@@ -3527,16 +3652,6 @@ cups_enum_dests(
|
||||
const char *device_uri; /* Device URI */
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
|
||||
if ((user_dest = cupsGetDest(dest->name, dest->instance, data.num_dests, data.dests)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Apply user defaults to this destination...
|
||||
*/
|
||||
|
||||
for (j = user_dest->num_options, option = user_dest->options; j > 0; j --, option ++)
|
||||
dest->num_options = cupsAddOption(option->name, option->value, dest->num_options, &dest->options);
|
||||
}
|
||||
|
||||
if (!(*cb)(user_data, i > 1 ? CUPS_DEST_FLAGS_MORE : CUPS_DEST_FLAGS_NONE, dest))
|
||||
break;
|
||||
|
||||
@@ -3599,9 +3714,6 @@ cups_enum_dests(
|
||||
if (DNSServiceCreateConnection(&data.main_ref) != kDNSServiceErr_NoError)
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create service browser, returning 0.");
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -3612,9 +3724,14 @@ cups_enum_dests(
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create IPP browser, returning 0.");
|
||||
DNSServiceRefDeallocate(data.main_ref);
|
||||
return (0);
|
||||
}
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
local_ipp_ref = data.main_ref;
|
||||
if (DNSServiceBrowse(&local_ipp_ref, kDNSServiceFlagsShareConnection, kDNSServiceInterfaceIndexLocalOnly, "_ipp._tcp", NULL, (DNSServiceBrowseReply)cups_dnssd_local_cb, &data) != kDNSServiceErr_NoError)
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create local IPP browser, returning 0.");
|
||||
DNSServiceRefDeallocate(data.main_ref);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -3624,9 +3741,14 @@ cups_enum_dests(
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create IPPS browser, returning 0.");
|
||||
DNSServiceRefDeallocate(data.main_ref);
|
||||
return (0);
|
||||
}
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
local_ipps_ref = data.main_ref;
|
||||
if (DNSServiceBrowse(&local_ipps_ref, kDNSServiceFlagsShareConnection, kDNSServiceInterfaceIndexLocalOnly, "_ipps._tcp", NULL, (DNSServiceBrowseReply)cups_dnssd_local_cb, &data) != kDNSServiceErr_NoError)
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create local IPPS browser, returning 0.");
|
||||
DNSServiceRefDeallocate(data.main_ref);
|
||||
return (0);
|
||||
}
|
||||
# endif /* HAVE_SSL */
|
||||
@@ -3635,9 +3757,6 @@ cups_enum_dests(
|
||||
if ((data.simple_poll = avahi_simple_poll_new()) == NULL)
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create Avahi poll, returning 0.");
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -3650,9 +3769,6 @@ cups_enum_dests(
|
||||
{
|
||||
DEBUG_puts("1cups_enum_dests: Unable to create Avahi client, returning 0.");
|
||||
avahi_simple_poll_free(data.simple_poll);
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -3663,9 +3779,6 @@ cups_enum_dests(
|
||||
|
||||
avahi_client_free(data.client);
|
||||
avahi_simple_poll_free(data.simple_poll);
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -3678,9 +3791,6 @@ cups_enum_dests(
|
||||
avahi_service_browser_free(ipp_ref);
|
||||
avahi_client_free(data.client);
|
||||
avahi_simple_poll_free(data.simple_poll);
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
return (0);
|
||||
}
|
||||
# endif /* HAVE_SSL */
|
||||
@@ -3793,26 +3903,8 @@ cups_enum_dests(
|
||||
|
||||
if ((device->type & mask) == type)
|
||||
{
|
||||
dest = &device->dest;
|
||||
|
||||
if ((user_dest = cupsGetDest(dest->name, dest->instance, data.num_dests, data.dests)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Apply user defaults to this destination...
|
||||
*/
|
||||
|
||||
for (j = user_dest->num_options, option = user_dest->options; j > 0; j --, option ++)
|
||||
dest->num_options = cupsAddOption(option->name, option->value, dest->num_options, &dest->options);
|
||||
}
|
||||
|
||||
if (!strcasecmp(dest->name, data.def_name) && !data.def_instance)
|
||||
{
|
||||
DEBUG_printf(("1cups_enum_dests: Setting is_default on discovered \"%s\".", dest->name));
|
||||
dest->is_default = 1;
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cups_enum_dests: Add callback for \"%s\".", device->dest.name));
|
||||
if (!(*cb)(user_data, CUPS_DEST_FLAGS_NONE, dest))
|
||||
if (!(*cb)(user_data, CUPS_DEST_FLAGS_NONE, &device->dest))
|
||||
{
|
||||
remaining = -1;
|
||||
break;
|
||||
@@ -3843,18 +3935,20 @@ cups_enum_dests(
|
||||
|
||||
enum_finished:
|
||||
|
||||
cupsFreeDests(data.num_dests, data.dests);
|
||||
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
cupsArrayDelete(data.devices);
|
||||
|
||||
# ifdef HAVE_DNSSD
|
||||
if (ipp_ref)
|
||||
DNSServiceRefDeallocate(ipp_ref);
|
||||
if (local_ipp_ref)
|
||||
DNSServiceRefDeallocate(local_ipp_ref);
|
||||
|
||||
# ifdef HAVE_SSL
|
||||
if (ipps_ref)
|
||||
DNSServiceRefDeallocate(ipps_ref);
|
||||
if (local_ipps_ref)
|
||||
DNSServiceRefDeallocate(local_ipps_ref);
|
||||
# endif /* HAVE_SSL */
|
||||
|
||||
if (data.main_ref)
|
||||
@@ -4072,7 +4166,6 @@ cups_get_dests(
|
||||
const char *filename, /* I - File to read from */
|
||||
const char *match_name, /* I - Destination name we want */
|
||||
const char *match_inst, /* I - Instance name we want */
|
||||
int load_all, /* I - Load all saved destinations? */
|
||||
int user_default_set, /* I - User default printer set? */
|
||||
int num_dests, /* I - Number of destinations */
|
||||
cups_dest_t **dests) /* IO - Destinations */
|
||||
@@ -4087,7 +4180,7 @@ cups_get_dests(
|
||||
int linenum; /* Current line number */
|
||||
|
||||
|
||||
DEBUG_printf(("7cups_get_dests(filename=\"%s\", match_name=\"%s\", match_inst=\"%s\", load_all=%d, user_default_set=%d, num_dests=%d, dests=%p)", filename, match_name, match_inst, load_all, user_default_set, num_dests, (void *)dests));
|
||||
DEBUG_printf(("7cups_get_dests(filename=\"%s\", match_name=\"%s\", match_inst=\"%s\", user_default_set=%d, num_dests=%d, dests=%p)", filename, match_name, match_inst, user_default_set, num_dests, (void *)dests));
|
||||
|
||||
/*
|
||||
* Try to open the file...
|
||||
@@ -4155,7 +4248,8 @@ cups_get_dests(
|
||||
instance));
|
||||
|
||||
/*
|
||||
* Match and/or ignore missing destinations...
|
||||
* See if the primary instance of the destination exists; if not,
|
||||
* ignore this entry and move on...
|
||||
*/
|
||||
|
||||
if (match_name)
|
||||
@@ -4168,7 +4262,7 @@ cups_get_dests(
|
||||
|
||||
dest = *dests;
|
||||
}
|
||||
else if (!load_all && cupsGetDest(name, NULL, num_dests, *dests) == NULL)
|
||||
else if (cupsGetDest(name, NULL, num_dests, *dests) == NULL)
|
||||
{
|
||||
DEBUG_puts("9cups_get_dests: Not found!");
|
||||
continue;
|
||||
@@ -4196,7 +4290,8 @@ cups_get_dests(
|
||||
* Add options until we hit the end of the line...
|
||||
*/
|
||||
|
||||
dest->num_options = cupsParseOptions(lineptr, dest->num_options, &(dest->options));
|
||||
dest->num_options = cupsParseOptions(lineptr, dest->num_options,
|
||||
&(dest->options));
|
||||
|
||||
/*
|
||||
* If we found what we were looking for, stop now...
|
||||
|
||||
@@ -679,12 +679,6 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (fp->eof)
|
||||
{
|
||||
DEBUG_puts("5cupsFileGetChar: End-of-file!");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the input buffer is empty, try to read more data...
|
||||
*/
|
||||
@@ -1657,12 +1651,6 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
|
||||
if (bytes == 0)
|
||||
return (0);
|
||||
|
||||
if (fp->eof)
|
||||
{
|
||||
DEBUG_puts("5cupsFileRead: End-of-file!");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Loop until all bytes are read...
|
||||
*/
|
||||
|
||||
+2
-25
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hashing function for CUPS.
|
||||
*
|
||||
* Copyright © 2015-2019 by Apple Inc.
|
||||
* Copyright © 2015-2018 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -190,13 +190,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
|
||||
unsigned char temp[64]; /* Temporary hash buffer */
|
||||
size_t tempsize = 0; /* Truncate to this size? */
|
||||
|
||||
|
||||
# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
|
||||
unsigned oldmode = gnutls_fips140_mode_enabled();
|
||||
|
||||
gnutls_fips140_set_mode(GNUTLS_FIPS140_LAX, GNUTLS_FIPS140_SET_MODE_THREAD);
|
||||
# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
if (!strcmp(algorithm, "md5"))
|
||||
alg = GNUTLS_DIG_MD5;
|
||||
else if (!strcmp(algorithm, "sha"))
|
||||
@@ -234,10 +227,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
|
||||
gnutls_hash_fast(alg, data, datalen, temp);
|
||||
memcpy(hash, temp, tempsize);
|
||||
|
||||
# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
|
||||
gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
|
||||
# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
return ((ssize_t)tempsize);
|
||||
}
|
||||
|
||||
@@ -246,17 +235,9 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
|
||||
|
||||
gnutls_hash_fast(alg, data, datalen, hash);
|
||||
|
||||
# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
|
||||
gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
|
||||
# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
return ((ssize_t)gnutls_hash_get_len(alg));
|
||||
return (gnutls_hash_get_len(alg));
|
||||
}
|
||||
|
||||
# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
|
||||
gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
|
||||
# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
#else
|
||||
/*
|
||||
* No hash support beyond MD5 without CommonCrypto or GNU TLS...
|
||||
@@ -290,10 +271,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
|
||||
|
||||
too_small:
|
||||
|
||||
#ifdef HAVE_GNUTLS_FIPS140_SET_MODE
|
||||
gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
|
||||
#endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Hash buffer too small."), 1);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
+2
-7
@@ -1905,7 +1905,7 @@ httpPrintf(http_t *http, /* I - HTTP connection */
|
||||
...) /* I - Additional args as needed */
|
||||
{
|
||||
ssize_t bytes; /* Number of bytes to write */
|
||||
char buf[65536]; /* Buffer for formatted string */
|
||||
char buf[16384]; /* Buffer for formatted string */
|
||||
va_list ap; /* Variable argument pointer */
|
||||
|
||||
|
||||
@@ -1917,12 +1917,7 @@ httpPrintf(http_t *http, /* I - HTTP connection */
|
||||
|
||||
DEBUG_printf(("3httpPrintf: (" CUPS_LLFMT " bytes) %s", CUPS_LLCAST bytes, buf));
|
||||
|
||||
if (bytes > (ssize_t)(sizeof(buf) - 1))
|
||||
{
|
||||
http->error = ENOMEM;
|
||||
return (-1);
|
||||
}
|
||||
else if (http->data_encoding == HTTP_ENCODING_FIELDS)
|
||||
if (http->data_encoding == HTTP_ENCODING_FIELDS)
|
||||
return ((int)httpWrite2(http, buf, (size_t)bytes));
|
||||
else
|
||||
{
|
||||
|
||||
+61
-49
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Internet Printing Protocol functions for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 2007-2018 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -3044,13 +3044,8 @@ ippReadIO(void *src, /* I - Data source */
|
||||
|
||||
DEBUG_printf(("2ippReadIO: name length=%d", n));
|
||||
|
||||
if (n && parent)
|
||||
{
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Invalid named IPP attribute in collection."), 1);
|
||||
DEBUG_puts("1ippReadIO: bad attribute name in collection.");
|
||||
return (IPP_STATE_ERROR);
|
||||
}
|
||||
else if (n == 0 && tag != IPP_TAG_MEMBERNAME && tag != IPP_TAG_END_COLLECTION)
|
||||
if (n == 0 && tag != IPP_TAG_MEMBERNAME &&
|
||||
tag != IPP_TAG_END_COLLECTION)
|
||||
{
|
||||
/*
|
||||
* More values for current attribute...
|
||||
@@ -3757,7 +3752,8 @@ ippSetDate(ipp_t *ipp, /* I - IPP message */
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_DATE && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values || !datevalue)
|
||||
if (!ipp || !attr || !*attr || (*attr)->value_tag != IPP_TAG_DATE ||
|
||||
element < 0 || element > (*attr)->num_values || !datevalue)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -3840,7 +3836,9 @@ ippSetInteger(ipp_t *ipp, /* I - IPP message */
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_INTEGER && (*attr)->value_tag != IPP_TAG_ENUM && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values)
|
||||
if (!ipp || !attr || !*attr ||
|
||||
((*attr)->value_tag != IPP_TAG_INTEGER && (*attr)->value_tag != IPP_TAG_ENUM) ||
|
||||
element < 0 || element > (*attr)->num_values)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -3848,12 +3846,7 @@ ippSetInteger(ipp_t *ipp, /* I - IPP message */
|
||||
*/
|
||||
|
||||
if ((value = ipp_set_value(ipp, attr, element)) != NULL)
|
||||
{
|
||||
if ((*attr)->value_tag != IPP_TAG_ENUM)
|
||||
(*attr)->value_tag = IPP_TAG_INTEGER;
|
||||
|
||||
value->integer = intvalue;
|
||||
}
|
||||
|
||||
return (value != NULL);
|
||||
}
|
||||
@@ -3930,7 +3923,9 @@ ippSetOctetString(
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_STRING && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values || datalen < 0 || datalen > IPP_MAX_LENGTH)
|
||||
if (!ipp || !attr || !*attr || (*attr)->value_tag != IPP_TAG_STRING ||
|
||||
element < 0 || element > (*attr)->num_values ||
|
||||
datalen < 0 || datalen > IPP_MAX_LENGTH)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -3954,8 +3949,6 @@ ippSetOctetString(
|
||||
* Copy the data...
|
||||
*/
|
||||
|
||||
(*attr)->value_tag = IPP_TAG_STRING;
|
||||
|
||||
if (value->unknown.data)
|
||||
{
|
||||
/*
|
||||
@@ -4047,7 +4040,8 @@ ippSetRange(ipp_t *ipp, /* I - IPP message */
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_RANGE && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values || lowervalue > uppervalue)
|
||||
if (!ipp || !attr || !*attr || (*attr)->value_tag != IPP_TAG_RANGE ||
|
||||
element < 0 || element > (*attr)->num_values || lowervalue > uppervalue)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -4056,7 +4050,6 @@ ippSetRange(ipp_t *ipp, /* I - IPP message */
|
||||
|
||||
if ((value = ipp_set_value(ipp, attr, element)) != NULL)
|
||||
{
|
||||
(*attr)->value_tag = IPP_TAG_RANGE;
|
||||
value->range.lower = lowervalue;
|
||||
value->range.upper = uppervalue;
|
||||
}
|
||||
@@ -4129,7 +4122,9 @@ ippSetResolution(
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
if (!ipp || !attr || !*attr || ((*attr)->value_tag != IPP_TAG_RESOLUTION && (*attr)->value_tag != IPP_TAG_NOVALUE && (*attr)->value_tag != IPP_TAG_UNKNOWN) || element < 0 || element > (*attr)->num_values || xresvalue <= 0 || yresvalue <= 0 || unitsvalue < IPP_RES_PER_INCH || unitsvalue > IPP_RES_PER_CM)
|
||||
if (!ipp || !attr || !*attr || (*attr)->value_tag != IPP_TAG_RESOLUTION ||
|
||||
element < 0 || element > (*attr)->num_values || xresvalue <= 0 || yresvalue <= 0 ||
|
||||
unitsvalue < IPP_RES_PER_INCH || unitsvalue > IPP_RES_PER_CM)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -4138,7 +4133,6 @@ ippSetResolution(
|
||||
|
||||
if ((value = ipp_set_value(ipp, attr, element)) != NULL)
|
||||
{
|
||||
(*attr)->value_tag = IPP_TAG_RESOLUTION;
|
||||
value->resolution.units = unitsvalue;
|
||||
value->resolution.xres = xresvalue;
|
||||
value->resolution.yres = yresvalue;
|
||||
@@ -4240,7 +4234,10 @@ ippSetString(ipp_t *ipp, /* I - IPP message */
|
||||
else
|
||||
value_tag = IPP_TAG_ZERO;
|
||||
|
||||
if (!ipp || !attr || !*attr || (value_tag < IPP_TAG_TEXT && value_tag != IPP_TAG_TEXTLANG && value_tag != IPP_TAG_NAMELANG && value_tag != IPP_TAG_NOVALUE && value_tag != IPP_TAG_UNKNOWN) || value_tag > IPP_TAG_MIMETYPE || element < 0 || element > (*attr)->num_values || !strvalue)
|
||||
if (!ipp || !attr || !*attr ||
|
||||
(value_tag < IPP_TAG_TEXT && value_tag != IPP_TAG_TEXTLANG &&
|
||||
value_tag != IPP_TAG_NAMELANG) || value_tag > IPP_TAG_MIMETYPE ||
|
||||
element < 0 || element > (*attr)->num_values || !strvalue)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -4249,9 +4246,6 @@ ippSetString(ipp_t *ipp, /* I - IPP message */
|
||||
|
||||
if ((value = ipp_set_value(ipp, attr, element)) != NULL)
|
||||
{
|
||||
if (value_tag == IPP_TAG_NOVALUE || value_tag == IPP_TAG_UNKNOWN)
|
||||
(*attr)->value_tag = IPP_TAG_KEYWORD;
|
||||
|
||||
if (element > 0)
|
||||
value->string.language = (*attr)->values[0].string.language;
|
||||
|
||||
@@ -4352,7 +4346,10 @@ ippSetStringfv(ipp_t *ipp, /* I - IPP message */
|
||||
else
|
||||
value_tag = IPP_TAG_ZERO;
|
||||
|
||||
if (!ipp || !attr || !*attr || (value_tag < IPP_TAG_TEXT && value_tag != IPP_TAG_TEXTLANG && value_tag != IPP_TAG_NAMELANG && value_tag != IPP_TAG_NOVALUE && value_tag != IPP_TAG_UNKNOWN) || value_tag > IPP_TAG_MIMETYPE || !format)
|
||||
if (!ipp || !attr || !*attr ||
|
||||
(value_tag < IPP_TAG_TEXT && value_tag != IPP_TAG_TEXTLANG &&
|
||||
value_tag != IPP_TAG_NAMELANG) || value_tag > IPP_TAG_MIMETYPE ||
|
||||
!format)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
@@ -4404,8 +4401,6 @@ ippSetStringfv(ipp_t *ipp, /* I - IPP message */
|
||||
max_bytes = IPP_MAX_CHARSET;
|
||||
break;
|
||||
|
||||
case IPP_TAG_NOVALUE :
|
||||
case IPP_TAG_UNKNOWN :
|
||||
case IPP_TAG_KEYWORD :
|
||||
max_bytes = IPP_MAX_KEYWORD;
|
||||
break;
|
||||
@@ -4553,7 +4548,9 @@ ippSetValueTag(
|
||||
break;
|
||||
|
||||
case IPP_TAG_NAME :
|
||||
if (temp_tag != IPP_TAG_KEYWORD)
|
||||
if (temp_tag != IPP_TAG_KEYWORD && temp_tag != IPP_TAG_URI &&
|
||||
temp_tag != IPP_TAG_URISCHEME && temp_tag != IPP_TAG_LANGUAGE &&
|
||||
temp_tag != IPP_TAG_MIMETYPE)
|
||||
return (0);
|
||||
|
||||
(*attr)->value_tag = (ipp_tag_t)(IPP_TAG_NAME | ((*attr)->value_tag & IPP_TAG_CUPS_CONST));
|
||||
@@ -4561,7 +4558,10 @@ ippSetValueTag(
|
||||
|
||||
case IPP_TAG_NAMELANG :
|
||||
case IPP_TAG_TEXTLANG :
|
||||
if (value_tag == IPP_TAG_NAMELANG && (temp_tag != IPP_TAG_NAME && temp_tag != IPP_TAG_KEYWORD))
|
||||
if (value_tag == IPP_TAG_NAMELANG &&
|
||||
(temp_tag != IPP_TAG_NAME && temp_tag != IPP_TAG_KEYWORD &&
|
||||
temp_tag != IPP_TAG_URI && temp_tag != IPP_TAG_URISCHEME &&
|
||||
temp_tag != IPP_TAG_LANGUAGE && temp_tag != IPP_TAG_MIMETYPE))
|
||||
return (0);
|
||||
|
||||
if (value_tag == IPP_TAG_TEXTLANG && temp_tag != IPP_TAG_TEXT)
|
||||
@@ -4975,24 +4975,30 @@ ippValidateAttribute(
|
||||
{
|
||||
if ((*ptr & 0xe0) == 0xc0)
|
||||
{
|
||||
if ((ptr[1] & 0xc0) != 0x80)
|
||||
break;
|
||||
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
}
|
||||
else if ((*ptr & 0xf0) == 0xe0)
|
||||
{
|
||||
if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80)
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
|
||||
ptr += 2;
|
||||
}
|
||||
else if ((*ptr & 0xf8) == 0xf0)
|
||||
{
|
||||
if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80 || (ptr[3] & 0xc0) != 0x80)
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
|
||||
ptr += 3;
|
||||
}
|
||||
else if (*ptr & 0x80)
|
||||
break;
|
||||
@@ -5034,24 +5040,30 @@ ippValidateAttribute(
|
||||
{
|
||||
if ((*ptr & 0xe0) == 0xc0)
|
||||
{
|
||||
if ((ptr[1] & 0xc0) != 0x80)
|
||||
break;
|
||||
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
}
|
||||
else if ((*ptr & 0xf0) == 0xe0)
|
||||
{
|
||||
if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80)
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
|
||||
ptr += 2;
|
||||
}
|
||||
else if ((*ptr & 0xf8) == 0xf0)
|
||||
{
|
||||
if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80 || (ptr[3] & 0xc0) != 0x80)
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
ptr ++;
|
||||
if ((*ptr & 0xc0) != 0x80)
|
||||
break;
|
||||
|
||||
ptr += 3;
|
||||
}
|
||||
else if (*ptr & 0x80)
|
||||
break;
|
||||
|
||||
+82
-84
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PPD cache implementation for CUPS.
|
||||
*
|
||||
* Copyright © 2010-2019 by Apple Inc.
|
||||
* Copyright © 2010-2018 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -290,11 +290,11 @@ _cupsConvertOptions(
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, keyword);
|
||||
else if (pc->sides_option && (choice = ppdFindMarkedChoice(ppd, pc->sides_option)) != NULL)
|
||||
{
|
||||
if (pc->sides_1sided && !_cups_strcasecmp(choice->choice, pc->sides_1sided))
|
||||
if (!_cups_strcasecmp(choice->choice, pc->sides_1sided))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, "one-sided");
|
||||
else if (pc->sides_2sided_long && !_cups_strcasecmp(choice->choice, pc->sides_2sided_long))
|
||||
else if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_long))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, "two-sided-long-edge");
|
||||
else if (pc->sides_2sided_short && !_cups_strcasecmp(choice->choice, pc->sides_2sided_short))
|
||||
if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_short))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, "two-sided-short-edge");
|
||||
}
|
||||
|
||||
@@ -508,20 +508,24 @@ _ppdCacheCreateWithFile(
|
||||
else if (!_cups_strcasecmp(line, "Filter"))
|
||||
{
|
||||
if (!pc->filters)
|
||||
pc->filters = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
|
||||
pc->filters = cupsArrayNew3(NULL, NULL, NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
|
||||
cupsArrayAdd(pc->filters, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "PreFilter"))
|
||||
{
|
||||
if (!pc->prefilters)
|
||||
pc->prefilters = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
|
||||
pc->prefilters = cupsArrayNew3(NULL, NULL, NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
|
||||
cupsArrayAdd(pc->prefilters, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Product"))
|
||||
{
|
||||
pc->product = strdup(value);
|
||||
pc->product = _cupsStrAlloc(value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "SingleFile"))
|
||||
{
|
||||
@@ -621,8 +625,8 @@ _ppdCacheCreateWithFile(
|
||||
}
|
||||
|
||||
map = pc->bins + pc->num_bins;
|
||||
map->pwg = strdup(pwg_keyword);
|
||||
map->ppd = strdup(ppd_keyword);
|
||||
map->pwg = _cupsStrAlloc(pwg_keyword);
|
||||
map->ppd = _cupsStrAlloc(ppd_keyword);
|
||||
|
||||
pc->num_bins ++;
|
||||
}
|
||||
@@ -676,8 +680,8 @@ _ppdCacheCreateWithFile(
|
||||
goto create_error;
|
||||
}
|
||||
|
||||
size->map.pwg = strdup(pwg_keyword);
|
||||
size->map.ppd = strdup(ppd_keyword);
|
||||
size->map.pwg = _cupsStrAlloc(pwg_keyword);
|
||||
size->map.ppd = _cupsStrAlloc(ppd_keyword);
|
||||
|
||||
pc->num_sizes ++;
|
||||
}
|
||||
@@ -705,15 +709,15 @@ _ppdCacheCreateWithFile(
|
||||
|
||||
pwgFormatSizeName(pwg_keyword, sizeof(pwg_keyword), "custom", "max",
|
||||
pc->custom_max_width, pc->custom_max_length, NULL);
|
||||
pc->custom_max_keyword = strdup(pwg_keyword);
|
||||
pc->custom_max_keyword = _cupsStrAlloc(pwg_keyword);
|
||||
|
||||
pwgFormatSizeName(pwg_keyword, sizeof(pwg_keyword), "custom", "min",
|
||||
pc->custom_min_width, pc->custom_min_length, NULL);
|
||||
pc->custom_min_keyword = strdup(pwg_keyword);
|
||||
pc->custom_min_keyword = _cupsStrAlloc(pwg_keyword);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "SourceOption"))
|
||||
{
|
||||
pc->source_option = strdup(value);
|
||||
pc->source_option = _cupsStrAlloc(value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "NumSources"))
|
||||
{
|
||||
@@ -760,8 +764,8 @@ _ppdCacheCreateWithFile(
|
||||
}
|
||||
|
||||
map = pc->sources + pc->num_sources;
|
||||
map->pwg = strdup(pwg_keyword);
|
||||
map->ppd = strdup(ppd_keyword);
|
||||
map->pwg = _cupsStrAlloc(pwg_keyword);
|
||||
map->ppd = _cupsStrAlloc(ppd_keyword);
|
||||
|
||||
pc->num_sources ++;
|
||||
}
|
||||
@@ -809,8 +813,8 @@ _ppdCacheCreateWithFile(
|
||||
}
|
||||
|
||||
map = pc->types + pc->num_types;
|
||||
map->pwg = strdup(pwg_keyword);
|
||||
map->ppd = strdup(ppd_keyword);
|
||||
map->pwg = _cupsStrAlloc(pwg_keyword);
|
||||
map->ppd = _cupsStrAlloc(ppd_keyword);
|
||||
|
||||
pc->num_types ++;
|
||||
}
|
||||
@@ -840,13 +844,13 @@ _ppdCacheCreateWithFile(
|
||||
pc->presets[print_color_mode] + print_quality);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "SidesOption"))
|
||||
pc->sides_option = strdup(value);
|
||||
pc->sides_option = _cupsStrAlloc(value);
|
||||
else if (!_cups_strcasecmp(line, "Sides1Sided"))
|
||||
pc->sides_1sided = strdup(value);
|
||||
pc->sides_1sided = _cupsStrAlloc(value);
|
||||
else if (!_cups_strcasecmp(line, "Sides2SidedLong"))
|
||||
pc->sides_2sided_long = strdup(value);
|
||||
pc->sides_2sided_long = _cupsStrAlloc(value);
|
||||
else if (!_cups_strcasecmp(line, "Sides2SidedShort"))
|
||||
pc->sides_2sided_short = strdup(value);
|
||||
pc->sides_2sided_short = _cupsStrAlloc(value);
|
||||
else if (!_cups_strcasecmp(line, "Finishings"))
|
||||
{
|
||||
if (!pc->finishings)
|
||||
@@ -867,13 +871,13 @@ _ppdCacheCreateWithFile(
|
||||
else if (!_cups_strcasecmp(line, "MaxCopies"))
|
||||
pc->max_copies = atoi(value);
|
||||
else if (!_cups_strcasecmp(line, "ChargeInfoURI"))
|
||||
pc->charge_info_uri = strdup(value);
|
||||
pc->charge_info_uri = _cupsStrAlloc(value);
|
||||
else if (!_cups_strcasecmp(line, "JobAccountId"))
|
||||
pc->account_id = !_cups_strcasecmp(value, "true");
|
||||
else if (!_cups_strcasecmp(line, "JobAccountingUserId"))
|
||||
pc->accounting_user_id = !_cups_strcasecmp(value, "true");
|
||||
else if (!_cups_strcasecmp(line, "JobPassword"))
|
||||
pc->password = strdup(value);
|
||||
pc->password = _cupsStrAlloc(value);
|
||||
else if (!_cups_strcasecmp(line, "Mandatory"))
|
||||
{
|
||||
if (pc->mandatory)
|
||||
@@ -884,7 +888,9 @@ _ppdCacheCreateWithFile(
|
||||
else if (!_cups_strcasecmp(line, "SupportFile"))
|
||||
{
|
||||
if (!pc->support_files)
|
||||
pc->support_files = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
|
||||
pc->support_files = cupsArrayNew3(NULL, NULL, NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
|
||||
cupsArrayAdd(pc->support_files, value);
|
||||
}
|
||||
@@ -1124,8 +1130,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
*/
|
||||
|
||||
new_size = old_size;
|
||||
free(old_size->map.ppd);
|
||||
free(old_size->map.pwg);
|
||||
_cupsStrFree(old_size->map.ppd);
|
||||
_cupsStrFree(old_size->map.pwg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1146,8 +1152,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
* Save this size...
|
||||
*/
|
||||
|
||||
new_size->map.ppd = strdup(ppd_size->name);
|
||||
new_size->map.pwg = strdup(pwg_name);
|
||||
new_size->map.ppd = _cupsStrAlloc(ppd_size->name);
|
||||
new_size->map.pwg = _cupsStrAlloc(pwg_name);
|
||||
new_size->width = new_width;
|
||||
new_size->length = new_length;
|
||||
new_size->left = new_left;
|
||||
@@ -1167,14 +1173,14 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
pwgFormatSizeName(pwg_keyword, sizeof(pwg_keyword), "custom", "max",
|
||||
PWG_FROM_POINTS(ppd->custom_max[0]),
|
||||
PWG_FROM_POINTS(ppd->custom_max[1]), NULL);
|
||||
pc->custom_max_keyword = strdup(pwg_keyword);
|
||||
pc->custom_max_keyword = _cupsStrAlloc(pwg_keyword);
|
||||
pc->custom_max_width = PWG_FROM_POINTS(ppd->custom_max[0]);
|
||||
pc->custom_max_length = PWG_FROM_POINTS(ppd->custom_max[1]);
|
||||
|
||||
pwgFormatSizeName(pwg_keyword, sizeof(pwg_keyword), "custom", "min",
|
||||
PWG_FROM_POINTS(ppd->custom_min[0]),
|
||||
PWG_FROM_POINTS(ppd->custom_min[1]), NULL);
|
||||
pc->custom_min_keyword = strdup(pwg_keyword);
|
||||
pc->custom_min_keyword = _cupsStrAlloc(pwg_keyword);
|
||||
pc->custom_min_width = PWG_FROM_POINTS(ppd->custom_min[0]);
|
||||
pc->custom_min_length = PWG_FROM_POINTS(ppd->custom_min[1]);
|
||||
|
||||
@@ -1193,7 +1199,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
|
||||
if (input_slot)
|
||||
{
|
||||
pc->source_option = strdup(input_slot->keyword);
|
||||
pc->source_option = _cupsStrAlloc(input_slot->keyword);
|
||||
|
||||
if ((pc->sources = calloc((size_t)input_slot->num_choices, sizeof(pwg_map_t))) == NULL)
|
||||
{
|
||||
@@ -1245,8 +1251,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
"_");
|
||||
}
|
||||
|
||||
map->pwg = strdup(pwg_name);
|
||||
map->ppd = strdup(choice->choice);
|
||||
map->pwg = _cupsStrAlloc(pwg_name);
|
||||
map->ppd = _cupsStrAlloc(choice->choice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1309,8 +1315,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
"_");
|
||||
}
|
||||
|
||||
map->pwg = strdup(pwg_name);
|
||||
map->ppd = strdup(choice->choice);
|
||||
map->pwg = _cupsStrAlloc(pwg_name);
|
||||
map->ppd = _cupsStrAlloc(choice->choice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1336,8 +1342,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
{
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword), "_");
|
||||
|
||||
map->pwg = strdup(pwg_keyword);
|
||||
map->ppd = strdup(choice->choice);
|
||||
map->pwg = _cupsStrAlloc(pwg_keyword);
|
||||
map->ppd = _cupsStrAlloc(choice->choice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1552,7 +1558,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
|
||||
if (duplex)
|
||||
{
|
||||
pc->sides_option = strdup(duplex->keyword);
|
||||
pc->sides_option = _cupsStrAlloc(duplex->keyword);
|
||||
|
||||
for (i = duplex->num_choices, choice = duplex->choices;
|
||||
i > 0;
|
||||
@@ -1560,16 +1566,16 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
{
|
||||
if ((!_cups_strcasecmp(choice->choice, "None") ||
|
||||
!_cups_strcasecmp(choice->choice, "False")) && !pc->sides_1sided)
|
||||
pc->sides_1sided = strdup(choice->choice);
|
||||
pc->sides_1sided = _cupsStrAlloc(choice->choice);
|
||||
else if ((!_cups_strcasecmp(choice->choice, "DuplexNoTumble") ||
|
||||
!_cups_strcasecmp(choice->choice, "LongEdge") ||
|
||||
!_cups_strcasecmp(choice->choice, "Top")) && !pc->sides_2sided_long)
|
||||
pc->sides_2sided_long = strdup(choice->choice);
|
||||
pc->sides_2sided_long = _cupsStrAlloc(choice->choice);
|
||||
else if ((!_cups_strcasecmp(choice->choice, "DuplexTumble") ||
|
||||
!_cups_strcasecmp(choice->choice, "ShortEdge") ||
|
||||
!_cups_strcasecmp(choice->choice, "Bottom")) &&
|
||||
!pc->sides_2sided_short)
|
||||
pc->sides_2sided_short = strdup(choice->choice);
|
||||
pc->sides_2sided_short = _cupsStrAlloc(choice->choice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1577,7 +1583,9 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
* Copy filters and pre-filters...
|
||||
*/
|
||||
|
||||
pc->filters = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
|
||||
pc->filters = cupsArrayNew3(NULL, NULL, NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
|
||||
cupsArrayAdd(pc->filters,
|
||||
"application/vnd.cups-raw application/octet-stream 0 -");
|
||||
@@ -1634,7 +1642,9 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
|
||||
if ((ppd_attr = ppdFindAttr(ppd, "cupsPreFilter", NULL)) != NULL)
|
||||
{
|
||||
pc->prefilters = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
|
||||
pc->prefilters = cupsArrayNew3(NULL, NULL, NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1651,7 +1661,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
*/
|
||||
|
||||
if (ppd->product)
|
||||
pc->product = strdup(ppd->product);
|
||||
pc->product = _cupsStrAlloc(ppd->product);
|
||||
|
||||
/*
|
||||
* Copy finishings mapping data...
|
||||
@@ -1808,7 +1818,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
*/
|
||||
|
||||
if ((ppd_attr = ppdFindAttr(ppd, "cupsChargeInfoURI", NULL)) != NULL)
|
||||
pc->charge_info_uri = strdup(ppd_attr->value);
|
||||
pc->charge_info_uri = _cupsStrAlloc(ppd_attr->value);
|
||||
|
||||
if ((ppd_attr = ppdFindAttr(ppd, "cupsJobAccountId", NULL)) != NULL)
|
||||
pc->account_id = !_cups_strcasecmp(ppd_attr->value, "true");
|
||||
@@ -1817,7 +1827,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
pc->accounting_user_id = !_cups_strcasecmp(ppd_attr->value, "true");
|
||||
|
||||
if ((ppd_attr = ppdFindAttr(ppd, "cupsJobPassword", NULL)) != NULL)
|
||||
pc->password = strdup(ppd_attr->value);
|
||||
pc->password = _cupsStrAlloc(ppd_attr->value);
|
||||
|
||||
if ((ppd_attr = ppdFindAttr(ppd, "cupsMandatory", NULL)) != NULL)
|
||||
pc->mandatory = _cupsArrayNewStrings(ppd_attr->value, ' ');
|
||||
@@ -1826,7 +1836,9 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
* Support files...
|
||||
*/
|
||||
|
||||
pc->support_files = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
|
||||
pc->support_files = cupsArrayNew3(NULL, NULL, NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
|
||||
for (ppd_attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
|
||||
ppd_attr;
|
||||
@@ -1882,8 +1894,8 @@ _ppdCacheDestroy(_ppd_cache_t *pc) /* I - PPD cache and mapping data */
|
||||
{
|
||||
for (i = pc->num_bins, map = pc->bins; i > 0; i --, map ++)
|
||||
{
|
||||
free(map->pwg);
|
||||
free(map->ppd);
|
||||
_cupsStrFree(map->pwg);
|
||||
_cupsStrFree(map->ppd);
|
||||
}
|
||||
|
||||
free(pc->bins);
|
||||
@@ -1893,21 +1905,22 @@ _ppdCacheDestroy(_ppd_cache_t *pc) /* I - PPD cache and mapping data */
|
||||
{
|
||||
for (i = pc->num_sizes, size = pc->sizes; i > 0; i --, size ++)
|
||||
{
|
||||
free(size->map.pwg);
|
||||
free(size->map.ppd);
|
||||
_cupsStrFree(size->map.pwg);
|
||||
_cupsStrFree(size->map.ppd);
|
||||
}
|
||||
|
||||
free(pc->sizes);
|
||||
}
|
||||
|
||||
free(pc->source_option);
|
||||
if (pc->source_option)
|
||||
_cupsStrFree(pc->source_option);
|
||||
|
||||
if (pc->sources)
|
||||
{
|
||||
for (i = pc->num_sources, map = pc->sources; i > 0; i --, map ++)
|
||||
{
|
||||
free(map->pwg);
|
||||
free(map->ppd);
|
||||
_cupsStrFree(map->pwg);
|
||||
_cupsStrFree(map->ppd);
|
||||
}
|
||||
|
||||
free(pc->sources);
|
||||
@@ -1917,23 +1930,26 @@ _ppdCacheDestroy(_ppd_cache_t *pc) /* I - PPD cache and mapping data */
|
||||
{
|
||||
for (i = pc->num_types, map = pc->types; i > 0; i --, map ++)
|
||||
{
|
||||
free(map->pwg);
|
||||
free(map->ppd);
|
||||
_cupsStrFree(map->pwg);
|
||||
_cupsStrFree(map->ppd);
|
||||
}
|
||||
|
||||
free(pc->types);
|
||||
}
|
||||
|
||||
free(pc->custom_max_keyword);
|
||||
free(pc->custom_min_keyword);
|
||||
if (pc->custom_max_keyword)
|
||||
_cupsStrFree(pc->custom_max_keyword);
|
||||
|
||||
free(pc->product);
|
||||
if (pc->custom_min_keyword)
|
||||
_cupsStrFree(pc->custom_min_keyword);
|
||||
|
||||
_cupsStrFree(pc->product);
|
||||
cupsArrayDelete(pc->filters);
|
||||
cupsArrayDelete(pc->prefilters);
|
||||
cupsArrayDelete(pc->finishings);
|
||||
|
||||
free(pc->charge_info_uri);
|
||||
free(pc->password);
|
||||
_cupsStrFree(pc->charge_info_uri);
|
||||
_cupsStrFree(pc->password);
|
||||
|
||||
cupsArrayDelete(pc->mandatory);
|
||||
|
||||
@@ -2871,12 +2887,12 @@ _ppdCacheWriteFile(
|
||||
if (pc->charge_info_uri)
|
||||
cupsFilePutConf(fp, "ChargeInfoURI", pc->charge_info_uri);
|
||||
|
||||
cupsFilePrintf(fp, "JobAccountId %s\n", pc->account_id ? "true" : "false");
|
||||
cupsFilePrintf(fp, "JobAccountingUserId %s\n",
|
||||
cupsFilePrintf(fp, "AccountId %s\n", pc->account_id ? "true" : "false");
|
||||
cupsFilePrintf(fp, "AccountingUserId %s\n",
|
||||
pc->accounting_user_id ? "true" : "false");
|
||||
|
||||
if (pc->password)
|
||||
cupsFilePutConf(fp, "JobPassword", pc->password);
|
||||
cupsFilePutConf(fp, "Password", pc->password);
|
||||
|
||||
for (value = (char *)cupsArrayFirst(pc->mandatory);
|
||||
value;
|
||||
@@ -3101,22 +3117,6 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
cupsFilePuts(fp, "*cupsSNMPSupplies: False\n");
|
||||
cupsFilePuts(fp, "*cupsLanguages: \"en\"\n");
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-more-info", IPP_TAG_URI)) != NULL)
|
||||
cupsFilePrintf(fp, "*APSupplies: \"%s\"\n", ippGetString(attr, 0, NULL));
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-charge-info-uri", IPP_TAG_URI)) != NULL)
|
||||
cupsFilePrintf(fp, "*cupsChargeInfoURI: \"%s\"\n", ippGetString(attr, 0, NULL));
|
||||
|
||||
/*
|
||||
* Accounting...
|
||||
*/
|
||||
|
||||
if (ippGetBoolean(ippFindAttribute(response, "job-account-id-supported", IPP_TAG_BOOLEAN), 0))
|
||||
cupsFilePuts(fp, "*cupsJobAccountId: True\n");
|
||||
|
||||
if (ippGetBoolean(ippFindAttribute(response, "job-accounting-user-id-supported", IPP_TAG_BOOLEAN), 0))
|
||||
cupsFilePuts(fp, "*cupsJobAccountingUserId: True\n");
|
||||
|
||||
/*
|
||||
* Password/PIN printing...
|
||||
*/
|
||||
@@ -3149,7 +3149,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
|
||||
pattern[maxlen] = '\0';
|
||||
|
||||
cupsFilePrintf(fp, "*cupsJobPassword: \"%s\"\n", pattern);
|
||||
cupsFilePrintf(fp, "*cupsPassword: \"%s\"\n", pattern);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3178,8 +3178,6 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
else
|
||||
cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 10 -\"\n");
|
||||
}
|
||||
else
|
||||
cupsFilePuts(fp, "*cupsManualCopies: true\n");
|
||||
if (is_apple)
|
||||
cupsFilePuts(fp, "*cupsFilter2: \"image/urf image/urf 100 -\"\n");
|
||||
if (is_pwg)
|
||||
|
||||
@@ -662,9 +662,6 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
|
||||
{
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_POINTS :
|
||||
@@ -711,9 +708,6 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
|
||||
{
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_POINTS :
|
||||
@@ -809,9 +803,6 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
|
||||
{
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_POINTS :
|
||||
@@ -1014,9 +1005,6 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
|
||||
{
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_POINTS :
|
||||
|
||||
+6
-12
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Option marking routines for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -855,9 +855,6 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_REAL :
|
||||
@@ -893,9 +890,9 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
case PPD_CUSTOM_PASSWORD :
|
||||
case PPD_CUSTOM_STRING :
|
||||
if (cparam->current.custom_string)
|
||||
free(cparam->current.custom_string);
|
||||
_cupsStrFree(cparam->current.custom_string);
|
||||
|
||||
cparam->current.custom_string = strdup(choice + 7);
|
||||
cparam->current.custom_string = _cupsStrAlloc(choice + 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -935,9 +932,6 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
case PPD_CUSTOM_INVCURVE :
|
||||
case PPD_CUSTOM_REAL :
|
||||
@@ -973,9 +967,9 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
case PPD_CUSTOM_PASSWORD :
|
||||
case PPD_CUSTOM_STRING :
|
||||
if (cparam->current.custom_string)
|
||||
free(cparam->current.custom_string);
|
||||
_cupsStrFree(cparam->current.custom_string);
|
||||
|
||||
cparam->current.custom_string = strdup(val->value);
|
||||
cparam->current.custom_string = _cupsStrRetain(val->value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+129
-105
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* PPD file routines for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -34,6 +34,8 @@
|
||||
* Definitions...
|
||||
*/
|
||||
|
||||
#define ppd_free(p) if (p) free(p) /* Safe free macro */
|
||||
|
||||
#define PPD_KEYWORD 1 /* Line contained a keyword */
|
||||
#define PPD_OPTION 2 /* Line contained an option name */
|
||||
#define PPD_TEXT 4 /* Line contained human-readable text */
|
||||
@@ -115,6 +117,7 @@ void
|
||||
ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ppd_emul_t *emul; /* Current emulation */
|
||||
ppd_group_t *group; /* Current group */
|
||||
char **font; /* Current font */
|
||||
ppd_attr_t **attr; /* Current attribute */
|
||||
@@ -133,12 +136,28 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
* Free all strings at the top level...
|
||||
*/
|
||||
|
||||
free(ppd->lang_encoding);
|
||||
free(ppd->nickname);
|
||||
free(ppd->patches);
|
||||
free(ppd->jcl_begin);
|
||||
free(ppd->jcl_end);
|
||||
free(ppd->jcl_ps);
|
||||
_cupsStrFree(ppd->lang_encoding);
|
||||
_cupsStrFree(ppd->nickname);
|
||||
if (ppd->patches)
|
||||
free(ppd->patches);
|
||||
_cupsStrFree(ppd->jcl_begin);
|
||||
_cupsStrFree(ppd->jcl_end);
|
||||
_cupsStrFree(ppd->jcl_ps);
|
||||
|
||||
/*
|
||||
* Free any emulations...
|
||||
*/
|
||||
|
||||
if (ppd->num_emulations > 0)
|
||||
{
|
||||
for (i = ppd->num_emulations, emul = ppd->emulations; i > 0; i --, emul ++)
|
||||
{
|
||||
_cupsStrFree(emul->start);
|
||||
_cupsStrFree(emul->stop);
|
||||
}
|
||||
|
||||
ppd_free(ppd->emulations);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free any UI groups, subgroups, and options...
|
||||
@@ -149,7 +168,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
for (i = ppd->num_groups, group = ppd->groups; i > 0; i --, group ++)
|
||||
ppd_free_group(group);
|
||||
|
||||
free(ppd->groups);
|
||||
ppd_free(ppd->groups);
|
||||
}
|
||||
|
||||
cupsArrayDelete(ppd->options);
|
||||
@@ -160,14 +179,14 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
*/
|
||||
|
||||
if (ppd->num_sizes > 0)
|
||||
free(ppd->sizes);
|
||||
ppd_free(ppd->sizes);
|
||||
|
||||
/*
|
||||
* Free any constraints...
|
||||
*/
|
||||
|
||||
if (ppd->num_consts > 0)
|
||||
free(ppd->consts);
|
||||
ppd_free(ppd->consts);
|
||||
|
||||
/*
|
||||
* Free any filters...
|
||||
@@ -182,9 +201,9 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
if (ppd->num_fonts > 0)
|
||||
{
|
||||
for (i = ppd->num_fonts, font = ppd->fonts; i > 0; i --, font ++)
|
||||
free(*font);
|
||||
_cupsStrFree(*font);
|
||||
|
||||
free(ppd->fonts);
|
||||
ppd_free(ppd->fonts);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -192,7 +211,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
*/
|
||||
|
||||
if (ppd->num_profiles > 0)
|
||||
free(ppd->profiles);
|
||||
ppd_free(ppd->profiles);
|
||||
|
||||
/*
|
||||
* Free any attributes...
|
||||
@@ -202,11 +221,11 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
{
|
||||
for (i = ppd->num_attrs, attr = ppd->attrs; i > 0; i --, attr ++)
|
||||
{
|
||||
free((*attr)->value);
|
||||
free(*attr);
|
||||
_cupsStrFree((*attr)->value);
|
||||
ppd_free(*attr);
|
||||
}
|
||||
|
||||
free(ppd->attrs);
|
||||
ppd_free(ppd->attrs);
|
||||
}
|
||||
|
||||
cupsArrayDelete(ppd->sorted_attrs);
|
||||
@@ -228,7 +247,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
case PPD_CUSTOM_PASSCODE :
|
||||
case PPD_CUSTOM_PASSWORD :
|
||||
case PPD_CUSTOM_STRING :
|
||||
free(cparam->current.custom_string);
|
||||
_cupsStrFree(cparam->current.custom_string);
|
||||
break;
|
||||
|
||||
default :
|
||||
@@ -276,7 +295,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */
|
||||
* Free the whole record...
|
||||
*/
|
||||
|
||||
free(ppd);
|
||||
ppd_free(ppd);
|
||||
}
|
||||
|
||||
|
||||
@@ -424,6 +443,7 @@ _ppdOpen(
|
||||
_ppd_localization_t localization) /* I - Localization to load */
|
||||
{
|
||||
int i, j, k; /* Looping vars */
|
||||
int count; /* Temporary count */
|
||||
_ppd_line_t line; /* Line buffer */
|
||||
ppd_file_t *ppd; /* PPD file record */
|
||||
ppd_group_t *group, /* Current group */
|
||||
@@ -441,6 +461,7 @@ _ppdOpen(
|
||||
/* Human-readable text from file */
|
||||
*string, /* Code/text from file */
|
||||
*sptr, /* Pointer into string */
|
||||
*nameptr, /* Pointer into name */
|
||||
*temp, /* Temporary string pointer */
|
||||
**tempfonts; /* Temporary fonts pointer */
|
||||
float order; /* Order dependency number */
|
||||
@@ -614,15 +635,15 @@ _ppdOpen(
|
||||
if (pg->ppd_status == PPD_OK)
|
||||
pg->ppd_status = PPD_MISSING_PPDADOBE4;
|
||||
|
||||
free(string);
|
||||
free(line.buffer);
|
||||
_cupsStrFree(string);
|
||||
ppd_free(line.buffer);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
DEBUG_printf(("2_ppdOpen: keyword=%s, string=%p", keyword, string));
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
|
||||
/*
|
||||
* Allocate memory for the PPD file record...
|
||||
@@ -632,8 +653,8 @@ _ppdOpen(
|
||||
{
|
||||
pg->ppd_status = PPD_ALLOC_ERROR;
|
||||
|
||||
free(string);
|
||||
free(line.buffer);
|
||||
_cupsStrFree(string);
|
||||
ppd_free(line.buffer);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -716,8 +737,6 @@ _ppdOpen(
|
||||
strncmp(ll, keyword, ll_len)))
|
||||
{
|
||||
DEBUG_printf(("2_ppdOpen: Ignoring localization: \"%s\"\n", keyword));
|
||||
free(string);
|
||||
string = NULL;
|
||||
continue;
|
||||
}
|
||||
else if (localization == _PPD_LOCALIZATION_ICC_PROFILES)
|
||||
@@ -737,8 +756,6 @@ _ppdOpen(
|
||||
if (i >= (int)(sizeof(color_keywords) / sizeof(color_keywords[0])))
|
||||
{
|
||||
DEBUG_printf(("2_ppdOpen: Ignoring localization: \"%s\"\n", keyword));
|
||||
free(string);
|
||||
string = NULL;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -834,7 +851,7 @@ _ppdOpen(
|
||||
* Say all PPD files are UTF-8, since we convert to UTF-8...
|
||||
*/
|
||||
|
||||
ppd->lang_encoding = strdup("UTF-8");
|
||||
ppd->lang_encoding = _cupsStrAlloc("UTF-8");
|
||||
encoding = _ppdGetEncoding(string);
|
||||
}
|
||||
else if (!strcmp(keyword, "LanguageVersion"))
|
||||
@@ -855,10 +872,10 @@ _ppdOpen(
|
||||
|
||||
|
||||
cupsCharsetToUTF8(utf8, string, sizeof(utf8), encoding);
|
||||
ppd->nickname = strdup((char *)utf8);
|
||||
ppd->nickname = _cupsStrAlloc((char *)utf8);
|
||||
}
|
||||
else
|
||||
ppd->nickname = strdup(string);
|
||||
ppd->nickname = _cupsStrAlloc(string);
|
||||
}
|
||||
else if (!strcmp(keyword, "Product"))
|
||||
ppd->product = string;
|
||||
@@ -868,17 +885,17 @@ _ppdOpen(
|
||||
ppd->ttrasterizer = string;
|
||||
else if (!strcmp(keyword, "JCLBegin"))
|
||||
{
|
||||
ppd->jcl_begin = strdup(string);
|
||||
ppd->jcl_begin = _cupsStrAlloc(string);
|
||||
ppd_decode(ppd->jcl_begin); /* Decode quoted string */
|
||||
}
|
||||
else if (!strcmp(keyword, "JCLEnd"))
|
||||
{
|
||||
ppd->jcl_end = strdup(string);
|
||||
ppd->jcl_end = _cupsStrAlloc(string);
|
||||
ppd_decode(ppd->jcl_end); /* Decode quoted string */
|
||||
}
|
||||
else if (!strcmp(keyword, "JCLToPSInterpreter"))
|
||||
{
|
||||
ppd->jcl_ps = strdup(string);
|
||||
ppd->jcl_ps = _cupsStrAlloc(string);
|
||||
ppd_decode(ppd->jcl_ps); /* Decode quoted string */
|
||||
}
|
||||
else if (!strcmp(keyword, "AccurateScreensSupport"))
|
||||
@@ -946,10 +963,10 @@ _ppdOpen(
|
||||
ppd->num_filters ++;
|
||||
|
||||
/*
|
||||
* Make a copy of the filter string...
|
||||
* Retain a copy of the filter string...
|
||||
*/
|
||||
|
||||
*filter = strdup(string);
|
||||
*filter = _cupsStrRetain(string);
|
||||
}
|
||||
else if (!strcmp(keyword, "Throughput"))
|
||||
ppd->throughput = atoi(string);
|
||||
@@ -972,7 +989,7 @@ _ppdOpen(
|
||||
}
|
||||
|
||||
ppd->fonts = tempfonts;
|
||||
ppd->fonts[ppd->num_fonts] = strdup(name);
|
||||
ppd->fonts[ppd->num_fonts] = _cupsStrAlloc(name);
|
||||
ppd->num_fonts ++;
|
||||
}
|
||||
else if (!strncmp(keyword, "ParamCustom", 11))
|
||||
@@ -1003,13 +1020,6 @@ _ppdOpen(
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (cparam->type != PPD_CUSTOM_UNKNOWN)
|
||||
{
|
||||
pg->ppd_status = PPD_BAD_CUSTOM_PARAM;
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the parameter data...
|
||||
*/
|
||||
@@ -1144,7 +1154,7 @@ _ppdOpen(
|
||||
strlcpy(choice->text, text[0] ? text : _("Custom"),
|
||||
sizeof(choice->text));
|
||||
|
||||
choice->code = strdup(string);
|
||||
choice->code = _cupsStrAlloc(string);
|
||||
|
||||
if (custom_option->section == PPD_ORDER_JCL)
|
||||
ppd_decode(choice->code);
|
||||
@@ -1193,23 +1203,59 @@ _ppdOpen(
|
||||
else if (!strcmp(string, "Plus90"))
|
||||
ppd->landscape = 90;
|
||||
}
|
||||
else if (!strcmp(keyword, "Emulators") && string && ppd->num_emulations == 0)
|
||||
else if (!strcmp(keyword, "Emulators") && string)
|
||||
{
|
||||
/*
|
||||
* Issue #5562: Samsung printer drivers incorrectly use Emulators keyword
|
||||
* to configure themselves
|
||||
*
|
||||
* The Emulators keyword was loaded but never used by anything in CUPS,
|
||||
* and has no valid purpose in CUPS. The old code was removed due to a
|
||||
* memory leak (Issue #5475), so the following (new) code supports a single
|
||||
* name for the Emulators keyword, allowing these drivers to work until we
|
||||
* remove PPD and driver support entirely in a future version of CUPS.
|
||||
*/
|
||||
for (count = 1, sptr = string; sptr != NULL;)
|
||||
if ((sptr = strchr(sptr, ' ')) != NULL)
|
||||
{
|
||||
count ++;
|
||||
while (*sptr == ' ')
|
||||
sptr ++;
|
||||
}
|
||||
|
||||
ppd->num_emulations = 1;
|
||||
ppd->emulations = calloc(1, sizeof(ppd_emul_t));
|
||||
ppd->num_emulations = count;
|
||||
if ((ppd->emulations = calloc((size_t)count, sizeof(ppd_emul_t))) == NULL)
|
||||
{
|
||||
pg->ppd_status = PPD_ALLOC_ERROR;
|
||||
|
||||
strlcpy(ppd->emulations[0].name, string, sizeof(ppd->emulations[0].name));
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0, sptr = string; i < count; i ++)
|
||||
{
|
||||
for (nameptr = ppd->emulations[i].name;
|
||||
*sptr != '\0' && *sptr != ' ';
|
||||
sptr ++)
|
||||
if (nameptr < (ppd->emulations[i].name + sizeof(ppd->emulations[i].name) - 1))
|
||||
*nameptr++ = *sptr;
|
||||
|
||||
*nameptr = '\0';
|
||||
|
||||
while (*sptr == ' ')
|
||||
sptr ++;
|
||||
}
|
||||
}
|
||||
else if (!strncmp(keyword, "StartEmulator_", 14))
|
||||
{
|
||||
ppd_decode(string);
|
||||
|
||||
for (i = 0; i < ppd->num_emulations; i ++)
|
||||
if (!strcmp(keyword + 14, ppd->emulations[i].name))
|
||||
{
|
||||
ppd->emulations[i].start = string;
|
||||
string = NULL;
|
||||
}
|
||||
}
|
||||
else if (!strncmp(keyword, "StopEmulator_", 13))
|
||||
{
|
||||
ppd_decode(string);
|
||||
|
||||
for (i = 0; i < ppd->num_emulations; i ++)
|
||||
if (!strcmp(keyword + 13, ppd->emulations[i].name))
|
||||
{
|
||||
ppd->emulations[i].stop = string;
|
||||
string = NULL;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(keyword, "JobPatchFile"))
|
||||
{
|
||||
@@ -1364,7 +1410,7 @@ _ppdOpen(
|
||||
|
||||
option->section = PPD_ORDER_ANY;
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
|
||||
/*
|
||||
@@ -1392,7 +1438,7 @@ _ppdOpen(
|
||||
strlcpy(choice->text,
|
||||
custom_attr->text[0] ? custom_attr->text : _("Custom"),
|
||||
sizeof(choice->text));
|
||||
choice->code = strdup(custom_attr->value);
|
||||
choice->code = _cupsStrRetain(custom_attr->value);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(keyword, "JCLOpenUI"))
|
||||
@@ -1471,7 +1517,7 @@ _ppdOpen(
|
||||
option->section = PPD_ORDER_JCL;
|
||||
group = NULL;
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
|
||||
/*
|
||||
@@ -1495,7 +1541,7 @@ _ppdOpen(
|
||||
strlcpy(choice->text,
|
||||
custom_attr->text[0] ? custom_attr->text : _("Custom"),
|
||||
sizeof(choice->text));
|
||||
choice->code = strdup(custom_attr->value);
|
||||
choice->code = _cupsStrRetain(custom_attr->value);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(keyword, "CloseUI"))
|
||||
@@ -1509,7 +1555,7 @@ _ppdOpen(
|
||||
|
||||
option = NULL;
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strcmp(keyword, "JCLCloseUI"))
|
||||
@@ -1523,7 +1569,7 @@ _ppdOpen(
|
||||
|
||||
option = NULL;
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strcmp(keyword, "OpenGroup"))
|
||||
@@ -1570,14 +1616,14 @@ _ppdOpen(
|
||||
if (group == NULL)
|
||||
goto error;
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strcmp(keyword, "CloseGroup"))
|
||||
{
|
||||
group = NULL;
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strcmp(keyword, "OrderDependency"))
|
||||
@@ -1635,7 +1681,7 @@ _ppdOpen(
|
||||
option->order = order;
|
||||
}
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strncmp(keyword, "Default", 7))
|
||||
@@ -1878,18 +1924,11 @@ _ppdOpen(
|
||||
* Don't add this one as an attribute...
|
||||
*/
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strcmp(keyword, "PaperDimension"))
|
||||
{
|
||||
if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
|
||||
{
|
||||
pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((size = ppdPageSize(ppd, name)) == NULL)
|
||||
size = ppd_add_size(ppd, name);
|
||||
|
||||
@@ -1907,18 +1946,11 @@ _ppdOpen(
|
||||
size->width = (float)_cupsStrScand(string, &sptr, loc);
|
||||
size->length = (float)_cupsStrScand(sptr, NULL, loc);
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (!strcmp(keyword, "ImageableArea"))
|
||||
{
|
||||
if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
|
||||
{
|
||||
pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((size = ppdPageSize(ppd, name)) == NULL)
|
||||
size = ppd_add_size(ppd, name);
|
||||
|
||||
@@ -1938,7 +1970,7 @@ _ppdOpen(
|
||||
size->right = (float)_cupsStrScand(sptr, &sptr, loc);
|
||||
size->top = (float)_cupsStrScand(sptr, NULL, loc);
|
||||
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
string = NULL;
|
||||
}
|
||||
else if (option != NULL &&
|
||||
@@ -1948,13 +1980,6 @@ _ppdOpen(
|
||||
{
|
||||
DEBUG_printf(("2_ppdOpen: group=%p, subgroup=%p", group, subgroup));
|
||||
|
||||
if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
|
||||
{
|
||||
pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!strcmp(keyword, "PageSize"))
|
||||
{
|
||||
/*
|
||||
@@ -2001,7 +2026,7 @@ _ppdOpen(
|
||||
(mask & (PPD_KEYWORD | PPD_STRING)) == (PPD_KEYWORD | PPD_STRING))
|
||||
ppd_add_attr(ppd, keyword, name, text, string);
|
||||
else
|
||||
free(string);
|
||||
_cupsStrFree(string);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2024,7 +2049,7 @@ _ppdOpen(
|
||||
goto error;
|
||||
}
|
||||
|
||||
free(line.buffer);
|
||||
ppd_free(line.buffer);
|
||||
|
||||
/*
|
||||
* Reset language preferences...
|
||||
@@ -2106,8 +2131,8 @@ _ppdOpen(
|
||||
|
||||
error:
|
||||
|
||||
free(string);
|
||||
free(line.buffer);
|
||||
_cupsStrFree(string);
|
||||
ppd_free(line.buffer);
|
||||
|
||||
ppdClose(ppd);
|
||||
|
||||
@@ -2545,9 +2570,9 @@ ppd_free_filters(ppd_file_t *ppd) /* I - PPD file */
|
||||
if (ppd->num_filters > 0)
|
||||
{
|
||||
for (i = ppd->num_filters, filter = ppd->filters; i > 0; i --, filter ++)
|
||||
free(*filter);
|
||||
_cupsStrFree(*filter);
|
||||
|
||||
free(ppd->filters);
|
||||
ppd_free(ppd->filters);
|
||||
|
||||
ppd->num_filters = 0;
|
||||
ppd->filters = NULL;
|
||||
@@ -2574,7 +2599,7 @@ ppd_free_group(ppd_group_t *group) /* I - Group to free */
|
||||
i --, option ++)
|
||||
ppd_free_option(option);
|
||||
|
||||
free(group->options);
|
||||
ppd_free(group->options);
|
||||
}
|
||||
|
||||
if (group->num_subgroups > 0)
|
||||
@@ -2584,7 +2609,7 @@ ppd_free_group(ppd_group_t *group) /* I - Group to free */
|
||||
i --, subgroup ++)
|
||||
ppd_free_group(subgroup);
|
||||
|
||||
free(group->subgroups);
|
||||
ppd_free(group->subgroups);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2606,10 +2631,10 @@ ppd_free_option(ppd_option_t *option) /* I - Option to free */
|
||||
i > 0;
|
||||
i --, choice ++)
|
||||
{
|
||||
free(choice->code);
|
||||
_cupsStrFree(choice->code);
|
||||
}
|
||||
|
||||
free(option->choices);
|
||||
ppd_free(option->choices);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2679,7 +2704,6 @@ ppd_get_cparam(ppd_coption_t *opt, /* I - PPD file */
|
||||
if ((cparam = calloc(1, sizeof(ppd_cparam_t))) == NULL)
|
||||
return (NULL);
|
||||
|
||||
cparam->type = PPD_CUSTOM_UNKNOWN;
|
||||
strlcpy(cparam->name, param, sizeof(cparam->name));
|
||||
strlcpy(cparam->text, text[0] ? text : param, sizeof(cparam->text));
|
||||
|
||||
@@ -3347,7 +3371,7 @@ ppd_read(cups_file_t *fp, /* I - File to read from */
|
||||
lineptr ++;
|
||||
}
|
||||
|
||||
*string = strdup(lineptr);
|
||||
*string = _cupsStrAlloc(lineptr);
|
||||
|
||||
mask |= PPD_STRING;
|
||||
}
|
||||
@@ -3469,7 +3493,7 @@ ppd_update_filters(ppd_file_t *ppd, /* I - PPD file */
|
||||
filter += ppd->num_filters;
|
||||
ppd->num_filters ++;
|
||||
|
||||
*filter = strdup(buffer);
|
||||
*filter = _cupsStrAlloc(buffer);
|
||||
}
|
||||
while ((attr = ppdFindNextAttr(ppd, "cupsFilter2", NULL)) != NULL);
|
||||
|
||||
|
||||
+4
-5
@@ -5,8 +5,8 @@
|
||||
* -D_PPD_DEPRECATED="" TO YOUR COMPILE OPTIONS. THIS HEADER AND THESE
|
||||
* FUNCTIONS WILL BE REMOVED IN A FUTURE RELEASE OF CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -235,7 +235,6 @@ typedef struct ppd_profile_s /**** sRGB Color Profiles ****/
|
||||
/**** New in CUPS 1.2/macOS 10.5 ****/
|
||||
typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/macOS 10.5@ ****/
|
||||
{
|
||||
PPD_CUSTOM_UNKNOWN = -1, /* Unknown type (error) */
|
||||
PPD_CUSTOM_CURVE, /* Curve value for f(x) = x^value */
|
||||
PPD_CUSTOM_INT, /* Integer number value */
|
||||
PPD_CUSTOM_INVCURVE, /* Curve value for f(x) = x^(1/value) */
|
||||
@@ -305,8 +304,8 @@ typedef struct ppd_file_s /**** PPD File ****/
|
||||
int throughput; /* Pages per minute */
|
||||
ppd_cs_t colorspace; /* Default colorspace */
|
||||
char *patches; /* Patch commands to be sent to printer */
|
||||
int num_emulations; /* Number of emulations supported (no longer supported) @private@ */
|
||||
ppd_emul_t *emulations; /* Emulations and the code to invoke them (no longer supported) @private@ */
|
||||
int num_emulations; /* Number of emulations supported */
|
||||
ppd_emul_t *emulations; /* Emulations and the code to invoke them */
|
||||
char *jcl_begin; /* Start JCL commands */
|
||||
char *jcl_ps; /* Enter PostScript interpreter */
|
||||
char *jcl_end; /* End JCL commands */
|
||||
|
||||
+3
-5
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PWG media name API implementation for CUPS.
|
||||
*
|
||||
* Copyright 2009-2019 by Apple Inc.
|
||||
* Copyright 2009-2017 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#define _PWG_MEDIA_IN(p,l,a,x,y) {p, l, a, (int)(x * 2540), (int)(y * 2540)}
|
||||
#define _PWG_MEDIA_MM(p,l,a,x,y) {p, l, a, (int)(x * 100), (int)(y * 100)}
|
||||
#define _PWG_EPSILON 50 /* Matching tolerance */
|
||||
|
||||
|
||||
/*
|
||||
@@ -913,11 +912,10 @@ pwgMediaForSize(int width, /* I - Width in hundredths of millimeters */
|
||||
{
|
||||
/*
|
||||
* Adobe uses a size matching algorithm with an epsilon of 5 points, which
|
||||
* is just about 176/2540ths... But a lot of international media sizes are
|
||||
* very close so use 0.5mm (50/2540ths) as the maximum delta.
|
||||
* is just about 176/2540ths...
|
||||
*/
|
||||
|
||||
return (_pwgMediaNearSize(width, length, _PWG_EPSILON));
|
||||
return (_pwgMediaNearSize(width, length, 176));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-19
@@ -1233,9 +1233,6 @@ asn1_get_integer(
|
||||
int value; /* Integer value */
|
||||
|
||||
|
||||
if (*buffer >= bufend)
|
||||
return (0);
|
||||
|
||||
if (length > sizeof(int))
|
||||
{
|
||||
(*buffer) += length;
|
||||
@@ -1262,9 +1259,6 @@ asn1_get_length(unsigned char **buffer, /* IO - Pointer in buffer */
|
||||
unsigned length; /* Length */
|
||||
|
||||
|
||||
if (*buffer >= bufend)
|
||||
return (0);
|
||||
|
||||
length = **buffer;
|
||||
(*buffer) ++;
|
||||
|
||||
@@ -1307,9 +1301,6 @@ asn1_get_oid(
|
||||
int number; /* OID number */
|
||||
|
||||
|
||||
if (*buffer >= bufend)
|
||||
return (0);
|
||||
|
||||
valend = *buffer + length;
|
||||
oidptr = oid;
|
||||
oidend = oid + oidsize - 1;
|
||||
@@ -1358,12 +1349,9 @@ asn1_get_packed(
|
||||
int value; /* Value */
|
||||
|
||||
|
||||
if (*buffer >= bufend)
|
||||
return (0);
|
||||
|
||||
value = 0;
|
||||
|
||||
while (*buffer < bufend && (**buffer & 128))
|
||||
while ((**buffer & 128) && *buffer < bufend)
|
||||
{
|
||||
value = (value << 7) | (**buffer & 127);
|
||||
(*buffer) ++;
|
||||
@@ -1391,9 +1379,6 @@ asn1_get_string(
|
||||
char *string, /* I - String buffer */
|
||||
size_t strsize) /* I - String buffer size */
|
||||
{
|
||||
if (*buffer >= bufend)
|
||||
return (NULL);
|
||||
|
||||
if (length > (unsigned)(bufend - *buffer))
|
||||
length = (unsigned)(bufend - *buffer);
|
||||
|
||||
@@ -1436,9 +1421,6 @@ asn1_get_type(unsigned char **buffer, /* IO - Pointer in buffer */
|
||||
int type; /* Type */
|
||||
|
||||
|
||||
if (*buffer >= bufend)
|
||||
return (0);
|
||||
|
||||
type = **buffer;
|
||||
(*buffer) ++;
|
||||
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* snprintf functions for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -177,7 +177,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, double));
|
||||
templen = strlen(temp);
|
||||
templen = strlen(temp):
|
||||
|
||||
bytes += (int)templen;
|
||||
|
||||
@@ -208,7 +208,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, int));
|
||||
templen = strlen(temp);
|
||||
templen = strlen(temp):
|
||||
|
||||
bytes += (int)templen;
|
||||
|
||||
@@ -232,7 +232,7 @@ _cups_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, void *));
|
||||
templen = strlen(temp);
|
||||
templen = strlen(temp):
|
||||
|
||||
bytes += (int)templen;
|
||||
|
||||
|
||||
+11
-10
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* String functions for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -316,6 +316,15 @@ _cupsStrFree(const char *s) /* I - String to free */
|
||||
|
||||
key = (_cups_sp_item_t *)(s - offsetof(_cups_sp_item_t, str));
|
||||
|
||||
#ifdef DEBUG_GUARDS
|
||||
if (key->guard != _CUPS_STR_GUARD)
|
||||
{
|
||||
DEBUG_printf(("5_cupsStrFree: Freeing string %p(%s), guard=%08x, "
|
||||
"ref_count=%d", key, key->str, key->guard, key->ref_count));
|
||||
abort();
|
||||
}
|
||||
#endif /* DEBUG_GUARDS */
|
||||
|
||||
if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL &&
|
||||
item == key)
|
||||
{
|
||||
@@ -323,14 +332,6 @@ _cupsStrFree(const char *s) /* I - String to free */
|
||||
* Found it, dereference...
|
||||
*/
|
||||
|
||||
#ifdef DEBUG_GUARDS
|
||||
if (key->guard != _CUPS_STR_GUARD)
|
||||
{
|
||||
DEBUG_printf(("5_cupsStrFree: Freeing string %p(%s), guard=%08x, ref_count=%d", key, key->str, key->guard, key->ref_count));
|
||||
abort();
|
||||
}
|
||||
#endif /* DEBUG_GUARDS */
|
||||
|
||||
item->ref_count --;
|
||||
|
||||
if (!item->ref_count)
|
||||
|
||||
+48
-72
@@ -1,9 +1,15 @@
|
||||
/*
|
||||
* CUPS destination API test program for CUPS.
|
||||
*
|
||||
* Copyright © 2012-2018 by Apple Inc.
|
||||
* Copyright 2012-2018 by Apple Inc.
|
||||
*
|
||||
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
|
||||
* 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
|
||||
* missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -37,31 +43,17 @@ int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
http_t *http; /* Connection to destination */
|
||||
cups_dest_t *dest = NULL; /* Destination */
|
||||
cups_dinfo_t *dinfo; /* Destination info */
|
||||
unsigned dflags = CUPS_DEST_FLAGS_NONE;
|
||||
/* Destination flags */
|
||||
|
||||
|
||||
if (argc < 2)
|
||||
return (0);
|
||||
usage(NULL);
|
||||
|
||||
if (!strcmp(argv[1], "--get"))
|
||||
{
|
||||
cups_dest_t *dests; /* Destinations */
|
||||
int num_dests = cupsGetDests2(CUPS_HTTP_DEFAULT, &dests);
|
||||
/* Number of destinations */
|
||||
|
||||
for (i = 0; i < num_dests; i ++)
|
||||
enum_cb(NULL, 0, dests + i);
|
||||
|
||||
cupsFreeDests(num_dests, dests);
|
||||
return (0);
|
||||
}
|
||||
else if (!strcmp(argv[1], "--enum"))
|
||||
if (!strcmp(argv[1], "--enum"))
|
||||
{
|
||||
int i; /* Looping var */
|
||||
cups_ptype_t type = 0, /* Printer type filter */
|
||||
mask = 0; /* Printer type mask */
|
||||
|
||||
@@ -111,91 +103,78 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
i = 1;
|
||||
if (!strcmp(argv[i], "--device"))
|
||||
{
|
||||
dflags = CUPS_DEST_FLAGS_DEVICE;
|
||||
i ++;
|
||||
}
|
||||
|
||||
if (!strncmp(argv[i], "ipp://", 6) || !strncmp(argv[i], "ipps://", 7))
|
||||
dest = cupsGetDestWithURI(NULL, argv[i]);
|
||||
else if (!strcmp(argv[i], "default"))
|
||||
else if (!strncmp(argv[1], "ipp://", 6) || !strncmp(argv[1], "ipps://", 7))
|
||||
dest = cupsGetDestWithURI(NULL, argv[1]);
|
||||
else if (!strcmp(argv[1], "default"))
|
||||
{
|
||||
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, NULL, NULL);
|
||||
if (dest && dest->instance)
|
||||
printf("default is \"%s/%s\".\n", dest->name, dest->instance);
|
||||
else if (dest)
|
||||
printf("default is \"%s\".\n", dest->name);
|
||||
else
|
||||
puts("no default destination.");
|
||||
printf("default is \"%s\".\n", dest->name);
|
||||
}
|
||||
else
|
||||
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, argv[i], NULL);
|
||||
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, argv[1], NULL);
|
||||
|
||||
if (!dest)
|
||||
{
|
||||
printf("testdest: Unable to get destination \"%s\": %s\n", argv[i], cupsLastErrorString());
|
||||
printf("testdest: Unable to get destination \"%s\": %s\n", argv[1], cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
|
||||
i ++;
|
||||
|
||||
if ((http = cupsConnectDest(dest, dflags, 30000, NULL, NULL, 0, NULL, NULL)) == NULL)
|
||||
if ((http = cupsConnectDest(dest, CUPS_DEST_FLAGS_NONE, 30000, NULL, NULL, 0, NULL, NULL)) == NULL)
|
||||
{
|
||||
printf("testdest: Unable to connect to destination \"%s\": %s\n", dest->name, cupsLastErrorString());
|
||||
printf("testdest: Unable to connect to destination \"%s\": %s\n", argv[1], cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
|
||||
if ((dinfo = cupsCopyDestInfo(http, dest)) == NULL)
|
||||
{
|
||||
printf("testdest: Unable to get information for destination \"%s\": %s\n", dest->name, cupsLastErrorString());
|
||||
printf("testdest: Unable to get information for destination \"%s\": %s\n", argv[1], cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (i == argc || !strcmp(argv[i], "supported"))
|
||||
if (argc == 2 || (!strcmp(argv[2], "supported") && argc < 6))
|
||||
{
|
||||
i ++;
|
||||
|
||||
if ((i + 1) < argc)
|
||||
show_supported(http, dest, dinfo, argv[i], argv[i + 1]);
|
||||
if (argc > 3)
|
||||
show_supported(http, dest, dinfo, argv[3], argv[4]);
|
||||
else if (argc > 2)
|
||||
show_supported(http, dest, dinfo, argv[i], NULL);
|
||||
show_supported(http, dest, dinfo, argv[3], NULL);
|
||||
else
|
||||
show_supported(http, dest, dinfo, NULL, NULL);
|
||||
}
|
||||
else if (!strcmp(argv[i], "conflicts") && (i + 1) < argc)
|
||||
else if (!strcmp(argv[2], "conflicts") && argc > 3)
|
||||
{
|
||||
int num_options = 0;/* Number of options */
|
||||
int i, /* Looping var */
|
||||
num_options = 0;/* Number of options */
|
||||
cups_option_t *options = NULL;/* Options */
|
||||
|
||||
for (i ++; i < argc; i ++)
|
||||
for (i = 3; i < argc; i ++)
|
||||
num_options = cupsParseOptions(argv[i], num_options, &options);
|
||||
|
||||
show_conflicts(http, dest, dinfo, num_options, options);
|
||||
}
|
||||
else if (!strcmp(argv[i], "default") && (i + 1) < argc)
|
||||
else if (!strcmp(argv[2], "default") && argc == 4)
|
||||
{
|
||||
show_default(http, dest, dinfo, argv[i + 1]);
|
||||
show_default(http, dest, dinfo, argv[3]);
|
||||
}
|
||||
else if (!strcmp(argv[i], "localize"))
|
||||
else if (!strcmp(argv[2], "localize") && argc < 6)
|
||||
{
|
||||
i ++;
|
||||
if ((i + 1) < argc)
|
||||
localize(http, dest, dinfo, argv[i], argv[i + 1]);
|
||||
if (argc > 3)
|
||||
localize(http, dest, dinfo, argv[3], argv[4]);
|
||||
else if (argc > 2)
|
||||
localize(http, dest, dinfo, argv[i], NULL);
|
||||
localize(http, dest, dinfo, argv[3], NULL);
|
||||
else
|
||||
localize(http, dest, dinfo, NULL, NULL);
|
||||
}
|
||||
else if (!strcmp(argv[i], "media"))
|
||||
else if (!strcmp(argv[2], "media"))
|
||||
{
|
||||
int i; /* Looping var */
|
||||
const char *name = NULL; /* Media name, if any */
|
||||
unsigned flags = CUPS_MEDIA_FLAGS_DEFAULT;
|
||||
/* Media selection flags */
|
||||
|
||||
for (i ++; i < argc; i ++)
|
||||
for (i = 3; i < argc; i ++)
|
||||
{
|
||||
if (!strcmp(argv[i], "borderless"))
|
||||
flags = CUPS_MEDIA_FLAGS_BORDERLESS;
|
||||
@@ -213,19 +192,19 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
show_media(http, dest, dinfo, flags, name);
|
||||
}
|
||||
else if (!strcmp(argv[i], "print") && (i + 1) < argc)
|
||||
else if (!strcmp(argv[2], "print") && argc > 3)
|
||||
{
|
||||
int num_options = 0;/* Number of options */
|
||||
int i, /* Looping var */
|
||||
num_options = 0;/* Number of options */
|
||||
cups_option_t *options = NULL;/* Options */
|
||||
const char *filename = argv[i + 1];
|
||||
|
||||
for (i += 2; i < argc; i ++)
|
||||
for (i = 4; i < argc; i ++)
|
||||
num_options = cupsParseOptions(argv[i], num_options, &options);
|
||||
|
||||
print_file(http, dest, dinfo, filename, num_options, options);
|
||||
print_file(http, dest, dinfo, argv[3], num_options, options);
|
||||
}
|
||||
else
|
||||
usage(argv[i]);
|
||||
usage(argv[2]);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@@ -247,15 +226,13 @@ enum_cb(void *user_data, /* I - User data (unused) */
|
||||
(void)flags;
|
||||
|
||||
if (dest->instance)
|
||||
printf("%s%s/%s%s:\n", (flags & CUPS_DEST_FLAGS_REMOVED) ? "REMOVE " : "", dest->name, dest->instance, dest->is_default ? " (Default)" : "");
|
||||
printf("%s%s/%s:\n", (flags & CUPS_DEST_FLAGS_REMOVED) ? "REMOVE " : "", dest->name, dest->instance);
|
||||
else
|
||||
printf("%s%s%s:\n", (flags & CUPS_DEST_FLAGS_REMOVED) ? "REMOVE " : "", dest->name, dest->is_default ? " (Default)" : "");
|
||||
printf("%s%s:\n", (flags & CUPS_DEST_FLAGS_REMOVED) ? "REMOVE " : "", dest->name);
|
||||
|
||||
for (i = 0; i < dest->num_options; i ++)
|
||||
printf(" %s=\"%s\"\n", dest->options[i].name, dest->options[i].value);
|
||||
|
||||
puts("");
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -763,10 +740,9 @@ usage(const char *arg) /* I - Argument for usage message */
|
||||
printf("testdest: Unknown option \"%s\".\n", arg);
|
||||
|
||||
puts("Usage:");
|
||||
puts(" ./testdest [--device] name [operation ...]");
|
||||
puts(" ./testdest [--device] ipp://... [operation ...]");
|
||||
puts(" ./testdest [--device] ipps://... [operation ...]");
|
||||
puts(" ./testdest --get");
|
||||
puts(" ./testdest name [operation ...]");
|
||||
puts(" ./testdest ipp://... [operation ...]");
|
||||
puts(" ./testdest ipps://... [operation ...]");
|
||||
puts(" ./testdest --enum [grayscale] [color] [duplex] [staple] [small]\n"
|
||||
" [medium] [large]");
|
||||
puts("");
|
||||
|
||||
+16
-102
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* IPP test program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -50,7 +50,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x01, 0x01, /* IPP version */
|
||||
0x00, 0x02, /* Print-Job operation */
|
||||
0x00, 0x00, 0x00, 0x01,
|
||||
/* Request ID */
|
||||
/* Request ID */
|
||||
|
||||
IPP_TAG_OPERATION,
|
||||
|
||||
@@ -80,7 +80,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
IPP_TAG_JOB, /* job group tag */
|
||||
|
||||
IPP_TAG_BEGIN_COLLECTION,
|
||||
/* begCollection tag */
|
||||
/* begCollection tag */
|
||||
0x00, 0x09, /* Name length + name */
|
||||
'm', 'e', 'd', 'i', 'a', '-', 'c', 'o', 'l',
|
||||
0x00, 0x00, /* No value */
|
||||
@@ -89,11 +89,11 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x0a, /* Value length + value */
|
||||
'm', 'e', 'd', 'i', 'a', '-', 's', 'i', 'z', 'e',
|
||||
IPP_TAG_BEGIN_COLLECTION,
|
||||
/* begCollection tag */
|
||||
/* begCollection tag */
|
||||
0x00, 0x00, /* Name length + name */
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_MEMBERNAME,
|
||||
/* memberAttrName tag */
|
||||
/* memberAttrName tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x0b, /* Value length + value */
|
||||
'x', '-', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
@@ -102,7 +102,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x04, /* Value length + value */
|
||||
0x00, 0x00, 0x54, 0x56,
|
||||
IPP_TAG_MEMBERNAME,
|
||||
/* memberAttrName tag */
|
||||
/* memberAttrName tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x0b, /* Value length + value */
|
||||
'y', '-', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
@@ -111,7 +111,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x04, /* Value length + value */
|
||||
0x00, 0x00, 0x6d, 0x24,
|
||||
IPP_TAG_END_COLLECTION,
|
||||
/* endCollection tag */
|
||||
/* endCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_MEMBERNAME, /* memberAttrName tag */
|
||||
@@ -132,12 +132,12 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x05, /* Value length + value */
|
||||
'p', 'l', 'a', 'i', 'n',
|
||||
IPP_TAG_END_COLLECTION,
|
||||
/* endCollection tag */
|
||||
/* endCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
|
||||
IPP_TAG_BEGIN_COLLECTION,
|
||||
/* begCollection tag */
|
||||
/* begCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_MEMBERNAME, /* memberAttrName tag */
|
||||
@@ -145,11 +145,11 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x0a, /* Value length + value */
|
||||
'm', 'e', 'd', 'i', 'a', '-', 's', 'i', 'z', 'e',
|
||||
IPP_TAG_BEGIN_COLLECTION,
|
||||
/* begCollection tag */
|
||||
/* begCollection tag */
|
||||
0x00, 0x00, /* Name length + name */
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_MEMBERNAME,
|
||||
/* memberAttrName tag */
|
||||
/* memberAttrName tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x0b, /* Value length + value */
|
||||
'x', '-', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
@@ -158,7 +158,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x04, /* Value length + value */
|
||||
0x00, 0x00, 0x52, 0x08,
|
||||
IPP_TAG_MEMBERNAME,
|
||||
/* memberAttrName tag */
|
||||
/* memberAttrName tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x0b, /* Value length + value */
|
||||
'y', '-', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
@@ -167,7 +167,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x04, /* Value length + value */
|
||||
0x00, 0x00, 0x74, 0x04,
|
||||
IPP_TAG_END_COLLECTION,
|
||||
/* endCollection tag */
|
||||
/* endCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_MEMBERNAME, /* memberAttrName tag */
|
||||
@@ -188,72 +188,7 @@ static ipp_uchar_t collection[] = /* Collection buffer */
|
||||
0x00, 0x06, /* Value length + value */
|
||||
'g', 'l', 'o', 's', 's', 'y',
|
||||
IPP_TAG_END_COLLECTION,
|
||||
/* endCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
|
||||
IPP_TAG_END /* end tag */
|
||||
};
|
||||
static ipp_uchar_t bad_collection[] = /* Collection buffer (bad encoding) */
|
||||
{
|
||||
0x01, 0x01, /* IPP version */
|
||||
0x00, 0x02, /* Print-Job operation */
|
||||
0x00, 0x00, 0x00, 0x01,
|
||||
/* Request ID */
|
||||
|
||||
IPP_TAG_OPERATION,
|
||||
|
||||
IPP_TAG_CHARSET,
|
||||
0x00, 0x12, /* Name length + name */
|
||||
'a','t','t','r','i','b','u','t','e','s','-',
|
||||
'c','h','a','r','s','e','t',
|
||||
0x00, 0x05, /* Value length + value */
|
||||
'u','t','f','-','8',
|
||||
|
||||
IPP_TAG_LANGUAGE,
|
||||
0x00, 0x1b, /* Name length + name */
|
||||
'a','t','t','r','i','b','u','t','e','s','-',
|
||||
'n','a','t','u','r','a','l','-','l','a','n',
|
||||
'g','u','a','g','e',
|
||||
0x00, 0x02, /* Value length + value */
|
||||
'e','n',
|
||||
|
||||
IPP_TAG_URI,
|
||||
0x00, 0x0b, /* Name length + name */
|
||||
'p','r','i','n','t','e','r','-','u','r','i',
|
||||
0x00, 0x1c, /* Value length + value */
|
||||
'i','p','p',':','/','/','l','o','c','a','l',
|
||||
'h','o','s','t','/','p','r','i','n','t','e',
|
||||
'r','s','/','f','o','o',
|
||||
|
||||
IPP_TAG_JOB, /* job group tag */
|
||||
|
||||
IPP_TAG_BEGIN_COLLECTION,
|
||||
/* begCollection tag */
|
||||
0x00, 0x09, /* Name length + name */
|
||||
'm', 'e', 'd', 'i', 'a', '-', 'c', 'o', 'l',
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_BEGIN_COLLECTION,
|
||||
/* begCollection tag */
|
||||
0x00, 0x0a, /* Name length + name */
|
||||
'm', 'e', 'd', 'i', 'a', '-', 's', 'i', 'z', 'e',
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_INTEGER, /* integer tag */
|
||||
0x00, 0x0b, /* Name length + name */
|
||||
'x', '-', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
0x00, 0x04, /* Value length + value */
|
||||
0x00, 0x00, 0x54, 0x56,
|
||||
IPP_TAG_INTEGER, /* integer tag */
|
||||
0x00, 0x0b, /* Name length + name */
|
||||
'y', '-', 'd', 'i', 'm', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
0x00, 0x04, /* Value length + value */
|
||||
0x00, 0x00, 0x6d, 0x24,
|
||||
IPP_TAG_END_COLLECTION,
|
||||
/* endCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
IPP_TAG_END_COLLECTION,
|
||||
/* endCollection tag */
|
||||
/* endCollection tag */
|
||||
0x00, 0x00, /* No name */
|
||||
0x00, 0x00, /* No value */
|
||||
|
||||
@@ -265,7 +200,7 @@ static ipp_uchar_t mixed[] = /* Mixed value buffer */
|
||||
0x01, 0x01, /* IPP version */
|
||||
0x00, 0x02, /* Print-Job operation */
|
||||
0x00, 0x00, 0x00, 0x01,
|
||||
/* Request ID */
|
||||
/* Request ID */
|
||||
|
||||
IPP_TAG_OPERATION,
|
||||
|
||||
@@ -654,33 +589,12 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
ippDelete(request);
|
||||
|
||||
/*
|
||||
* Read the bad collection data and confirm we get an error...
|
||||
*/
|
||||
|
||||
fputs("Read Bad Collection from Memory: ", stdout);
|
||||
|
||||
request = ippNew();
|
||||
data.rpos = 0;
|
||||
data.wused = sizeof(bad_collection);
|
||||
data.wsize = sizeof(bad_collection);
|
||||
data.wbuffer = bad_collection;
|
||||
|
||||
while ((state = ippReadIO(&data, (ipp_iocb_t)read_cb, 1, NULL, request)) != IPP_STATE_DATA)
|
||||
if (state == IPP_STATE_ERROR)
|
||||
break;
|
||||
|
||||
if (state != IPP_STATE_ERROR)
|
||||
puts("FAIL (read successful)");
|
||||
else
|
||||
puts("PASS");
|
||||
|
||||
/*
|
||||
* Read the mixed data and confirm we converted everything to rangeOfInteger
|
||||
* values...
|
||||
*/
|
||||
|
||||
fputs("Read Mixed integer/rangeOfInteger from Memory: ", stdout);
|
||||
printf("Read Mixed integer/rangeOfInteger from Memory: ");
|
||||
|
||||
request = ippNew();
|
||||
data.rpos = 0;
|
||||
|
||||
@@ -1054,10 +1054,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
{
|
||||
switch (cparam->type)
|
||||
{
|
||||
case PPD_CUSTOM_UNKNOWN :
|
||||
printf(" %s(%s): PPD_CUSTOM_UNKNOWN (error)\n", cparam->name, cparam->text);
|
||||
break;
|
||||
|
||||
case PPD_CUSTOM_CURVE :
|
||||
printf(" %s(%s): PPD_CUSTOM_CURVE (%g to %g)\n",
|
||||
cparam->name, cparam->text,
|
||||
|
||||
+12
-37
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* TLS support code for CUPS using GNU TLS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 2007-2018 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -173,33 +173,10 @@ cupsMakeServerCredentials(
|
||||
gnutls_x509_crt_set_activation_time(crt, curtime);
|
||||
gnutls_x509_crt_set_expiration_time(crt, curtime + 10 * 365 * 86400);
|
||||
gnutls_x509_crt_set_ca_status(crt, 0);
|
||||
gnutls_x509_crt_set_subject_alt_name(crt, GNUTLS_SAN_DNSNAME, common_name, (unsigned)strlen(common_name), GNUTLS_FSAN_SET);
|
||||
if (!strchr(common_name, '.'))
|
||||
{
|
||||
/*
|
||||
* Add common_name.local to the list, too...
|
||||
*/
|
||||
|
||||
char localname[256]; /* hostname.local */
|
||||
|
||||
snprintf(localname, sizeof(localname), "%s.local", common_name);
|
||||
gnutls_x509_crt_set_subject_alt_name(crt, GNUTLS_SAN_DNSNAME, localname, (unsigned)strlen(localname), GNUTLS_FSAN_APPEND);
|
||||
}
|
||||
gnutls_x509_crt_set_subject_alt_name(crt, GNUTLS_SAN_DNSNAME, "localhost", 9, GNUTLS_FSAN_APPEND);
|
||||
if (num_alt_names > 0)
|
||||
{
|
||||
int i; /* Looping var */
|
||||
|
||||
for (i = 0; i < num_alt_names; i ++)
|
||||
{
|
||||
if (strcmp(alt_names[i], "localhost"))
|
||||
{
|
||||
gnutls_x509_crt_set_subject_alt_name(crt, GNUTLS_SAN_DNSNAME, alt_names[i], (unsigned)strlen(alt_names[i]), GNUTLS_FSAN_APPEND);
|
||||
}
|
||||
}
|
||||
}
|
||||
gnutls_x509_crt_set_subject_alternative_name(crt, GNUTLS_SAN_DNSNAME, alt_names[0]);
|
||||
gnutls_x509_crt_set_key_purpose_oid(crt, GNUTLS_KP_TLS_WWW_SERVER, 0);
|
||||
gnutls_x509_crt_set_key_usage(crt, GNUTLS_KEY_DIGITAL_SIGNATURE | GNUTLS_KEY_KEY_ENCIPHERMENT);
|
||||
gnutls_x509_crt_set_key_usage(crt, GNUTLS_KEY_KEY_ENCIPHERMENT);
|
||||
gnutls_x509_crt_set_version(crt, 3);
|
||||
|
||||
bytes = sizeof(buffer);
|
||||
@@ -403,8 +380,8 @@ httpCredentialsAreValidForName(
|
||||
|
||||
if (result)
|
||||
{
|
||||
gnutls_x509_crl_iter_t iter = NULL;
|
||||
/* Iterator */
|
||||
int i, /* Looping var */
|
||||
count; /* Number of revoked certificates */
|
||||
unsigned char cserial[1024], /* Certificate serial number */
|
||||
rserial[1024]; /* Revoked serial number */
|
||||
size_t cserial_size, /* Size of cert serial number */
|
||||
@@ -412,24 +389,22 @@ httpCredentialsAreValidForName(
|
||||
|
||||
_cupsMutexLock(&tls_mutex);
|
||||
|
||||
if (gnutls_x509_crl_get_crt_count(tls_crl) > 0)
|
||||
count = gnutls_x509_crl_get_crt_count(tls_crl);
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
cserial_size = sizeof(cserial);
|
||||
gnutls_x509_crt_get_serial(cert, cserial, &cserial_size);
|
||||
|
||||
rserial_size = sizeof(rserial);
|
||||
|
||||
while (!gnutls_x509_crl_iter_crt_serial(tls_crl, &iter, rserial, &rserial_size, NULL))
|
||||
{
|
||||
if (cserial_size == rserial_size && !memcmp(cserial, rserial, rserial_size))
|
||||
for (i = 0; i < count; i ++)
|
||||
{
|
||||
rserial_size = sizeof(rserial);
|
||||
if (!gnutls_x509_crl_get_crt_serial(tls_crl, (unsigned)i, rserial, &rserial_size, NULL) && cserial_size == rserial_size && !memcmp(cserial, rserial, rserial_size))
|
||||
{
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
rserial_size = sizeof(rserial);
|
||||
}
|
||||
gnutls_x509_crl_iter_deinit(iter);
|
||||
}
|
||||
|
||||
_cupsMutexUnlock(&tls_mutex);
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
float: left;
|
||||
margin-left: 0.5%;
|
||||
margin-right: 0;
|
||||
padding-bottom: 40px;
|
||||
width: 33%;
|
||||
}
|
||||
.row .thirds:first-child {
|
||||
@@ -87,7 +86,6 @@
|
||||
float: left;
|
||||
margin-left: 0.5%;
|
||||
margin-right: 0;
|
||||
padding-bottom: 40px;
|
||||
width: 49.75%;
|
||||
}
|
||||
.row .halves:first-child {
|
||||
|
||||
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS und das CUPS Logo sind Warenzeichen der <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. Alle Rechte vorbehalten.</div>
|
||||
<div class="footer">CUPS und das CUPS Logo sind Warenzeichen der <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. Alle Rechte vorbehalten.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2019 Apple Inc. Todos los derechos reservados.</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2018 Apple Inc. Todos los derechos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -142,17 +142,25 @@ The <i>level</i> field contains the type of message:
|
||||
<p>The <i>message</i> field contains a free-form textual message.
|
||||
Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
|
||||
<h3><a name="PAGE_LOG_FILE_FORMAT">Page Log File Format</a></h3>
|
||||
The <i>page_log</i> file lists the total number of pages (sheets) that are printed.
|
||||
The <i>page_log</i> file lists each page or group of pages that are sent to a printer.
|
||||
By default, each line contains the following information:
|
||||
<pre class="man">
|
||||
|
||||
<i>printer user job-id date-time </i><b>total </b><i>num-sheets job-billing
|
||||
<i>printer user job-id date-time page-number num-copies job-billing
|
||||
job-originating-host-name job-name media sides</i>
|
||||
|
||||
<i>printer user job-id date-time </i><b>total </b><i>num-impressions job-billing
|
||||
job-originating-host-name job-name media sides</i>
|
||||
|
||||
</pre>
|
||||
For example the entry for a two page job called "myjob" might look like:
|
||||
For example the entries for a two page job called "myjob" might look like:
|
||||
<pre class="man">
|
||||
|
||||
DeskJet root 1 [20/May/1999:19:21:05 +0000] 1 1 acme-123
|
||||
localhost myjob na_letter_8.5x11in one-sided
|
||||
DeskJet root 1 [20/May/1999:19:21:05 +0000] 2 1 acme-123
|
||||
localhost myjob na_letter_8.5x11in one-sided
|
||||
|
||||
DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
|
||||
localhost myjob na_letter_8.5x11in one-sided
|
||||
|
||||
@@ -166,7 +174,9 @@ If you send a job to a printer class, this field will contain the name of the pr
|
||||
<p>The <i>job-id</i> field contains the job number of the page being printed.
|
||||
<p>The <i>date-time</i> field contains the date and time of when the page started printing.
|
||||
The format of this field is identical to the data-time field in the <i>access_log</i> file.
|
||||
<p>The <i>num-sheets</i> field provides the total number of pages (sheets) that have been printed on for the job.
|
||||
<p>The <i>page-number</i> and <i>num-copies</i> fields contain the page number and number of copies being printed of that page.
|
||||
For printers that cannot produce copies on their own, the num-copies field will always be 1.
|
||||
<p>Lines containing the keyword "total" have a <i>num-impressions</i> field instead which provides the total number of impressions (sides) that have been printed on for the job.
|
||||
<p>The <i>job-billing</i> field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or "-" if neither was provided.
|
||||
<p>The <i>job-originating-host-name</i> field contains the hostname or IP address of the client that printed the job.
|
||||
<p>The <i>job-name</i> field contains a copy of the job-name attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided.
|
||||
@@ -178,7 +188,7 @@ The format of this field is identical to the data-time field in the <i>access_lo
|
||||
<a href="man-cups-files.conf.html?TOPIC=Man+Pages"><b>cups-files.conf</b>(5),</a>
|
||||
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright © 2007-2018 by Apple Inc.
|
||||
Copyright © 2007-2017 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -219,7 +219,7 @@ The value "0" disables log rotation.
|
||||
The default is "1048576" (1MB).
|
||||
<dt><a name="MultipleOperationTimeout"></a><b>MultipleOperationTimeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum amount of time to allow between files in a multiple file print job.
|
||||
The default is "900" (15 minutes).
|
||||
The default is "300" (5 minutes).
|
||||
<dt><a name="Policy"></a><b><Policy </b><i>name</i><b>> </b>... <b></Policy></b>
|
||||
<dd style="margin-left: 5.0em">Specifies access control for the named policy.
|
||||
<dt><a name="Port"></a><b>Port </b><i>number</i>
|
||||
@@ -294,7 +294,7 @@ The <i>DenyTLS1.0</i> option disables TLS v1.0 support - this sets the minimum p
|
||||
The default is "No".
|
||||
<dt><a name="Timeout"></a><b>Timeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the HTTP request timeout.
|
||||
The default is "900" (15 minutes).
|
||||
The default is "300" (5 minutes).
|
||||
<dt><a name="WebInterface"></a><b>WebInterface yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>WebInterface no</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the web interface is enabled.
|
||||
@@ -601,7 +601,7 @@ Require authentication for accesses from outside the 10. network:
|
||||
<a href="man-subscriptions.conf.html?TOPIC=Man+Pages"><b>subscriptions.conf</b>(5),</a>
|
||||
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright © 2007-2019 by Apple Inc.
|
||||
Copyright © 2007-2018 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -230,7 +230,7 @@ The following predicates are understood following the <b>EXPECT</b> test directi
|
||||
<dd style="margin-left: 5.0em">Makes the <b>EXPECT</b> conditions apply only if the specified variable is not defined.
|
||||
<dt><b>IN-GROUP </b><i>tag</i>
|
||||
<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to be in the specified group tag.
|
||||
<dt><b>OF-TYPE </b><i>tag[|tag,...]</i>
|
||||
<dt><b>OF-TYPE </b><i>tag[,tag,...]</i>
|
||||
<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to use one of the specified value tag(s).
|
||||
<dt><b>REPEAT-LIMIT </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
@@ -532,7 +532,7 @@ IANA IPP Registry (<a href="http://www.iana.org/assignments/ipp-registrations)">
|
||||
PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp)">http://www.pwg.org/ipp)</a>,
|
||||
RFC 8011 (<a href="http://tools.ietf.org/html/rfc8011">http://tools.ietf.org/html/rfc8011</a>)
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright © 2007-2019 by Apple Inc.
|
||||
Copyright © 2007-2017 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. All rights reserved.</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. All rights reserved.</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -51,6 +51,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS e o logo do CUPS são marcas registradas da <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. Todos os direitos reservados.</div>
|
||||
<div class="footer">CUPS e o logo do CUPS são marcas registradas da <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. Todos os direitos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -51,6 +51,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2019) компании Apple Inc. Все права защищены.</div>
|
||||
<div class="footer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2018) компании Apple Inc. Все права защищены.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Label printer filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2016 by Apple Inc.
|
||||
* Copyright 2001-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -619,14 +619,7 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
|
||||
*/
|
||||
|
||||
puts("^XZ");
|
||||
|
||||
/*
|
||||
* Delete the label image...
|
||||
*/
|
||||
|
||||
puts("^XA");
|
||||
puts("^IDR:CUPS.GRF^FS");
|
||||
puts("^XZ");
|
||||
|
||||
/*
|
||||
* Cut the label as needed...
|
||||
|
||||
+659
-660
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1722,7 +1722,7 @@
|
||||
"cups-deviced failed to execute." = "cups-deviced failed to execute.";
|
||||
"cups-driverd failed to execute." = "cups-driverd failed to execute.";
|
||||
"cupsaddsmb: No PPD file for printer \"%s\" - %s" = "cupsaddsmb: No PPD file for printer “%s” - %s";
|
||||
"cupsctl: Cannot set %s directly." = "cupsctl: Cannot set %s directly.";
|
||||
"cupsctl: Cannot set Listen or Port directly." = "cupsctl: Cannot set Listen or Port directly.";
|
||||
"cupsctl: Unable to connect to server: %s" = "cupsctl: Unable to connect to server: %s";
|
||||
"cupsctl: Unknown option \"%s\"" = "cupsctl: Unknown option “%s”";
|
||||
"cupsctl: Unknown option \"-%c\"" = "cupsctl: Unknown option “-%c”";
|
||||
|
||||
+3
-7
@@ -32,7 +32,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.4.6\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2012-09-29 11:21+0200\n"
|
||||
"Last-Translator: Àngel Mompó <mecatxis@gmail.com>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
@@ -6271,9 +6271,8 @@ msgstr "no s'ha pogut executar correctament la cups-driverd"
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: falta el fitxer PPD per la impressora «%s» - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: no es pot establir Listen o Port directament."
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13777,9 +13776,6 @@ msgstr "Z Offset"
|
||||
#~ "convert: feu servir l'opció -f per especificar el fitxer que voleu "
|
||||
#~ "convertir."
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: no es pot establir Listen o Port directament."
|
||||
|
||||
#~ msgid "cupsd: launchd(8) support not compiled in, running in normal mode."
|
||||
#~ msgstr ""
|
||||
#~ "cupsd: no s'ha compilat amb compatibilitat per launchd(8). S'executa en "
|
||||
|
||||
+2
-3
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2012-09-14 10:26+0100\n"
|
||||
"Last-Translator: Jan Bartos <jan.bartos@madeta.cz>\n"
|
||||
"Language-Team: Czech\n"
|
||||
@@ -6002,8 +6002,7 @@ msgstr "Nepodařilo se spustit \"cups-driverd\"."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
|
||||
+3
-7
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 2.0\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2017-10-25 14:57+0200\n"
|
||||
"Last-Translator: Michael Weghorn <m.weghorn@posteo.de>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -6132,9 +6132,8 @@ msgstr "„cups-driverd“ konnte nicht ausgeführt werden."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: Keine PPD Datei für Drucker »%s« - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: Kann nicht direkt auf dem Port hören."
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13327,9 +13326,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: Kann nicht direkt auf dem Port hören."
|
||||
|
||||
#~ msgid "destination-accesses"
|
||||
#~ msgstr "Destination Accesses"
|
||||
|
||||
|
||||
+5
-9
@@ -16,7 +16,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 2.2\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2016-06-26 21:17+0100\n"
|
||||
"Last-Translator: Juan Pablo González Riopedre <jpgriopedre@yahoo.es>\n"
|
||||
"Language-Team: Spanish\n"
|
||||
@@ -5978,8 +5978,8 @@ msgstr "Uso: cupstestdsc [opciones] nombre_archivo.ps [... nombre_archivo.ps]"
|
||||
msgid ""
|
||||
"Usage: cupstestppd [options] filename1.ppd[.gz] [... filenameN.ppd[.gz]]"
|
||||
msgstr ""
|
||||
"Uso: cupstestppd [opciones] nombre_archivo1.ppd[.gz] [... nombre_archivoN.ppd"
|
||||
"[.gz]]"
|
||||
"Uso: cupstestppd [opciones] nombre_archivo1.ppd[.gz] [... nombre_archivoN."
|
||||
"ppd[.gz]]"
|
||||
|
||||
msgid ""
|
||||
"Usage: ippfind [options] regtype[,subtype][.domain.] ... [expression]\n"
|
||||
@@ -6315,9 +6315,8 @@ msgstr "Ha fallado al ejecutarse cups-driverd."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: No hay archivo PPD para la impresora \"%s\" - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: No se puede establecer Listen o Port directamente."
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13716,9 +13715,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: No se puede establecer Listen o Port directamente."
|
||||
|
||||
#~ msgid "destination-accesses"
|
||||
#~ msgstr "Destination Accesses"
|
||||
|
||||
|
||||
+2
-3
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2012-12-12 11:12+0100\n"
|
||||
"Last-Translator: Stéphane Blondon <stephane.blondon@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -6069,8 +6069,7 @@ msgstr "L’exécution de « cups-driverd » a échoué."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
|
||||
+3
-7
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2013-07-14 12:00+0200\n"
|
||||
"Last-Translator: Giovanni Scafora <giovanni@archlinux.org>\n"
|
||||
"Language-Team: Arch Linux Italian Team <giovanni@archlinux.org>\n"
|
||||
@@ -6294,9 +6294,8 @@ msgstr "cups-driverd ha smesso di funzionare."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: nessun file PPD per la stampante \"%s\" - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: non è possibile impostare direttamente Listen o Port."
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13824,9 +13823,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: non è possibile impostare direttamente Listen o Port."
|
||||
|
||||
#~ msgid "cupsd: launchd(8) support not compiled in, running in normal mode."
|
||||
#~ msgstr ""
|
||||
#~ "cupsd: launchd(8) non supporta i compilati, quando è in modalità normale."
|
||||
|
||||
+3
-7
@@ -28,7 +28,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 2.0\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2014-11-15 19:27+0900\n"
|
||||
"Last-Translator: OPFC TRANSCUPS <opfc-transcups@sourceforge.jp>\n"
|
||||
"Language-Team: OPFC TRANSCUPS <opfc-transcups@sourceforge.jp>\n"
|
||||
@@ -6251,9 +6251,8 @@ msgstr "cups-driverd の実行に失敗しました。"
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: プリンター \"%s\" の PPD ファイルがありません - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: Listen あるいは Port を直接設定できません。"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13844,9 +13843,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: Listen あるいは Port を直接設定できません。"
|
||||
|
||||
#~ msgid "cupsd: launchd(8) support not compiled in, running in normal mode."
|
||||
#~ msgstr ""
|
||||
#~ "cupsd: launchd(8) サポートがコンパイルされていないので、通常モードで動作し"
|
||||
|
||||
@@ -40,7 +40,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 2.1.2\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2016-01-31 16:45-0200\n"
|
||||
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>\n"
|
||||
"Language-Team: Brazilian Portuguese <traducao-cups-pt-br@googlegroups.com>\n"
|
||||
@@ -6295,9 +6295,8 @@ msgstr "cups-driverd falhou na execução."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: Nenhum arquivo PPD para a impressora \"%s\" - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: Não foi possível definir diretamente Porta ou Listen."
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13815,9 +13814,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: Não foi possível definir diretamente Porta ou Listen."
|
||||
|
||||
#~ msgid "cupsd: launchd(8) support not compiled in, running in normal mode."
|
||||
#~ msgstr ""
|
||||
#~ "cupsd: Compilado sem suporte a launchd(8) e, portanto, executando no modo "
|
||||
|
||||
+3
-7
@@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 2.0\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2015-01-28 12:00-0800\n"
|
||||
"Last-Translator: Aleksandr Proklov\n"
|
||||
"Language-Team: PuppyRus Linux Team\n"
|
||||
@@ -6208,9 +6208,8 @@ msgstr "Не удалось выполнить cups-driverd."
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb: Нет PPD-файла для принтера \"%s\" - %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl: Не удается задать Listen или Port."
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13606,9 +13605,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl: Не удается задать Listen или Port."
|
||||
|
||||
#~ msgid "destination-accesses"
|
||||
#~ msgstr "Destination Accesses"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/apple/cups/issues\n"
|
||||
"POT-Creation-Date: 2019-05-15 10:31-0400\n"
|
||||
"POT-Creation-Date: 2018-09-28 11:22-0400\n"
|
||||
"PO-Revision-Date: 2017-06-11 12:38+0800\n"
|
||||
"Last-Translator: Mingcong Bai <jeffbai@aosc.xyz>\n"
|
||||
"Language-Team: \n"
|
||||
@@ -6165,9 +6165,8 @@ msgstr "无法执行 cups-driverd。"
|
||||
msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s"
|
||||
msgstr "cupsaddsmb:打印机“%s”无 PPD 文件 — %s"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Cannot set %s directly."
|
||||
msgstr ""
|
||||
msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
msgstr "cupsctl:无法直接设置 Listen 或 Port 值。"
|
||||
|
||||
#, c-format
|
||||
msgid "cupsctl: Unable to connect to server: %s"
|
||||
@@ -13506,9 +13505,6 @@ msgstr "Z Offset"
|
||||
#~ msgid "compression.none"
|
||||
#~ msgstr "None"
|
||||
|
||||
#~ msgid "cupsctl: Cannot set Listen or Port directly."
|
||||
#~ msgstr "cupsctl:无法直接设置 Listen 或 Port 值。"
|
||||
|
||||
#~ msgid "destination-accesses"
|
||||
#~ msgstr "Destination Accesses"
|
||||
|
||||
|
||||
+19
-8
@@ -1,8 +1,8 @@
|
||||
.\"
|
||||
.\" cupsd-logs man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright © 2007-2018 by Apple Inc.
|
||||
.\" Copyright © 1997-2006 by Easy Software Products.
|
||||
.\" Copyright 2007-2014 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -10,7 +10,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 cupsd-logs 5 "CUPS" "8 November 2017" "Apple Inc."
|
||||
.TH cupsd-logs 5 "CUPS" "11 June 2014" "Apple Inc."
|
||||
.SH NAME
|
||||
cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
|
||||
.SH DESCRIPTION
|
||||
@@ -176,17 +176,25 @@ The \fIdate-time\fR field contains the date and time of when the page started pr
|
||||
The \fImessage\fR field contains a free-form textual message.
|
||||
Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
|
||||
.SS PAGE LOG FILE FORMAT
|
||||
The \fIpage_log\fR file lists the total number of pages (sheets) that are printed.
|
||||
The \fIpage_log\fR file lists each page or group of pages that are sent to a printer.
|
||||
By default, each line contains the following information:
|
||||
.nf
|
||||
|
||||
\fIprinter user job-id date-time \fBtotal \fInum-sheets job-billing
|
||||
\fIprinter user job-id date-time page-number num-copies job-billing
|
||||
job-originating-host-name job-name media sides\fR
|
||||
|
||||
\fIprinter user job-id date-time \fBtotal \fInum-impressions job-billing
|
||||
job-originating-host-name job-name media sides\fR
|
||||
|
||||
.fi
|
||||
For example the entry for a two page job called "myjob" might look like:
|
||||
For example the entries for a two page job called "myjob" might look like:
|
||||
.nf
|
||||
|
||||
DeskJet root 1 [20/May/1999:19:21:05 +0000] 1 1 acme-123
|
||||
localhost myjob na_letter_8.5x11in one-sided
|
||||
DeskJet root 1 [20/May/1999:19:21:05 +0000] 2 1 acme-123
|
||||
localhost myjob na_letter_8.5x11in one-sided
|
||||
|
||||
DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
|
||||
localhost myjob na_letter_8.5x11in one-sided
|
||||
|
||||
@@ -205,7 +213,10 @@ The \fIjob-id\fR field contains the job number of the page being printed.
|
||||
The \fIdate-time\fR field contains the date and time of when the page started printing.
|
||||
The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
|
||||
.LP
|
||||
The \fInum-sheets\fR field provides the total number of pages (sheets) that have been printed on for the job.
|
||||
The \fIpage-number\fR and \fInum-copies\fR fields contain the page number and number of copies being printed of that page.
|
||||
For printers that cannot produce copies on their own, the num-copies field will always be 1.
|
||||
.LP
|
||||
Lines containing the keyword "total" have a \fInum-impressions\fR field instead which provides the total number of impressions (sides) that have been printed on for the job.
|
||||
.LP
|
||||
The \fIjob-billing\fR field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or "-" if neither was provided.
|
||||
.LP
|
||||
@@ -222,4 +233,4 @@ The \fIsides\fR field contains a copy of the sides attribute provided with the I
|
||||
.BR cups-files.conf (5),
|
||||
CUPS Online Help (http://localhost:631/help)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2018 by Apple Inc.
|
||||
Copyright \[co] 2007-2017 by Apple Inc.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\"
|
||||
.\" cupsd.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright © 2007-2019 by Apple Inc.
|
||||
.\" Copyright © 2007-2018 by Apple Inc.
|
||||
.\" Copyright © 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -10,7 +10,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 cupsd.conf 5 "CUPS" "2 May 2019" "Apple Inc."
|
||||
.TH cupsd.conf 5 "CUPS" "24 April 2018" "Apple Inc."
|
||||
.SH NAME
|
||||
cupsd.conf \- server configuration file for cups
|
||||
.SH DESCRIPTION
|
||||
@@ -341,7 +341,7 @@ The default is "1048576" (1MB).
|
||||
.TP 5
|
||||
\fBMultipleOperationTimeout \fIseconds\fR
|
||||
Specifies the maximum amount of time to allow between files in a multiple file print job.
|
||||
The default is "900" (15 minutes).
|
||||
The default is "300" (5 minutes).
|
||||
.\"#Policy
|
||||
.TP 5
|
||||
\fB<Policy \fIname\fB> \fR... \fB</Policy>\fR
|
||||
@@ -459,7 +459,7 @@ The default is "No".
|
||||
.TP 5
|
||||
\fBTimeout \fIseconds\fR
|
||||
Specifies the HTTP request timeout.
|
||||
The default is "900" (15 minutes).
|
||||
The default is "300" (5 minutes).
|
||||
.\"#WebInterface
|
||||
.TP 5
|
||||
\fBWebInterface yes\fR
|
||||
@@ -876,4 +876,4 @@ Require authentication for accesses from outside the 10. network:
|
||||
.BR subscriptions.conf (5),
|
||||
CUPS Online Help (http://localhost:631/help)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2019 by Apple Inc.
|
||||
Copyright \[co] 2007-2018 by Apple Inc.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.\"
|
||||
.\" ipptoolfile man page.
|
||||
.\"
|
||||
.\" Copyright 2010-2019 by Apple Inc.
|
||||
.\" Copyright 2010-2017 by Apple Inc.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -9,7 +9,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 ipptoolfile 5 "CUPS" "5 August 2019" "Apple Inc."
|
||||
.TH ipptoolfile 5 "CUPS" "15 June 2017" "Apple Inc."
|
||||
.SH NAME
|
||||
ipptoolfile \- ipptool file format
|
||||
.SH DESCRIPTION
|
||||
@@ -297,7 +297,7 @@ Makes the \fBEXPECT\fR conditions apply only if the specified variable is not de
|
||||
\fBIN\-GROUP \fItag\fR
|
||||
Requires the \fBEXPECT\fR attribute to be in the specified group tag.
|
||||
.TP 5
|
||||
\fBOF\-TYPE \fItag[|tag,...]\fR
|
||||
\fBOF\-TYPE \fItag[,tag,...]\fR
|
||||
Requires the \fBEXPECT\fR attribute to use one of the specified value tag(s).
|
||||
.TP 5
|
||||
\fBREPEAT\-LIMIT \fInumber\fR
|
||||
@@ -649,4 +649,4 @@ IANA IPP Registry (http://www.iana.org/assignments/ipp-registrations),
|
||||
PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp),
|
||||
RFC 8011 (http://tools.ietf.org/html/rfc8011)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2019 by Apple Inc.
|
||||
Copyright \[co] 2007-2017 by Apple Inc.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Array class for the CUPS PPD Compiler.
|
||||
//
|
||||
// Copyright 2007-2019 by Apple Inc.
|
||||
// Copyright 2007-2014 by Apple Inc.
|
||||
// Copyright 2002-2005 by Easy Software Products.
|
||||
//
|
||||
// These coded instructions, statements, and computer programs are the
|
||||
@@ -39,7 +39,7 @@ ppdcArray::ppdcArray(ppdcArray *a)
|
||||
|
||||
memcpy(data, a->data, (size_t)count * sizeof(ppdcShared *));
|
||||
|
||||
for (size_t i = 0; i < count; i ++)
|
||||
for (int i = 0; i < count; i ++)
|
||||
data[i]->retain();
|
||||
}
|
||||
else
|
||||
@@ -64,7 +64,7 @@ ppdcArray::~ppdcArray()
|
||||
{
|
||||
PPDC_DELETE;
|
||||
|
||||
for (size_t i = 0; i < count; i ++)
|
||||
for (int i = 0; i < count; i ++)
|
||||
data[i]->release();
|
||||
|
||||
if (alloc)
|
||||
@@ -134,7 +134,7 @@ ppdcArray::next()
|
||||
void
|
||||
ppdcArray::remove(ppdcShared *d) // I - Data element
|
||||
{
|
||||
size_t i; // Looping var
|
||||
int i; // Looping var
|
||||
|
||||
|
||||
for (i = 0; i < count; i ++)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Definitions for the CUPS PPD Compiler.
|
||||
//
|
||||
// Copyright 2007-2019 by Apple Inc.
|
||||
// Copyright 2007-2009 by Apple Inc.
|
||||
// Copyright 2002-2007 by Easy Software Products.
|
||||
//
|
||||
// These coded instructions, statements, and computer programs are the
|
||||
@@ -109,7 +109,7 @@ class ppdcArray //// Shared Array
|
||||
{
|
||||
public:
|
||||
|
||||
size_t count, // Number of elements
|
||||
int count, // Number of elements
|
||||
alloc, // Allocated elements
|
||||
current; // Current element
|
||||
ppdcShared **data; // Elements
|
||||
|
||||
+5
-3
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// PPD file merge utility for the CUPS PPD Compiler.
|
||||
//
|
||||
// Copyright © 2007-2018 by Apple Inc.
|
||||
// Copyright © 2002-2007 by Easy Software Products.
|
||||
// Copyright 2007-2014 by Apple Inc.
|
||||
// Copyright 2002-2007 by Easy Software Products.
|
||||
//
|
||||
// These coded instructions, statements, and computer programs are the
|
||||
// property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -42,7 +42,6 @@ main(int argc, // I - Number of command-line arguments
|
||||
cups_array_t *ppds; // Array of PPD files
|
||||
const char *inname, // First input filename
|
||||
*outname; // Output filename (if any)
|
||||
char bckname[1024]; // Backup filename
|
||||
cups_file_t *infile, // Input file
|
||||
*outfile; // Output file
|
||||
cups_array_t *languages; // Languages in file
|
||||
@@ -142,6 +141,9 @@ main(int argc, // I - Number of command-line arguments
|
||||
if (outname && !strcmp(inname, outname))
|
||||
{
|
||||
// Rename input filename so that we don't overwrite it...
|
||||
char bckname[1024]; // Backup filename
|
||||
|
||||
|
||||
snprintf(bckname, sizeof(bckname), "%s.bck", inname);
|
||||
|
||||
if (rename(inname, bckname))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Test program for message catalog class.
|
||||
//
|
||||
// Copyright © 2008-2019 by Apple Inc.
|
||||
// Copyright 2008 by Apple Inc.
|
||||
//
|
||||
// These coded instructions, statements, and computer programs are the
|
||||
// property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -38,7 +38,7 @@ main(int argc, // I - Number of command-line arguments
|
||||
// Scan the command-line...
|
||||
catalog = new ppdcCatalog(NULL, argv[1]);
|
||||
|
||||
printf("%s: %u messages\n", argv[1], (unsigned)catalog->messages->count);
|
||||
printf("%s: %d messages\n", argv[1], catalog->messages->count);
|
||||
|
||||
for (m = (ppdcMessage *)catalog->messages->first();
|
||||
m;
|
||||
|
||||
+7
-16
@@ -1176,23 +1176,7 @@ cupsdCheckGroup(
|
||||
|
||||
groupid = group->gr_gid;
|
||||
|
||||
for (i = 0; group->gr_mem[i]; i ++)
|
||||
{
|
||||
/*
|
||||
* User appears in the group membership...
|
||||
*/
|
||||
|
||||
if (!_cups_strcasecmp(username, group->gr_mem[i]))
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GETGROUPLIST
|
||||
/*
|
||||
* If the user isn't in the group membership list, try the results from
|
||||
* getgrouplist() which is supposed to return the full list of groups a user
|
||||
* belongs to...
|
||||
*/
|
||||
|
||||
if (user)
|
||||
{
|
||||
int ngroups; /* Number of groups */
|
||||
@@ -1213,6 +1197,13 @@ cupsdCheckGroup(
|
||||
if ((int)groupid == (int)groups[i])
|
||||
return (1);
|
||||
}
|
||||
|
||||
#else
|
||||
for (i = 0; group->gr_mem[i]; i ++)
|
||||
{
|
||||
if (!_cups_strcasecmp(username, group->gr_mem[i]))
|
||||
return (1);
|
||||
}
|
||||
#endif /* HAVE_GETGROUPLIST */
|
||||
}
|
||||
else
|
||||
|
||||
+11
-12
@@ -568,17 +568,6 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
|
||||
cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cupsdReadClient: error=%d, used=%d, state=%s, data_encoding=HTTP_ENCODING_%s, data_remaining=" CUPS_LLFMT ", request=%p(%s), file=%d", httpError(con->http), (int)httpGetReady(con->http), httpStateString(httpGetState(con->http)), httpIsChunked(con->http) ? "CHUNKED" : "LENGTH", CUPS_LLCAST httpGetRemaining(con->http), con->request, con->request ? ippStateString(ippGetState(con->request)) : "", con->file);
|
||||
|
||||
if (httpError(con->http) == EPIPE && !httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1)
|
||||
{
|
||||
/*
|
||||
* Connection closed...
|
||||
*/
|
||||
|
||||
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF.");
|
||||
cupsdCloseClient(con);
|
||||
return;
|
||||
}
|
||||
|
||||
if (httpGetState(con->http) == HTTP_STATE_GET_SEND ||
|
||||
httpGetState(con->http) == HTTP_STATE_POST_SEND ||
|
||||
httpGetState(con->http) == HTTP_STATE_STATUS)
|
||||
@@ -588,6 +577,17 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
* connection and we need to shut it down...
|
||||
*/
|
||||
|
||||
if (!httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1)
|
||||
{
|
||||
/*
|
||||
* Connection closed...
|
||||
*/
|
||||
|
||||
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF.");
|
||||
cupsdCloseClient(con);
|
||||
return;
|
||||
}
|
||||
|
||||
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on unexpected HTTP read state %s.", httpStateString(httpGetState(con->http)));
|
||||
cupsdCloseClient(con);
|
||||
return;
|
||||
@@ -2209,7 +2209,6 @@ cupsdSendError(cupsd_client_t *con, /* I - Connection */
|
||||
strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));
|
||||
|
||||
httpClearFields(con->http);
|
||||
httpClearCookie(con->http);
|
||||
|
||||
httpSetField(con->http, HTTP_FIELD_LOCATION, location);
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Configuration routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 2007-2018 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -729,14 +729,14 @@ cupsdReadConfiguration(void)
|
||||
MaxClientsPerHost = 0;
|
||||
MaxLogSize = 1024 * 1024;
|
||||
MaxRequestSize = 0;
|
||||
MultipleOperationTimeout = 900;
|
||||
MultipleOperationTimeout = DEFAULT_TIMEOUT;
|
||||
NumSystemGroups = 0;
|
||||
ReloadTimeout = DEFAULT_KEEPALIVE;
|
||||
RootCertDuration = 300;
|
||||
Sandboxing = CUPSD_SANDBOXING_STRICT;
|
||||
StrictConformance = FALSE;
|
||||
SyncOnClose = FALSE;
|
||||
Timeout = 900;
|
||||
Timeout = DEFAULT_TIMEOUT;
|
||||
WebInterface = CUPS_DEFAULT_WEBIF;
|
||||
|
||||
BrowseLocalProtocols = parse_protocols(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* created from driver information files, and dynamically generated PPD files
|
||||
* using driver helper programs.
|
||||
*
|
||||
* Copyright  2007-2019 by Apple Inc.
|
||||
* Copyright  1997-2007 by Easy Software Products.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -31,7 +31,7 @@
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
#define PPD_SYNC 0x50504441 /* Sync word for ppds.dat (PPDA) */
|
||||
#define PPD_SYNC 0x50504439 /* Sync word for ppds.dat (PPD9) */
|
||||
#define PPD_MAX_LANG 32 /* Maximum languages */
|
||||
#define PPD_MAX_PROD 32 /* Maximum products */
|
||||
#define PPD_MAX_VERS 32 /* Maximum versions */
|
||||
@@ -40,9 +40,12 @@
|
||||
#define PPD_TYPE_PDF 1 /* PDF PPD */
|
||||
#define PPD_TYPE_RASTER 2 /* CUPS raster PPD */
|
||||
#define PPD_TYPE_FAX 3 /* Facsimile/MFD PPD */
|
||||
#define PPD_TYPE_UNKNOWN 4 /* Other/hybrid PPD */
|
||||
#define PPD_TYPE_DRV 5 /* Driver info file */
|
||||
#define PPD_TYPE_ARCHIVE 6 /* Archive file */
|
||||
#define PPD_TYPE_OBJECT_ANY 4 /* 3D (AMF/STL/g-code) PPD */
|
||||
#define PPD_TYPE_OBJECT_DIRECT 5 /* 3D (AMF/STL/g-code) PPD over any connection */
|
||||
#define PPD_TYPE_OBJECT_STORAGE 6 /* 3D (AMF/STL/g-code) PPD for storage to SD card, etc. */
|
||||
#define PPD_TYPE_UNKNOWN 7 /* Other/hybrid PPD */
|
||||
#define PPD_TYPE_DRV 8 /* Driver info file */
|
||||
#define PPD_TYPE_ARCHIVE 9 /* Archive file */
|
||||
|
||||
#define TAR_BLOCK 512 /* Number of bytes in a block */
|
||||
#define TAR_BLOCKS 10 /* Blocking factor */
|
||||
@@ -369,7 +372,8 @@ cat_drv(const char *name, /* I - PPD name */
|
||||
ppdcCatalog *catalog; // Message catalog in .drv file
|
||||
|
||||
|
||||
fprintf(stderr, "DEBUG2: [cups-driverd] %u locales defined in \"%s\"...\n", (unsigned)src->po_files->count, filename);
|
||||
fprintf(stderr, "DEBUG2: [cups-driverd] %d locales defined in \"%s\"...\n",
|
||||
src->po_files->count, filename);
|
||||
|
||||
locales = new ppdcArray();
|
||||
for (catalog = (ppdcCatalog *)src->po_files->first();
|
||||
@@ -1523,20 +1527,8 @@ list_ppds(int request_id, /* I - Request ID */
|
||||
}
|
||||
|
||||
if (send_type)
|
||||
{
|
||||
if (ppd->record.type < PPD_TYPE_POSTSCRIPT || ppd->record.type > PPD_TYPE_ARCHIVE)
|
||||
{
|
||||
/*
|
||||
* This cache file is corrupted, remove it!
|
||||
*/
|
||||
|
||||
unlink(filename);
|
||||
|
||||
cupsdSendIPPString(IPP_TAG_KEYWORD, "ppd-type", PPDTypes[PPD_TYPE_UNKNOWN]);
|
||||
}
|
||||
else
|
||||
cupsdSendIPPString(IPP_TAG_KEYWORD, "ppd-type", PPDTypes[ppd->record.type]);
|
||||
}
|
||||
cupsdSendIPPString(IPP_TAG_KEYWORD, "ppd-type",
|
||||
PPDTypes[ppd->record.type]);
|
||||
|
||||
if (send_model_number)
|
||||
cupsdSendIPPInteger(IPP_TAG_INTEGER, "ppd-model-number",
|
||||
@@ -2119,6 +2111,22 @@ load_ppd(const char *filename, /* I - Real filename */
|
||||
type = PPD_TYPE_RASTER;
|
||||
else if (strstr(line + 12, "application/vnd.cups-pdf"))
|
||||
type = PPD_TYPE_PDF;
|
||||
else if (strstr(line + 12, "application/amf") ||
|
||||
strstr(line + 12, "application/g-code") ||
|
||||
strstr(line + 12, "application/sla"))
|
||||
type = PPD_TYPE_OBJECT_ANY;
|
||||
}
|
||||
else if (!strncmp(line, "*cups3DWorkflows:", 17))
|
||||
{
|
||||
int is_direct = strstr(line + 17, "direct") != NULL;
|
||||
int is_storage = strstr(line + 17, "storage") != NULL;
|
||||
|
||||
if (is_direct && !is_storage)
|
||||
type = PPD_TYPE_OBJECT_DIRECT;
|
||||
else if (!is_direct && is_storage)
|
||||
type = PPD_TYPE_OBJECT_STORAGE;
|
||||
else
|
||||
type = PPD_TYPE_OBJECT_ANY;
|
||||
}
|
||||
else if (!strncmp(line, "*cupsModelNumber:", 17))
|
||||
sscanf(line, "*cupsModelNumber:%d", &model_number);
|
||||
|
||||
+6
-11
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* IPP routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 2007-2018 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -2601,7 +2601,8 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
|
||||
if (!strcmp(attr->values[i].string.text, "none"))
|
||||
continue;
|
||||
|
||||
printer->reasons[printer->num_reasons] = _cupsStrAlloc(attr->values[i].string.text);
|
||||
printer->reasons[printer->num_reasons] =
|
||||
_cupsStrRetain(attr->values[i].string.text);
|
||||
printer->num_reasons ++;
|
||||
|
||||
if (!strcmp(attr->values[i].string.text, "paused") &&
|
||||
@@ -4891,9 +4892,8 @@ copy_printer_attrs(
|
||||
|
||||
if ((p2_uri = ippFindAttribute(p2->attrs, "printer-uri-supported",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
{
|
||||
member_uris->values[i].string.text = _cupsStrAlloc(p2_uri->values[0].string.text);
|
||||
}
|
||||
member_uris->values[i].string.text =
|
||||
_cupsStrRetain(p2_uri->values[0].string.text);
|
||||
else
|
||||
{
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, printer_uri,
|
||||
@@ -5279,11 +5279,6 @@ create_local_bg_thread(
|
||||
*response; /* Response from printer */
|
||||
ipp_attribute_t *attr; /* Attribute in response */
|
||||
ipp_status_t status; /* Status code */
|
||||
static const char * const pattrs[] = /* Printer attributes we need */
|
||||
{
|
||||
"all",
|
||||
"media-col-database"
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
@@ -5318,7 +5313,7 @@ create_local_bg_thread(
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
ippSetVersion(request, 2, 0);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer->device_uri);
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "all");
|
||||
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
status = cupsLastError();
|
||||
|
||||
+57
-133
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Job management routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -307,12 +307,10 @@ cupsdCheckJobs(void)
|
||||
|
||||
if (cupsdTimeoutJob(job))
|
||||
continue;
|
||||
|
||||
cupsdSetJobState(job, IPP_JOB_PENDING, CUPSD_JOB_DEFAULT, "Job submission timed out.");
|
||||
cupsdLogJob(job, CUPSD_LOG_ERROR, "Job submission timed out.");
|
||||
}
|
||||
else
|
||||
cupsdSetJobState(job, IPP_JOB_PENDING, CUPSD_JOB_DEFAULT, "Job hold expired.");
|
||||
|
||||
cupsdSetJobState(job, IPP_JOB_PENDING, CUPSD_JOB_DEFAULT,
|
||||
"Job submission timed out.");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -439,20 +437,10 @@ cupsdCleanJobs(void)
|
||||
curtime = time(NULL);
|
||||
JobHistoryUpdate = 0;
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCleanJobs: curtime=%d", (int)curtime);
|
||||
|
||||
for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
|
||||
job;
|
||||
job = (cupsd_job_t *)cupsArrayNext(Jobs))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCleanJobs: Job %d, state=%d, printer=%p, history_time=%d, file_time=%d", job->id, (int)job->state_value, (void *)job->printer, (int)job->history_time, (int)job->file_time);
|
||||
|
||||
if ((job->history_time && job->history_time < JobHistoryUpdate) || !JobHistoryUpdate)
|
||||
JobHistoryUpdate = job->history_time;
|
||||
|
||||
if ((job->file_time && job->file_time < JobHistoryUpdate) || !JobHistoryUpdate)
|
||||
JobHistoryUpdate = job->file_time;
|
||||
|
||||
if (job->state_value >= IPP_JOB_CANCELED && !job->printer)
|
||||
{
|
||||
/*
|
||||
@@ -468,9 +456,21 @@ cupsdCleanJobs(void)
|
||||
else if (job->file_time && job->file_time <= curtime)
|
||||
{
|
||||
cupsdLogJob(job, CUPSD_LOG_DEBUG, "Removing document files.");
|
||||
cupsdLogJob(job, CUPSD_LOG_DEBUG2, "curtime=%ld, job->file_time=%ld", (long)curtime, (long)job->file_time);
|
||||
remove_job_files(job);
|
||||
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
|
||||
if (job->history_time < JobHistoryUpdate || !JobHistoryUpdate)
|
||||
JobHistoryUpdate = job->history_time;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (job->history_time < JobHistoryUpdate || !JobHistoryUpdate)
|
||||
JobHistoryUpdate = job->history_time;
|
||||
|
||||
if (job->file_time < JobHistoryUpdate || !JobHistoryUpdate)
|
||||
JobHistoryUpdate = job->file_time;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1729,7 +1729,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
|
||||
job->completed_time = attr->values[0].integer;
|
||||
|
||||
if (JobHistory < INT_MAX)
|
||||
job->history_time = job->completed_time + JobHistory;
|
||||
job->history_time = attr->values[0].integer + JobHistory;
|
||||
else
|
||||
job->history_time = INT_MAX;
|
||||
|
||||
@@ -1740,7 +1740,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
|
||||
JobHistoryUpdate = job->history_time;
|
||||
|
||||
if (JobFiles < INT_MAX)
|
||||
job->file_time = job->completed_time + JobFiles;
|
||||
job->file_time = attr->values[0].integer + JobFiles;
|
||||
else
|
||||
job->file_time = INT_MAX;
|
||||
|
||||
@@ -1850,8 +1850,6 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
|
||||
|
||||
if (!job->impressions)
|
||||
job->impressions = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-impressions-completed", 0);
|
||||
if (!job->sheets)
|
||||
job->sheets = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-media-sheets-completed", 0);
|
||||
|
||||
if (!job->priority)
|
||||
{
|
||||
@@ -2862,10 +2860,8 @@ cupsdUpdateJobs(void)
|
||||
* Update history/file expiration times...
|
||||
*/
|
||||
|
||||
job->completed_time = attr->values[0].integer;
|
||||
|
||||
if (JobHistory < INT_MAX)
|
||||
job->history_time = job->completed_time + JobHistory;
|
||||
job->history_time = attr->values[0].integer + JobHistory;
|
||||
else
|
||||
job->history_time = INT_MAX;
|
||||
|
||||
@@ -2879,7 +2875,7 @@ cupsdUpdateJobs(void)
|
||||
JobHistoryUpdate = job->history_time;
|
||||
|
||||
if (JobFiles < INT_MAX)
|
||||
job->file_time = job->completed_time + JobFiles;
|
||||
job->file_time = attr->values[0].integer + JobFiles;
|
||||
else
|
||||
job->file_time = INT_MAX;
|
||||
|
||||
@@ -3158,13 +3154,6 @@ finalize_job(cupsd_job_t *job, /* I - Job */
|
||||
cupsdStatBufDelete(job->status_buffer);
|
||||
job->status_buffer = NULL;
|
||||
|
||||
/*
|
||||
* Log the final impression (page) count...
|
||||
*/
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "total %d", ippGetInteger(job->impressions, 0));
|
||||
cupsdLogPage(job, buffer);
|
||||
|
||||
/*
|
||||
* Process the exit status...
|
||||
*/
|
||||
@@ -3444,12 +3433,6 @@ finalize_job(cupsd_job_t *job, /* I - Job */
|
||||
* Stop the printer...
|
||||
*/
|
||||
|
||||
if (job_state == IPP_JSTATE_CANCELED || job_state == IPP_JSTATE_ABORTED)
|
||||
{
|
||||
cupsdLogJob(job, CUPSD_LOG_INFO, "Ignored STOP from backend since the job is %s.", job_state == IPP_JSTATE_CANCELED ? "canceled" : "aborted");
|
||||
break;
|
||||
}
|
||||
|
||||
printer_state = IPP_PRINTER_STOPPED;
|
||||
|
||||
if (ErrorLog)
|
||||
@@ -3464,7 +3447,8 @@ finalize_job(cupsd_job_t *job, /* I - Job */
|
||||
{
|
||||
job_state = IPP_JOB_PENDING;
|
||||
|
||||
ippSetString(job->attrs, &job->reasons, 0, "resources-are-not-ready");
|
||||
ippSetString(job->attrs, &job->reasons, 0,
|
||||
"resources-are-not-ready");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4023,45 +4007,6 @@ get_options(cupsd_job_t *job, /* I - Job */
|
||||
break;
|
||||
|
||||
case IPP_TAG_STRING :
|
||||
{
|
||||
int length = attr->values[i].unknown.length;
|
||||
|
||||
for (valptr = attr->values[i].unknown.data; length > 0; length --)
|
||||
{
|
||||
if ((*valptr & 255) < 0x20 || *valptr == 0x7f)
|
||||
break;
|
||||
}
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
/*
|
||||
* Encode this string as hex characters...
|
||||
*/
|
||||
|
||||
*optptr++ = '<';
|
||||
|
||||
for (valptr = attr->values[i].unknown.data, length = attr->values[i].unknown.length; length > 0; length --)
|
||||
{
|
||||
snprintf(optptr, optlength - (size_t)(optptr - options) - 1, "%02X", *valptr & 255);
|
||||
optptr += 2;
|
||||
}
|
||||
|
||||
*optptr++ = '>';
|
||||
}
|
||||
else
|
||||
{
|
||||
for (valptr = attr->values[i].unknown.data, length = attr->values[i].unknown.length; length > 0; length --)
|
||||
{
|
||||
if (strchr(" \t\n\\\'\"", *valptr))
|
||||
*optptr++ = '\\';
|
||||
*optptr++ = *valptr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*optptr = '\0';
|
||||
break;
|
||||
|
||||
case IPP_TAG_TEXT :
|
||||
case IPP_TAG_NAME :
|
||||
case IPP_TAG_KEYWORD :
|
||||
@@ -4207,16 +4152,6 @@ ipp_length(ipp_t *ipp) /* I - IPP request */
|
||||
break;
|
||||
|
||||
case IPP_TAG_STRING :
|
||||
/*
|
||||
* Octet strings can contain characters that need quoting. We need
|
||||
* at least 2 * len + 2 characters to cover the quotes and any
|
||||
* backslashes in the string.
|
||||
*/
|
||||
|
||||
for (i = 0; i < attr->num_values; i ++)
|
||||
bytes += 2 * (size_t)attr->values[i].unknown.length + 2;
|
||||
break;
|
||||
|
||||
case IPP_TAG_TEXT :
|
||||
case IPP_TAG_NAME :
|
||||
case IPP_TAG_KEYWORD :
|
||||
@@ -4749,7 +4684,7 @@ set_time(cupsd_job_t *job, /* I - Job to update */
|
||||
job->completed_time = curtime;
|
||||
|
||||
if (JobHistory < INT_MAX && attr)
|
||||
job->history_time = job->completed_time + JobHistory;
|
||||
job->history_time = attr->values[0].integer + JobHistory;
|
||||
else
|
||||
job->history_time = INT_MAX;
|
||||
|
||||
@@ -4757,7 +4692,7 @@ set_time(cupsd_job_t *job, /* I - Job to update */
|
||||
JobHistoryUpdate = job->history_time;
|
||||
|
||||
if (JobFiles < INT_MAX && attr)
|
||||
job->file_time = job->completed_time + JobFiles;
|
||||
job->file_time = curtime + JobFiles;
|
||||
else
|
||||
job->file_time = INT_MAX;
|
||||
|
||||
@@ -5058,6 +4993,7 @@ void
|
||||
update_job(cupsd_job_t *job) /* I - Job to check */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
int copies; /* Number of copies printed */
|
||||
char message[CUPSD_SB_BUFFER_SIZE],
|
||||
/* Message text */
|
||||
*ptr; /* Pointer update... */
|
||||
@@ -5095,10 +5031,6 @@ update_job(cupsd_job_t *job) /* I - Job to check */
|
||||
|
||||
if (loglevel == CUPSD_LOG_PAGE)
|
||||
{
|
||||
int impressions = ippGetInteger(job->impressions, 0);
|
||||
/* Number of impressions printed */
|
||||
int delta; /* Number of impressions added */
|
||||
|
||||
/*
|
||||
* Page message; send the message to the page_log file and update the
|
||||
* job sheet count...
|
||||
@@ -5106,57 +5038,51 @@ update_job(cupsd_job_t *job) /* I - Job to check */
|
||||
|
||||
cupsdLogJob(job, CUPSD_LOG_DEBUG, "PAGE: %s", message);
|
||||
|
||||
if (!_cups_strncasecmp(message, "total ", 6))
|
||||
if (job->impressions)
|
||||
{
|
||||
/*
|
||||
* Got a total count of pages from a backend or filter...
|
||||
*/
|
||||
|
||||
int total = atoi(message + 6); /* Total impressions */
|
||||
|
||||
if (total > impressions)
|
||||
if (!_cups_strncasecmp(message, "total ", 6))
|
||||
{
|
||||
delta = total - impressions;
|
||||
impressions = total;
|
||||
/*
|
||||
* Got a total count of pages from a backend or filter...
|
||||
*/
|
||||
|
||||
copies = atoi(message + 6);
|
||||
copies -= ippGetInteger(job->impressions, 0); /* Just track the delta */
|
||||
}
|
||||
else
|
||||
delta = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Add the number of copies to the impression count...
|
||||
*/
|
||||
|
||||
int copies; /* Number of copies */
|
||||
|
||||
if (!sscanf(message, "%*d%d", &copies) || copies <= 0)
|
||||
else if (!sscanf(message, "%*d%d", &copies))
|
||||
copies = 1;
|
||||
|
||||
delta = copies;
|
||||
impressions += copies;
|
||||
ippSetInteger(job->attrs, &job->impressions, 0, ippGetInteger(job->impressions, 0) + copies);
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
}
|
||||
|
||||
if (job->impressions)
|
||||
ippSetInteger(job->attrs, &job->impressions, 0, impressions);
|
||||
|
||||
if (job->sheets)
|
||||
{
|
||||
const char *sides = ippGetString(ippFindAttribute(job->attrs, "sides", IPP_TAG_KEYWORD), 0, NULL);
|
||||
if (!_cups_strncasecmp(message, "total ", 6))
|
||||
{
|
||||
/*
|
||||
* Got a total count of pages from a backend or filter...
|
||||
*/
|
||||
|
||||
if (sides && strcmp(sides, "one-sided"))
|
||||
ippSetInteger(job->attrs, &job->sheets, 0, impressions / 2);
|
||||
else
|
||||
ippSetInteger(job->attrs, &job->sheets, 0, impressions);
|
||||
copies = atoi(message + 6);
|
||||
copies -= ippGetInteger(job->sheets, 0); /* Just track the delta */
|
||||
}
|
||||
else if (!sscanf(message, "%*d%d", &copies))
|
||||
copies = 1;
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_PROGRESS, job->printer, job, "Printed %d page(s).", ippGetInteger(job->sheets, 0));
|
||||
ippSetInteger(job->attrs, &job->sheets, 0, ippGetInteger(job->sheets, 0) + copies);
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
|
||||
if (job->printer->page_limit)
|
||||
cupsdUpdateQuota(job->printer, job->username, copies, 0);
|
||||
}
|
||||
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
cupsdLogPage(job, message);
|
||||
|
||||
if (job->printer->page_limit)
|
||||
cupsdUpdateQuota(job->printer, job->username, delta, 0);
|
||||
if (job->sheets)
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_PROGRESS, job->printer, job, "Printed %d page(s).", ippGetInteger(job->sheets, 0));
|
||||
}
|
||||
else if (loglevel == CUPSD_LOG_JOBSTATE)
|
||||
{
|
||||
@@ -5204,10 +5130,8 @@ update_job(cupsd_job_t *job) /* I - Job to check */
|
||||
|
||||
if (cancel_after)
|
||||
job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
|
||||
else if (MaxJobTime > 0)
|
||||
job->cancel_time = time(NULL) + MaxJobTime;
|
||||
else
|
||||
job->cancel_time = 0;
|
||||
job->cancel_time = time(NULL) + MaxJobTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+49
-57
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Main loop for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -749,10 +749,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
#ifdef HAVE_ONDEMAND
|
||||
if (OnDemand)
|
||||
{
|
||||
stop_scheduler = 1;
|
||||
break;
|
||||
}
|
||||
#endif /* HAVE_ONDEMAND */
|
||||
|
||||
DoingShutdown = 1;
|
||||
@@ -811,25 +808,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
if (timeout == 86400 && OnDemand && IdleExitTimeout &&
|
||||
!cupsArrayCount(ActiveJobs) &&
|
||||
# ifdef HAVE_SYSTEMD
|
||||
!WebInterface &&
|
||||
# endif /* HAVE_SYSTEMD */
|
||||
!cupsArrayCount(ActiveJobs))
|
||||
(!Browsing || !BrowseLocalProtocols || !cupsArrayCount(Printers)))
|
||||
{
|
||||
cupsd_printer_t *p = NULL; /* Current printer */
|
||||
|
||||
if (Browsing && BrowseLocalProtocols)
|
||||
{
|
||||
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); p; p = (cupsd_printer_t *)cupsArrayNext(Printers))
|
||||
if (p->shared)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!p)
|
||||
{
|
||||
timeout = IdleExitTimeout;
|
||||
service_idle_exit = 1;
|
||||
}
|
||||
timeout = IdleExitTimeout;
|
||||
service_idle_exit = 1;
|
||||
}
|
||||
else
|
||||
service_idle_exit = 0;
|
||||
@@ -960,7 +946,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
if (current_time > expire_time)
|
||||
{
|
||||
cupsdExpireSubscriptions(NULL, NULL);
|
||||
if (cupsArrayCount(Subscriptions) > 0)
|
||||
cupsdExpireSubscriptions(NULL, NULL);
|
||||
|
||||
cupsdUnloadCompletedJobs();
|
||||
|
||||
@@ -995,23 +982,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
#endif /* !HAVE_AUTHORIZATION_H */
|
||||
|
||||
/*
|
||||
* Clean job history...
|
||||
*/
|
||||
|
||||
if (JobHistoryUpdate && current_time >= JobHistoryUpdate)
|
||||
cupsdCleanJobs();
|
||||
|
||||
/*
|
||||
* Update any pending multi-file documents...
|
||||
*/
|
||||
|
||||
if ((current_time - senddoc_time) >= 10)
|
||||
{
|
||||
cupsdCheckJobs();
|
||||
senddoc_time = current_time;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for new data on the client sockets...
|
||||
*/
|
||||
@@ -1044,6 +1014,23 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Update any pending multi-file documents...
|
||||
*/
|
||||
|
||||
if ((current_time - senddoc_time) >= 10)
|
||||
{
|
||||
cupsdCheckJobs();
|
||||
senddoc_time = current_time;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clean job history...
|
||||
*/
|
||||
|
||||
if (JobHistoryUpdate && current_time >= JobHistoryUpdate)
|
||||
cupsdCleanJobs();
|
||||
|
||||
/*
|
||||
* Log statistics at most once a minute when in debug mode...
|
||||
*/
|
||||
@@ -1625,6 +1612,7 @@ 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_printer_t *printer; /* Printer information */
|
||||
const char *why; /* Debugging aid */
|
||||
|
||||
|
||||
@@ -1713,6 +1701,12 @@ select_timeout(int fds) /* I - Number of descriptors returned */
|
||||
* Check for any job activity...
|
||||
*/
|
||||
|
||||
if (JobHistoryUpdate && timeout > JobHistoryUpdate)
|
||||
{
|
||||
timeout = JobHistoryUpdate;
|
||||
why = "update job history";
|
||||
}
|
||||
|
||||
for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
|
||||
job;
|
||||
job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
|
||||
@@ -1743,6 +1737,22 @@ select_timeout(int fds) /* I - Number of descriptors returned */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for temporary printers that need to be deleted...
|
||||
*/
|
||||
|
||||
for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); printer; printer = (cupsd_printer_t *)cupsArrayNext(Printers))
|
||||
{
|
||||
if (printer->temporary && !printer->job && (!local_timeout || local_timeout > (printer->state_time + 60)))
|
||||
local_timeout = printer->state_time + 60;
|
||||
}
|
||||
|
||||
if (timeout > local_timeout && local_timeout)
|
||||
{
|
||||
timeout = local_timeout;
|
||||
why = "delete stale local printers";
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
@@ -2036,31 +2046,13 @@ service_checkout(int shutdown) /* I - Shutting down? */
|
||||
#ifdef HAVE_ONDEMAND
|
||||
if (OnDemand)
|
||||
{
|
||||
int shared_printers = 0; /* Do we have shared printers? */
|
||||
|
||||
strlcpy(pidfile, CUPS_KEEPALIVE, sizeof(pidfile));
|
||||
|
||||
/*
|
||||
* If printer sharing is on see if there are any actual shared printers...
|
||||
*/
|
||||
|
||||
if (Browsing && BrowseLocalProtocols)
|
||||
{
|
||||
cupsd_printer_t *p = NULL; /* Current printer */
|
||||
|
||||
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); p; p = (cupsd_printer_t *)cupsArrayNext(Printers))
|
||||
{
|
||||
if (p->shared)
|
||||
break;
|
||||
}
|
||||
|
||||
shared_printers = (p != NULL);
|
||||
}
|
||||
|
||||
if (cupsArrayCount(ActiveJobs) || /* Active jobs */
|
||||
WebInterface || /* Web interface enabled */
|
||||
NeedReload || /* Doing a reload */
|
||||
shared_printers) /* Printers being shared */
|
||||
(Browsing && BrowseLocalProtocols && cupsArrayCount(Printers)))
|
||||
/* Printers being shared */
|
||||
{
|
||||
/*
|
||||
* Create or remove the "keep-alive" file based on whether there are active
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[Unit]
|
||||
Description=CUPS Scheduler
|
||||
Documentation=man:cupsd(8)
|
||||
After=sssd.service
|
||||
|
||||
[Service]
|
||||
ExecStart=@sbindir@/cupsd -l
|
||||
|
||||
+134
-28
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Printer routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2017 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -48,7 +48,8 @@ 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 ipp_t *new_media_col(pwg_size_t *size);
|
||||
static ipp_t *new_media_col(pwg_size_t *size, const char *source,
|
||||
const char *type);
|
||||
static void write_xml_string(cups_file_t *fp, const char *s);
|
||||
|
||||
|
||||
@@ -1021,7 +1022,8 @@ cupsdLoadAllPrinters(void)
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Info"))
|
||||
{
|
||||
cupsdSetString(&p->info, value ? value : "");
|
||||
if (value)
|
||||
cupsdSetString(&p->info, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "MakeModel"))
|
||||
{
|
||||
@@ -1030,19 +1032,23 @@ cupsdLoadAllPrinters(void)
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Location"))
|
||||
{
|
||||
cupsdSetString(&p->location, value ? value : "");
|
||||
if (value)
|
||||
cupsdSetString(&p->location, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "GeoLocation"))
|
||||
{
|
||||
cupsdSetString(&p->geo_location, value ? value : "");
|
||||
if (value)
|
||||
cupsdSetString(&p->geo_location, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Organization"))
|
||||
{
|
||||
cupsdSetString(&p->organization, value ? value : "");
|
||||
if (value)
|
||||
cupsdSetString(&p->organization, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "OrganizationalUnit"))
|
||||
{
|
||||
cupsdSetString(&p->organizational_unit, value ? value : "");
|
||||
if (value)
|
||||
cupsdSetString(&p->organizational_unit, value);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "DeviceURI"))
|
||||
{
|
||||
@@ -3364,7 +3370,7 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
|
||||
"document-format-default", NULL, "application/octet-stream");
|
||||
|
||||
if (!cupsGetOption("job-cancel-after", p->num_options, p->options))
|
||||
ippAddInteger(p->attrs, IPP_TAG_PRINTER, MaxJobTime > 0 ? IPP_TAG_INTEGER : IPP_TAG_NOVALUE,
|
||||
ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"job-cancel-after-default", MaxJobTime);
|
||||
|
||||
if (!cupsGetOption("job-hold-until", p->num_options, p->options))
|
||||
@@ -3793,7 +3799,7 @@ dirty_printer(cupsd_printer_t *p) /* I - Printer */
|
||||
static void
|
||||
load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
{
|
||||
int i, j; /* Looping vars */
|
||||
int i, j, k; /* Looping vars */
|
||||
char cache_name[1024]; /* Cache filename */
|
||||
struct stat cache_info; /* Cache file info */
|
||||
ppd_file_t *ppd; /* PPD file */
|
||||
@@ -3805,7 +3811,9 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
*output_bin, /* OutputBin option */
|
||||
*output_mode, /* OutputMode option */
|
||||
*resolution; /* (Set|JCL|)Resolution option */
|
||||
ppd_choice_t *choice; /* Current PPD choice */
|
||||
ppd_choice_t *choice, /* Current PPD choice */
|
||||
*input_slot, /* Current input slot */
|
||||
*media_type; /* Current media type */
|
||||
ppd_attr_t *ppd_attr; /* PPD attribute */
|
||||
int xdpi, /* Horizontal resolution */
|
||||
ydpi; /* Vertical resolution */
|
||||
@@ -4065,8 +4073,20 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
{
|
||||
ipp_t *col; /* Collection value */
|
||||
|
||||
col = new_media_col(pwgsize);
|
||||
ippAddCollection(p->ppd_attrs, IPP_TAG_PRINTER, "media-col-default", col);
|
||||
input_slot = ppdFindMarkedChoice(ppd, "InputSlot");
|
||||
media_type = ppdFindMarkedChoice(ppd, "MediaType");
|
||||
col = new_media_col(pwgsize,
|
||||
input_slot ?
|
||||
_ppdCacheGetSource(p->pc,
|
||||
input_slot->choice) :
|
||||
NULL,
|
||||
media_type ?
|
||||
_ppdCacheGetType(p->pc,
|
||||
media_type->choice) :
|
||||
NULL);
|
||||
|
||||
ippAddCollection(p->ppd_attrs, IPP_TAG_PRINTER, "media-col-default",
|
||||
col);
|
||||
ippDelete(col);
|
||||
}
|
||||
|
||||
@@ -4260,19 +4280,89 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
* media-col-database
|
||||
*/
|
||||
|
||||
if ((attr = ippAddCollections(p->ppd_attrs, IPP_TAG_PRINTER, "media-col-database", p->pc->num_sizes, NULL)) != NULL)
|
||||
num_media = p->pc->num_sizes;
|
||||
if (p->pc->num_sources)
|
||||
{
|
||||
if (p->pc->num_types > 0)
|
||||
num_media += p->pc->num_sizes * p->pc->num_sources *
|
||||
p->pc->num_types;
|
||||
else
|
||||
num_media += p->pc->num_sizes * p->pc->num_sources;
|
||||
}
|
||||
else if (p->pc->num_types)
|
||||
num_media += p->pc->num_sizes * p->pc->num_types;
|
||||
|
||||
if ((attr = ippAddCollections(p->ppd_attrs, IPP_TAG_PRINTER,
|
||||
"media-col-database", num_media,
|
||||
NULL)) != NULL)
|
||||
{
|
||||
for (i = p->pc->num_sizes, pwgsize = p->pc->sizes, val = attr->values;
|
||||
i > 0;
|
||||
i --, pwgsize ++)
|
||||
{
|
||||
/*
|
||||
* Start by adding the page size without source or type...
|
||||
*/
|
||||
|
||||
ppdMarkOption(ppd, "PageSize", pwgsize->map.ppd);
|
||||
|
||||
val->collection = new_media_col(pwgsize, NULL, NULL);
|
||||
val ++;
|
||||
|
||||
/*
|
||||
* Then add the specific, supported combinations of size, source, and
|
||||
* type...
|
||||
*/
|
||||
|
||||
if (p->pc->num_sources > 0)
|
||||
{
|
||||
for (j = p->pc->num_sources, pwgsource = p->pc->sources;
|
||||
j > 0;
|
||||
j --, pwgsource ++)
|
||||
{
|
||||
ppdMarkOption(ppd, "InputSlot", pwgsource->ppd);
|
||||
|
||||
if (p->pc->num_types > 0)
|
||||
{
|
||||
for (k = p->pc->num_types, pwgtype = p->pc->types;
|
||||
k > 0;
|
||||
k --, pwgtype ++)
|
||||
{
|
||||
if (!ppdMarkOption(ppd, "MediaType", pwgtype->ppd))
|
||||
{
|
||||
val->collection = new_media_col(pwgsize, pwgsource->pwg,
|
||||
pwgtype->pwg);
|
||||
val ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!ppdConflicts(ppd))
|
||||
{
|
||||
val->collection = new_media_col(pwgsize, pwgsource->pwg, NULL);
|
||||
val ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (p->pc->num_types > 0)
|
||||
{
|
||||
for (j = p->pc->num_types, pwgtype = p->pc->types;
|
||||
j > 0;
|
||||
j --, pwgtype ++)
|
||||
{
|
||||
if (!ppdMarkOption(ppd, "MediaType", pwgtype->ppd))
|
||||
{
|
||||
val->collection = new_media_col(pwgsize, NULL, pwgtype->pwg);
|
||||
val ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Adding each page size without source or type...
|
||||
* Update the number of media-col-database values...
|
||||
*/
|
||||
|
||||
for (i = 0, pwgsize = p->pc->sizes; i < p->pc->num_sizes; i ++, pwgsize ++)
|
||||
{
|
||||
ipp_t *col = new_media_col(pwgsize);
|
||||
|
||||
ippSetCollection(p->ppd_attrs, &attr, i, col);
|
||||
ippDelete(col);
|
||||
}
|
||||
attr->num_values = val - attr->values;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4970,7 +5060,9 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
*/
|
||||
|
||||
static ipp_t * /* O - Collection value */
|
||||
new_media_col(pwg_size_t *size) /* I - media-size/margin values */
|
||||
new_media_col(pwg_size_t *size, /* I - media-size/margin values */
|
||||
const char *source, /* I - media-source value */
|
||||
const char *type) /* I - media-type value */
|
||||
{
|
||||
ipp_t *media_col, /* Collection value */
|
||||
*media_size; /* media-size value */
|
||||
@@ -4979,15 +5071,29 @@ new_media_col(pwg_size_t *size) /* I - media-size/margin values */
|
||||
media_col = ippNew();
|
||||
|
||||
media_size = ippNew();
|
||||
ippAddInteger(media_size, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "x-dimension", size->width);
|
||||
ippAddInteger(media_size, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "y-dimension", size->length);
|
||||
ippAddInteger(media_size, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"x-dimension", size->width);
|
||||
ippAddInteger(media_size, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"y-dimension", size->length);
|
||||
ippAddCollection(media_col, IPP_TAG_PRINTER, "media-size", media_size);
|
||||
ippDelete(media_size);
|
||||
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-bottom-margin", size->bottom);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-left-margin", size->left);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-right-margin", size->right);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "media-top-margin", size->top);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"media-bottom-margin", size->bottom);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"media-left-margin", size->left);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"media-right-margin", size->right);
|
||||
ippAddInteger(media_col, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
|
||||
"media-top-margin", size->top);
|
||||
|
||||
if (source)
|
||||
ippAddString(media_col, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "media-source",
|
||||
NULL, source);
|
||||
|
||||
if (type)
|
||||
ippAddString(media_col, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "media-type",
|
||||
NULL, type);
|
||||
|
||||
return (media_col);
|
||||
}
|
||||
|
||||
+1
-10
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Server start/stop routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -176,15 +176,6 @@ cupsdStopServer(void)
|
||||
cupsdDestroyProfile(DefaultProfile);
|
||||
DefaultProfile = NULL;
|
||||
|
||||
/*
|
||||
* Expire subscriptions and clean out old jobs...
|
||||
*/
|
||||
|
||||
cupsdExpireSubscriptions(NULL, NULL);
|
||||
|
||||
if (JobHistoryUpdate)
|
||||
cupsdCleanJobs();
|
||||
|
||||
/*
|
||||
* Write out any dirty files...
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Subscription routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -652,9 +652,6 @@ cupsdExpireSubscriptions(
|
||||
time_t curtime; /* Current time */
|
||||
|
||||
|
||||
if (cupsArrayCount(Subscriptions) == 0)
|
||||
return;
|
||||
|
||||
curtime = time(NULL);
|
||||
update = 0;
|
||||
|
||||
|
||||
+7
-48
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Scheduler control program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2019 by Apple Inc.
|
||||
* Copyright 2007-2018 by Apple Inc.
|
||||
* Copyright 2006-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -36,47 +36,11 @@ int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line args */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
int i, j, /* Looping vars */
|
||||
int i, /* Looping var */
|
||||
num_settings; /* Number of settings */
|
||||
cups_option_t *settings, /* Settings */
|
||||
*setting; /* Current setting */
|
||||
cups_option_t *settings; /* Settings */
|
||||
const char *opt; /* Current option character */
|
||||
http_t *http; /* Connection to server */
|
||||
static const char * const disallowed[] =
|
||||
{ /* List of disallowed directives for cupsd.conf */
|
||||
"AccessLog",
|
||||
"CacheDir",
|
||||
"ConfigFilePerm",
|
||||
"DataDir",
|
||||
"DocumentRoot",
|
||||
"ErrorLog",
|
||||
"FatalErrors",
|
||||
"FileDevice",
|
||||
"FontPath",
|
||||
"Group",
|
||||
"Listen",
|
||||
"LogFilePerm",
|
||||
"LPDConfigFile",
|
||||
"PageLog",
|
||||
"PassEnv",
|
||||
"Port",
|
||||
"Printcap",
|
||||
"PrintcapFormat",
|
||||
"RemoteRoot",
|
||||
"RequestRoot",
|
||||
"ServerBin",
|
||||
"ServerCertificate",
|
||||
"ServerKey",
|
||||
"ServerKeychain",
|
||||
"ServerRoot",
|
||||
"SetEnv",
|
||||
"SMBConfigFile",
|
||||
"StateDir",
|
||||
"SystemGroup",
|
||||
"SystemGroupAuthKey",
|
||||
"TempDir",
|
||||
"User"
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
@@ -164,16 +128,11 @@ main(int argc, /* I - Number of command-line args */
|
||||
usage(argv[i]);
|
||||
}
|
||||
|
||||
for (i = num_settings, setting = settings; i > 0; i --, setting ++)
|
||||
if (cupsGetOption("Listen", num_settings, settings) ||
|
||||
cupsGetOption("Port", num_settings, settings))
|
||||
{
|
||||
for (j = 0; j < (int)(sizeof(disallowed) / sizeof(disallowed[0])); j ++)
|
||||
{
|
||||
if (!_cups_strcasecmp(setting->name, disallowed[j]))
|
||||
{
|
||||
_cupsLangPrintf(stderr, _("cupsctl: Cannot set %s directly."), disallowed[j]);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
_cupsLangPuts(stderr, _("cupsctl: Cannot set Listen or Port directly."));
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+12
-18
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* "lpadmin" command for CUPS.
|
||||
*
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 2007-2018 by Apple Inc.
|
||||
* Copyright © 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1140,7 +1140,6 @@ enable_printer(http_t *http, /* I - Server connection */
|
||||
|
||||
request = ippNewRequest(IPP_OP_ENABLE_PRINTER);
|
||||
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, "localhost", ippPort(), "/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());
|
||||
|
||||
@@ -1195,7 +1194,9 @@ get_printer_ppd(
|
||||
int port; /* Port number */
|
||||
static const char * const pattrs[] = /* Attributes to use */
|
||||
{
|
||||
"all",
|
||||
"job-template",
|
||||
"printer-defaults",
|
||||
"printer-description",
|
||||
"media-col-database"
|
||||
};
|
||||
|
||||
@@ -1386,6 +1387,12 @@ set_printer_options(
|
||||
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());
|
||||
|
||||
if (enable)
|
||||
{
|
||||
ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", IPP_PSTATE_IDLE);
|
||||
ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the options...
|
||||
*/
|
||||
@@ -1418,13 +1425,6 @@ set_printer_options(
|
||||
ppdfile = NULL;
|
||||
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
|
||||
|
||||
if (enable)
|
||||
{
|
||||
ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", IPP_PSTATE_IDLE);
|
||||
ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
|
||||
}
|
||||
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
|
||||
|
||||
if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)
|
||||
@@ -1450,7 +1450,6 @@ set_printer_options(
|
||||
/* Status code */
|
||||
|
||||
_cupsLangPrintf(stderr, _("lpadmin: Unable to open PPD \"%s\": %s on line %d."), ppdfile, ppdErrorString(status), linenum);
|
||||
return (1);
|
||||
}
|
||||
|
||||
ppdMarkDefaults(ppd);
|
||||
@@ -1488,7 +1487,6 @@ set_printer_options(
|
||||
(boolval = cupsGetOption("cupsIPPSupplies", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ppdchanged = 1;
|
||||
wrote_ipp_supplies = 1;
|
||||
cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
|
||||
(!_cups_strcasecmp(boolval, "true") ||
|
||||
@@ -1499,7 +1497,6 @@ set_printer_options(
|
||||
(boolval = cupsGetOption("cupsSNMPSupplies", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ppdchanged = 1;
|
||||
wrote_snmp_supplies = 1;
|
||||
cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
|
||||
(!_cups_strcasecmp(boolval, "true") ||
|
||||
@@ -1560,8 +1557,6 @@ set_printer_options(
|
||||
(boolval = cupsGetOption("cupsIPPSupplies", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ppdchanged = 1;
|
||||
|
||||
cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
|
||||
(!_cups_strcasecmp(boolval, "true") ||
|
||||
!_cups_strcasecmp(boolval, "yes") ||
|
||||
@@ -1572,8 +1567,6 @@ set_printer_options(
|
||||
(boolval = cupsGetOption("cupsSNMPSupplies", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ppdchanged = 1;
|
||||
|
||||
cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
|
||||
(!_cups_strcasecmp(boolval, "true") ||
|
||||
!_cups_strcasecmp(boolval, "yes") ||
|
||||
@@ -1588,7 +1581,8 @@ set_printer_options(
|
||||
* Do the request...
|
||||
*/
|
||||
|
||||
ippDelete(cupsDoFileRequest(http, request, "/admin/", ppdchanged ? tempfile : file));
|
||||
ippDelete(cupsDoFileRequest(http, request, "/admin/",
|
||||
ppdchanged ? tempfile : file));
|
||||
|
||||
/*
|
||||
* Clean up temp files... (TODO: catch signals in case we CTRL-C during
|
||||
|
||||
+1
-14
@@ -480,32 +480,19 @@ list_group(ppd_file_t *ppd, /* I - PPD file */
|
||||
static void
|
||||
list_options(cups_dest_t *dest) /* I - Destination to list */
|
||||
{
|
||||
http_t *http; /* Connection to destination */
|
||||
char resource[1024]; /* Resource path */
|
||||
int i; /* Looping var */
|
||||
const char *filename; /* PPD filename */
|
||||
ppd_file_t *ppd; /* PPD data */
|
||||
ppd_group_t *group; /* Current group */
|
||||
|
||||
|
||||
if ((http = cupsConnectDest(dest, CUPS_DEST_FLAGS_NONE, 30000, NULL, resource, sizeof(resource), NULL, NULL)) == NULL)
|
||||
if ((filename = cupsGetPPD(dest->name)) == NULL)
|
||||
{
|
||||
_cupsLangPrintf(stderr, _("lpoptions: Unable to get PPD file for %s: %s"),
|
||||
dest->name, cupsLastErrorString());
|
||||
return;
|
||||
}
|
||||
|
||||
if ((filename = cupsGetPPD2(http, dest->name)) == NULL)
|
||||
{
|
||||
httpClose(http);
|
||||
|
||||
_cupsLangPrintf(stderr, _("lpoptions: Unable to get PPD file for %s: %s"),
|
||||
dest->name, cupsLastErrorString());
|
||||
return;
|
||||
}
|
||||
|
||||
httpClose(http);
|
||||
|
||||
if ((ppd = ppdOpenFile(filename)) == NULL)
|
||||
{
|
||||
unlink(filename);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS und das CUPS-Logo sind Warenzeichen der <a href="https://www.apple.com/">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. Alle Rechte vorbehalten.</div>
|
||||
<div class="footer">CUPS und das CUPS-Logo sind Warenzeichen der <a href="https://www.apple.com/">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. Alle Rechte vorbehalten.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2019 Apple Inc. Todos los derechos reservados.</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2018 Apple Inc. Todos los derechos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS et le logo CUPS sont des marques déposées de <a href="http://www.apple.com">Apple Inc.</a> CUPS est sous copyright 2007-2019 Apple Inc. Tous droits réservés.</div>
|
||||
<div class="footer">CUPS et le logo CUPS sont des marques déposées de <a href="http://www.apple.com">Apple Inc.</a> CUPS est sous copyright 2007-2018 Apple Inc. Tous droits réservés.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. All rights reserved.</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS e sua logo são marcas registradas da <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. Todos os direitos reservados.</div>
|
||||
<div class="footer">CUPS e sua logo são marcas registradas da <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. Todos os direitos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS, а так же логотип CUPS являются зарегистрированными торговыми марками
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2019) компании Apple Inc. Все права защищены.</div>
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2018) компании Apple Inc. Все права защищены.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2019 Apple Inc. All rights reserved.</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2018 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+6
-72
@@ -3,7 +3,7 @@
|
||||
# Perform the complete set of IPP compliance tests specified in the
|
||||
# CUPS Software Test Plan.
|
||||
#
|
||||
# Copyright © 2007-2019 by Apple Inc.
|
||||
# Copyright © 2007-2018 by Apple Inc.
|
||||
# Copyright © 1997-2007 by Easy Software Products, all rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -482,14 +482,6 @@ else
|
||||
encryption=""
|
||||
fi
|
||||
|
||||
if test $testtype = 0; then
|
||||
jobhistory="30m"
|
||||
jobfiles="5m"
|
||||
else
|
||||
jobhistory="30"
|
||||
jobfiles="Off"
|
||||
fi
|
||||
|
||||
cat >$BASE/cupsd.conf <<EOF
|
||||
StrictConformance Yes
|
||||
Browsing Off
|
||||
@@ -500,8 +492,8 @@ MaxLogSize 0
|
||||
AccessLogLevel actions
|
||||
LogLevel $loglevel
|
||||
LogTimeFormat usecs
|
||||
PreserveJobHistory $jobhistory
|
||||
PreserveJobFiles $jobfiles
|
||||
PreserveJobHistory Yes
|
||||
PreserveJobFiles 5m
|
||||
<Policy default>
|
||||
<Limit All>
|
||||
Order Allow,Deny
|
||||
@@ -828,70 +820,12 @@ else
|
||||
echo PASS
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Perform job history test...
|
||||
#
|
||||
|
||||
echo $ac_n "Starting history test: $ac_c"
|
||||
echo "" >>$strfile
|
||||
echo "`date '+[%d/%b/%Y:%H:%M:%S %z]'` \"5.11-history\":" >>$strfile
|
||||
|
||||
echo " lp -d Test1 testfile.jpg" >>$strfile
|
||||
|
||||
$runcups ../systemv/lp -d Test1 testfile.jpg 2>&1 >>$strfile
|
||||
if test $? != 0; then
|
||||
echo "FAIL (unable to queue test job)"
|
||||
echo " FAILED" >>$strfile
|
||||
fail=`expr $fail + 1`
|
||||
else
|
||||
echo "PASS"
|
||||
echo " PASSED" >>$strfile
|
||||
|
||||
./waitjobs.sh >>$strfile
|
||||
|
||||
echo $ac_n "Verifying that history still exists: $ac_c"
|
||||
|
||||
echo " ls -l $BASE/spool" >>$strfile
|
||||
count=`ls -1 $BASE/spool | wc -l`
|
||||
if test $count = 1; then
|
||||
echo "FAIL"
|
||||
echo " FAILED (job control files not present)" >>$strfile
|
||||
ls -l $BASE/spool >>$strfile
|
||||
fail=`expr $fail + 1`
|
||||
else
|
||||
echo "PASS"
|
||||
echo " PASSED" >>$strfile
|
||||
|
||||
echo $ac_n "Waiting for job history to expire: $ac_c"
|
||||
echo "" >>$strfile
|
||||
echo " sleep 35" >>$strfile
|
||||
sleep 35
|
||||
|
||||
echo " lpstat" >>$strfile
|
||||
$runcups ../systemv/lpstat 2>&1 >>$strfile
|
||||
|
||||
echo " ls -l $BASE/spool" >>$strfile
|
||||
count=`ls -1 $BASE/spool | wc -l`
|
||||
if test $count != 1; then
|
||||
echo "FAIL"
|
||||
echo " FAILED (job control files still present)" >>$strfile
|
||||
ls -l $BASE/spool >>$strfile
|
||||
fail=`expr $fail + 1`
|
||||
else
|
||||
echo "PASS"
|
||||
echo " PASSED" >>$strfile
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " </pre>" >>$strfile
|
||||
|
||||
#
|
||||
# Stop the server...
|
||||
#
|
||||
|
||||
echo " </pre>" >>$strfile
|
||||
|
||||
kill $cupsd
|
||||
wait $cupsd
|
||||
cupsdstatus=$?
|
||||
@@ -952,7 +886,7 @@ fi
|
||||
|
||||
# Paged printed on Test3
|
||||
count=`$GREP '^Test3 ' $BASE/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
|
||||
expected=2
|
||||
expected=4
|
||||
if test $count != $expected; then
|
||||
echo "FAIL: Printer 'Test3' produced $count page(s), expected $expected."
|
||||
echo " <p>FAIL: Printer 'Test3' produced $count page(s), expected $expected.</p>" >>$strfile
|
||||
@@ -964,7 +898,7 @@ fi
|
||||
|
||||
# Requests logged
|
||||
count=`wc -l $BASE/log/access_log | awk '{print $1}'`
|
||||
expected=`expr 35 + 18 + 30 + $pjobs \* 8 + $pprinters \* $pjobs \* 4 + 2`
|
||||
expected=`expr 35 + 18 + 30 + $pjobs \* 8 + $pprinters \* $pjobs \* 4`
|
||||
if test $count != $expected; then
|
||||
echo "FAIL: $count requests logged, expected $expected."
|
||||
echo " <p>FAIL: $count requests logged, expected $expected.</p>" >>$strfile
|
||||
|
||||
+2
-9
@@ -94,8 +94,8 @@ typedef unsigned long useconds_t;
|
||||
* Version of software...
|
||||
*/
|
||||
|
||||
#define CUPS_SVERSION "CUPS v2.2.12"
|
||||
#define CUPS_MINIMAL "CUPS/2.2.12"
|
||||
#define CUPS_SVERSION "CUPS v2.2.9"
|
||||
#define CUPS_MINIMAL "CUPS/2.2.9"
|
||||
|
||||
|
||||
/*
|
||||
@@ -379,13 +379,6 @@ typedef unsigned long useconds_t;
|
||||
#define HAVE_SSL 1
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_fips140_set_mode function?
|
||||
*/
|
||||
|
||||
/* #undef HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_transport_set_pull_timeout_function function?
|
||||
*/
|
||||
|
||||
+2
-9
@@ -22,8 +22,8 @@
|
||||
* Version of software...
|
||||
*/
|
||||
|
||||
#define CUPS_SVERSION "CUPS v2.2.12"
|
||||
#define CUPS_MINIMAL "CUPS/2.2.12"
|
||||
#define CUPS_SVERSION "CUPS v2.2.9"
|
||||
#define CUPS_MINIMAL "CUPS/2.2.9"
|
||||
|
||||
|
||||
/*
|
||||
@@ -309,13 +309,6 @@
|
||||
#define HAVE_SSL 1
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_fips140_set_mode function?
|
||||
*/
|
||||
|
||||
/* #undef HAVE_GNUTLS_FIPS140_SET_MODE */
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_transport_set_pull_timeout_function function?
|
||||
*/
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário