Comparar commits
6 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 00d0ae86f6 | |||
| a215cf8413 | |||
| 4ef75dec45 | |||
| 86243a7551 | |||
| b93671244e | |||
| 5d2cc5d32d |
+155
-1
@@ -1,6 +1,160 @@
|
||||
CHANGES.txt - 2.0b1 - 2014-07-30
|
||||
CHANGES.txt - 2.0.4 - 2015-07-31
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V2.0.4
|
||||
|
||||
- Fixed a bug in cupsRasterWritePixels (STR #4650)
|
||||
- Fixed redirection in the web interface (STR #4538)
|
||||
- The IPP backend did not respond to side-channel requests (STR #4645)
|
||||
- The scheduler did not start all pending jobs at once (STR #4646)
|
||||
- The web search incorrectly searched time-at-xxx values (STR #4652)
|
||||
- Fixed an RPM spec file issue (STR #4657)
|
||||
- The scheduler incorrectly started jobs while canceling multiple jobs
|
||||
(STR #4648)
|
||||
- Fixed processing of server overrides without port numbers (STR #4675)
|
||||
- Documentation changes (STR #4651, STR #4674)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.3
|
||||
|
||||
- Security: Fixed CERT VU #810572 exploiting the dynamic linker
|
||||
(STR #4609)
|
||||
- Security: The scheduler could hang with malformed gzip data
|
||||
(STR #4602)
|
||||
- Restored missing generic printer icon file (STR #4587)
|
||||
- Fixed logging of configuration errors to show up as errors (STR #4582)
|
||||
- Fixed potential buffer overflows in raster code and filters
|
||||
(STR #4598, STR #4599, STR #4600, STR #4601)
|
||||
- Fixed a gzip processing bug (#4602)
|
||||
- Fixed <Limit> inside <Location> (STR #4575)
|
||||
- Fixed lpadmin when both -m and -o are used (STR #4578)
|
||||
- The web interface always showed support for 2-sided printing
|
||||
(STR #4595)
|
||||
- cupsRasterReadHeader did not fully validate the raster header
|
||||
(STR #4596)
|
||||
- The rastertopwg filter did not check for truncated input (STR #4597)
|
||||
- The cups-lpd mini-daemon did not check for request parameters
|
||||
(STR #4603)
|
||||
- The scheduler could get caught in a busy loop (STR #4605)
|
||||
- The sample Epson driver could crash (STR #4616)
|
||||
- The IPP backend now correctly monitors jobs
|
||||
(<rdar://problem/20495955>)
|
||||
- The ppdhtml and ppdpo utilities crashed when the -D option was used
|
||||
before a driver information file (STR #4627)
|
||||
- ippfind incorrectly substituted "=port" for service_port.
|
||||
- The IPP/1.1 test file did not handle the initial print job
|
||||
completing early (STR #4576)
|
||||
- Fixed a memory leak in cupsConnectDest (STR #4634)
|
||||
- PWG Raster Format output contained invalid ImageBox values
|
||||
(<rdar://problem/21144309>)
|
||||
- Added Russian translation (STR #4577)
|
||||
- Added German translation (STR #4635)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.2
|
||||
|
||||
- Security: cupsRasterReadPixels buffer overflow with invalid page
|
||||
header and compressed raster data (STR #4551)
|
||||
- Command-line programs were not localized on Mac OS X
|
||||
(<rdar://problem/14546232>)
|
||||
- The scheduler incorrectly cleared the MakeModel string in the
|
||||
printers.conf file after a restart (<rdar://problem/16827518>)
|
||||
- CUPS did not compile with older versions of GNU TLS (STR #4527)
|
||||
- CUPS did not compile without Avahi or mDNSResponder (STR #4523)
|
||||
- ippLength() did not return the correct length for IPP_TAG_CONST
|
||||
string values.
|
||||
- The scheduler incorrectly aborted jobs after a job was restarted
|
||||
(<rdar://problem/19129387>)
|
||||
- The cups-files.conf file contained the old ServerCertificate/Key
|
||||
directives instead of ServerKeychain.
|
||||
- Fixed builds when no SSL/TLS library is available, or when explicitly
|
||||
disabled (STR #4531)
|
||||
- Fixed an OpenBSD charset transcoding issue.
|
||||
- Fixed USB printing on OpenBSD (STR #4525)
|
||||
- The --without-xinetd configure option did not work (STR #4542)
|
||||
- Backends needing to load OS X kernel extensions did not work
|
||||
(<rdar://problem/19015679>)
|
||||
- Mapping of PPD keywords to IPP keywords did not work if the PPD
|
||||
keyword was already an IPP keyword (<rdar://problem/19121005>)
|
||||
- cupsGetPPD* sent bad requests (STR #4567)
|
||||
- ippserver used the wrong temporary directory on Windows (STR #4547)
|
||||
- ippserver did not handle Bonjour registrations properly (STR #4548)
|
||||
- The scheduler could crash during shutdown if Avahi was shutdown
|
||||
first (STR #4550)
|
||||
- Added a USB quirk rule for Intermec printers (STR #4553)
|
||||
- The scheduler did not always log which configuration file had the
|
||||
error (STR #4559)
|
||||
- The ippfind and ipptool programs now correctly match hostnames with
|
||||
trailing dots (STR #4563)
|
||||
- The ipptool timeout option did not work (STR #4515)
|
||||
- Fixed several issues with client.conf, CUPS_SERVER, and the "-h"
|
||||
option of most commands (STR #4528)
|
||||
- Another change for OpenBSD (STR #4526)
|
||||
- Added Japanese localization (STR #4524)
|
||||
- Documentation changes (STR #4569)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.1
|
||||
|
||||
- Security: SSLv3 is now disabled by default to protect against the
|
||||
POODLE attack (STR #4476)
|
||||
- Printer sharing did not work when systemd was being used (STR #4497)
|
||||
- cupsGetPPD* would return a symlink to the PPD in /etc/cups/ppd even if
|
||||
it was not readable by the user (STR #4500)
|
||||
- The web interface now protects against frame "click-jacking" attacks
|
||||
(STR #4492)
|
||||
- Fixed a crash in ippAttributeString (<rdar://problem/17903871>)
|
||||
- Fixed a crash in the scheduler on Linux/*BSD if colord was not running
|
||||
(STR #4496)
|
||||
- Fixed a random crash in the scheduler when not using systemd
|
||||
(STR #4484)
|
||||
- Added systemd support for cups-lpd (STR #4493)
|
||||
- The scheduler did not honor the FatalErrors directive for mis-
|
||||
configured Group and SystemGroup values (STR #4495)
|
||||
- The network backends no longer report waste-receptacle conditions when
|
||||
using SNMP (STR #4499)
|
||||
- The IPP backend did not work with some configurations of Windows
|
||||
(STR #4503)
|
||||
- RPMs did not build (STR #4490)
|
||||
- Added a USB quirk rule for the Brother HL-1250 (STR #4519)
|
||||
- Fixed compiles on unsupported platforms (STR #4510)
|
||||
- "cancel -a" did not cancel all jobs on all destinations (STR #4513)
|
||||
- The web interface did not work on OpenBSD (STR #4496)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.0
|
||||
|
||||
- The scheduler did not preserve listener sockets from launchd or
|
||||
systemd after a restart (<rdar://problem/18112848>)
|
||||
- Added some USB quirk rules for the libusb-based USB backend
|
||||
(STR #4482)
|
||||
- Spanish localization update (STR #4487)
|
||||
- Updated documentation for 2.0.0 release.
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0rc1
|
||||
|
||||
- Documentation updates (STR #4464)
|
||||
- The scheduler now monitors the AC power status on OS X, allowing for
|
||||
"sleep printing" when sharing printers (<rdar://problem/17325852>)
|
||||
- The scheduler incorrectly called launch_activate_socket multiple times
|
||||
on OS X (<rdar://problem/17523218>)
|
||||
- The ippserver test program now passes the IPP Everywhere self-
|
||||
certification tests (STR #4101)
|
||||
- Relaxed the new OS X filter sandbox slightly (STR #4471,
|
||||
<rdar://problem/17483959>)
|
||||
- Dropped the old Epson Stylus Color/Photo sample drivers since they
|
||||
don't work with any current printers and there are free alternatives
|
||||
that produce much better output (<rdar://problem/18036889>)
|
||||
- Log and configuration files that are not world-readable are again
|
||||
accessible via the web interface (STR #4461)
|
||||
- PPD files are now created using the permissions specified by the
|
||||
ConfigFilePerm directive.
|
||||
- Fixed RPM build issues (STR #4459)
|
||||
- Fixed the spinner image and restart page when reconfiguring the
|
||||
scheduler through the web interface (STR #4475)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0b1
|
||||
|
||||
- Added a "--list-filters" option to the cupsfilter command (STR #4325)
|
||||
|
||||
+10
-7
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v2.0b1 - 2014-07-30
|
||||
INSTALL - CUPS v2.0.4 - 2015-07-31
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
@@ -98,6 +98,11 @@ CONFIGURATION
|
||||
and diagnose a variety of common problems - use the "--enable-unit-tests"
|
||||
configure option to run them at build time.
|
||||
|
||||
On OS X, use the "--with-archflags" option to build with the correct set of
|
||||
architectures:
|
||||
|
||||
./configure --with-archflags="-arch i386 -arch x86_64" ...
|
||||
|
||||
Once you have configured things, just type:
|
||||
|
||||
make ENTER
|
||||
@@ -136,6 +141,10 @@ INSTALLING THE SOFTWARE
|
||||
|
||||
gmake install ENTER
|
||||
|
||||
Use the BUILDROOT variable to install to an alternate root directory:
|
||||
|
||||
make BUILDROOT=/some/other/root/directory install ENTER
|
||||
|
||||
You can also build binary packages that can be installed on other machines
|
||||
using the RPM spec file ("packaging/cups.spec") or EPM list file
|
||||
("packaging/cups.list"). The latter also supports building of binary RPMs,
|
||||
@@ -165,17 +174,11 @@ CREATING BINARY DISTRIBUTIONS WITH EPM
|
||||
following:
|
||||
|
||||
epm - Builds a script + tarfile package
|
||||
aix - Builds an AIX package
|
||||
bsd - Builds a *BSD package
|
||||
deb - Builds a Debian package
|
||||
depot - Builds a HP-UX package (also swinstall)
|
||||
inst - Builds an IRIX package (also tardist)
|
||||
pkg - Builds a Solaris package
|
||||
rpm - Builds a RPM package
|
||||
setld - Build a Tru64 UNIX package
|
||||
slackware - Build a Slackware package
|
||||
swinstall - Build a HP-UX package (also depot)
|
||||
tardist - Builds an IRIX package (also inst)
|
||||
|
||||
|
||||
GETTING DEBUG LOGGING FROM CUPS
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 12074 2014-07-31 01:10:14Z msweet $"
|
||||
# "$Id: Makefile 12415 2015-01-21 00:03:08Z msweet $"
|
||||
#
|
||||
# Top-level Makefile for CUPS.
|
||||
#
|
||||
@@ -105,7 +105,7 @@ distclean: clean
|
||||
$(RM) doc/index.html
|
||||
$(RM) man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man
|
||||
$(RM) packaging/cups.list
|
||||
$(RM) scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket
|
||||
$(RM) scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket
|
||||
$(RM) templates/header.tmpl
|
||||
-$(RM) doc/*/index.html
|
||||
-$(RM) templates/*/header.tmpl
|
||||
@@ -319,7 +319,7 @@ sloc:
|
||||
|
||||
EPMFLAGS = -v --output-dir dist $(EPMARCH)
|
||||
|
||||
bsd deb pkg slackware tardist:
|
||||
bsd deb pkg slackware:
|
||||
epm $(EPMFLAGS) -f $@ cups packaging/cups.list
|
||||
|
||||
epm:
|
||||
@@ -348,5 +348,5 @@ dist: all
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 12074 2014-07-31 01:10:14Z msweet $".
|
||||
# End of "$Id: Makefile 12415 2015-01-21 00:03:08Z msweet $".
|
||||
#
|
||||
|
||||
+9
-33
@@ -1,19 +1,6 @@
|
||||
README - CUPS v2.0b1 - 2014-07-30
|
||||
README - CUPS v2.0.4 - 2015-07-31
|
||||
---------------------------------
|
||||
|
||||
********************************************************************************
|
||||
********************************************************************************
|
||||
******** ********
|
||||
******** ********
|
||||
******** THIS IS BETA-RELEASE SOFTWARE AND SHOULD NOT BE USED ON ********
|
||||
******** PRODUCTION SYSTEMS. ********
|
||||
******** ********
|
||||
******** ********
|
||||
********************************************************************************
|
||||
********************************************************************************
|
||||
|
||||
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
|
||||
|
||||
@@ -54,10 +41,10 @@ READING THE DOCUMENTATION
|
||||
|
||||
GETTING SUPPORT AND OTHER RESOURCES
|
||||
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! We also provide many
|
||||
discussion forums which are available at:
|
||||
If you have problems, READ THE DOCUMENTATION FIRST! We also provide two
|
||||
mailing lists which are available at:
|
||||
|
||||
http://www.cups.org/newsgroups.php
|
||||
http://www.cups.org/lists.php
|
||||
|
||||
See the CUPS web site at "http://www.cups.org/" for other resources.
|
||||
|
||||
@@ -91,10 +78,6 @@ SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
----------------------------- ------------------------------
|
||||
Dymo Label Printers drv:///sample.drv/dymo.ppd
|
||||
Intellitech Intellibar drv:///sample.drv/intelbar.ppd
|
||||
EPSON Stylus Color Series drv:///sample.drv/stcolor.ppd
|
||||
EPSON Stylus Photo Series drv:///sample.drv/stphoto.ppd
|
||||
EPSON Stylus New Color Series drv:///sample.drv/stcolor2.ppd
|
||||
EPSON Stylus New Photo Series drv:///sample.drv/stphoto2.ppd
|
||||
EPSON 9-pin Series drv:///sample.drv/epson9.ppd
|
||||
EPSON 24-pin Series drv:///sample.drv/epson24.ppd
|
||||
Generic PCL Laser Printer drv:///sample.drv/generpcl.ppd
|
||||
@@ -126,11 +109,7 @@ SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
|
||||
lpadmin -p printername -E -v lpd://11.22.33.44/ -m ppd-name
|
||||
|
||||
The sample drivers provide basic printing capabilities, but generally do not
|
||||
exercise the full potential of the printers or CUPS. The CUPS web site
|
||||
provides links and drivers:
|
||||
|
||||
http://www.cups.org/ppd.php PPD files
|
||||
http://www.cups.org/links.php Links to other drivers
|
||||
exercise the full potential of the printers or CUPS.
|
||||
|
||||
|
||||
PRINTING FILES
|
||||
@@ -147,8 +126,8 @@ PRINTING FILES
|
||||
lpr -o media=A4 -o resolution=600dpi filename
|
||||
|
||||
CUPS recognizes many types of images files as well as PDF, PostScript,
|
||||
HP-GL/2, and text files, so you can print those files directly rather than
|
||||
through an application.
|
||||
and text files, so you can print those files directly rather than through
|
||||
an application.
|
||||
|
||||
If you have an application that generates output specifically for your
|
||||
printer then you need to use the "-oraw" or "-l" options:
|
||||
@@ -156,19 +135,16 @@ PRINTING FILES
|
||||
lp -o raw filename
|
||||
lpr -l filename
|
||||
|
||||
This will prevent the filters from misinterpreting your print
|
||||
file.
|
||||
This will prevent the filters from misinterpreting your print file.
|
||||
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2014 by Apple Inc. CUPS and the CUPS logo are
|
||||
CUPS is Copyright 2007-2015 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
This software is based in part on the work of the Independent JPEG Group.
|
||||
|
||||
CUPS is provided under the terms of version 2 of the GNU General Public
|
||||
License and GNU Library General Public License. This program is distributed
|
||||
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $"
|
||||
* "$Id: dnssd.c 12660 2015-05-22 19:09:57Z msweet $"
|
||||
*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
* Copyright 2008-2014 by Apple Inc.
|
||||
* Copyright 2008-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -318,7 +318,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if ((simple_poll = avahi_simple_poll_new()) == NULL)
|
||||
{
|
||||
fputs("DEBUG: Unable to create Avahi simple poll object.\n", stderr);
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
avahi_simple_poll_set_func(simple_poll, poll_callback, NULL);
|
||||
@@ -328,7 +328,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (!client)
|
||||
{
|
||||
fputs("DEBUG: Unable to create Avahi client.\n", stderr);
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
browsers = 6;
|
||||
@@ -1330,5 +1330,5 @@ unquote(char *dst, /* I - Destination buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $".
|
||||
* End of "$Id: dnssd.c 12660 2015-05-22 19:09:57Z msweet $".
|
||||
*/
|
||||
|
||||
+16
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $"
|
||||
* "$Id: ipp.c 12759 2015-06-24 20:06:30Z msweet $"
|
||||
*
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
@@ -64,6 +64,7 @@ typedef struct _cups_monitor_s /**** Monitoring data ****/
|
||||
version, /* IPP version */
|
||||
job_id, /* Job ID for submitted job */
|
||||
job_reasons, /* Job state reasons bits */
|
||||
create_job, /* Support Create-Job? */
|
||||
get_job_attrs; /* Support Get-Job-Attributes? */
|
||||
const char *job_name; /* Job name for submitted job */
|
||||
http_encryption_t encryption; /* Use encryption? */
|
||||
@@ -1396,6 +1397,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
monitor.port = port;
|
||||
monitor.version = version;
|
||||
monitor.job_id = 0;
|
||||
monitor.create_job = create_job;
|
||||
monitor.get_job_attrs = get_job_attrs;
|
||||
monitor.encryption = cupsEncryption();
|
||||
monitor.job_state = IPP_JOB_PENDING;
|
||||
@@ -1560,6 +1562,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
FD_ZERO(&input);
|
||||
FD_SET(fd, &input);
|
||||
FD_SET(snmp_fd, &input);
|
||||
FD_SET(CUPS_SC_FD, &input);
|
||||
|
||||
while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
|
||||
NULL) <= 0 && !job_canceled);
|
||||
@@ -2336,6 +2339,15 @@ monitor_printer(
|
||||
if (cupsLastError() <= IPP_OK_CONFLICT)
|
||||
password_tries = 0;
|
||||
|
||||
if (monitor->job_id == 0 && monitor->create_job)
|
||||
{
|
||||
/*
|
||||
* No job-id yet, so continue...
|
||||
*/
|
||||
|
||||
goto monitor_disconnect;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the status of the job itself...
|
||||
*/
|
||||
@@ -2485,6 +2497,8 @@ monitor_printer(
|
||||
* Disconnect from the printer - we'll reconnect on the next poll...
|
||||
*/
|
||||
|
||||
monitor_disconnect:
|
||||
|
||||
_httpDisconnect(http);
|
||||
}
|
||||
|
||||
@@ -3756,5 +3770,5 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
}
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $".
|
||||
* End of "$Id: ipp.c 12759 2015-06-24 20:06:30Z msweet $".
|
||||
*/
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: network.c 11970 2014-07-01 14:35:25Z msweet $"
|
||||
* "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* Common backend network APIs for CUPS.
|
||||
*
|
||||
@@ -175,13 +175,13 @@ backendNetworkSideCB(
|
||||
{
|
||||
case CUPS_ASN1_BOOLEAN :
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%d", packet.object_value.boolean);
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_INTEGER :
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%d",
|
||||
packet.object_value.integer);
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_BIT_STRING :
|
||||
@@ -193,13 +193,13 @@ backendNetworkSideCB(
|
||||
|
||||
memcpy(dataptr, packet.object_value.string.bytes, i);
|
||||
|
||||
datalen += i;
|
||||
datalen += (int)i;
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_OID :
|
||||
_cupsSNMPOIDToString(packet.object_value.oid, dataptr,
|
||||
sizeof(data) - (size_t)(dataptr - data));
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_HEX_STRING :
|
||||
@@ -208,22 +208,22 @@ backendNetworkSideCB(
|
||||
dataptr < (data + sizeof(data) - 3);
|
||||
i ++, dataptr += 2)
|
||||
sprintf(dataptr, "%02X", packet.object_value.string.bytes[i]);
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_COUNTER :
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%u", packet.object_value.counter);
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_GAUGE :
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%u", packet.object_value.gauge);
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
case CUPS_ASN1_TIMETICKS :
|
||||
snprintf(dataptr, sizeof(data) - (size_t)(dataptr - data), "%u", packet.object_value.timeticks);
|
||||
datalen += strlen(dataptr);
|
||||
datalen += (int)strlen(dataptr);
|
||||
break;
|
||||
|
||||
default :
|
||||
@@ -304,5 +304,5 @@ backendNetworkSideCB(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: network.c 11970 2014-07-01 14:35:25Z msweet $".
|
||||
* End of "$Id: network.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -84,6 +84,9 @@
|
||||
# Canon, Inc. MF4150 Printer, https://bugs.launchpad.net/bugs/1160638
|
||||
0x04a9 0x26a3 no-reattach
|
||||
|
||||
# Brother Industries, Ltd HL-1250 Laser Printer, https://bugs.debian.org/712512
|
||||
0x04f9 0x0007 no-reattach
|
||||
|
||||
# Brother Industries, Ltd HL-1430 Laser Printer, https://bugs.launchpad.net/bugs/1038695
|
||||
0x04f9 0x001a no-reattach
|
||||
|
||||
@@ -215,3 +218,12 @@
|
||||
|
||||
# Lexmark E238 (STR #4448)
|
||||
0x043d 0x009a no-reattach
|
||||
|
||||
# Canon MX310 (STR #4482)
|
||||
0x04a9 0x1728 unidir
|
||||
|
||||
# Canon MX320 (STR #4482)
|
||||
0x04A9 0x1736 unidir
|
||||
|
||||
# All Intermec devices (STR #4553)
|
||||
0x067e no-reattach
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: snmp-supplies.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: snmp-supplies.c 12228 2014-10-21 13:42:05Z msweet $"
|
||||
*
|
||||
* SNMP supplies functions for CUPS.
|
||||
*
|
||||
@@ -297,6 +297,7 @@ backendSNMPSupplies(
|
||||
else
|
||||
new_supply_state |= CUPS_OPC_NEAR_EOL;
|
||||
break;
|
||||
#if 0 /* Because no two vendors report waste containers the same, disable SNMP reporting of same */
|
||||
case CUPS_TC_wasteInk :
|
||||
case CUPS_TC_wastePaper :
|
||||
case CUPS_TC_wasteToner :
|
||||
@@ -307,6 +308,7 @@ backendSNMPSupplies(
|
||||
else
|
||||
new_supply_state |= CUPS_WASTE_ALMOST_FULL;
|
||||
break;
|
||||
#endif /* 0 */
|
||||
case CUPS_TC_cleanerUnit :
|
||||
case CUPS_TC_fuserCleaningPad :
|
||||
if (percent <= 1)
|
||||
@@ -1096,5 +1098,5 @@ utf16_to_utf8(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: snmp-supplies.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: snmp-supplies.c 12228 2014-10-21 13:42:05Z msweet $".
|
||||
*/
|
||||
|
||||
+552
-403
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+11
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-libusb.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: usb-libusb.c 12349 2014-12-09 22:10:52Z msweet $"
|
||||
*
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
@@ -915,7 +915,7 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
write_endp = endp;
|
||||
}
|
||||
|
||||
if (write_endp >= 0)
|
||||
if (write_endp != 0xff)
|
||||
{
|
||||
/*
|
||||
* Save the best match so far...
|
||||
@@ -1451,9 +1451,14 @@ open_device(usb_printer_t *printer, /* I - Printer */
|
||||
else
|
||||
{
|
||||
printer->usblp_attached = 0;
|
||||
fprintf(stderr, "DEBUG: Failed to check whether %04x:%04x has the \"usblp\" kernel module attached\n",
|
||||
devdesc.idVendor, devdesc.idProduct);
|
||||
goto error;
|
||||
|
||||
if (errcode != LIBUSB_ERROR_NOT_SUPPORTED)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to check whether %04x:%04x has the \"usblp\" "
|
||||
"kernel module attached\n", devdesc.idVendor, devdesc.idProduct);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1999,6 +2004,6 @@ soft_reset_printer(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-libusb.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: usb-libusb.c 12349 2014-12-09 22:10:52Z msweet $".
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-unix.c 11342 2013-10-18 20:36:01Z msweet $"
|
||||
* "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* USB port backend for CUPS.
|
||||
*
|
||||
@@ -146,7 +146,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
tcgetattr(device_fd, &opts);
|
||||
|
||||
opts.c_lflag &= ~(ICANON | ECHO | ISIG); /* Raw mode */
|
||||
opts.c_lflag &= ~(unsigned)(ICANON | ECHO | ISIG); /* Raw mode */
|
||||
|
||||
/**** No options supported yet ****/
|
||||
|
||||
@@ -603,5 +603,5 @@ side_cb(int print_fd, /* I - Print file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-unix.c 11342 2013-10-18 20:36:01Z msweet $".
|
||||
* End of "$Id: usb-unix.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: admin.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: admin.c 12123 2014-08-28 14:24:45Z msweet $"
|
||||
*
|
||||
* Administration CGI for CUPS.
|
||||
*
|
||||
@@ -1897,7 +1897,7 @@ do_config_server(http_t *http) /* I - HTTP connection */
|
||||
}
|
||||
else
|
||||
{
|
||||
cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect");
|
||||
cgiSetVariable("refresh_page", "5;URL=/admin/");
|
||||
|
||||
cgiStartHTML(cgiText(_("Edit Configuration File")));
|
||||
cgiCopyTemplateLang("restart.tmpl");
|
||||
@@ -4198,5 +4198,5 @@ get_points(double number, /* I - Original number */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: admin.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: admin.c 12123 2014-08-28 14:24:45Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: help-index.c 12344 2014-12-09 21:36:11Z msweet $"
|
||||
*
|
||||
* Online help index routines for CUPS.
|
||||
*
|
||||
@@ -884,7 +884,7 @@ help_load_file(
|
||||
|
||||
|
||||
DEBUG_printf(("2help_load_file(hi=%p, filename=\"%s\", relative=\"%s\", "
|
||||
"mtime=%ld)", hi, filename, relative, mtime));
|
||||
"mtime=%ld)", hi, filename, relative, (long)mtime));
|
||||
|
||||
if ((fp = cupsFileOpen(filename, "r")) == NULL)
|
||||
return (-1);
|
||||
@@ -1306,5 +1306,5 @@ help_sort_words(help_word_t *w1, /* I - Second word */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: help-index.c 12344 2014-12-09 21:36:11Z msweet $".
|
||||
*/
|
||||
|
||||
+7
-18
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $"
|
||||
* "$Id: ipp-var.c 12769 2015-06-30 16:13:48Z msweet $"
|
||||
*
|
||||
* CGI <-> IPP variable routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -222,6 +222,9 @@ cgiGetIPPObjects(ipp_t *response, /* I - IPP response */
|
||||
break;
|
||||
|
||||
case IPP_TAG_INTEGER :
|
||||
if (!strncmp(ippGetName(attr), "time-at-", 8))
|
||||
break; /* Ignore time-at-xxx */
|
||||
|
||||
for (i = 0; !add && i < attr->num_values; i ++)
|
||||
{
|
||||
char buf[255]; /* Number buffer */
|
||||
@@ -1202,21 +1205,7 @@ cgiSetIPPObjectVars(
|
||||
* Rewrite URIs...
|
||||
*/
|
||||
|
||||
if (!strcmp(name, "member_uris"))
|
||||
{
|
||||
char url[1024]; /* URL for class member... */
|
||||
|
||||
|
||||
cgiRewriteURL(attr->values[i].string.text, url,
|
||||
sizeof(url), NULL);
|
||||
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value),
|
||||
"<A HREF=\"%s\">%s</A>", url,
|
||||
strrchr(attr->values[i].string.text, '/') + 1);
|
||||
}
|
||||
else
|
||||
cgiRewriteURL(attr->values[i].string.text, valptr,
|
||||
(int)(sizeof(value) - (size_t)(valptr - value)), NULL);
|
||||
cgiRewriteURL(attr->values[i].string.text, valptr, (int)(sizeof(value) - (size_t)(valptr - value)), NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1561,5 +1550,5 @@ cgiText(const char *message) /* I - Message */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $".
|
||||
* End of "$Id: ipp-var.c 12769 2015-06-30 16:13:48Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-36
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $"
|
||||
* "$Id: template.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* CGI template function.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -648,39 +648,7 @@ cgi_puts(const char *s, /* I - String to output */
|
||||
while (*s)
|
||||
{
|
||||
if (*s == '<')
|
||||
{
|
||||
/*
|
||||
* Pass <A HREF="url"> and </A>, otherwise quote it...
|
||||
*/
|
||||
|
||||
if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
|
||||
{
|
||||
fputs("<A HREF=\"", out);
|
||||
s += 9;
|
||||
|
||||
while (*s && *s != '\"')
|
||||
{
|
||||
if (*s == '&')
|
||||
fputs("&", out);
|
||||
else
|
||||
putc(*s, out);
|
||||
|
||||
s ++;
|
||||
}
|
||||
|
||||
if (*s)
|
||||
s ++;
|
||||
|
||||
fputs("\">", out);
|
||||
}
|
||||
else if (!_cups_strncasecmp(s, "</A>", 4))
|
||||
{
|
||||
fputs("</A>", out);
|
||||
s += 3;
|
||||
}
|
||||
else
|
||||
fputs("<", out);
|
||||
}
|
||||
fputs("<", out);
|
||||
else if (*s == '>')
|
||||
fputs(">", out);
|
||||
else if (*s == '\"')
|
||||
@@ -718,5 +686,5 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $".
|
||||
* End of "$Id: template.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#Group @CUPS_GROUP@
|
||||
|
||||
# Administrator user group, used to match @SYSTEM in cupsd.conf policy rules...
|
||||
# This cannot contain the Group value for security reasons...
|
||||
SystemGroup @CUPS_SYSTEM_GROUPS@
|
||||
@CUPS_SYSTEM_AUTHKEY@
|
||||
|
||||
@@ -74,11 +75,8 @@ PageLog @CUPS_LOGDIR@/page_log
|
||||
# Location of helper programs...
|
||||
#ServerBin @CUPS_SERVERBIN@
|
||||
|
||||
# SSL/TLS certificate for the scheduler...
|
||||
#ServerCertificate @CUPS_SERVERCERT@
|
||||
|
||||
# SSL/TLS private key for the scheduler...
|
||||
#ServerKey @CUPS_SERVERKEY@
|
||||
# SSL/TLS keychain for the scheduler...
|
||||
#ServerKeychain @CUPS_SERVERKEYCHAIN@
|
||||
|
||||
# Location of other configuration files...
|
||||
#ServerRoot @CUPS_SERVERROOT@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 12073 2014-07-31 00:58:00Z msweet $"
|
||||
dnl "$Id: cups-common.m4 12336 2014-12-09 21:19:52Z msweet $"
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION=2.0b1
|
||||
CUPS_VERSION=2.0.4
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -145,6 +145,9 @@ AC_CHECK_HEADER(iconv.h,
|
||||
AC_SEARCH_LIBS(iconv_open,iconv,
|
||||
AC_DEFINE(HAVE_ICONV_H)
|
||||
SAVELIBS="$SAVELIBS $LIBS")
|
||||
AC_SEARCH_LIBS(libiconv_open,iconv,
|
||||
AC_DEFINE(HAVE_ICONV_H)
|
||||
SAVELIBS="$SAVELIBS $LIBS")
|
||||
LIBS="$SAVELIBS")
|
||||
|
||||
dnl Checks for Mini-XML (www.minixml.org)...
|
||||
@@ -369,9 +372,6 @@ case $uname in
|
||||
AC_CHECK_HEADER(membershipPriv.h,AC_DEFINE(HAVE_MEMBERSHIPPRIV_H))
|
||||
AC_CHECK_FUNCS(mbr_uid_to_uuid)
|
||||
|
||||
dnl Check for the vproc_transaction_begin/end stuff...
|
||||
AC_CHECK_FUNCS(vproc_transaction_begin)
|
||||
|
||||
dnl Need <dlfcn.h> header...
|
||||
AC_CHECK_HEADER(dlfcn.h,AC_DEFINE(HAVE_DLFCN_H))
|
||||
|
||||
@@ -465,5 +465,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 12073 2014-07-31 00:58:00Z msweet $".
|
||||
dnl End of "$Id: cups-common.m4 12336 2014-12-09 21:19:52Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-compiler.m4 11683 2014-03-05 20:00:54Z msweet $"
|
||||
dnl "$Id: cups-compiler.m4 12743 2015-06-23 14:49:09Z msweet $"
|
||||
dnl
|
||||
dnl Compiler stuff for CUPS.
|
||||
dnl
|
||||
@@ -110,7 +110,7 @@ if test -n "$GCC"; then
|
||||
# The -fstack-protector option is available with some versions of
|
||||
# GCC and adds "stack canaries" which detect when the return address
|
||||
# has been overwritten, preventing many types of exploit attacks.
|
||||
AC_MSG_CHECKING(if GCC supports -fstack-protector)
|
||||
AC_MSG_CHECKING(whether compiler supports -fstack-protector)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fstack-protector"
|
||||
AC_TRY_LINK(,,
|
||||
@@ -130,7 +130,7 @@ if test -n "$GCC"; then
|
||||
# exploits that depend on a fixed address for common functions.
|
||||
#
|
||||
# Not available to LSB binaries...
|
||||
AC_MSG_CHECKING(if GCC supports -fPIE)
|
||||
AC_MSG_CHECKING(whether compiler supports -fPIE)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
@@ -154,9 +154,27 @@ if test -n "$GCC"; then
|
||||
|
||||
if test "x$with_optim" = x; then
|
||||
# Add useful warning options for tracking down problems...
|
||||
OPTIM="-Wall -Wno-format-y2k -Wsign-conversion -Wunused $OPTIM"
|
||||
OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
|
||||
|
||||
AC_MSG_CHECKING(if GCC supports -Wno-tautological-compare)
|
||||
AC_MSG_CHECKING(whether compiler supports -Wno-unused-result)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-unused-result"
|
||||
AC_TRY_COMPILE(,,
|
||||
[OPTIM="$OPTIM -Wno-unused-result"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(whether compiler supports -Wsign-conversion)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wsign-conversion"
|
||||
AC_TRY_COMPILE(,,
|
||||
[OPTIM="$OPTIM -Wsign-conversion"
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(whether compiler supports -Wno-tautological-compare)
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
|
||||
AC_TRY_COMPILE(,,
|
||||
@@ -211,7 +229,7 @@ else
|
||||
# should contribute the necessary options to
|
||||
# cups-support@cups.org...
|
||||
echo "Building CUPS with default compiler optimizations; contact"
|
||||
echo "cups-bugs@cups.org with uname and compiler options needed"
|
||||
echo "cups-devel@cups.org with uname and compiler options needed"
|
||||
echo "for your platform, or set the CFLAGS and LDFLAGS environment"
|
||||
echo "variables before running configure."
|
||||
;;
|
||||
@@ -228,5 +246,5 @@ case $uname in
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-compiler.m4 11683 2014-03-05 20:00:54Z msweet $".
|
||||
dnl End of "$Id: cups-compiler.m4 12743 2015-06-23 14:49:09Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-network.m4 11719 2014-03-21 18:07:23Z msweet $"
|
||||
dnl "$Id: cups-network.m4 12325 2014-12-09 20:28:51Z msweet $"
|
||||
dnl
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl
|
||||
@@ -13,7 +13,12 @@ dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H))
|
||||
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>])
|
||||
AC_SEARCH_LIBS(socket, socket)
|
||||
AC_SEARCH_LIBS(gethostbyaddr, nsl)
|
||||
AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
|
||||
@@ -67,5 +72,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
|
||||
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-network.m4 11719 2014-03-21 18:07:23Z msweet $".
|
||||
dnl End of "$Id: cups-network.m4 12325 2014-12-09 20:28:51Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 11911 2014-06-10 13:54:53Z msweet $"
|
||||
dnl "$Id: cups-ssl.m4 12290 2014-12-05 17:25:55Z msweet $"
|
||||
dnl
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
@@ -20,8 +20,7 @@ AC_ARG_ENABLE(gnutls, [ --enable-gnutls use GNU TLS for SSL/TLS support
|
||||
SSLFLAGS=""
|
||||
SSLLIBS=""
|
||||
have_ssl=0
|
||||
CUPS_SERVERCERT=""
|
||||
CUPS_SERVERKEY=""
|
||||
CUPS_SERVERKEYCHAIN=""
|
||||
|
||||
if test x$enable_ssl != xno; then
|
||||
dnl Look for CDSA...
|
||||
@@ -31,7 +30,7 @@ if test x$enable_ssl != xno; then
|
||||
have_ssl=1
|
||||
AC_DEFINE(HAVE_SSL)
|
||||
AC_DEFINE(HAVE_CDSASSL)
|
||||
CUPS_SERVERCERT="/Library/Keychains/System.keychain"
|
||||
CUPS_SERVERKEYCHAIN="/Library/Keychains/System.keychain"
|
||||
|
||||
dnl Check for the various security headers...
|
||||
AC_CHECK_HEADER(Security/SecureTransportPriv.h,
|
||||
@@ -76,8 +75,13 @@ if test x$enable_ssl != xno; then
|
||||
fi
|
||||
|
||||
if test $have_ssl = 1; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
CUPS_SERVERKEYCHAIN="ssl"
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS $SSLLIBS"
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -91,8 +95,7 @@ elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes; then
|
||||
AC_MSG_ERROR([Unable to enable SSL support.])
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_SERVERCERT)
|
||||
AC_SUBST(CUPS_SERVERKEY)
|
||||
AC_SUBST(CUPS_SERVERKEYCHAIN)
|
||||
AC_SUBST(IPPALIASES)
|
||||
AC_SUBST(SSLFLAGS)
|
||||
AC_SUBST(SSLLIBS)
|
||||
@@ -101,5 +104,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 11911 2014-06-10 13:54:53Z msweet $".
|
||||
dnl End of "$Id: cups-ssl.m4 12290 2014-12-05 17:25:55Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-startup.m4 11747 2014-03-27 01:15:48Z msweet $"
|
||||
dnl "$Id: cups-startup.m4 12351 2014-12-09 22:18:45Z msweet $"
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
@@ -166,11 +166,11 @@ if test "x$xinetd" = x; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
elif test "x$xinet" != xno; then
|
||||
elif test "x$xinetd" != xno; then
|
||||
XINETD="$xinetd"
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-startup.m4 11747 2014-03-27 01:15:48Z msweet $".
|
||||
dnl End of "$Id: cups-startup.m4 12351 2014-12-09 22:18:45Z msweet $".
|
||||
dnl
|
||||
|
||||
+19
-14
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: config.h.in 11717 2014-03-21 16:42:53Z msweet $"
|
||||
* "$Id: config.h.in 12329 2014-12-09 20:50:51Z msweet $"
|
||||
*
|
||||
* Configuration file for CUPS.
|
||||
*
|
||||
@@ -93,7 +93,7 @@
|
||||
* Default MaxCopies value...
|
||||
*/
|
||||
|
||||
#define CUPS_DEFAULT_MAX_COPIES 100
|
||||
#define CUPS_DEFAULT_MAX_COPIES 9999
|
||||
|
||||
|
||||
/*
|
||||
@@ -150,10 +150,7 @@
|
||||
* Do we have PAM stuff?
|
||||
*/
|
||||
|
||||
#ifndef HAVE_LIBPAM
|
||||
#define HAVE_LIBPAM 0
|
||||
#endif /* !HAVE_LIBPAM */
|
||||
|
||||
#undef HAVE_PAM_PAM_APPL_H
|
||||
#undef HAVE_PAM_SET_ITEM
|
||||
#undef HAVE_PAM_SETCRED
|
||||
@@ -297,9 +294,24 @@
|
||||
|
||||
#undef HAVE_CDSASSL
|
||||
#undef HAVE_GNUTLS
|
||||
#undef HAVE_SSPISSL
|
||||
#undef HAVE_SSL
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_transport_set_pull_timeout_function function?
|
||||
*/
|
||||
|
||||
#undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_priority_set_direct function?
|
||||
*/
|
||||
|
||||
#undef HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
||||
|
||||
|
||||
/*
|
||||
* What Security framework headers do we have?
|
||||
*/
|
||||
@@ -619,7 +631,7 @@
|
||||
|
||||
#ifdef HAVE_ARC4RANDOM
|
||||
# define CUPS_RAND() arc4random()
|
||||
# define CUPS_SRAND(v) arc4random_stir()
|
||||
# define CUPS_SRAND(v)
|
||||
#elif defined(HAVE_RANDOM)
|
||||
# define CUPS_RAND() random()
|
||||
# define CUPS_SRAND(v) srandom(v)
|
||||
@@ -632,13 +644,6 @@
|
||||
#endif /* HAVE_ARC4RANDOM */
|
||||
|
||||
|
||||
/*
|
||||
* Do we have vproc_transaction_begin/end?
|
||||
*/
|
||||
|
||||
#undef HAVE_VPROC_TRANSACTION_BEGIN
|
||||
|
||||
|
||||
/*
|
||||
* Do we have libusb?
|
||||
*/
|
||||
@@ -714,5 +719,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
|
||||
#endif /* !_CUPS_CONFIG_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: config.h.in 11717 2014-03-21 16:42:53Z msweet $".
|
||||
* End of "$Id: config.h.in 12329 2014-12-09 20:50:51Z msweet $".
|
||||
*/
|
||||
|
||||
externo
+272
-148
@@ -1,11 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68.
|
||||
# Generated by GNU Autoconf 2.69.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -134,6 +132,31 @@ 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
|
||||
@@ -167,7 +190,8 @@ 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\$exitcode = x0 || exit 1
|
||||
test -x / || 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'\" &&
|
||||
@@ -212,21 +236,25 @@ IFS=$as_save_IFS
|
||||
|
||||
|
||||
if test "x$CONFIG_SHELL" != x; then :
|
||||
# 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+"$@"}
|
||||
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
|
||||
fi
|
||||
|
||||
if test x$as_have_required = xno; then :
|
||||
@@ -328,6 +356,14 @@ $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
|
||||
@@ -449,6 +485,10 @@ 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).
|
||||
@@ -483,16 +523,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 -p'.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
@@ -504,28 +544,8 @@ else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
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
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
|
||||
# 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'"
|
||||
@@ -659,8 +679,7 @@ EXPORT_SSLLIBS
|
||||
SSLLIBS
|
||||
SSLFLAGS
|
||||
IPPALIASES
|
||||
CUPS_SERVERKEY
|
||||
CUPS_SERVERCERT
|
||||
CUPS_SERVERKEYCHAIN
|
||||
LIBGCRYPTCONFIG
|
||||
LIBGNUTLSCONFIG
|
||||
PTHREAD_FLAGS
|
||||
@@ -1359,8 +1378,6 @@ 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
|
||||
@@ -1684,9 +1701,9 @@ test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
configure
|
||||
generated by GNU Autoconf 2.68
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This configure script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it.
|
||||
_ACEOF
|
||||
@@ -1837,7 +1854,7 @@ $as_echo "$ac_try_echo"; } >&5
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext && {
|
||||
test "$cross_compiling" = yes ||
|
||||
$as_test_x conftest$ac_exeext
|
||||
test -x conftest$ac_exeext
|
||||
}; then :
|
||||
ac_retval=0
|
||||
else
|
||||
@@ -2144,7 +2161,7 @@ This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by $as_me, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
||||
@@ -2520,7 +2537,7 @@ esac
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION=2.0b1
|
||||
CUPS_VERSION=2.0.4
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -2569,7 +2586,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -2617,7 +2634,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -2661,7 +2678,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3105,8 +3122,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
struct stat;
|
||||
/* 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);
|
||||
@@ -3356,7 +3372,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3400,7 +3416,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3602,7 +3618,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3642,7 +3658,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3695,7 +3711,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3735,7 +3751,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3775,7 +3791,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3815,7 +3831,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3855,7 +3871,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3895,7 +3911,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3935,7 +3951,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -3975,7 +3991,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -4015,7 +4031,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -4055,7 +4071,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -4131,7 +4147,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -4174,7 +4190,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -4584,7 +4600,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"
|
||||
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
|
||||
as_fn_executable_p "$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
|
||||
@@ -4650,7 +4666,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"
|
||||
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
|
||||
as_fn_executable_p "$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
|
||||
@@ -4967,6 +4983,64 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv_open" >&5
|
||||
$as_echo "$ac_cv_search_iconv_open" >&6; }
|
||||
ac_res=$ac_cv_search_iconv_open
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
|
||||
|
||||
SAVELIBS="$SAVELIBS $LIBS"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libiconv_open" >&5
|
||||
$as_echo_n "checking for library containing libiconv_open... " >&6; }
|
||||
if ${ac_cv_search_libiconv_open+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_func_search_save_LIBS=$LIBS
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char libiconv_open ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return libiconv_open ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
for ac_lib in '' iconv; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
ac_res=-l$ac_lib
|
||||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
fi
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_search_libiconv_open=$ac_res
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext
|
||||
if ${ac_cv_search_libiconv_open+:} false; then :
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ${ac_cv_search_libiconv_open+:} false; then :
|
||||
|
||||
else
|
||||
ac_cv_search_libiconv_open=no
|
||||
fi
|
||||
rm conftest.$ac_ext
|
||||
LIBS=$ac_func_search_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libiconv_open" >&5
|
||||
$as_echo "$ac_cv_search_libiconv_open" >&6; }
|
||||
ac_res=$ac_cv_search_libiconv_open
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
|
||||
@@ -5692,18 +5766,6 @@ if test "x$ac_cv_func_mbr_uid_to_uuid" = xyes; then :
|
||||
#define HAVE_MBR_UID_TO_UUID 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
for ac_func in vproc_transaction_begin
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "vproc_transaction_begin" "ac_cv_func_vproc_transaction_begin"
|
||||
if test "x$ac_cv_func_vproc_transaction_begin" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_VPROC_TRANSACTION_BEGIN 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -6625,8 +6687,8 @@ if test -n "$GCC"; then
|
||||
# The -fstack-protector option is available with some versions of
|
||||
# GCC and adds "stack canaries" which detect when the return address
|
||||
# has been overwritten, preventing many types of exploit attacks.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -fstack-protector" >&5
|
||||
$as_echo_n "checking if GCC supports -fstack-protector... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -fstack-protector" >&5
|
||||
$as_echo_n "checking whether compiler supports -fstack-protector... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fstack-protector"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@@ -6663,8 +6725,8 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
# exploits that depend on a fixed address for common functions.
|
||||
#
|
||||
# Not available to LSB binaries...
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -fPIE" >&5
|
||||
$as_echo_n "checking if GCC supports -fPIE... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -fPIE" >&5
|
||||
$as_echo_n "checking whether compiler supports -fPIE... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
@@ -6722,10 +6784,62 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
if test "x$with_optim" = x; then
|
||||
# Add useful warning options for tracking down problems...
|
||||
OPTIM="-Wall -Wno-format-y2k -Wsign-conversion -Wunused $OPTIM"
|
||||
OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -Wno-tautological-compare" >&5
|
||||
$as_echo_n "checking if GCC supports -Wno-tautological-compare... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wno-unused-result" >&5
|
||||
$as_echo_n "checking whether compiler supports -Wno-unused-result... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-unused-result"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
OPTIM="$OPTIM -Wno-unused-result"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wsign-conversion" >&5
|
||||
$as_echo_n "checking whether compiler supports -Wsign-conversion... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wsign-conversion"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
OPTIM="$OPTIM -Wsign-conversion"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -Wno-tautological-compare" >&5
|
||||
$as_echo_n "checking whether compiler supports -Wno-tautological-compare... " >&6; }
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wno-tautological-compare"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@@ -6796,7 +6910,7 @@ else
|
||||
# should contribute the necessary options to
|
||||
# cups-support@cups.org...
|
||||
echo "Building CUPS with default compiler optimizations; contact"
|
||||
echo "cups-bugs@cups.org with uname and compiler options needed"
|
||||
echo "cups-devel@cups.org with uname and compiler options needed"
|
||||
echo "for your platform, or set the CFLAGS and LDFLAGS environment"
|
||||
echo "variables before running configure."
|
||||
;;
|
||||
@@ -6815,7 +6929,13 @@ esac
|
||||
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default"
|
||||
ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
"
|
||||
if test "x$ac_cv_header_resolv_h" = xyes; then :
|
||||
$as_echo "#define HAVE_RESOLV_H 1" >>confdefs.h
|
||||
|
||||
@@ -7504,7 +7624,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -7547,7 +7667,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -7993,8 +8113,7 @@ fi
|
||||
SSLFLAGS=""
|
||||
SSLLIBS=""
|
||||
have_ssl=0
|
||||
CUPS_SERVERCERT=""
|
||||
CUPS_SERVERKEY=""
|
||||
CUPS_SERVERKEYCHAIN=""
|
||||
|
||||
if test x$enable_ssl != xno; then
|
||||
if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
|
||||
@@ -8007,7 +8126,7 @@ if test "x$ac_cv_header_Security_SecureTransport_h" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_CDSASSL 1" >>confdefs.h
|
||||
|
||||
CUPS_SERVERCERT="/Library/Keychains/System.keychain"
|
||||
CUPS_SERVERKEYCHAIN="/Library/Keychains/System.keychain"
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "Security/SecureTransportPriv.h" "ac_cv_header_Security_SecureTransportPriv_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_Security_SecureTransportPriv_h" = xyes; then :
|
||||
@@ -8097,7 +8216,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -8140,7 +8259,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -8195,7 +8314,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_LIBGCRYPTCONFIG="$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
|
||||
@@ -8238,7 +8357,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_ac_pt_LIBGCRYPTCONFIG="$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
|
||||
@@ -8293,8 +8412,23 @@ fi
|
||||
fi
|
||||
|
||||
if test $have_ssl = 1; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
CUPS_SERVERKEYCHAIN="ssl"
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS $SSLLIBS"
|
||||
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
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct"
|
||||
if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes; then :
|
||||
$as_echo "#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
LIBS="$SAVELIBS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -8315,7 +8449,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
EXPORT_SSLLIBS="$SSLLIBS"
|
||||
|
||||
|
||||
@@ -8785,6 +8918,8 @@ _ACEOF
|
||||
esac
|
||||
rm -rf conftest*
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@@ -9183,7 +9318,7 @@ if test "x$xinetd" = x; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
elif test "x$xinet" != xno; then
|
||||
elif test "x$xinetd" != xno; then
|
||||
XINETD="$xinetd"
|
||||
fi
|
||||
|
||||
@@ -9782,7 +9917,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -9845,7 +9980,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -9908,7 +10043,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -9949,7 +10084,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -10017,7 +10152,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$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
|
||||
@@ -10077,7 +10212,7 @@ fi
|
||||
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config data/testprint desktop/cups.desktop doc/index.html man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket templates/header.tmpl packaging/cups.list $LANGFILES"
|
||||
ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups-config data/testprint desktop/cups.desktop doc/index.html man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket templates/header.tmpl packaging/cups.list $LANGFILES"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -10486,16 +10621,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 -p'.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
@@ -10555,28 +10690,16 @@ else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
# 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'"
|
||||
@@ -10598,7 +10721,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by $as_me, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
@@ -10660,10 +10783,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
config.status
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This config.status script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
@@ -10752,7 +10875,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'
|
||||
@@ -10804,6 +10927,7 @@ do
|
||||
"scheduler/cups.sh") CONFIG_FILES="$CONFIG_FILES scheduler/cups.sh" ;;
|
||||
"scheduler/cups.xml") CONFIG_FILES="$CONFIG_FILES scheduler/cups.xml" ;;
|
||||
"scheduler/org.cups.cups-lpd.plist") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cups-lpd.plist" ;;
|
||||
"scheduler/org.cups.cups-lpdAT.service") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cups-lpdAT.service" ;;
|
||||
"scheduler/org.cups.cupsd.path") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.path" ;;
|
||||
"scheduler/org.cups.cupsd.service") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.service" ;;
|
||||
"scheduler/org.cups.cupsd.socket") CONFIG_FILES="$CONFIG_FILES scheduler/org.cups.cupsd.socket" ;;
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: configure.ac 11823 2014-04-21 12:22:03Z msweet $"
|
||||
dnl "$Id: configure.ac 12222 2014-10-21 11:55:01Z msweet $"
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
@@ -81,6 +81,7 @@ AC_OUTPUT(Makedefs
|
||||
scheduler/cups.sh
|
||||
scheduler/cups.xml
|
||||
scheduler/org.cups.cups-lpd.plist
|
||||
scheduler/org.cups.cups-lpdAT.service
|
||||
scheduler/org.cups.cupsd.path
|
||||
scheduler/org.cups.cupsd.service
|
||||
scheduler/org.cups.cupsd.socket
|
||||
@@ -91,5 +92,5 @@ AC_OUTPUT(Makedefs
|
||||
chmod +x cups-config
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: configure.ac 11823 2014-04-21 12:22:03Z msweet $".
|
||||
dnl End of "$Id: configure.ac 12222 2014-10-21 11:55:01Z msweet $".
|
||||
dnl
|
||||
|
||||
+9
-4
@@ -4,8 +4,9 @@ adminutil.o: adminutil.c cups-private.h string-private.h ../config.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h adminutil.h
|
||||
array.o: array.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h array-private.h ../cups/array.h
|
||||
array.o: array.c ../cups/cups.h file.h versioning.h ipp.h http.h array.h \
|
||||
language.h pwg.h string-private.h ../config.h debug-private.h \
|
||||
array-private.h
|
||||
attr.o: attr.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
@@ -223,8 +224,12 @@ snmp.o: snmp.c cups-private.h string-private.h ../config.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h snmp-private.h
|
||||
snprintf.o: snprintf.c string-private.h ../config.h
|
||||
string.o: string.c string-private.h ../config.h debug-private.h \
|
||||
../cups/versioning.h thread-private.h array.h
|
||||
string.o: string.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
md5-private.h language-private.h ../cups/transcode.h pwg-private.h \
|
||||
../cups/cups.h file.h pwg.h ppd-private.h ../cups/ppd.h \
|
||||
thread-private.h
|
||||
tempfile.o: tempfile.c cups-private.h string-private.h ../config.h \
|
||||
debug-private.h ../cups/versioning.h array-private.h ../cups/array.h \
|
||||
ipp-private.h ../cups/ipp.h http.h http-private.h ../cups/language.h \
|
||||
|
||||
+24
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
Filter and backend programming introduction for CUPS.
|
||||
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
Copyright 2007-2014 by Apple Inc.
|
||||
Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
@@ -81,7 +81,7 @@ directory to write to.</p>
|
||||
|
||||
<p>In addition, some operating systems provide additional security mechanisms
|
||||
that further limit file system access, even for backends running as root. On
|
||||
OS X, for example, no backend may write to a user's home directory.</p>
|
||||
OS X, for example, no backend may write to a user's home directory. See the <a href="#SANDBOXING">Sandboxing on OS X</a> section for more information.</p>
|
||||
</blockquote>
|
||||
|
||||
<h3><a name="SIGNALS">Canceled Jobs and Signal Handling</a></h3>
|
||||
@@ -852,3 +852,25 @@ void *my_data;
|
||||
|
||||
<a href="#cupsSideChannelSNMPWalk">cupsSNMPSideChannelWalk</a>(".1.3.6.1.2.1.43", 5.0, my_callback, my_data);
|
||||
</pre>
|
||||
|
||||
<h2><a name="SANDBOXING">Sandboxing on OS X</a></h2>
|
||||
|
||||
<p>Starting with OS X 10.6, filters and backends are run inside a security "sandbox" which further limits (beyond the normal UNIX user/group permissions) what a filter or backend can do. This helps to both secure the printing system from malicious software and enforce the functional separation of components in the CUPS filter chain. What follows is a list of actions that are explicitly allowed for all filters and backends:</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>Reading of files: pursuant to normal UNIX file permissions, filters and backends can read files for the current job from the <var>/private/var/spool/cups</var> directory and other files on mounted filesystems <em>except</em> for user home directories under <var>/Users</var>.</li>
|
||||
|
||||
<li>Writing of files: pursuant to normal UNIX file permissions, filters and backends can read/write files to the cache directory specified by the <code>CUPS_CACHEDIR</code> environment variable, to the state directory specified by the <code>CUPS_STATEDIR</code> environment variable, to the temporary directory specified by the <code>TMPDIR</code> environment variable, and under the <var>/private/var/db</var>, <var>/private/var/folders</var>, <var>/private/var/lib</var>, <var>/private/var/mysql</var>, <var>/private/var/run</var>, <var>/private/var/spool</var> (except <var>/private/var/spool/cups</var>), <var>/Library/Application Support</var>, <var>/Library/Caches</var>, <var>/Library/Logs</var>, <var>/Library/Preferences</var>, <var>/Library/WebServer</var>, and <var>/Users/Shared</var> directories.</li>
|
||||
|
||||
<li>Execution of programs: pursuant to normal UNIX file permissions, filters and backends can execute any program not located under the <var>/Users</var> directory. Child processes inherit the sandbox and are subject to the same restrictions as the parent.</li>
|
||||
|
||||
<li>Bluetooth and USB: backends can access Bluetooth and USB printers through IOKit. <em>Filters cannot access Bluetooth and USB printers directly.</em></li>
|
||||
|
||||
<li>Network: filters and backends can access UNIX domain sockets under the <var>/private/tmp</var>, <var>/private/var/run</var>, and <var>/private/var/tmp</var> directories. Backends can also create IPv4 and IPv6 TCP (outgoing) and UDP (incoming and outgoing) socket, and bind to local source ports. <em>Filters cannot directly create IPv4 and IPv6 TCP or UDP sockets.</em></li>
|
||||
|
||||
<li>Notifications: filters and backends can send notifications via the Darwin <code>notify_post()</code> API.</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<blockquote><b>Note:</b> The sandbox profile used in CUPS 2.0 still allows some actions that are not listed above - these privileges will be removed over time until the profile matches the list above.</blockquote>
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: auth.c 11776 2014-03-28 19:16:05Z msweet $"
|
||||
* "$Id: auth.c 12230 2014-10-21 13:55:24Z msweet $"
|
||||
*
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
@@ -761,7 +761,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
|
||||
if (
|
||||
# ifdef HAVE_GSSAPI
|
||||
strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9) &&
|
||||
_cups_strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9) &&
|
||||
# endif /* HAVE_GSSAPI */
|
||||
# ifdef HAVE_AUTHORIZATION_H
|
||||
!httpGetSubField2(http, HTTP_FIELD_WWW_AUTHENTICATE, "authkey",
|
||||
@@ -808,7 +808,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
filename, strerror(errno)));
|
||||
|
||||
# ifdef HAVE_GSSAPI
|
||||
if (!strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
|
||||
if (!_cups_strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
|
||||
{
|
||||
/*
|
||||
* Kerberos required, don't try the root certificate...
|
||||
@@ -876,5 +876,5 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: auth.c 11776 2014-03-28 19:16:05Z msweet $".
|
||||
* End of "$Id: auth.c 12230 2014-10-21 13:55:24Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: cups.h 11884 2014-05-16 21:54:22Z msweet $"
|
||||
* "$Id: cups.h 12761 2015-06-24 20:10:19Z msweet $"
|
||||
*
|
||||
* API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -49,10 +49,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0000
|
||||
# define CUPS_VERSION 2.0004
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 0
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
# define CUPS_VERSION_PATCH 4
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -615,7 +615,7 @@ extern int cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
|
||||
extern void cupsSetUserAgent(const char *user_agent) _CUPS_API_1_7;
|
||||
extern const char *cupsUserAgent(void) _CUPS_API_1_7;
|
||||
|
||||
/* New in CUPS 2.0 */
|
||||
/* New in CUPS 2.0/OS X 10.10 */
|
||||
extern cups_dest_t *cupsGetDestWithURI(const char *name, const char *uri) _CUPS_API_2_0;
|
||||
extern const char *cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest, cups_dinfo_t *info, unsigned flags, cups_size_t *size) _CUPS_API_2_0;
|
||||
extern int cupsMakeServerCredentials(const char *path, const char *common_name, int num_alt_names, const char **alt_names, time_t expiration_date) _CUPS_API_2_0;
|
||||
@@ -628,5 +628,5 @@ extern int cupsSetServerCredentials(const char *path, const char *common_name,
|
||||
#endif /* !_CUPS_CUPS_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups.h 11884 2014-05-16 21:54:22Z msweet $".
|
||||
* End of "$Id: cups.h 12761 2015-06-24 20:10:19Z msweet $".
|
||||
*/
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: debug.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: debug.c 12328 2014-12-09 20:38:47Z msweet $"
|
||||
*
|
||||
* Debugging functions for CUPS.
|
||||
*
|
||||
@@ -97,7 +97,7 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
type; /* Format type character */
|
||||
int width, /* Width of field */
|
||||
prec; /* Number of characters of precision */
|
||||
char tformat[100], /* Temporary format string for sprintf() */
|
||||
char tformat[100], /* Temporary format string for snprintf() */
|
||||
*tptr, /* Pointer into temporary format */
|
||||
temp[1024]; /* Buffer for formatted numbers */
|
||||
char *s; /* Pointer to string */
|
||||
@@ -232,7 +232,7 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
if ((size_t)(width + 2) > sizeof(temp))
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, double));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, double));
|
||||
|
||||
bytes += (int)strlen(temp);
|
||||
|
||||
@@ -256,13 +256,13 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
|
||||
# ifdef HAVE_LONG_LONG
|
||||
if (size == 'L')
|
||||
sprintf(temp, tformat, va_arg(ap, long long));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, long long));
|
||||
else
|
||||
# endif /* HAVE_LONG_LONG */
|
||||
if (size == 'l')
|
||||
sprintf(temp, tformat, va_arg(ap, long));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, long));
|
||||
else
|
||||
sprintf(temp, tformat, va_arg(ap, int));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, int));
|
||||
|
||||
bytes += (int)strlen(temp);
|
||||
|
||||
@@ -277,7 +277,7 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
if ((size_t)(width + 2) > sizeof(temp))
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, void *));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, void *));
|
||||
|
||||
bytes += (int)strlen(temp);
|
||||
|
||||
@@ -643,5 +643,5 @@ _cups_debug_set(const char *logfile, /* I - Log file or NULL */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: debug.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: debug.c 12328 2014-12-09 20:38:47Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: dest-localization.c 11894 2014-05-23 03:18:00Z msweet $"
|
||||
* "$Id: dest-localization.c 12094 2014-08-19 12:15:11Z msweet $"
|
||||
*
|
||||
* Destination localization support for CUPS.
|
||||
*
|
||||
@@ -38,7 +38,7 @@ static char *cups_scan_strings(char *buffer);
|
||||
* The returned string is stored in the destination information and will become
|
||||
* invalid if the destination information is deleted.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
const char * /* O - Localized string */
|
||||
@@ -535,5 +535,5 @@ cups_scan_strings(char *buffer) /* I - Start of string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest-localization.c 11894 2014-05-23 03:18:00Z msweet $".
|
||||
* End of "$Id: dest-localization.c 12094 2014-08-19 12:15:11Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dest.c 11959 2014-06-26 18:30:19Z msweet $"
|
||||
* "$Id: dest.c 12665 2015-05-25 15:08:55Z msweet $"
|
||||
*
|
||||
* User-defined destination (and option) support for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -657,6 +657,7 @@ cupsConnectDest(
|
||||
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, encryption, 1, 0,
|
||||
NULL);
|
||||
httpAddrFreeList(addrlist);
|
||||
|
||||
/*
|
||||
* Connect if requested...
|
||||
@@ -1310,7 +1311,7 @@ _cupsGetDestResource(
|
||||
*
|
||||
* "uri" is the "ipp" or "ipps" URI for the printer.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
cups_dest_t * /* O - Destination or @code NULL@ */
|
||||
@@ -3942,5 +3943,5 @@ cups_make_string(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest.c 11959 2014-06-26 18:30:19Z msweet $".
|
||||
* End of "$Id: dest.c 12665 2015-05-25 15:08:55Z msweet $".
|
||||
*/
|
||||
|
||||
+115
-34
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.c 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: file.c 12642 2015-05-19 15:04:47Z msweet $"
|
||||
*
|
||||
* File functions for CUPS.
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
* our own file functions allows us to provide transparent support of
|
||||
* gzip'd print files, PPD files, etc.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* 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
|
||||
@@ -288,6 +288,7 @@ _cupsFileCheckFilter(
|
||||
|
||||
switch (result)
|
||||
{
|
||||
default :
|
||||
case _CUPS_FILE_CHECK_OK :
|
||||
prefix = "DEBUG2";
|
||||
break;
|
||||
@@ -638,6 +639,8 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("4cupsFileGetChar(fp=%p)", fp));
|
||||
|
||||
if (!fp || (fp->mode != 'r' && fp->mode != 's'))
|
||||
{
|
||||
DEBUG_puts("5cupsFileGetChar: Bad arguments!");
|
||||
@@ -648,8 +651,10 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
|
||||
* If the input buffer is empty, try to read more data...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("5cupsFileGetChar: fp->eof=%d, fp->ptr=%p, fp->end=%p", fp->eof, fp->ptr, fp->end));
|
||||
|
||||
if (fp->ptr >= fp->end)
|
||||
if (cups_fill(fp) < 0)
|
||||
if (cups_fill(fp) <= 0)
|
||||
{
|
||||
DEBUG_puts("5cupsFileGetChar: Unable to fill buffer!");
|
||||
return (-1);
|
||||
@@ -1283,7 +1288,7 @@ cupsFilePeekChar(cups_file_t *fp) /* I - CUPS file */
|
||||
*/
|
||||
|
||||
if (fp->ptr >= fp->end)
|
||||
if (cups_fill(fp) < 0)
|
||||
if (cups_fill(fp) <= 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
@@ -1778,7 +1783,7 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
|
||||
* Preload a buffer to determine whether the file is compressed...
|
||||
*/
|
||||
|
||||
if (cups_fill(fp) < 0)
|
||||
if (cups_fill(fp) <= 0)
|
||||
return (-1);
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
||||
@@ -2194,6 +2199,8 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
DEBUG_printf(("9cups_fill: cups_read() returned " CUPS_LLFMT,
|
||||
CUPS_LLCAST bytes));
|
||||
|
||||
fp->eof = 1;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -2233,6 +2240,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Extra gzip header data missing, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -2245,6 +2257,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Extra gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2266,6 +2283,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Original filename in gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2287,6 +2309,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Comment in gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2305,6 +2332,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Header CRC in gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2329,8 +2361,15 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
fp->stream.avail_out = 0;
|
||||
fp->crc = crc32(0L, Z_NULL, 0);
|
||||
|
||||
if (inflateInit2(&(fp->stream), -15) != Z_OK)
|
||||
if ((status = inflateInit2(&(fp->stream), -15)) != Z_OK)
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: inflateInit2 returned %d, returning -1.", status));
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
fp->compressed = 1;
|
||||
}
|
||||
@@ -2342,7 +2381,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
*/
|
||||
|
||||
if (fp->eof)
|
||||
return (-1);
|
||||
{
|
||||
DEBUG_puts("9cups_fill: EOF, returning 0.");
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fill the decompression buffer as needed...
|
||||
@@ -2351,7 +2394,13 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
if (fp->stream.avail_in == 0)
|
||||
{
|
||||
if ((bytes = cups_read(fp, (char *)fp->cbuf, sizeof(fp->cbuf))) <= 0)
|
||||
return (-1);
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: cups_read error, returning %d.", (int)bytes));
|
||||
|
||||
fp->eof = 1;
|
||||
|
||||
return (bytes);
|
||||
}
|
||||
|
||||
fp->stream.next_in = fp->cbuf;
|
||||
fp->stream.avail_in = (uInt)bytes;
|
||||
@@ -2378,42 +2427,69 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
|
||||
unsigned char trailer[8]; /* Trailer bytes */
|
||||
uLong tcrc; /* Trailer CRC */
|
||||
ssize_t tbytes = 0; /* Number of bytes */
|
||||
|
||||
|
||||
if (read(fp->fd, trailer, sizeof(trailer)) < (ssize_t)sizeof(trailer))
|
||||
if (fp->stream.avail_in > 0)
|
||||
{
|
||||
/*
|
||||
* Can't get it, so mark end-of-file...
|
||||
*/
|
||||
if (fp->stream.avail_in > sizeof(trailer))
|
||||
tbytes = (ssize_t)sizeof(trailer);
|
||||
else
|
||||
tbytes = (ssize_t)fp->stream.avail_in;
|
||||
|
||||
fp->eof = 1;
|
||||
memcpy(trailer, fp->stream.next_in, (size_t)tbytes);
|
||||
fp->stream.next_in += tbytes;
|
||||
fp->stream.avail_in -= (size_t)tbytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
tcrc = ((((((uLong)trailer[3] << 8) | (uLong)trailer[2]) << 8) |
|
||||
(uLong)trailer[1]) << 8) | (uLong)trailer[0];
|
||||
|
||||
if (tcrc != fp->crc)
|
||||
if (tbytes < (ssize_t)sizeof(trailer))
|
||||
{
|
||||
if (read(fp->fd, trailer + tbytes, sizeof(trailer) - (size_t)tbytes) < ((ssize_t)sizeof(trailer) - tbytes))
|
||||
{
|
||||
/*
|
||||
* Bad CRC, mark end-of-file...
|
||||
* Can't get it, so mark end-of-file...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("9cups_fill: tcrc=%08x != fp->crc=%08x",
|
||||
(unsigned int)tcrc, (unsigned int)fp->crc));
|
||||
DEBUG_puts("9cups_fill: Unable to read gzip CRC trailer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
tcrc = ((((((uLong)trailer[3] << 8) | (uLong)trailer[2]) << 8) |
|
||||
(uLong)trailer[1]) << 8) | (uLong)trailer[0];
|
||||
|
||||
if (tcrc != fp->crc)
|
||||
{
|
||||
/*
|
||||
* Otherwise, reset the compressed flag so that we re-read the
|
||||
* file header...
|
||||
* Bad CRC, mark end-of-file...
|
||||
*/
|
||||
|
||||
fp->compressed = 0;
|
||||
DEBUG_printf(("9cups_fill: tcrc=%08x != fp->crc=%08x, returning -1.", (unsigned int)tcrc, (unsigned int)fp->crc));
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, reset the compressed flag so that we re-read the
|
||||
* file header...
|
||||
*/
|
||||
|
||||
fp->compressed = 0;
|
||||
}
|
||||
else if (status < Z_OK)
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: inflate returned %d, returning -1.", status));
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
bytes = (ssize_t)sizeof(fp->buf) - (ssize_t)fp->stream.avail_out;
|
||||
@@ -2426,7 +2502,10 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
fp->end = fp->buf + bytes;
|
||||
|
||||
if (bytes)
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: Returning %d.", (int)bytes));
|
||||
return (bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
||||
@@ -2444,17 +2523,19 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
fp->eof = 1;
|
||||
fp->ptr = fp->buf;
|
||||
fp->end = fp->buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Return the bytes we read...
|
||||
*/
|
||||
|
||||
return (-1);
|
||||
fp->eof = 0;
|
||||
fp->ptr = fp->buf;
|
||||
fp->end = fp->buf + bytes;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the bytes we read...
|
||||
*/
|
||||
|
||||
fp->eof = 0;
|
||||
fp->ptr = fp->buf;
|
||||
fp->end = fp->buf + bytes;
|
||||
DEBUG_printf(("9cups_fill: Not gzip, returning %d.", (int)bytes));
|
||||
|
||||
return (bytes);
|
||||
}
|
||||
@@ -2671,5 +2752,5 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: file.c 11627 2014-02-20 16:15:09Z msweet $".
|
||||
* End of "$Id: file.c 12642 2015-05-19 15:04:47Z msweet $".
|
||||
*/
|
||||
|
||||
+7
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: globals.c 11851 2014-05-07 23:55:35Z msweet $"
|
||||
* "$Id: globals.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* Global variable access routines for CUPS.
|
||||
*
|
||||
@@ -216,9 +216,9 @@ cups_globals_alloc(void)
|
||||
memset(cg, 0, sizeof(_cups_globals_t));
|
||||
cg->encryption = (http_encryption_t)-1;
|
||||
cg->password_cb = (cups_password_cb2_t)_cupsGetPassword;
|
||||
cg->any_root = 1;
|
||||
cg->expired_certs = 1;
|
||||
cg->validate_certs = 0;
|
||||
cg->any_root = -1;
|
||||
cg->expired_certs = -1;
|
||||
cg->validate_certs = -1;
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
@@ -361,7 +361,9 @@ cups_globals_free(_cups_globals_t *cg) /* I - Pointer to global data */
|
||||
|
||||
httpClose(cg->http);
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
_httpFreeCredentials(cg->tls_credentials);
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
cupsFileClose(cg->stdio_files[0]);
|
||||
cupsFileClose(cg->stdio_files[1]);
|
||||
@@ -392,5 +394,5 @@ cups_globals_init(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: globals.c 11851 2014-05-07 23:55:35Z msweet $".
|
||||
* End of "$Id: globals.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+12
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-addr.c 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: http-addr.c 12129 2014-08-28 19:26:31Z msweet $"
|
||||
*
|
||||
* HTTP address routines for CUPS.
|
||||
*
|
||||
@@ -64,7 +64,7 @@ httpAddrAny(const http_addr_t *addr) /* I - Address to check */
|
||||
* listen address for sockets created with @link httpAddrListen@. This will
|
||||
* ensure that domain sockets are removed when closed.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on failure */
|
||||
@@ -653,7 +653,7 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */
|
||||
*
|
||||
* Returns @code NULL@ if the socket is currently unconnected.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
http_addr_t * /* O - Connected address or @code NULL@ */
|
||||
@@ -865,6 +865,13 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
|
||||
}
|
||||
#endif /* HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure .local hostnames end with a period...
|
||||
*/
|
||||
|
||||
if (strlen(s) > 6 && !strcmp(s + strlen(s) - 6, ".local"))
|
||||
strlcat(s, ".", (size_t)slen);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -879,7 +886,7 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
|
||||
* 'httpResolveHostname()' - Resolve the hostname of the HTTP connection
|
||||
* address.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
const char * /* O - Resolved hostname or @code NULL@ */
|
||||
@@ -917,5 +924,5 @@ httpResolveHostname(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-addr.c 11627 2014-02-20 16:15:09Z msweet $".
|
||||
* End of "$Id: http-addr.c 12129 2014-08-28 19:26:31Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: http-private.h 12044 2014-07-17 21:21:21Z msweet $"
|
||||
* "$Id: http-private.h 12419 2015-01-22 15:51:20Z msweet $"
|
||||
*
|
||||
* Private HTTP definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* 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
|
||||
@@ -76,7 +76,6 @@ typedef int socklen_t;
|
||||
# ifdef HAVE_GNUTLS
|
||||
# include <gnutls/gnutls.h>
|
||||
# include <gnutls/x509.h>
|
||||
# include <gcrypt.h>
|
||||
# elif defined(HAVE_CDSASSL)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
# include <Security/Security.h>
|
||||
@@ -162,6 +161,9 @@ extern "C" {
|
||||
#define _HTTP_RESOLVE_FQDN 2 /* Resolve to a FQDN */
|
||||
#define _HTTP_RESOLVE_FAXOUT 4 /* Resolve FaxOut service? */
|
||||
|
||||
#define _HTTP_TLS_ALLOW_RC4 1 /* Allow RC4 cipher suites */
|
||||
#define _HTTP_TLS_ALLOW_SSL3 2 /* Allow SSL 3.0 */
|
||||
|
||||
|
||||
/*
|
||||
* Types and functions for SSL support...
|
||||
@@ -184,10 +186,6 @@ typedef gnutls_certificate_credentials_t *http_tls_credentials_t;
|
||||
# if !defined(HAVE_SECBASEPRIV_H) && defined(HAVE_CSSMERRORSTRING) /* Declare prototype for function in that header... */
|
||||
extern const char *cssmErrorString(int error);
|
||||
# endif /* !HAVE_SECBASEPRIV_H && HAVE_CSSMERRORSTRING */
|
||||
# ifndef HAVE_SECITEMPRIV_H /* Declare constants from that header... */
|
||||
extern const CFTypeRef kSecClassCertificate;
|
||||
extern const CFTypeRef kSecClassIdentity;
|
||||
# endif /* !HAVE_SECITEMPRIV_H */
|
||||
# if !defined(HAVE_SECIDENTITYSEARCHPRIV_H) && defined(HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY) /* Declare prototype for function in that header... */
|
||||
extern OSStatus SecIdentitySearchCreateWithPolicy(SecPolicyRef policy,
|
||||
CFStringRef idString, CSSM_KEYUSE keyUsage,
|
||||
@@ -421,6 +419,7 @@ extern void _httpTLSInitialize(void);
|
||||
extern size_t _httpTLSPending(http_t *http);
|
||||
extern int _httpTLSRead(http_t *http, char *buf, int len);
|
||||
extern int _httpTLSSetCredentials(http_t *http);
|
||||
extern void _httpTLSSetOptions(int options);
|
||||
extern int _httpTLSStart(http_t *http);
|
||||
extern void _httpTLSStop(http_t *http);
|
||||
extern int _httpTLSWrite(http_t *http, const char *buf, int len);
|
||||
@@ -439,5 +438,5 @@ extern int _httpWait(http_t *http, int msec, int usessl);
|
||||
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http-private.h 12044 2014-07-17 21:21:21Z msweet $".
|
||||
* End of "$Id: http-private.h 12419 2015-01-22 15:51:20Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http-support.c 11844 2014-05-02 11:58:54Z msweet $"
|
||||
* "$Id: http-support.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* HTTP support routines for CUPS.
|
||||
*
|
||||
@@ -649,7 +649,7 @@ httpDecode64_2(char *out, /* I - String to write to */
|
||||
break;
|
||||
case 3 :
|
||||
if (outptr < outend)
|
||||
*outptr++ |= base64;
|
||||
*outptr++ |= (char)base64;
|
||||
pos = 0;
|
||||
break;
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ httpSeparateURI(
|
||||
/*
|
||||
* 'httpStateString()' - Return the string describing a HTTP state value.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
const char * /* O - State string */
|
||||
@@ -1433,7 +1433,7 @@ httpStatus(http_status_t status) /* I - HTTP status code */
|
||||
/*
|
||||
* 'httpURIStatusString()' - Return a string describing a URI status code.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
const char * /* O - Localized status string */
|
||||
@@ -2544,5 +2544,5 @@ http_resolve_cb(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http-support.c 11844 2014-05-02 11:58:54Z msweet $".
|
||||
* End of "$Id: http-support.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
+44
-16
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http.c 12034 2014-07-16 19:37:34Z msweet $"
|
||||
* "$Id: http.c 12334 2014-12-09 21:01:55Z msweet $"
|
||||
*
|
||||
* HTTP routines for CUPS.
|
||||
*
|
||||
@@ -393,7 +393,7 @@ httpClose(http_t *http) /* I - HTTP connection */
|
||||
/*
|
||||
* 'httpCompareCredentials()' - Compare two sets of X.509 credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 if they match, 0 if they do not */
|
||||
@@ -759,7 +759,7 @@ httpGet(http_t *http, /* I - HTTP connection */
|
||||
*
|
||||
* The return value is the UNIX time of the last read or write.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
time_t /* O - Time of last read or write */
|
||||
@@ -911,7 +911,7 @@ httpGetCookie(http_t *http) /* I - HTTP connecion */
|
||||
* @link httpIsEncrypted@ function to determine whether a TLS session has
|
||||
* been established.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
http_encryption_t /* O - Current encryption mode */
|
||||
@@ -995,7 +995,7 @@ httpGetField(http_t *http, /* I - HTTP connection */
|
||||
/*
|
||||
* 'httpGetKeepAlive()' - Get the current Keep-Alive state of the connection.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
http_keepalive_t /* O - Keep-Alive state */
|
||||
@@ -1104,7 +1104,7 @@ httpGetLength2(http_t *http) /* I - HTTP connection */
|
||||
/*
|
||||
* 'httpGetPending()' - Get the number of bytes that are buffered for writing.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
size_t /* O - Number of bytes buffered */
|
||||
@@ -1117,7 +1117,7 @@ httpGetPending(http_t *http) /* I - HTTP connection */
|
||||
/*
|
||||
* 'httpGetReady()' - Get the number of bytes that can be read without blocking.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
size_t /* O - Number of bytes available */
|
||||
@@ -1143,7 +1143,7 @@ httpGetReady(http_t *http) /* I - HTTP connection */
|
||||
* The @link httpIsChunked@ function can be used to determine whether the
|
||||
* message body is chunked or fixed-length.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
size_t /* O - Remaining bytes */
|
||||
@@ -1582,7 +1582,7 @@ httpInitialize(void)
|
||||
* This function returns non-zero if the message body is composed of
|
||||
* variable-length chunks.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 if chunked, 0 if not */
|
||||
@@ -1597,7 +1597,7 @@ httpIsChunked(http_t *http) /* I - HTTP connection */
|
||||
*
|
||||
* This function returns non-zero if the connection is currently encrypted.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 if encrypted, 0 if not */
|
||||
@@ -1793,8 +1793,8 @@ httpPeek(http_t *http, /* I - HTTP connection */
|
||||
|
||||
memcpy(http->sbuffer + http->stream.avail_in, http->buffer, buflen);
|
||||
http->stream.avail_in += buflen;
|
||||
http->used -= buflen;
|
||||
http->data_remaining -= buflen;
|
||||
http->used -= (int)buflen;
|
||||
http->data_remaining -= (off_t)buflen;
|
||||
|
||||
if (http->used > 0)
|
||||
memmove(http->buffer, http->buffer + buflen, (size_t)http->used);
|
||||
@@ -2557,9 +2557,11 @@ httpSetCredentials(http_t *http, /* I - HTTP connection */
|
||||
if (!http || cupsArrayCount(credentials) < 1)
|
||||
return (-1);
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
_httpFreeCredentials(http->tls_credentials);
|
||||
|
||||
http->tls_credentials = _httpCreateCredentials(credentials);
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
return (http->tls_credentials ? 0 : -1);
|
||||
}
|
||||
@@ -2700,6 +2702,19 @@ httpSetField(http_t *http, /* I - HTTP connection */
|
||||
http->server = _cupsStrAlloc(value);
|
||||
break;
|
||||
|
||||
case HTTP_FIELD_WWW_AUTHENTICATE :
|
||||
/* CUPS STR #4503 - don't override WWW-Authenticate for unknown auth schemes */
|
||||
if (http->fields[HTTP_FIELD_WWW_AUTHENTICATE][0] &&
|
||||
_cups_strncasecmp(value, "Basic ", 6) &&
|
||||
_cups_strncasecmp(value, "Digest ", 7) &&
|
||||
_cups_strncasecmp(value, "Negotiate ", 10))
|
||||
{
|
||||
DEBUG_printf(("1httpSetField: Ignoring unknown auth scheme in \"%s\".", value));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fall through to copy */
|
||||
|
||||
default :
|
||||
strlcpy(http->fields[field], value, HTTP_MAX_VALUE);
|
||||
break;
|
||||
@@ -2769,7 +2784,7 @@ httpSetField(http_t *http, /* I - HTTP connection */
|
||||
/*
|
||||
* 'httpSetKeepAlive()' - Set the current Keep-Alive state of a connection.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -2847,7 +2862,7 @@ httpSetTimeout(
|
||||
/*
|
||||
* 'httpShutdown()' - Shutdown one side of an HTTP connection.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -2856,8 +2871,10 @@ httpShutdown(http_t *http) /* I - HTTP connection */
|
||||
if (!http || http->fd < 0)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
if (http->tls)
|
||||
_httpTLSStop(http);
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
#ifdef WIN32
|
||||
shutdown(http->fd, SD_RECEIVE); /* Microsoft-ism... */
|
||||
@@ -3607,6 +3624,17 @@ httpWriteResponse(http_t *http, /* I - HTTP connection */
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* "Click-jacking" defense (STR #4492)...
|
||||
*/
|
||||
|
||||
if (httpPrintf(http, "X-Frame-Options: DENY\r\n"
|
||||
"Content-Security-Policy: frame-ancestors 'none'\r\n") < 1)
|
||||
{
|
||||
http->status = HTTP_STATUS_ERROR;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (httpWrite2(http, "\r\n", 2) < 2)
|
||||
@@ -4004,7 +4032,7 @@ http_debug_hex(const char *prefix, /* I - Prefix for line */
|
||||
for (i = 0; i < bytes; i += 16)
|
||||
{
|
||||
for (j = 0, ptr = start; j < 16 && (i + j) < bytes; j ++, ptr += 2)
|
||||
sprintf(ptr, "%02X", buffer[i + j] & 255);
|
||||
snprintf(ptr, 3, "%02X", buffer[i + j] & 255);
|
||||
|
||||
while (j < 16)
|
||||
{
|
||||
@@ -4822,5 +4850,5 @@ http_write_chunk(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http.c 12034 2014-07-16 19:37:34Z msweet $".
|
||||
* End of "$Id: http.c 12334 2014-12-09 21:01:55Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http.h 11850 2014-05-07 23:12:48Z msweet $"
|
||||
* "$Id: http.h 12094 2014-08-19 12:15:11Z msweet $"
|
||||
*
|
||||
* Hyper-Text Transport Protocol definitions for CUPS.
|
||||
*
|
||||
@@ -342,7 +342,7 @@ typedef enum http_status_e /**** HTTP status codes ****/
|
||||
# endif /* !_CUPS_NO_DEPRECATED */
|
||||
} http_status_t;
|
||||
|
||||
typedef enum http_trust_e /**** Level of trust for credentials @since CUPS 2.0@ */
|
||||
typedef enum http_trust_e /**** Level of trust for credentials @since CUPS 2.0/OS 10.10@ */
|
||||
{
|
||||
HTTP_TRUST_OK = 0, /* Credentials are OK/trusted */
|
||||
HTTP_TRUST_INVALID, /* Credentials are invalid */
|
||||
@@ -620,7 +620,7 @@ extern void httpSetDefaultField(http_t *http, http_field_t field,
|
||||
extern http_state_t httpWriteResponse(http_t *http,
|
||||
http_status_t status) _CUPS_API_1_7;
|
||||
|
||||
/* New in CUPS 2.0 */
|
||||
/* New in CUPS 2.0/OS X 10.10 */
|
||||
extern int httpAddrClose(http_addr_t *addr, int fd) _CUPS_API_2_0;
|
||||
extern int httpAddrFamily(http_addr_t *addr) _CUPS_API_2_0;
|
||||
extern int httpCompareCredentials(cups_array_t *cred1, cups_array_t *cred2) _CUPS_API_2_0;
|
||||
@@ -656,5 +656,5 @@ extern const char *httpURIStatusString(http_uri_status_t status) _CUPS_API_2_0;
|
||||
#endif /* !_CUPS_HTTP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http.h 11850 2014-05-07 23:12:48Z msweet $".
|
||||
* End of "$Id: http.h 12094 2014-08-19 12:15:11Z msweet $".
|
||||
*/
|
||||
|
||||
+19
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-support.c 11806 2014-04-09 16:12:27Z msweet $"
|
||||
* "$Id: ipp-support.c 12194 2014-10-02 18:44:36Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol support functions for CUPS.
|
||||
*
|
||||
@@ -669,7 +669,14 @@ ippAttributeString(
|
||||
break;
|
||||
|
||||
case IPP_TAG_RESOLUTION :
|
||||
if (buffer && bufptr < bufend)
|
||||
if (val->resolution.xres == val->resolution.yres)
|
||||
{
|
||||
if (buffer && bufptr < bufend)
|
||||
bufptr += snprintf(bufptr, (size_t)(bufend - bufptr + 1), "%d%s", val->resolution.xres, val->resolution.units == IPP_RES_PER_INCH ? "dpi" : "dpcm");
|
||||
else
|
||||
bufptr += snprintf(temp, sizeof(temp), "%d%s", val->resolution.xres, val->resolution.units == IPP_RES_PER_INCH ? "dpi" : "dpcm");
|
||||
}
|
||||
else if (buffer && bufptr < bufend)
|
||||
bufptr += snprintf(bufptr, (size_t)(bufend - bufptr + 1), "%dx%d%s", val->resolution.xres, val->resolution.yres, val->resolution.units == IPP_RES_PER_INCH ? "dpi" : "dpcm");
|
||||
else
|
||||
bufptr += snprintf(temp, sizeof(temp), "%dx%d%s", val->resolution.xres, val->resolution.yres, val->resolution.units == IPP_RES_PER_INCH ? "dpi" : "dpcm");
|
||||
@@ -2122,7 +2129,7 @@ ippSetPort(int p) /* I - Port number to use */
|
||||
/*
|
||||
* 'ippStateString()' - Return the name corresponding to a state value.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
const char * /* O - State name */
|
||||
@@ -2216,6 +2223,14 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */
|
||||
ipp_attribute_t *attr; /* Current member attribute */
|
||||
|
||||
|
||||
if (!col)
|
||||
{
|
||||
if (buffer)
|
||||
*buffer = '\0';
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
bufptr = buffer;
|
||||
bufend = buffer + bufsize - 1;
|
||||
|
||||
@@ -2256,5 +2271,5 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-support.c 11806 2014-04-09 16:12:27Z msweet $".
|
||||
* End of "$Id: ipp-support.c 12194 2014-10-02 18:44:36Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp.c 11840 2014-04-29 15:57:26Z msweet $"
|
||||
* "$Id: ipp.c 12469 2015-02-01 04:51:08Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* 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
|
||||
@@ -1728,7 +1728,7 @@ ippCopyAttribute(
|
||||
/*
|
||||
* 'ippCopyAttributes()' - Copy attributes from one IPP message to another.
|
||||
*
|
||||
* Zero or more attributes are copied from the source IPP message, @code@ src, to the
|
||||
* Zero or more attributes are copied from the source IPP message, @code src@, to the
|
||||
* destination IPP message, @code dst@. When @code quickcopy@ is non-zero, a "shallow"
|
||||
* reference copy of the attribute is created - this should only be done as long as the
|
||||
* original source IPP message will not be freed for the life of the destination.
|
||||
@@ -2032,7 +2032,7 @@ ippFindNextAttribute(ipp_t *ipp, /* I - IPP message */
|
||||
*childattr; /* Child attribute */
|
||||
ipp_tag_t value_tag; /* Value tag */
|
||||
char parent[1024], /* Parent attribute name */
|
||||
*child; /* Child attribute name */
|
||||
*child = NULL; /* Child attribute name */
|
||||
|
||||
|
||||
DEBUG_printf(("2ippFindNextAttribute(ipp=%p, name=\"%s\", type=%02x(%s))",
|
||||
@@ -6675,7 +6675,7 @@ ipp_length(ipp_t *ipp, /* I - IPP message or collection */
|
||||
DEBUG_printf(("5ipp_length: attr->name=\"%s\", attr->num_values=%d, "
|
||||
"bytes=" CUPS_LLFMT, attr->name, attr->num_values, CUPS_LLCAST bytes));
|
||||
|
||||
if (attr->value_tag < IPP_TAG_EXTENSION)
|
||||
if ((attr->value_tag & ~IPP_TAG_CUPS_CONST) < IPP_TAG_EXTENSION)
|
||||
bytes += (size_t)attr->num_values;/* Value tag for each value */
|
||||
else
|
||||
bytes += (size_t)(5 * attr->num_values);
|
||||
@@ -6830,6 +6830,22 @@ ipp_read_http(http_t *http, /* I - Client connection */
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (http->used == 0 && http->timeout_value > 0)
|
||||
{
|
||||
/*
|
||||
* Wait up to timeout seconds for more data on blocking sockets...
|
||||
*/
|
||||
|
||||
if (!httpWait(http, (int)(1000 * http->timeout_value)))
|
||||
{
|
||||
/*
|
||||
* Signal no data...
|
||||
*/
|
||||
|
||||
bytes = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bytes = httpRead2(http, (char *)buffer, length - (size_t)tbytes)) < 0)
|
||||
{
|
||||
@@ -7046,5 +7062,5 @@ ipp_write_file(int *fd, /* I - File descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 11840 2014-04-29 15:57:26Z msweet $".
|
||||
* End of "$Id: ipp.c 12469 2015-02-01 04:51:08Z msweet $".
|
||||
*/
|
||||
|
||||
+34
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: language.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: language.c 12266 2014-11-19 16:05:28Z msweet $"
|
||||
*
|
||||
* I18N/language support for CUPS.
|
||||
*
|
||||
@@ -1139,7 +1139,7 @@ appleLangDefault(void)
|
||||
int i; /* Looping var */
|
||||
CFBundleRef bundle; /* Main bundle (if any) */
|
||||
CFArrayRef bundleList; /* List of localizations in bundle */
|
||||
CFPropertyListRef localizationList;
|
||||
CFPropertyListRef localizationList = NULL;
|
||||
/* List of localization data */
|
||||
CFStringRef languageName; /* Current name */
|
||||
CFStringRef localeName; /* Canonical from of name */
|
||||
@@ -1165,14 +1165,42 @@ appleLangDefault(void)
|
||||
else if ((bundle = CFBundleGetMainBundle()) != NULL &&
|
||||
(bundleList = CFBundleCopyBundleLocalizations(bundle)) != NULL)
|
||||
{
|
||||
CFURLRef resources = CFBundleCopyResourcesDirectoryURL(bundle);
|
||||
|
||||
DEBUG_puts("3appleLangDefault: Getting localizationList from bundle.");
|
||||
|
||||
localizationList =
|
||||
CFBundleCopyPreferredLocalizationsFromArray(bundleList);
|
||||
if (resources)
|
||||
{
|
||||
CFStringRef cfpath = CFURLCopyPath(resources);
|
||||
char path[1024];
|
||||
|
||||
if (cfpath)
|
||||
{
|
||||
/*
|
||||
* See if we have an Info.plist file in the bundle...
|
||||
*/
|
||||
|
||||
CFStringGetCString(cfpath, path,sizeof(path), kCFStringEncodingUTF8);
|
||||
DEBUG_printf(("3appleLangDefault: Got a resource URL (\"%s\")", path));
|
||||
strlcat(path, "Contents/Info.plist", sizeof(path));
|
||||
|
||||
if (!access(path, R_OK))
|
||||
localizationList = CFBundleCopyPreferredLocalizationsFromArray(bundleList);
|
||||
else
|
||||
DEBUG_puts("3appleLangDefault: No Info.plist, ignoring resource URL...");
|
||||
|
||||
CFRelease(cfpath);
|
||||
}
|
||||
|
||||
CFRelease(resources);
|
||||
}
|
||||
else
|
||||
DEBUG_puts("3appleLangDefault: No resource URL.");
|
||||
|
||||
CFRelease(bundleList);
|
||||
}
|
||||
else
|
||||
|
||||
if (!localizationList)
|
||||
{
|
||||
DEBUG_puts("3appleLangDefault: Getting localizationList from preferences.");
|
||||
|
||||
@@ -1560,5 +1588,5 @@ cups_unquote(char *d, /* O - Unquoted string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: language.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: language.c 12266 2014-11-19 16:05:28Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: md5.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: md5.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* Private MD5 implementation for CUPS.
|
||||
*
|
||||
@@ -333,7 +333,7 @@ _cupsMD5Finish(_cups_md5_state_t *pms, unsigned char digest[16])
|
||||
for (i = 0; i < 8; ++i)
|
||||
data[i] = (unsigned char)(pms->count[i >> 2] >> ((i & 3) << 3));
|
||||
/* Pad to 56 bytes mod 64. */
|
||||
_cupsMD5Append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
|
||||
_cupsMD5Append(pms, pad, (int)((55 - (pms->count[0] >> 3)) & 63) + 1);
|
||||
/* Append the length. */
|
||||
_cupsMD5Append(pms, data, 8);
|
||||
for (i = 0; i < 16; ++i)
|
||||
@@ -342,5 +342,5 @@ _cupsMD5Finish(_cups_md5_state_t *pms, unsigned char digest[16])
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: md5.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: md5.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
+23
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ppd-cache.c 11832 2014-04-24 15:04:00Z msweet $"
|
||||
* "$Id: ppd-cache.c 12434 2015-01-28 16:29:06Z msweet $"
|
||||
*
|
||||
* PPD cache implementation for CUPS.
|
||||
*
|
||||
* Copyright 2010-2014 by Apple Inc.
|
||||
* Copyright 2010-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -2630,7 +2630,7 @@ pwg_compare_finishings(
|
||||
_pwg_finishings_t *a, /* I - First finishings value */
|
||||
_pwg_finishings_t *b) /* I - Second finishings value */
|
||||
{
|
||||
return (b->value - a->value);
|
||||
return ((int)b->value - (int)a->value);
|
||||
}
|
||||
|
||||
|
||||
@@ -2691,6 +2691,25 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
*end; /* End of name buffer */
|
||||
|
||||
|
||||
if (_cups_islower(*ppd))
|
||||
{
|
||||
/*
|
||||
* Already lowercase name, use as-is?
|
||||
*/
|
||||
|
||||
const char *ppdptr; /* Pointer into PPD keyword */
|
||||
|
||||
for (ppdptr = ppd + 1; *ppdptr; ppdptr ++)
|
||||
if (_cups_isupper(*ppdptr) || strchr(dashchars, *ppdptr))
|
||||
break;
|
||||
|
||||
if (!*ppdptr)
|
||||
{
|
||||
strlcpy(name, ppd, namesize);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (ptr = name, end = name + namesize - 1; *ppd && ptr < end; ppd ++)
|
||||
{
|
||||
if (_cups_isalnum(*ppd) || *ppd == '-')
|
||||
@@ -2712,5 +2731,5 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-cache.c 11832 2014-04-24 15:04:00Z msweet $".
|
||||
* End of "$Id: ppd-cache.c 12434 2015-01-28 16:29:06Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: sidechannel.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: sidechannel.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
*
|
||||
* Side-channel API code for CUPS.
|
||||
*
|
||||
@@ -490,7 +490,7 @@ cupsSideChannelSNMPWalk(
|
||||
real_data[real_datalen] = '\0';
|
||||
|
||||
real_oidlen = strlen(real_data) + 1;
|
||||
real_datalen -= real_oidlen;
|
||||
real_datalen -= (int)real_oidlen;
|
||||
|
||||
/*
|
||||
* Call the callback with the OID and data...
|
||||
@@ -625,5 +625,5 @@ cupsSideChannelWrite(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: sidechannel.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: sidechannel.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: testfile.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: testfile.c 12578 2015-03-30 19:07:29Z msweet $"
|
||||
*
|
||||
* File test program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -205,14 +205,14 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Cat the filename on the command-line...
|
||||
*/
|
||||
|
||||
char line[1024]; /* Line from file */
|
||||
char line[8192]; /* Line from file */
|
||||
|
||||
if ((fp = cupsFileOpen(argv[1], "r")) == NULL)
|
||||
{
|
||||
perror(argv[1]);
|
||||
status = 1;
|
||||
}
|
||||
else
|
||||
else if (argc == 2)
|
||||
{
|
||||
status = 0;
|
||||
|
||||
@@ -224,6 +224,21 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
status = 0;
|
||||
ssize_t bytes;
|
||||
|
||||
while ((bytes = cupsFileRead(fp, line, sizeof(line))) > 0)
|
||||
printf("%s: %d bytes\n", argv[1], (int)bytes);
|
||||
|
||||
if (cupsFileEOF(fp))
|
||||
printf("%s: EOF\n", argv[1]);
|
||||
else
|
||||
perror(argv[1]);
|
||||
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
return (status);
|
||||
@@ -798,7 +813,8 @@ read_write_tests(int compression) /* I - Use compression? */
|
||||
* Remove the test file...
|
||||
*/
|
||||
|
||||
unlink(compression ? "testfile.dat.gz" : "testfile.dat");
|
||||
if (!status)
|
||||
unlink(compression ? "testfile.dat.gz" : "testfile.dat");
|
||||
|
||||
/*
|
||||
* Return the test status...
|
||||
@@ -809,5 +825,5 @@ read_write_tests(int compression) /* I - Use compression? */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testfile.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: testfile.c 12578 2015-03-30 19:07:29Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testppd.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: testppd.c 12604 2015-05-06 01:43:05Z msweet $"
|
||||
*
|
||||
* PPD test program for CUPS.
|
||||
*
|
||||
@@ -859,7 +859,19 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
struct stat fileinfo; /* File information */
|
||||
|
||||
|
||||
if (!strncmp(argv[1], "-d", 2))
|
||||
if (strchr(argv[1], ':'))
|
||||
{
|
||||
/*
|
||||
* Server PPD...
|
||||
*/
|
||||
|
||||
if ((filename = cupsGetServerPPD(CUPS_HTTP_DEFAULT, argv[1])) == NULL)
|
||||
{
|
||||
printf("%s: %s\n", argv[1], cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
else if (!strncmp(argv[1], "-d", 2))
|
||||
{
|
||||
const char *printer; /* Printer name */
|
||||
|
||||
@@ -1107,5 +1119,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testppd.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: testppd.c 12604 2015-05-06 01:43:05Z msweet $".
|
||||
*/
|
||||
|
||||
+136
-14
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: tls-darwin.c 12029 2014-07-15 18:59:26Z msweet $"
|
||||
* "$Id: tls-darwin.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* TLS support code for CUPS on OS X.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* 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
|
||||
@@ -15,7 +15,7 @@
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/**** This file is included from http.c ****/
|
||||
/**** This file is included from tls.c ****/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
@@ -26,6 +26,14 @@
|
||||
extern char **environ;
|
||||
|
||||
|
||||
/*
|
||||
* Test define - set to 1 to use SSLSetEnabledCiphers. Currently disabled (0)
|
||||
* because of <rdar://problem/18707430>.
|
||||
*/
|
||||
|
||||
#define USE_SET_ENABLED_CIPHERS 0
|
||||
|
||||
|
||||
/*
|
||||
* Local globals...
|
||||
*/
|
||||
@@ -41,6 +49,7 @@ static char *tls_keypath = NULL;
|
||||
/* Server cert keychain path */
|
||||
static _cups_mutex_t tls_mutex = _CUPS_MUTEX_INITIALIZER;
|
||||
/* Mutex for keychain/certs */
|
||||
static int tls_options = 0;/* Options for TLS connections */
|
||||
#endif /* HAVE_SECKEYCHAINOPEN */
|
||||
|
||||
|
||||
@@ -61,7 +70,7 @@ static OSStatus http_cdsa_write(SSLConnectionRef connection, const void *data,
|
||||
/*
|
||||
* 'cupsMakeServerCredentials()' - Make a self-signed certificate and private key pair.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -283,7 +292,7 @@ cleanup:
|
||||
* Note: The server credentials are used by all threads in the running process.
|
||||
* This function is threadsafe.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -452,7 +461,7 @@ _httpCreateCredentials(
|
||||
/*
|
||||
* 'httpCredentialsAreValidForName()' - Return whether the credentials are valid for the given name.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 if valid, 0 otherwise */
|
||||
@@ -515,7 +524,7 @@ httpCredentialsAreValidForName(
|
||||
/*
|
||||
* 'httpCredentialsGetTrust()' - Return the trust of credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
http_trust_t /* O - Level of trust */
|
||||
@@ -537,6 +546,9 @@ httpCredentialsGetTrust(
|
||||
if ((secCert = http_cdsa_create_credential((http_credential_t *)cupsArrayFirst(credentials))) == NULL)
|
||||
return (HTTP_TRUST_UNKNOWN);
|
||||
|
||||
if (cg->any_root < 0)
|
||||
_cupsSetDefaults();
|
||||
|
||||
/*
|
||||
* Look this common name up in the default keychains...
|
||||
*/
|
||||
@@ -599,7 +611,7 @@ httpCredentialsGetTrust(
|
||||
/*
|
||||
* 'httpCredentialsGetExpiration()' - Return the expiration date of the credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
time_t /* O - Expiration date of credentials */
|
||||
@@ -624,7 +636,7 @@ httpCredentialsGetExpiration(
|
||||
/*
|
||||
* 'httpCredentialsString()' - Return a string representing the credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS X 10.10@
|
||||
*/
|
||||
|
||||
size_t /* O - Total size of credentials string */
|
||||
@@ -697,7 +709,7 @@ _httpFreeCredentials(
|
||||
/*
|
||||
* 'httpLoadCredentials()' - Load X.509 credentials from a keychain file.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -803,7 +815,7 @@ httpLoadCredentials(
|
||||
/*
|
||||
* 'httpSaveCredentials()' - Save X.509 credentials to a keychain file.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - -1 on error, 0 on success */
|
||||
@@ -972,6 +984,17 @@ _httpTLSRead(http_t *http, /* I - HTTP connection */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_httpTLSSetOptions()' - Set TLS protocol and cipher suite options.
|
||||
*/
|
||||
|
||||
void
|
||||
_httpTLSSetOptions(int options) /* I - Options */
|
||||
{
|
||||
tls_options = options;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_httpTLSStart()' - Set up SSL/TLS support on a connection.
|
||||
*/
|
||||
@@ -1033,10 +1056,109 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
{
|
||||
error = SSLSetSessionOption(http->tls, kSSLSessionOptionBreakOnServerAuth,
|
||||
true);
|
||||
DEBUG_printf(("4_httpTLSStart: SSLSetSessionOption, error=%d",
|
||||
(int)error));
|
||||
DEBUG_printf(("4_httpTLSStart: SSLSetSessionOption, error=%d", (int)error));
|
||||
}
|
||||
|
||||
if (!error)
|
||||
{
|
||||
error = SSLSetProtocolVersionMin(http->tls, (tls_options & _HTTP_TLS_ALLOW_SSL3) ? kSSLProtocol3 : kTLSProtocol1);
|
||||
DEBUG_printf(("4_httpTLSStart: SSLSetProtocolVersionMin, error=%d", (int)error));
|
||||
}
|
||||
|
||||
# if USE_SET_ENABLED_CIPHERS
|
||||
if (!error)
|
||||
{
|
||||
SSLCipherSuite supported[100]; /* Supported cipher suites */
|
||||
size_t num_supported; /* Number of supported cipher suites */
|
||||
SSLCipherSuite enabled[100]; /* Cipher suites to enable */
|
||||
size_t num_enabled; /* Number of cipher suites to enable */
|
||||
|
||||
num_supported = sizeof(supported) / sizeof(supported[0]);
|
||||
error = SSLGetSupportedCiphers(http->tls, supported, &num_supported);
|
||||
|
||||
if (!error)
|
||||
{
|
||||
DEBUG_printf(("4_httpTLSStart: %d cipher suites supported.", (int)num_supported));
|
||||
|
||||
for (i = 0, num_enabled = 0; i < (int)num_supported && num_enabled < (sizeof(enabled) / sizeof(enabled[0])); i ++)
|
||||
{
|
||||
switch (supported[i])
|
||||
{
|
||||
/* Obviously insecure cipher suites that we never want to use */
|
||||
case SSL_NULL_WITH_NULL_NULL :
|
||||
case SSL_RSA_WITH_NULL_MD5 :
|
||||
case SSL_RSA_WITH_NULL_SHA :
|
||||
case SSL_RSA_EXPORT_WITH_RC4_40_MD5 :
|
||||
case SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 :
|
||||
case SSL_RSA_EXPORT_WITH_DES40_CBC_SHA :
|
||||
case SSL_RSA_WITH_DES_CBC_SHA :
|
||||
case SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA :
|
||||
case SSL_DH_DSS_WITH_DES_CBC_SHA :
|
||||
case SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA :
|
||||
case SSL_DH_RSA_WITH_DES_CBC_SHA :
|
||||
case SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA :
|
||||
case SSL_DHE_DSS_WITH_DES_CBC_SHA :
|
||||
case SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA :
|
||||
case SSL_DHE_RSA_WITH_DES_CBC_SHA :
|
||||
case SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 :
|
||||
case SSL_DH_anon_WITH_RC4_128_MD5 :
|
||||
case SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA :
|
||||
case SSL_DH_anon_WITH_DES_CBC_SHA :
|
||||
case SSL_DH_anon_WITH_3DES_EDE_CBC_SHA :
|
||||
case SSL_FORTEZZA_DMS_WITH_NULL_SHA :
|
||||
case TLS_DH_anon_WITH_AES_128_CBC_SHA :
|
||||
case TLS_DH_anon_WITH_AES_256_CBC_SHA :
|
||||
case TLS_ECDH_ECDSA_WITH_NULL_SHA :
|
||||
case TLS_ECDHE_RSA_WITH_NULL_SHA :
|
||||
case TLS_ECDH_anon_WITH_NULL_SHA :
|
||||
case TLS_ECDH_anon_WITH_RC4_128_SHA :
|
||||
case TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA :
|
||||
case TLS_ECDH_anon_WITH_AES_128_CBC_SHA :
|
||||
case TLS_ECDH_anon_WITH_AES_256_CBC_SHA :
|
||||
case TLS_RSA_WITH_NULL_SHA256 :
|
||||
case TLS_DH_anon_WITH_AES_128_CBC_SHA256 :
|
||||
case TLS_DH_anon_WITH_AES_256_CBC_SHA256 :
|
||||
case TLS_PSK_WITH_NULL_SHA :
|
||||
case TLS_DHE_PSK_WITH_NULL_SHA :
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA :
|
||||
case TLS_DH_anon_WITH_AES_128_GCM_SHA256 :
|
||||
case TLS_DH_anon_WITH_AES_256_GCM_SHA384 :
|
||||
case TLS_PSK_WITH_NULL_SHA256 :
|
||||
case TLS_PSK_WITH_NULL_SHA384 :
|
||||
case TLS_DHE_PSK_WITH_NULL_SHA256 :
|
||||
case TLS_DHE_PSK_WITH_NULL_SHA384 :
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA256 :
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA384 :
|
||||
case SSL_RSA_WITH_DES_CBC_MD5 :
|
||||
break;
|
||||
|
||||
/* RC4 cipher suites that should only be used as a last resort */
|
||||
case SSL_RSA_WITH_RC4_128_MD5 :
|
||||
case SSL_RSA_WITH_RC4_128_SHA :
|
||||
case TLS_ECDH_ECDSA_WITH_RC4_128_SHA :
|
||||
case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA :
|
||||
case TLS_ECDH_RSA_WITH_RC4_128_SHA :
|
||||
case TLS_ECDHE_RSA_WITH_RC4_128_SHA :
|
||||
case TLS_PSK_WITH_RC4_128_SHA :
|
||||
case TLS_DHE_PSK_WITH_RC4_128_SHA :
|
||||
case TLS_RSA_PSK_WITH_RC4_128_SHA :
|
||||
if (tls_options & _HTTP_TLS_ALLOW_RC4)
|
||||
enabled[num_enabled ++] = supported[i];
|
||||
break;
|
||||
|
||||
/* Anything else we'll assume is secure */
|
||||
default :
|
||||
enabled[num_enabled ++] = supported[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_printf(("4_httpTLSStart: %d cipher suites enabled.", (int)num_enabled));
|
||||
error = SSLSetEnabledCiphers(http->tls, enabled, num_enabled);
|
||||
}
|
||||
}
|
||||
#endif /* USE_SET_ENABLED_CIPHERS */
|
||||
|
||||
if (!error && http->mode == _HTTP_MODE_CLIENT)
|
||||
{
|
||||
/*
|
||||
@@ -1660,5 +1782,5 @@ http_cdsa_write(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-darwin.c 12029 2014-07-15 18:59:26Z msweet $".
|
||||
* End of "$Id: tls-darwin.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+55
-12
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: tls-gnutls.c 12050 2014-07-18 16:51:12Z msweet $"
|
||||
* "$Id: tls-gnutls.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* TLS support code for CUPS using GNU TLS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* 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
|
||||
@@ -15,6 +15,7 @@
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/**** This file is included from tls.c ****/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
@@ -35,6 +36,7 @@ static char *tls_keypath = NULL;
|
||||
/* Server cert keychain path */
|
||||
static _cups_mutex_t tls_mutex = _CUPS_MUTEX_INITIALIZER;
|
||||
/* Mutex for keychain/certs */
|
||||
static int tls_options = 0;/* Options for TLS connections */
|
||||
|
||||
|
||||
/*
|
||||
@@ -51,7 +53,7 @@ static ssize_t http_gnutls_write(gnutls_transport_ptr_t ptr, const void *data,
|
||||
/*
|
||||
* 'cupsMakeServerCredentials()' - Make a self-signed certificate and private key pair.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -228,7 +230,7 @@ cupsMakeServerCredentials(
|
||||
* Note: The server credentials are used by all threads in the running process.
|
||||
* This function is threadsafe.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -357,7 +359,7 @@ _httpFreeCredentials(
|
||||
/*
|
||||
* 'httpCredentialsAreValidForName()' - Return whether the credentials are valid for the given name.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 if valid, 0 otherwise */
|
||||
@@ -383,7 +385,7 @@ httpCredentialsAreValidForName(
|
||||
/*
|
||||
* 'httpCredentialsGetTrust()' - Return the trust of credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
http_trust_t /* O - Level of trust */
|
||||
@@ -405,6 +407,9 @@ httpCredentialsGetTrust(
|
||||
if ((cert = http_gnutls_create_credential((http_credential_t *)cupsArrayFirst(credentials))) == NULL)
|
||||
return (HTTP_TRUST_UNKNOWN);
|
||||
|
||||
if (cg->any_root < 0)
|
||||
_cupsSetDefaults();
|
||||
|
||||
/*
|
||||
* Look this common name up in the default keychains...
|
||||
*/
|
||||
@@ -475,7 +480,7 @@ httpCredentialsGetTrust(
|
||||
/*
|
||||
* 'httpCredentialsGetExpiration()' - Return the expiration date of the credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
time_t /* O - Expiration date of credentials */
|
||||
@@ -500,7 +505,7 @@ httpCredentialsGetExpiration(
|
||||
/*
|
||||
* 'httpCredentialsString()' - Return a string representing the credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
size_t /* O - Total size of credentials string */
|
||||
@@ -556,7 +561,7 @@ httpCredentialsString(
|
||||
/*
|
||||
* 'httpLoadCredentials()' - Load X.509 credentials from a keychain file.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -682,7 +687,7 @@ httpLoadCredentials(
|
||||
/*
|
||||
* 'httpSaveCredentials()' - Save X.509 credentials to a keychain file.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - -1 on error, 0 on success */
|
||||
@@ -1000,6 +1005,17 @@ _httpTLSSetCredentials(http_t *http) /* I - Connection to server */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_httpTLSSetOptions()' - Set TLS protocol and cipher suite options.
|
||||
*/
|
||||
|
||||
void
|
||||
_httpTLSSetOptions(int options) /* I - Options */
|
||||
{
|
||||
tls_options = options;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_httpTLSStart()' - Set up SSL/TLS support on a connection.
|
||||
*/
|
||||
@@ -1094,7 +1110,6 @@ _httpTLSStart(http_t *http) /* I - Connection to server */
|
||||
keyfile[1024]; /* Private key file */
|
||||
int have_creds = 0; /* Have credentials? */
|
||||
|
||||
|
||||
if (http->fields[HTTP_FIELD_HOST][0])
|
||||
{
|
||||
/*
|
||||
@@ -1184,9 +1199,37 @@ _httpTLSStart(http_t *http) /* I - Connection to server */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
||||
if (!tls_options)
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
else if ((tls_options & _HTTP_TLS_ALLOW_SSL3) && (tls_options & _HTTP_TLS_ALLOW_RC4))
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL", NULL);
|
||||
else if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL", NULL);
|
||||
else
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
|
||||
#else
|
||||
gnutls_priority_t priority; /* Priority */
|
||||
|
||||
if (!tls_options)
|
||||
gnutls_priority_init(&priority, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
else if ((tls_options & _HTTP_TLS_ALLOW_SSL3) && (tls_options & _HTTP_TLS_ALLOW_RC4))
|
||||
gnutls_priority_init(&priority, "NORMAL", NULL);
|
||||
else if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
gnutls_priority_init(&priority, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL", NULL);
|
||||
else
|
||||
gnutls_priority_init(&priority, "NORMAL:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
|
||||
gnutls_priority_set(http->tls, priority);
|
||||
gnutls_priority_deinit(priority);
|
||||
#endif /* HAVE_GNUTLS_PRIORITY_SET_DIRECT */
|
||||
|
||||
gnutls_transport_set_ptr(http->tls, (gnutls_transport_ptr_t)http);
|
||||
gnutls_transport_set_pull_function(http->tls, http_gnutls_read);
|
||||
#ifdef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION
|
||||
gnutls_transport_set_pull_timeout_function(http->tls, (gnutls_pull_timeout_func)httpWait);
|
||||
#endif /* HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
|
||||
gnutls_transport_set_push_function(http->tls, http_gnutls_write);
|
||||
|
||||
while ((status = gnutls_handshake(http->tls)) != GNUTLS_E_SUCCESS)
|
||||
@@ -1289,5 +1332,5 @@ _httpTLSWrite(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-gnutls.c 12050 2014-07-18 16:51:12Z msweet $".
|
||||
* End of "$Id: tls-gnutls.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+71
-14
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* "$Id: tls-sspi.c 12047 2014-07-18 13:53:34Z msweet $"
|
||||
* "$Id: tls-sspi.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* TLS support for CUPS on Windows using SSPI.
|
||||
* TLS support for CUPS on Windows using the Security Support Provider
|
||||
* Interface (SSPI).
|
||||
*
|
||||
* Copyright 2010-2014 by Apple Inc.
|
||||
* Copyright 2010-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -14,6 +15,8 @@
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/**** This file is included from tls.c ****/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
@@ -46,6 +49,14 @@
|
||||
# define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID 0x00002000 /* Expired X509 Cert. */
|
||||
#endif /* !SECURITY_FLAG_IGNORE_CERT_DATE_INVALID */
|
||||
|
||||
|
||||
/*
|
||||
* Local globals...
|
||||
*/
|
||||
|
||||
static int tls_options = 0;/* Options for TLS connections */
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
@@ -66,7 +77,7 @@ static DWORD http_sspi_verify(PCCERT_CONTEXT cert, const char *common_name, DWOR
|
||||
/*
|
||||
* 'cupsMakeServerCredentials()' - Make a self-signed certificate and private key pair.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -102,7 +113,7 @@ cupsMakeServerCredentials(
|
||||
* Note: The server credentials are used by all threads in the running process.
|
||||
* This function is threadsafe.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@@ -165,7 +176,7 @@ _httpCreateCredentials(
|
||||
/*
|
||||
* 'httpCredentialsAreValidForName()' - Return whether the credentials are valid for the given name.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 1 if valid, 0 otherwise */
|
||||
@@ -230,7 +241,7 @@ httpCredentialsAreValidForName(
|
||||
/*
|
||||
* 'httpCredentialsGetTrust()' - Return the trust of credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
http_trust_t /* O - Level of trust */
|
||||
@@ -251,6 +262,9 @@ httpCredentialsGetTrust(
|
||||
if (!cert)
|
||||
return (HTTP_TRUST_UNKNOWN);
|
||||
|
||||
if (cg->any_root < 0)
|
||||
_cupsSetDefaults();
|
||||
|
||||
if (cg->any_root)
|
||||
certFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA;
|
||||
|
||||
@@ -272,7 +286,7 @@ httpCredentialsGetTrust(
|
||||
/*
|
||||
* 'httpCredentialsGetExpiration()' - Return the expiration date of the credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
time_t /* O - Expiration date of credentials */
|
||||
@@ -309,7 +323,7 @@ httpCredentialsGetExpiration(
|
||||
/*
|
||||
* 'httpCredentialsString()' - Return a string representing the credentials.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
size_t /* O - Total size of credentials string */
|
||||
@@ -399,7 +413,7 @@ _httpFreeCredentials(
|
||||
/*
|
||||
* 'httpLoadCredentials()' - Load X.509 credentials from a keychain file.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - 0 on success, -1 on error */
|
||||
@@ -523,7 +537,7 @@ cleanup:
|
||||
/*
|
||||
* 'httpSaveCredentials()' - Save X.509 credentials to a keychain file.
|
||||
*
|
||||
* @since CUPS 2.0@
|
||||
* @since CUPS 2.0/OS 10.10@
|
||||
*/
|
||||
|
||||
int /* O - -1 on error, 0 on success */
|
||||
@@ -894,6 +908,17 @@ _httpTLSRead(http_t *http, /* I - HTTP connection */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_httpTLSSetOptions()' - Set TLS protocol and cipher suite options.
|
||||
*/
|
||||
|
||||
void
|
||||
_httpTLSSetOptions(int options) /* I - Options */
|
||||
{
|
||||
tls_options = options;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '_httpTLSStart()' - Set up SSL/TLS support on a connection.
|
||||
*/
|
||||
@@ -1725,11 +1750,43 @@ http_sspi_find_credentials(
|
||||
SchannelCred.paCred = &storedContext;
|
||||
|
||||
/*
|
||||
* SSPI doesn't seem to like it if grbitEnabledProtocols is set for a client.
|
||||
* Set supported protocols (can also be overriden in the registry...)
|
||||
*/
|
||||
|
||||
#ifdef SP_PROT_TLS1_2_SERVER
|
||||
if (http->mode == _HTTP_MODE_SERVER)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_SSL3TLS1;
|
||||
{
|
||||
if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_0_SERVER | SP_PROT_SSL3_SERVER;
|
||||
else
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_0_SERVER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_0_CLIENT | SP_PROT_SSL3_CLIENT;
|
||||
else
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_0_CLIENT;
|
||||
}
|
||||
|
||||
#else
|
||||
if (http->mode == _HTTP_MODE_SERVER)
|
||||
{
|
||||
if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_SERVER | SP_PROT_SSL3_SERVER;
|
||||
else
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_SERVER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT | SP_PROT_SSL3_CLIENT;
|
||||
else
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT;
|
||||
}
|
||||
#endif /* SP_PROT_TLS1_2_SERVER */
|
||||
|
||||
/* TODO: Support _HTTP_TLS_ALLOW_RC4 option; right now we'll rely on Windows registry to enable/disable RC4... */
|
||||
|
||||
/*
|
||||
* Create an SSPI credential.
|
||||
@@ -2359,5 +2416,5 @@ http_sspi_verify(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-sspi.c 12047 2014-07-18 13:53:34Z msweet $".
|
||||
* End of "$Id: tls-sspi.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+58
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: tls.c 11841 2014-04-29 16:39:25Z msweet $"
|
||||
* "$Id: tls.c 12136 2014-08-29 15:19:40Z msweet $"
|
||||
*
|
||||
* TLS routines for CUPS.
|
||||
*
|
||||
@@ -46,12 +46,67 @@
|
||||
# include "tls-gnutls.c"
|
||||
# elif defined(HAVE_CDSASSL)
|
||||
# include "tls-darwin.c"
|
||||
# else
|
||||
# elif defined(HAVE_SSPISSL)
|
||||
# include "tls-sspi.c"
|
||||
# endif /* HAVE_GNUTLS */
|
||||
#else
|
||||
/* Stubs for when TLS is not supported/available */
|
||||
int
|
||||
httpCopyCredentials(http_t *http, cups_array_t **credentials)
|
||||
{
|
||||
(void)http;
|
||||
if (credentials)
|
||||
*credentials = NULL;
|
||||
return (-1);
|
||||
}
|
||||
int
|
||||
httpCredentialsAreValidForName(cups_array_t *credentials, const char *common_name)
|
||||
{
|
||||
(void)credentials;
|
||||
(void)common_name;
|
||||
return (1);
|
||||
}
|
||||
time_t
|
||||
httpCredentialsGetExpiration(cups_array_t *credentials)
|
||||
{
|
||||
(void)credentials;
|
||||
return (INT_MAX);
|
||||
}
|
||||
http_trust_t
|
||||
httpCredentialsGetTrust(cups_array_t *credentials, const char *common_name)
|
||||
{
|
||||
(void)credentials;
|
||||
(void)common_name;
|
||||
return (HTTP_TRUST_OK);
|
||||
}
|
||||
size_t
|
||||
httpCredentialsString(cups_array_t *credentials, char *buffer, size_t bufsize)
|
||||
{
|
||||
(void)credentials;
|
||||
(void)bufsize;
|
||||
if (buffer)
|
||||
*buffer = '\0';
|
||||
return (0);
|
||||
}
|
||||
int
|
||||
httpLoadCredentials(const char *path, cups_array_t **credentials, const char *common_name)
|
||||
{
|
||||
(void)path;
|
||||
(void)credentials;
|
||||
(void)common_name;
|
||||
return (-1);
|
||||
}
|
||||
int
|
||||
httpSaveCredentials(const char *path, cups_array_t *credentials, const char *common_name)
|
||||
{
|
||||
(void)path;
|
||||
(void)credentials;
|
||||
(void)common_name;
|
||||
return (-1);
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls.c 11841 2014-04-29 16:39:25Z msweet $".
|
||||
* End of "$Id: tls.c 12136 2014-08-29 15:19:40Z msweet $".
|
||||
*/
|
||||
|
||||
+14
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: transcode.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: transcode.c 12332 2014-12-09 20:58:45Z msweet $"
|
||||
*
|
||||
* Transcoding support for CUPS.
|
||||
*
|
||||
@@ -154,11 +154,15 @@ cupsCharsetToUTF8(
|
||||
|
||||
if (map_encoding != encoding)
|
||||
{
|
||||
char toset[1024]; /* Destination character set */
|
||||
|
||||
_cupsCharmapFlush();
|
||||
|
||||
snprintf(toset, sizeof(toset), "%s//IGNORE", _cupsEncodingName(encoding));
|
||||
|
||||
map_encoding = encoding;
|
||||
map_from_utf8 = iconv_open(_cupsEncodingName(encoding), "UTF-8");
|
||||
map_to_utf8 = iconv_open("UTF-8", _cupsEncodingName(encoding));
|
||||
map_encoding = encoding;
|
||||
map_to_utf8 = iconv_open("UTF-8", toset);
|
||||
}
|
||||
|
||||
if (map_to_utf8 != (iconv_t)-1)
|
||||
@@ -279,11 +283,15 @@ cupsUTF8ToCharset(
|
||||
|
||||
if (map_encoding != encoding)
|
||||
{
|
||||
char toset[1024]; /* Destination character set */
|
||||
|
||||
_cupsCharmapFlush();
|
||||
|
||||
map_from_utf8 = iconv_open(_cupsEncodingName(encoding), "UTF-8");
|
||||
map_to_utf8 = iconv_open("UTF-8", _cupsEncodingName(encoding));
|
||||
snprintf(toset, sizeof(toset), "%s//IGNORE", _cupsEncodingName(encoding));
|
||||
|
||||
map_encoding = encoding;
|
||||
map_from_utf8 = iconv_open(_cupsEncodingName(encoding), "UTF-8");
|
||||
map_to_utf8 = iconv_open("UTF-8", toset);
|
||||
}
|
||||
|
||||
if (map_from_utf8 != (iconv_t)-1)
|
||||
@@ -708,5 +716,5 @@ cupsUTF32ToUTF8(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: transcode.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* End of "$Id: transcode.c 12332 2014-12-09 20:58:45Z msweet $"
|
||||
*/
|
||||
|
||||
+400
-248
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: usersys.c 11908 2014-06-09 18:57:44Z msweet $"
|
||||
* "$Id: usersys.c 12813 2015-07-30 15:00:40Z msweet $"
|
||||
*
|
||||
* User, system, and password routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -38,21 +38,46 @@
|
||||
#define _CUPS_PASSCHAR '*' /* Character that is echoed for password */
|
||||
|
||||
|
||||
/*
|
||||
* Local types...
|
||||
*/
|
||||
|
||||
typedef struct _cups_client_conf_s /**** client.conf config data ****/
|
||||
{
|
||||
#ifdef HAVE_SSL
|
||||
int ssl_options; /* SSLOptions values */
|
||||
#endif /* HAVE_SSL */
|
||||
int any_root, /* Allow any (e.g., self-signed) root */
|
||||
expired_certs, /* Allow expired certs */
|
||||
validate_certs; /* Validate certificates */
|
||||
http_encryption_t encryption; /* Encryption setting */
|
||||
char user[65], /* User name */
|
||||
server_name[256];
|
||||
/* Server hostname */
|
||||
#ifdef HAVE_GSSAPI
|
||||
char gss_service_name[32];
|
||||
/* Kerberos service name */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
} _cups_client_conf_t;
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void cups_read_client_conf(cups_file_t *fp,
|
||||
_cups_globals_t *cg,
|
||||
const char *cups_encryption,
|
||||
const char *cups_server,
|
||||
const char *cups_user,
|
||||
static void cups_finalize_client_conf(_cups_client_conf_t *cc);
|
||||
static void cups_init_client_conf(_cups_client_conf_t *cc);
|
||||
static void cups_read_client_conf(cups_file_t *fp, _cups_client_conf_t *cc);
|
||||
static void cups_set_default_ipp_port(_cups_globals_t *cg);
|
||||
static void cups_set_encryption(_cups_client_conf_t *cc, const char *value);
|
||||
#ifdef HAVE_GSSAPI
|
||||
const char *cups_gssservicename,
|
||||
static void cups_set_gss_service_name(_cups_client_conf_t *cc, const char *value);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
const char *cups_anyroot,
|
||||
const char *cups_expiredcerts,
|
||||
const char *cups_validatecerts);
|
||||
static void cups_set_server_name(_cups_client_conf_t *cc, const char *value);
|
||||
#ifdef HAVE_SSL
|
||||
static void cups_set_ssl_options(_cups_client_conf_t *cc, const char *value);
|
||||
#endif /* HAVE_SSL */
|
||||
static void cups_set_user(_cups_client_conf_t *cc, const char *value);
|
||||
|
||||
|
||||
/*
|
||||
@@ -211,8 +236,10 @@ cupsSetCredentials(
|
||||
if (cupsArrayCount(credentials) < 1)
|
||||
return (-1);
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
_httpFreeCredentials(cg->tls_credentials);
|
||||
cg->tls_credentials = _httpCreateCredentials(credentials);
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
return (cg->tls_credentials ? 0 : -1);
|
||||
}
|
||||
@@ -356,6 +383,9 @@ cupsSetServer(const char *server) /* I - Server name */
|
||||
cg->ipp_port = atoi(port);
|
||||
}
|
||||
|
||||
if (!cg->ipp_port)
|
||||
cups_set_default_ipp_port(cg);
|
||||
|
||||
if (cg->server[0] == '/')
|
||||
strlcpy(cg->servername, "localhost", sizeof(cg->servername));
|
||||
else
|
||||
@@ -366,6 +396,7 @@ cupsSetServer(const char *server) /* I - Server name */
|
||||
cg->server[0] = '\0';
|
||||
cg->servername[0] = '\0';
|
||||
cg->server_version = 20;
|
||||
cg->ipp_port = 0;
|
||||
}
|
||||
|
||||
if (cg->http)
|
||||
@@ -823,199 +854,154 @@ void
|
||||
_cupsSetDefaults(void)
|
||||
{
|
||||
cups_file_t *fp; /* File */
|
||||
const char *home, /* Home directory of user */
|
||||
*cups_encryption, /* CUPS_ENCRYPTION env var */
|
||||
*cups_server, /* CUPS_SERVER env var */
|
||||
*cups_user, /* CUPS_USER/USER env var */
|
||||
#ifdef HAVE_GSSAPI
|
||||
*cups_gssservicename, /* CUPS_GSSSERVICENAME env var */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
*cups_anyroot, /* CUPS_ANYROOT env var */
|
||||
*cups_expiredcerts, /* CUPS_EXPIREDCERTS env var */
|
||||
*cups_validatecerts; /* CUPS_VALIDATECERTS env var */
|
||||
const char *home; /* Home directory of user */
|
||||
char filename[1024]; /* Filename */
|
||||
_cups_client_conf_t cc; /* client.conf values */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
|
||||
|
||||
|
||||
DEBUG_puts("_cupsSetDefaults()");
|
||||
|
||||
/*
|
||||
* First collect environment variables...
|
||||
* Load initial client.conf values...
|
||||
*/
|
||||
|
||||
cups_encryption = getenv("CUPS_ENCRYPTION");
|
||||
cups_server = getenv("CUPS_SERVER");
|
||||
#ifdef HAVE_GSSAPI
|
||||
cups_gssservicename = getenv("CUPS_GSSSERVICENAME");
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cups_anyroot = getenv("CUPS_ANYROOT");
|
||||
cups_expiredcerts = getenv("CUPS_EXPIREDCERTS");
|
||||
cups_user = getenv("CUPS_USER");
|
||||
cups_validatecerts = getenv("CUPS_VALIDATECERTS");
|
||||
cups_init_client_conf(&cc);
|
||||
|
||||
/*
|
||||
* Then, if needed, read the ~/.cups/client.conf or /etc/cups/client.conf
|
||||
* files to get the default values...
|
||||
* Read the /etc/cups/client.conf and ~/.cups/client.conf files, if
|
||||
* present.
|
||||
*/
|
||||
|
||||
if (cg->encryption == (http_encryption_t)-1 || !cg->server[0] ||
|
||||
!cg->user[0] || !cg->ipp_port)
|
||||
snprintf(filename, sizeof(filename), "%s/client.conf", cg->cups_serverroot);
|
||||
if ((fp = cupsFileOpen(filename, "r")) != NULL)
|
||||
{
|
||||
# ifdef HAVE_GETEUID
|
||||
if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
|
||||
# elif !defined(WIN32)
|
||||
if (getuid() && (home = getenv("HOME")) != NULL)
|
||||
# else
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
# endif /* HAVE_GETEUID */
|
||||
{
|
||||
/*
|
||||
* Look for ~/.cups/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
|
||||
fp = cupsFileOpen(filename, "r");
|
||||
}
|
||||
else
|
||||
fp = NULL;
|
||||
|
||||
if (!fp)
|
||||
{
|
||||
/*
|
||||
* Look for CUPS_SERVERROOT/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/client.conf",
|
||||
cg->cups_serverroot);
|
||||
fp = cupsFileOpen(filename, "r");
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the configuration file and apply any environment variables; both
|
||||
* functions handle NULL cups_file_t pointers...
|
||||
*/
|
||||
|
||||
cups_read_client_conf(fp, cg, cups_encryption, cups_server, cups_user,
|
||||
#ifdef HAVE_GSSAPI
|
||||
cups_gssservicename,
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cups_anyroot, cups_expiredcerts, cups_validatecerts);
|
||||
cups_read_client_conf(fp, &cc);
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
|
||||
# ifdef HAVE_GETEUID
|
||||
if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
|
||||
# elif !defined(WIN32)
|
||||
if (getuid() && (home = getenv("HOME")) != NULL)
|
||||
# else
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
# endif /* HAVE_GETEUID */
|
||||
{
|
||||
/*
|
||||
* Look for ~/.cups/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
|
||||
if ((fp = cupsFileOpen(filename, "r")) != NULL)
|
||||
{
|
||||
cups_read_client_conf(fp, &cc);
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Finalize things so every client.conf value is set...
|
||||
*/
|
||||
|
||||
cups_finalize_client_conf(&cc);
|
||||
|
||||
if (cg->encryption == (http_encryption_t)-1)
|
||||
cg->encryption = cc.encryption;
|
||||
|
||||
if (!cg->server[0] || !cg->ipp_port)
|
||||
cupsSetServer(cc.server_name);
|
||||
|
||||
if (!cg->ipp_port)
|
||||
cups_set_default_ipp_port(cg);
|
||||
|
||||
if (!cg->user[0])
|
||||
strlcpy(cg->user, cc.user, sizeof(cg->user));
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if (!cg->gss_service_name[0])
|
||||
strlcpy(cg->gss_service_name, cc.gss_service_name, sizeof(cg->gss_service_name));
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if (cg->any_root < 0)
|
||||
cg->any_root = cc.any_root;
|
||||
|
||||
if (cg->expired_certs < 0)
|
||||
cg->expired_certs = cc.expired_certs;
|
||||
|
||||
if (cg->validate_certs < 0)
|
||||
cg->validate_certs = cc.validate_certs;
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
_httpTLSSetOptions(cc.ssl_options);
|
||||
#endif /* HAVE_SSL */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_read_client_conf()' - Read a client.conf file.
|
||||
* 'cups_boolean_value()' - Convert a string to a boolean value.
|
||||
*/
|
||||
|
||||
static int /* O - Boolean value */
|
||||
cups_boolean_value(const char *value) /* I - String value */
|
||||
{
|
||||
return (!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "on") || !_cups_strcasecmp(value, "true"));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_finalize_client_conf()' - Finalize client.conf values.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_read_client_conf(
|
||||
cups_file_t *fp, /* I - File to read */
|
||||
_cups_globals_t *cg, /* I - Global data */
|
||||
const char *cups_encryption, /* I - CUPS_ENCRYPTION env var */
|
||||
const char *cups_server, /* I - CUPS_SERVER env var */
|
||||
const char *cups_user, /* I - CUPS_USER env var */
|
||||
#ifdef HAVE_GSSAPI
|
||||
const char *cups_gssservicename,
|
||||
/* I - CUPS_GSSSERVICENAME env var */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
const char *cups_anyroot, /* I - CUPS_ANYROOT env var */
|
||||
const char *cups_expiredcerts, /* I - CUPS_EXPIREDCERTS env var */
|
||||
const char *cups_validatecerts)/* I - CUPS_VALIDATECERTS env var */
|
||||
cups_finalize_client_conf(
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
int linenum; /* Current line number */
|
||||
char line[1024], /* Line from file */
|
||||
*value, /* Pointer into line */
|
||||
encryption[1024], /* Encryption value */
|
||||
#ifndef __APPLE__
|
||||
server_name[1024], /* ServerName value */
|
||||
#endif /* !__APPLE__ */
|
||||
user[256], /* User value */
|
||||
any_root[1024], /* AllowAnyRoot value */
|
||||
expired_certs[1024], /* AllowExpiredCerts value */
|
||||
validate_certs[1024]; /* ValidateCerts value */
|
||||
const char *value; /* Environment variable */
|
||||
|
||||
|
||||
if ((value = getenv("CUPS_ANYROOT")) != NULL)
|
||||
cc->any_root = cups_boolean_value(value);
|
||||
|
||||
if ((value = getenv("CUPS_ENCRYPTION")) != NULL)
|
||||
cups_set_encryption(cc, value);
|
||||
|
||||
if ((value = getenv("CUPS_EXPIREDCERTS")) != NULL)
|
||||
cc->expired_certs = cups_boolean_value(value);
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
char gss_service_name[32]; /* GSSServiceName value */
|
||||
if ((value = getenv("CUPS_GSSSERVICENAME")) != NULL)
|
||||
cups_set_gss_service_name(cc, value);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if ((value = getenv("CUPS_SERVER")) != NULL)
|
||||
cups_set_server_name(cc, value);
|
||||
|
||||
if ((value = getenv("CUPS_USER")) != NULL)
|
||||
cups_set_user(cc, value);
|
||||
|
||||
if ((value = getenv("CUPS_VALIDATECERTS")) != NULL)
|
||||
cc->validate_certs = cups_boolean_value(value);
|
||||
|
||||
/*
|
||||
* Read from the file...
|
||||
* Then apply defaults for those values that haven't been set...
|
||||
*/
|
||||
|
||||
linenum = 0;
|
||||
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
|
||||
{
|
||||
if (!cups_encryption && cg->encryption == (http_encryption_t)-1 &&
|
||||
!_cups_strcasecmp(line, "Encryption") && value)
|
||||
{
|
||||
strlcpy(encryption, value, sizeof(encryption));
|
||||
cups_encryption = encryption;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
/*
|
||||
* The Server directive is not supported on OS X due to app sandboxing
|
||||
* restrictions, i.e. not all apps request network access.
|
||||
*/
|
||||
else if (!cups_server && (!cg->server[0] || !cg->ipp_port) &&
|
||||
!_cups_strcasecmp(line, "ServerName") && value)
|
||||
{
|
||||
strlcpy(server_name, value, sizeof(server_name));
|
||||
cups_server = server_name;
|
||||
}
|
||||
#endif /* !__APPLE__ */
|
||||
else if (!cups_user && !_cups_strcasecmp(line, "User") && value)
|
||||
{
|
||||
strlcpy(user, value, sizeof(user));
|
||||
cups_user = user;
|
||||
}
|
||||
else if (!cups_anyroot && !_cups_strcasecmp(line, "AllowAnyRoot") && value)
|
||||
{
|
||||
strlcpy(any_root, value, sizeof(any_root));
|
||||
cups_anyroot = any_root;
|
||||
}
|
||||
else if (!cups_expiredcerts && !_cups_strcasecmp(line, "AllowExpiredCerts") &&
|
||||
value)
|
||||
{
|
||||
strlcpy(expired_certs, value, sizeof(expired_certs));
|
||||
cups_expiredcerts = expired_certs;
|
||||
}
|
||||
else if (!cups_validatecerts && !_cups_strcasecmp(line, "ValidateCerts") && value)
|
||||
{
|
||||
strlcpy(validate_certs, value, sizeof(validate_certs));
|
||||
cups_validatecerts = validate_certs;
|
||||
}
|
||||
if (cc->any_root < 0)
|
||||
cc->any_root = 1;
|
||||
|
||||
if (cc->encryption == (http_encryption_t)-1)
|
||||
cc->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
|
||||
if (cc->expired_certs < 0)
|
||||
cc->expired_certs = 1;
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
else if (!cups_gssservicename && !_cups_strcasecmp(line, "GSSServiceName") &&
|
||||
value)
|
||||
{
|
||||
strlcpy(gss_service_name, value, sizeof(gss_service_name));
|
||||
cups_gssservicename = gss_service_name;
|
||||
}
|
||||
if (!cc->gss_service_name[0])
|
||||
cups_set_gss_service_name(cc, CUPS_DEFAULT_GSSSERVICENAME);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
}
|
||||
|
||||
/*
|
||||
* Set values...
|
||||
*/
|
||||
|
||||
if (cg->encryption == (http_encryption_t)-1 && cups_encryption)
|
||||
{
|
||||
if (!_cups_strcasecmp(cups_encryption, "never"))
|
||||
cg->encryption = HTTP_ENCRYPTION_NEVER;
|
||||
else if (!_cups_strcasecmp(cups_encryption, "always"))
|
||||
cg->encryption = HTTP_ENCRYPTION_ALWAYS;
|
||||
else if (!_cups_strcasecmp(cups_encryption, "required"))
|
||||
cg->encryption = HTTP_ENCRYPTION_REQUIRED;
|
||||
else
|
||||
cg->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
}
|
||||
|
||||
if ((!cg->server[0] || !cg->ipp_port) && cups_server)
|
||||
cupsSetServer(cups_server);
|
||||
|
||||
if (!cg->server[0])
|
||||
if (!cc->server_name[0])
|
||||
{
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
/*
|
||||
@@ -1027,105 +1013,271 @@ cups_read_client_conf(
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
(sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
||||
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
|
||||
cups_set_server_name(cc, CUPS_DEFAULT_DOMAINSOCKET);
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
cups_server = "localhost";
|
||||
|
||||
cupsSetServer(cups_server);
|
||||
cups_set_server_name(cc, "localhost");
|
||||
}
|
||||
|
||||
if (!cg->ipp_port)
|
||||
if (!cc->user[0])
|
||||
{
|
||||
const char *ipp_port; /* IPP_PORT environment variable */
|
||||
|
||||
if ((ipp_port = getenv("IPP_PORT")) != NULL)
|
||||
{
|
||||
if ((cg->ipp_port = atoi(ipp_port)) <= 0)
|
||||
cg->ipp_port = CUPS_DEFAULT_IPP_PORT;
|
||||
}
|
||||
else
|
||||
cg->ipp_port = CUPS_DEFAULT_IPP_PORT;
|
||||
}
|
||||
|
||||
if (!cg->user[0])
|
||||
{
|
||||
if (cups_user)
|
||||
strlcpy(cg->user, cups_user, sizeof(cg->user));
|
||||
else
|
||||
{
|
||||
#ifdef WIN32
|
||||
/*
|
||||
* Get the current user name from the OS...
|
||||
*/
|
||||
/*
|
||||
* Get the current user name from the OS...
|
||||
*/
|
||||
|
||||
DWORD size; /* Size of string */
|
||||
DWORD size; /* Size of string */
|
||||
|
||||
size = sizeof(cg->user);
|
||||
if (!GetUserName(cg->user, &size))
|
||||
size = sizeof(cc->user);
|
||||
if (!GetUserName(cc->user, &size))
|
||||
#else
|
||||
/*
|
||||
* Try the USER environment variable as the default username...
|
||||
*/
|
||||
|
||||
const char *envuser = getenv("USER");
|
||||
/* Default username */
|
||||
struct passwd *pw = NULL; /* Account information */
|
||||
|
||||
if (envuser)
|
||||
{
|
||||
/*
|
||||
* Try the USER environment variable as the default username...
|
||||
* Validate USER matches the current UID, otherwise don't allow it to
|
||||
* override things... This makes sure that printing after doing su
|
||||
* or sudo records the correct username.
|
||||
*/
|
||||
|
||||
const char *envuser = getenv("USER");
|
||||
/* Default username */
|
||||
struct passwd *pw = NULL; /* Account information */
|
||||
if ((pw = getpwnam(envuser)) != NULL && pw->pw_uid != getuid())
|
||||
pw = NULL;
|
||||
}
|
||||
|
||||
if (envuser)
|
||||
{
|
||||
/*
|
||||
* Validate USER matches the current UID, otherwise don't allow it to
|
||||
* override things... This makes sure that printing after doing su or
|
||||
* sudo records the correct username.
|
||||
*/
|
||||
if (!pw)
|
||||
pw = getpwuid(getuid());
|
||||
|
||||
if ((pw = getpwnam(envuser)) != NULL && pw->pw_uid != getuid())
|
||||
pw = NULL;
|
||||
}
|
||||
|
||||
if (!pw)
|
||||
pw = getpwuid(getuid());
|
||||
|
||||
if (pw)
|
||||
strlcpy(cg->user, pw->pw_name, sizeof(cg->user));
|
||||
else
|
||||
if (pw)
|
||||
strlcpy(cc->user, pw->pw_name, sizeof(cc->user));
|
||||
else
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
/*
|
||||
* Use the default "unknown" user name...
|
||||
*/
|
||||
{
|
||||
/*
|
||||
* Use the default "unknown" user name...
|
||||
*/
|
||||
|
||||
strlcpy(cg->user, "unknown", sizeof(cg->user));
|
||||
}
|
||||
strlcpy(cc->user, "unknown", sizeof(cc->user));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if (!cups_gssservicename)
|
||||
cups_gssservicename = CUPS_DEFAULT_GSSSERVICENAME;
|
||||
|
||||
strlcpy(cg->gss_service_name, cups_gssservicename,
|
||||
sizeof(cg->gss_service_name));
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if (cups_anyroot)
|
||||
cg->any_root = !_cups_strcasecmp(cups_anyroot, "yes") ||
|
||||
!_cups_strcasecmp(cups_anyroot, "on") ||
|
||||
!_cups_strcasecmp(cups_anyroot, "true");
|
||||
|
||||
if (cups_expiredcerts)
|
||||
cg->expired_certs = !_cups_strcasecmp(cups_expiredcerts, "yes") ||
|
||||
!_cups_strcasecmp(cups_expiredcerts, "on") ||
|
||||
!_cups_strcasecmp(cups_expiredcerts, "true");
|
||||
|
||||
if (cups_validatecerts)
|
||||
cg->validate_certs = !_cups_strcasecmp(cups_validatecerts, "yes") ||
|
||||
!_cups_strcasecmp(cups_validatecerts, "on") ||
|
||||
!_cups_strcasecmp(cups_validatecerts, "true");
|
||||
if (cc->validate_certs < 0)
|
||||
cc->validate_certs = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usersys.c 11908 2014-06-09 18:57:44Z msweet $".
|
||||
* 'cups_init_client_conf()' - Initialize client.conf values.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_init_client_conf(
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
/*
|
||||
* Clear all values to "not set"...
|
||||
*/
|
||||
|
||||
memset(cc, 0, sizeof(_cups_client_conf_t));
|
||||
|
||||
cc->encryption = (http_encryption_t)-1;
|
||||
cc->any_root = -1;
|
||||
cc->expired_certs = -1;
|
||||
cc->validate_certs = -1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_read_client_conf()' - Read a client.conf file.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_read_client_conf(
|
||||
cups_file_t *fp, /* I - File to read */
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
int linenum; /* Current line number */
|
||||
char line[1024], /* Line from file */
|
||||
*value; /* Pointer into line */
|
||||
|
||||
|
||||
/*
|
||||
* Read from the file...
|
||||
*/
|
||||
|
||||
linenum = 0;
|
||||
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
|
||||
{
|
||||
if (!_cups_strcasecmp(line, "Encryption") && value)
|
||||
cups_set_encryption(cc, value);
|
||||
#ifndef __APPLE__
|
||||
/*
|
||||
* The ServerName directive is not supported on OS X due to app
|
||||
* sandboxing restrictions, i.e. not all apps request network access.
|
||||
*/
|
||||
else if (!_cups_strcasecmp(line, "ServerName") && value)
|
||||
cups_set_server_name(cc, value);
|
||||
#endif /* !__APPLE__ */
|
||||
else if (!_cups_strcasecmp(line, "User") && value)
|
||||
cups_set_user(cc, value);
|
||||
else if (!_cups_strcasecmp(line, "AllowAnyRoot") && value)
|
||||
cc->any_root = cups_boolean_value(value);
|
||||
else if (!_cups_strcasecmp(line, "AllowExpiredCerts") &&
|
||||
value)
|
||||
cc->expired_certs = cups_boolean_value(value);
|
||||
else if (!_cups_strcasecmp(line, "ValidateCerts") && value)
|
||||
cc->validate_certs = cups_boolean_value(value);
|
||||
#ifdef HAVE_GSSAPI
|
||||
else if (!_cups_strcasecmp(line, "GSSServiceName") && value)
|
||||
cups_set_gss_service_name(cc, value);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
#ifdef HAVE_SSL
|
||||
else if (!_cups_strcasecmp(line, "SSLOptions") && value)
|
||||
cups_set_ssl_options(cc, value);
|
||||
#endif /* HAVE_SSL */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_default_ipp_port()' - Set the default IPP port value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_default_ipp_port(
|
||||
_cups_globals_t *cg) /* I - Global data */
|
||||
{
|
||||
const char *ipp_port; /* IPP_PORT environment variable */
|
||||
|
||||
|
||||
if ((ipp_port = getenv("IPP_PORT")) != NULL)
|
||||
{
|
||||
if ((cg->ipp_port = atoi(ipp_port)) <= 0)
|
||||
cg->ipp_port = CUPS_DEFAULT_IPP_PORT;
|
||||
}
|
||||
else
|
||||
cg->ipp_port = CUPS_DEFAULT_IPP_PORT;
|
||||
}
|
||||
|
||||
/*
|
||||
* 'cups_set_encryption()' - Set the Encryption value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_encryption(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
if (!_cups_strcasecmp(value, "never"))
|
||||
cc->encryption = HTTP_ENCRYPTION_NEVER;
|
||||
else if (!_cups_strcasecmp(value, "always"))
|
||||
cc->encryption = HTTP_ENCRYPTION_ALWAYS;
|
||||
else if (!_cups_strcasecmp(value, "required"))
|
||||
cc->encryption = HTTP_ENCRYPTION_REQUIRED;
|
||||
else
|
||||
cc->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_gss_service_name()' - Set the GSSServiceName value.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
static void
|
||||
cups_set_gss_service_name(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
strlcpy(cc->gss_service_name, value, sizeof(cc->gss_service_name));
|
||||
}
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_server_name()' - Set the ServerName value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_server_name(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
strlcpy(cc->server_name, value, sizeof(cc->server_name));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_ssl_options()' - Set the SSLOptions value.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
static void
|
||||
cups_set_ssl_options(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
/*
|
||||
* SSLOptions [AllowRC4] [AllowSSL3] [None]
|
||||
*/
|
||||
|
||||
int options = 0; /* SSL/TLS options */
|
||||
char temp[256], /* Copy of value */
|
||||
*start, /* Start of option */
|
||||
*end; /* End of option */
|
||||
|
||||
|
||||
strlcpy(temp, value, sizeof(temp));
|
||||
|
||||
for (start = temp; *start; start = end)
|
||||
{
|
||||
/*
|
||||
* Find end of keyword...
|
||||
*/
|
||||
|
||||
end = start;
|
||||
while (*end && !_cups_isspace(*end))
|
||||
end ++;
|
||||
|
||||
if (*end)
|
||||
*end++ = '\0';
|
||||
|
||||
/*
|
||||
* Compare...
|
||||
*/
|
||||
|
||||
if (!_cups_strcasecmp(start, "AllowRC4"))
|
||||
options |= _HTTP_TLS_ALLOW_RC4;
|
||||
else if (!_cups_strcasecmp(start, "AllowSSL3"))
|
||||
options |= _HTTP_TLS_ALLOW_SSL3;
|
||||
else if (!_cups_strcasecmp(start, "None"))
|
||||
options = 0;
|
||||
}
|
||||
|
||||
cc->ssl_options = options;
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_user()' - Set the User value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_user(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
strlcpy(cc->user, value, sizeof(cc->user));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usersys.c 12813 2015-07-30 15:00:40Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: util.c 12073 2014-07-31 00:58:00Z msweet $"
|
||||
* "$Id: util.c 12449 2015-01-29 20:32:16Z msweet $"
|
||||
*
|
||||
* Printing utilities for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -846,10 +846,10 @@ cupsGetPPD3(http_t *http, /* I - HTTP connection or @code CUPS_HTTP_DEFAUL
|
||||
|
||||
snprintf(ppdname, sizeof(ppdname), "%s/ppd/%s.ppd", cg->cups_serverroot,
|
||||
name);
|
||||
if (!stat(ppdname, &ppdinfo))
|
||||
if (!stat(ppdname, &ppdinfo) && !access(ppdname, R_OK))
|
||||
{
|
||||
/*
|
||||
* OK, the file exists, use it!
|
||||
* OK, the file exists and is readable, use it!
|
||||
*/
|
||||
|
||||
if (buffer[0])
|
||||
@@ -1509,7 +1509,7 @@ cups_get_printer_uri(
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requested-attributes", sizeof(requested_attrs) / sizeof(requested_attrs[0]), NULL, requested_attrs);
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(requested_attrs) / sizeof(requested_attrs[0]), NULL, requested_attrs);
|
||||
|
||||
/*
|
||||
* Do the request and get back a response...
|
||||
@@ -1655,5 +1655,5 @@ cups_get_printer_uri(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: util.c 12073 2014-07-31 00:58:00Z msweet $".
|
||||
* End of "$Id: util.c 12449 2015-01-29 20:32:16Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: versioning.h 11232 2013-08-12 19:33:47Z msweet $"
|
||||
* "$Id: versioning.h 12419 2015-01-22 15:51:20Z msweet $"
|
||||
*
|
||||
* API versioning definitions for CUPS.
|
||||
*
|
||||
@@ -53,6 +53,9 @@
|
||||
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
|
||||
# define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __attribute__((unavailable))
|
||||
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER */
|
||||
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
|
||||
# define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER __attribute__((unavailable))
|
||||
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER */
|
||||
# define _CUPS_API_1_1_19 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
|
||||
# define _CUPS_API_1_1_20 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
|
||||
# define _CUPS_API_1_1_21 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
|
||||
@@ -62,7 +65,7 @@
|
||||
# define _CUPS_API_1_5 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
# define _CUPS_API_1_6 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
# define _CUPS_API_1_7 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
|
||||
# define _CUPS_API_2_0
|
||||
# define _CUPS_API_2_0 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
|
||||
# else
|
||||
# define _CUPS_API_1_1_19
|
||||
# define _CUPS_API_1_1_20
|
||||
@@ -159,5 +162,5 @@
|
||||
#endif /* !_CUPS_VERSIONING_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: versioning.h 11232 2013-08-12 19:33:47Z msweet $".
|
||||
* End of "$Id: versioning.h 12419 2015-01-22 15:51:20Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Home - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">Home</a></li>
|
||||
<li><a href="/admin">Verwaltung</a></li>
|
||||
<li><a href="/classes/">Klassen</a></li>
|
||||
<li><a href="/help/">Hilfe</a></li>
|
||||
<li><a href="/jobs/">Aufträge</a></li>
|
||||
<li><a href="/printers/">Drucker</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS 2.0.2</h1>
|
||||
<p>CUPS basiert auf Standards, Open Source Drucksystem entwickelt durch <a href="http://www.apple.com/">Apple Inc.</a> für OS X<sup>®</sup> und andere UNIX<sup>®</sup>-artige Betriebssysteme.</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<h2>CUPS für Benutzer</h2>
|
||||
<p><a href="help/overview.html">Überblick über CUPS</a></p>
|
||||
<p><a href="help/options.html">Befehlszeilen-Druck und Optionen</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups">Benutzerforum</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS für Administratoren</h2>
|
||||
<p><a href="admin">Drucker und Klassen hinzufügen</a></p>
|
||||
<p><a href="help/policies.html">Betriebs-Richtlinie festlegen</a></p>
|
||||
<p><a href="help/network.html">Benutzung von Netzwerk-Druckern</a></p>
|
||||
<p><a href="help/man-cupsd.conf.html">cupsd.conf Referenz</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS für Entwickler</h2>
|
||||
<p><a href="help/api-overview.html">Einführung in die CUPS Programmierung</a></p>
|
||||
<p><a href="help/api-cups.html">CUPS API</a></p>
|
||||
<p><a href="help/api-filter.html">Filter und Backend Programmierung</a></p>
|
||||
<p><a href="help/api-httpipp.html">HTTP und IPP APIs</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups-devel">Entwicklerforum</a></p>
|
||||
</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-2015 Apple Inc. Alle Rechte vorbehalten.</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Inicio - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">Inicio</a></li>
|
||||
<li><a href="/admin">Administración</a></li>
|
||||
<li><a href="/classes/">Clases</a></li>
|
||||
<li><a href="/help/">Ayuda</a></li>
|
||||
<li><a href="/jobs/">Trabajos</a></li>
|
||||
<li><a href="/printers/">Impresoras</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS @CUPS_VERSION@</h1>
|
||||
<p>CUPS es el sistema de impresión de código abierto basado en estándares desarrollado por <a href="http://www.apple.com/">Apple Inc.</a> para OS X<sup>®</sup> y otros sistemas operativos tipo UNIX<sup>®</sup>.</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<h2>CUPS para usuarios</h2>
|
||||
<p><a href="help/overview.html">Descripción de CUPS</a></p>
|
||||
<p><a href="help/options.html">Impresión desde la línea de comandos y opciones</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups">Foro de usuarios</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS para administradores</h2>
|
||||
<p><a href="admin">Añadiendo impresoras y clases</a></p>
|
||||
<p><a href="help/policies.html">Gestionando políticas de funcionamiento</a></p>
|
||||
<p><a href="help/network.html">Usando impresoras de red</a></p>
|
||||
<p><a href="help/man-cupsd.conf.html">Referencia de cupsd.conf</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS para desarrolladores</h2>
|
||||
<p><a href="help/api-overview.html">Introducción a la programación de CUPS</a></p>
|
||||
<p><a href="help/api-cups.html">La API de CUPS</a></p>
|
||||
<p><a href="help/api-filter.html">Programación de filtros y programas de conexión</a></p>
|
||||
<p><a href="help/api-httpipp.html">Las APIs HTTP e IPP</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups-devel">Foro de desarrollo</a></p>
|
||||
</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-2015 Apple Inc. Todos los derechos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,8 +10,7 @@
|
||||
|
||||
<P>CUPS supports a variety of printer accounting schemes. Aside from the
|
||||
built-in <A HREF="#QUOTAS">quota</A> and <A HREF="#PAGELOG">page logging</A>
|
||||
support, there are several third-party solutions that can be found on
|
||||
<A HREF="http://www.cups.org/">www.cups.org</A>.</P>
|
||||
support, there are several third-party solutions that can be found online.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="QUOTAS">Quota Support</A></H2>
|
||||
@@ -27,7 +26,7 @@ options determine whether and how quotas are enforced for a printer.
|
||||
The <CODE>job-quota-period</CODE> option determines the time interval for
|
||||
quota tracking. The interval is expressed in seconds, so a day is
|
||||
86,400, a week is 604,800, and a month is 2,592,000 seconds. The
|
||||
<CODE>job-k-limit</CODE> option specifies the job size limit in killobytes. The
|
||||
<CODE>job-k-limit</CODE> option specifies the job size limit in killobytes. The
|
||||
<CODE>job-page-limit</CODE> option specifies the number of pages limit.</P>
|
||||
|
||||
<P>For quotas to be enforced, the period and at least one of the limits
|
||||
@@ -50,13 +49,7 @@ can be used to easily determine that information.</P>
|
||||
|
||||
<H2 CLASS="title"><A NAME="PAGELOG">Page Logging</A></H2>
|
||||
|
||||
<P>CUPS logs every page that is printed on a system to the
|
||||
<VAR><A HREF="ref-page_log.html">page_log</A></VAR> file. Page logging
|
||||
is only available for drivers that provide page accounting information,
|
||||
typically all PostScript and CUPS raster devices. Raw queues and queues
|
||||
using third-party solutions such as Foomatic generally do not have
|
||||
useful page accounting information available.</P>
|
||||
|
||||
<P>CUPS can log every page that is printed on a system to the <VAR><A HREF="man-cupsd-logs.html">page_log</A></VAR> file. Page logging must be enabled by setting the <CODE>PageLogFormat</CODE> directive in the <VAR><A HREF="man-cupsd.conf.html">cupsd.conf</A></VAR> file and is only available for drivers that provide page accounting information, typically all PostScript and CUPS raster devices. Raw queues and queues using third-party solutions such as Foomatic generally do not have useful page accounting information available.</P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -2097,7 +2097,7 @@ example, passing <code>CUPS_MEDIA_FLAGS_BORDERLESS</code> will return the defaul
|
||||
borderless size, typically US Letter or A4, but sometimes 4x6 photo media.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="cupsGetDestWithURI">cupsGetDestWithURI</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS X 10.10 </span><a name="cupsGetDestWithURI">cupsGetDestWithURI</a></h3>
|
||||
<p class="description">Get a destination associated with a URI.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *cupsGetDestWithURI (<br>
|
||||
@@ -2525,7 +2525,7 @@ cups_lang_t *cupsLangGet (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Language data</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="cupsLocalizeDestMedia">cupsLocalizeDestMedia</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS X 10.10 </span><a name="cupsLocalizeDestMedia">cupsLocalizeDestMedia</a></h3>
|
||||
<p class="description">Get the localized string for a destination media
|
||||
size.</p>
|
||||
<p class="code">
|
||||
|
||||
@@ -408,6 +408,7 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#COMMUNICATING_FILTER">Communicating with Filters</a></li>
|
||||
<li><a href="#SNMP">Doing SNMP Queries with Network Printers</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#SANDBOXING">Sandboxing on OS X</a></li>
|
||||
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
|
||||
<li><a href="#cupsBackChannelRead" title="Read data from the backchannel.">cupsBackChannelRead</a></li>
|
||||
<li><a href="#cupsBackChannelWrite" title="Write data to the backchannel.">cupsBackChannelWrite</a></li>
|
||||
@@ -442,7 +443,7 @@ div.contents ul.subcontents li {
|
||||
|
||||
Filter and backend programming introduction for CUPS.
|
||||
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
Copyright 2007-2014 by Apple Inc.
|
||||
Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
@@ -520,7 +521,7 @@ directory to write to.</p>
|
||||
|
||||
<p>In addition, some operating systems provide additional security mechanisms
|
||||
that further limit file system access, even for backends running as root. On
|
||||
OS X, for example, no backend may write to a user's home directory.</p>
|
||||
OS X, for example, no backend may write to a user's home directory. See the <a href="#SANDBOXING">Sandboxing on OS X</a> section for more information.</p>
|
||||
</blockquote>
|
||||
|
||||
<h3><a name="SIGNALS">Canceled Jobs and Signal Handling</a></h3>
|
||||
@@ -1291,6 +1292,28 @@ void *my_data;
|
||||
|
||||
<a href="#cupsSideChannelSNMPWalk">cupsSNMPSideChannelWalk</a>(".1.3.6.1.2.1.43", 5.0, my_callback, my_data);
|
||||
</pre>
|
||||
|
||||
<h2><a name="SANDBOXING">Sandboxing on OS X</a></h2>
|
||||
|
||||
<p>Starting with OS X 10.6, filters and backends are run inside a security "sandbox" which further limits (beyond the normal UNIX user/group permissions) what a filter or backend can do. This helps to both secure the printing system from malicious software and enforce the functional separation of components in the CUPS filter chain. What follows is a list of actions that are explicitly allowed for all filters and backends:</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>Reading of files: pursuant to normal UNIX file permissions, filters and backends can read files for the current job from the <var>/private/var/spool/cups</var> directory and other files on mounted filesystems <em>except</em> for user home directories under <var>/Users</var>.</li>
|
||||
|
||||
<li>Writing of files: pursuant to normal UNIX file permissions, filters and backends can read/write files to the cache directory specified by the <code>CUPS_CACHEDIR</code> environment variable, to the state directory specified by the <code>CUPS_STATEDIR</code> environment variable, to the temporary directory specified by the <code>TMPDIR</code> environment variable, and under the <var>/private/var/db</var>, <var>/private/var/folders</var>, <var>/private/var/lib</var>, <var>/private/var/mysql</var>, <var>/private/var/run</var>, <var>/private/var/spool</var> (except <var>/private/var/spool/cups</var>), <var>/Library/Application Support</var>, <var>/Library/Caches</var>, <var>/Library/Logs</var>, <var>/Library/Preferences</var>, <var>/Library/WebServer</var>, and <var>/Users/Shared</var> directories.</li>
|
||||
|
||||
<li>Execution of programs: pursuant to normal UNIX file permissions, filters and backends can execute any program not located under the <var>/Users</var> directory. Child processes inherit the sandbox and are subject to the same restrictions as the parent.</li>
|
||||
|
||||
<li>Bluetooth and USB: backends can access Bluetooth and USB printers through IOKit. <em>Filters cannot access Bluetooth and USB printers directly.</em></li>
|
||||
|
||||
<li>Network: filters and backends can access UNIX domain sockets under the <var>/private/tmp</var>, <var>/private/var/run</var>, and <var>/private/var/tmp</var> directories. Backends can also create IPv4 and IPv6 TCP (outgoing) and UDP (incoming and outgoing) socket, and bind to local source ports. <em>Filters cannot directly create IPv4 and IPv6 TCP or UDP sockets.</em></li>
|
||||
|
||||
<li>Notifications: filters and backends can send notifications via the Darwin <code>notify_post()</code> API.</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<blockquote><b>Note:</b> The sandbox profile used in CUPS 2.0 still allows some actions that are not listed above - these privileges will be removed over time until the profile matches the list above.</blockquote>
|
||||
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="cupsBackChannelRead">cupsBackChannelRead</a></h3>
|
||||
<p class="description">Read data from the backchannel.</p>
|
||||
|
||||
+20
-20
@@ -1490,7 +1490,7 @@ int httpAddrAny (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if "any", 0 otherwise</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpAddrClose">httpAddrClose</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpAddrClose">httpAddrClose</a></h3>
|
||||
<p class="description">Close a socket created by <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> or
|
||||
<a href="#httpAddrListen"><code>httpAddrListen</code></a>.</p>
|
||||
<p class="code">
|
||||
@@ -1820,7 +1820,7 @@ void httpClose (<br>
|
||||
<dt>http</dt>
|
||||
<dd class="description">HTTP connection</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpCompareCredentials">httpCompareCredentials</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpCompareCredentials">httpCompareCredentials</a></h3>
|
||||
<p class="description">Compare two sets of X.509 credentials.</p>
|
||||
<p class="code">
|
||||
int httpCompareCredentials (<br>
|
||||
@@ -2107,7 +2107,7 @@ int httpGet (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status of call (0 = success)</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetActivity">httpGetActivity</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetActivity">httpGetActivity</a></h3>
|
||||
<p class="description">Get the most recent activity for a connection.</p>
|
||||
<p class="code">
|
||||
time_t httpGetActivity (<br>
|
||||
@@ -2124,7 +2124,7 @@ time_t httpGetActivity (<br>
|
||||
<p class="discussion">The return value is the UNIX time of the last read or write.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetAddress">httpGetAddress</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetAddress">httpGetAddress</a></h3>
|
||||
<p class="description">Get the address of the connected peer of a connection.</p>
|
||||
<p class="code">
|
||||
<a href="#http_addr_t">http_addr_t</a> *httpGetAddress (<br>
|
||||
@@ -2255,7 +2255,7 @@ time_t httpGetDateTime (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">UNIX time</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetEncryption">httpGetEncryption</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetEncryption">httpGetEncryption</a></h3>
|
||||
<p class="description">Get the current encryption mode of a connection.</p>
|
||||
<p class="code">
|
||||
<a href="#http_encryption_t">http_encryption_t</a> httpGetEncryption (<br>
|
||||
@@ -2362,7 +2362,7 @@ Otherwise, return the FQDN for the local system using both gethostname()
|
||||
and gethostbyname() to get the local hostname with domain.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetKeepAlive">httpGetKeepAlive</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetKeepAlive">httpGetKeepAlive</a></h3>
|
||||
<p class="description">Get the current Keep-Alive state of the connection.</p>
|
||||
<p class="code">
|
||||
<a href="#http_keepalive_t">http_keepalive_t</a> httpGetKeepAlive (<br>
|
||||
@@ -2413,7 +2413,7 @@ off_t httpGetLength2 (<br>
|
||||
content larger than 2^31 - 1.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetPending">httpGetPending</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetPending">httpGetPending</a></h3>
|
||||
<p class="description">Get the number of bytes that are buffered for writing.</p>
|
||||
<p class="code">
|
||||
size_t httpGetPending (<br>
|
||||
@@ -2426,7 +2426,7 @@ size_t httpGetPending (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Number of bytes buffered</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetReady">httpGetReady</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetReady">httpGetReady</a></h3>
|
||||
<p class="description">Get the number of bytes that can be read without blocking.</p>
|
||||
<p class="code">
|
||||
size_t httpGetReady (<br>
|
||||
@@ -2439,7 +2439,7 @@ size_t httpGetReady (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Number of bytes available</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpGetRemaining">httpGetRemaining</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpGetRemaining">httpGetRemaining</a></h3>
|
||||
<p class="description">Get the number of remaining bytes in the message
|
||||
body or current chunk.</p>
|
||||
<p class="code">
|
||||
@@ -2584,7 +2584,7 @@ int httpHead (<br>
|
||||
default HTTP proxy (if any).</p>
|
||||
<p class="code">
|
||||
void httpInitialize (void);</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpIsChunked">httpIsChunked</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpIsChunked">httpIsChunked</a></h3>
|
||||
<p class="description">Report whether a message body is chunked.</p>
|
||||
<p class="code">
|
||||
int httpIsChunked (<br>
|
||||
@@ -2602,7 +2602,7 @@ int httpIsChunked (<br>
|
||||
variable-length chunks.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpIsEncrypted">httpIsEncrypted</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpIsEncrypted">httpIsEncrypted</a></h3>
|
||||
<p class="description">Report whether a connection is encrypted.</p>
|
||||
<p class="code">
|
||||
int httpIsEncrypted (<br>
|
||||
@@ -2856,7 +2856,7 @@ int httpReconnect2 (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">0 on success, non-zero on failure</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpResolveHostname">httpResolveHostname</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpResolveHostname">httpResolveHostname</a></h3>
|
||||
<p class="description">Resolve the hostname of the HTTP connection
|
||||
address.</p>
|
||||
<p class="code">
|
||||
@@ -3109,7 +3109,7 @@ void httpSetField (<br>
|
||||
<dt>value</dt>
|
||||
<dd class="description">Value</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpSetKeepAlive">httpSetKeepAlive</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpSetKeepAlive">httpSetKeepAlive</a></h3>
|
||||
<p class="description">Set the current Keep-Alive state of a connection.</p>
|
||||
<p class="code">
|
||||
void httpSetKeepAlive (<br>
|
||||
@@ -3163,7 +3163,7 @@ must be greater than 0</dd>
|
||||
data pointer and must return 1 to continue or 0 to error (time) out.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpShutdown">httpShutdown</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpShutdown">httpShutdown</a></h3>
|
||||
<p class="description">Shutdown one side of an HTTP connection.</p>
|
||||
<p class="code">
|
||||
void httpShutdown (<br>
|
||||
@@ -3174,7 +3174,7 @@ void httpShutdown (<br>
|
||||
<dt>http</dt>
|
||||
<dd class="description">HTTP connection</dd>
|
||||
</dl>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpStateString">httpStateString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpStateString">httpStateString</a></h3>
|
||||
<p class="description">Return the string describing a HTTP state value.</p>
|
||||
<p class="code">
|
||||
const char *httpStateString (<br>
|
||||
@@ -3219,7 +3219,7 @@ int httpTrace (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status of call (0 = success)</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="httpURIStatusString">httpURIStatusString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="httpURIStatusString">httpURIStatusString</a></h3>
|
||||
<p class="description">Return a string describing a URI status code.</p>
|
||||
<p class="code">
|
||||
const char *httpURIStatusString (<br>
|
||||
@@ -4140,7 +4140,7 @@ int ippCopyAttributes (<br>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on success, 0 on error</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Zero or more attributes are copied from the source IPP message, @code@ src, to the
|
||||
<p class="discussion">Zero or more attributes are copied from the source IPP message, <code>src</code>, to the
|
||||
destination IPP message, <code>dst</code>. When <code>quickcopy</code> is non-zero, a "shallow"
|
||||
reference copy of the attribute is created - this should only be done as long as the
|
||||
original source IPP message will not be freed for the life of the destination.<br>
|
||||
@@ -5393,7 +5393,7 @@ the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ip
|
||||
The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0 </span><a name="ippStateString">ippStateString</a></h3>
|
||||
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="ippStateString">ippStateString</a></h3>
|
||||
<p class="description">Return the name corresponding to a state value.</p>
|
||||
<p class="code">
|
||||
const char *ippStateString (<br>
|
||||
@@ -5616,7 +5616,7 @@ typedef struct _http_s http_t;
|
||||
<p class="code">
|
||||
typedef int (*http_timeout_cb_t)(<a href="#http_t">http_t</a> *http, void *user_data);
|
||||
</p>
|
||||
<h3 class="typedef"><span class="info"> CUPS 2.0 </span><a name="http_trust_t">http_trust_t</a></h3>
|
||||
<h3 class="typedef"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="http_trust_t">http_trust_t</a></h3>
|
||||
<p class="description">Level of trust for credentials </p>
|
||||
<p class="code">
|
||||
typedef enum <a href="#http_trust_e">http_trust_e</a> http_trust_t;
|
||||
@@ -6018,7 +6018,7 @@ are server-oriented...</p>
|
||||
<dt>HTTP_STATUS_USE_PROXY </dt>
|
||||
<dd class="description">Must use a proxy to access this URI</dd>
|
||||
</dl>
|
||||
<h3 class="enumeration"><span class="info"> CUPS 2.0 </span><a name="http_trust_e">http_trust_e</a></h3>
|
||||
<h3 class="enumeration"><span class="info"> CUPS 2.0/OS 10.10 </span><a name="http_trust_e">http_trust_e</a></h3>
|
||||
<p class="description">Level of trust for credentials </p>
|
||||
<h4 class="constants">Constants</h4>
|
||||
<dl>
|
||||
|
||||
+2
-6
@@ -63,8 +63,7 @@ application/x-httpd-php php
|
||||
application/x-httpd-python py
|
||||
</PRE>
|
||||
|
||||
<P>CGI scripts/programs (application/x-httpd-cgi) also must have execution
|
||||
permissions to be treated as a CGI script or program.</P>
|
||||
<P>CGI scripts/programs (application/x-httpd-cgi) also must be owned by root, have execution permissions, and not have world or group write permissions to be treated as a CGI script or program.</P>
|
||||
|
||||
<H2><A NAME="LIMITS">Limitations</A></H2>
|
||||
|
||||
@@ -75,10 +74,7 @@ following exceptions:</P>
|
||||
|
||||
<LI>No PATH_INFO or PATH_TRANSLATED support</LI>
|
||||
|
||||
<LI>Limited HTTP field support; only the Content-Length
|
||||
(CONTENT_LENGTH), Cookie (HTTP_COOKIE), and User-Agent
|
||||
(HTTP_USER_AGENT) fields are placed in environment
|
||||
variables at this time</LI>
|
||||
<LI>Limited HTTP field support; only the Content-Length (CONTENT_LENGTH), Content-Type (CONTENT_TYPE), Cookie (HTTP_COOKIE), Referrer (HTTP_REFERRER), and User-Agent (HTTP_USER_AGENT) fields are placed in environment variables at this time</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
@@ -66,9 +66,6 @@
|
||||
|
||||
<DL>
|
||||
|
||||
<DT>HP-GL
|
||||
<DD>Hewlett-Packard Graphics Language
|
||||
|
||||
<DT>HP-PCL
|
||||
<DD>Hewlett-Packard Page Control Language
|
||||
|
||||
@@ -161,6 +158,9 @@
|
||||
<DT>PPD
|
||||
<DD>PostScript Printer Description
|
||||
|
||||
<DT>PWG
|
||||
<DD>Printer Working Group
|
||||
|
||||
</DL>
|
||||
|
||||
|
||||
@@ -168,9 +168,6 @@
|
||||
|
||||
<DL>
|
||||
|
||||
<DT>SCSI
|
||||
<DD>Small Computer Systems Interface
|
||||
|
||||
<DT>serial
|
||||
<DD>Sending or receiving data 1 bit at a time
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@ DNS server(s).</li>
|
||||
server(s).</li>
|
||||
</ol></li>
|
||||
|
||||
<li>A "host" Service Granting Ticket (SGT) for every CUPS server</li>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
@@ -83,7 +81,7 @@ http://server.example.com:631/admin
|
||||
|
||||
<P>When doing printing tasks that require authentication, CUPS requests single-use "tickets" from your login session to authenticate who you are. These tickets give CUPS a username of the form "user@REALM", which is then converted to just "user" for purposes of user and group checks.</P>
|
||||
|
||||
<P>In order to support printing to a shared printer, CUPS runs the IPP backend as the owner of the print job so it can obtain the necessary credentials.</P>
|
||||
<P>In order to support printing to a shared printer, CUPS runs the IPP backend as the owner of the print job so it can obtain the necessary credentials when the job is de-spooled to the server.</P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -38,6 +38,12 @@ CUPS adds the remote hostname ("name@server.example.com") for you. The default n
|
||||
<b>Note: This directive it not supported on OS X 10.7 or later.</b>
|
||||
<dt><b>ServerName </b><i>hostname-or-ip-address</i>[<i>:port</i>]<b>/version=1.1</b>
|
||||
<dd style="margin-left: 5.0em">Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier.
|
||||
<dt><b>SSLOptions </b>[<i>AllowRC4</i>] [<i>AllowSSL3</i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLOptions None</b>
|
||||
<dd style="margin-left: 5.0em">Sets encryption options (only in /etc/cups/client.conf).
|
||||
By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
|
||||
The <i>AllowRC4</i> option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
|
||||
The <i>AllowSSL3</i> option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
|
||||
<dt><b>User </b><i>name</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default user name to use for requests.
|
||||
<dt><b>ValidateCerts Yes</b>
|
||||
|
||||
@@ -21,7 +21,7 @@ Comment lines start with the # character.
|
||||
The following directives are understood by
|
||||
<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8):</a>
|
||||
<dl class="man">
|
||||
<dt><b>AccessLog</b>
|
||||
<dt><a name="AccessLog"></a><b>AccessLog</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog </b><i>filename</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the access log filename.
|
||||
@@ -34,7 +34,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
</pre>
|
||||
The default is "/var/log/cups/access_log".
|
||||
<dt><b>ConfigFilePerm </b><i>mode</i>
|
||||
<dt><a name="ConfigFilePerm"></a><b>ConfigFilePerm </b><i>mode</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the permissions for all configuration files that the scheduler writes.
|
||||
The default is "0644" on OS X and "0640" on all other operating systems.
|
||||
</dl>
|
||||
@@ -42,13 +42,13 @@ The default is "0644" on OS X and "0640" on all other operating systems.
|
||||
This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system.
|
||||
There is no way to disable this security feature.
|
||||
<dl class="man">
|
||||
<dt><b>DataDir </b><i>path</i>
|
||||
<dt><a name="DataDir"></a><b>DataDir </b><i>path</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory where data files can be found.
|
||||
The default is usually "/usr/share/cups".
|
||||
<dt><b>DocumentRoot </b><i>directory</i>
|
||||
<dt><a name="DocumentRoot"></a><b>DocumentRoot </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the root directory for the CUPS web interface content.
|
||||
The default is usually "/usr/share/doc/cups".
|
||||
<dt><b>ErrorLog</b>
|
||||
<dt><a name="ErrorLog"></a><b>ErrorLog</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog </b><i>filename</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the error log filename.
|
||||
@@ -61,7 +61,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
</pre>
|
||||
The default is "/var/log/cups/error_log".
|
||||
<dt><b>FatalErrors none</b>
|
||||
<dt><a name="FatalErrors"></a><b>FatalErrors none</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>FatalErrors all </b><i>-kind </i>[ ... <i>-kind </i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>FatalErrors </b><i>kind </i>[ ... <i>kind </i>]
|
||||
<dd style="margin-left: 5.0em">Specifies which errors are fatal, causing the scheduler to exit.
|
||||
@@ -84,17 +84,17 @@ The <i>kind</i> strings are:
|
||||
<dt><b>permissions</b>
|
||||
<dd style="margin-left: 5.0em">Bad startup file permissions are fatal, for example shared TLS certificate and key files with world-read permissions.
|
||||
</div>
|
||||
<dt><b>FileDevice Yes</b>
|
||||
<dt><a name="FileDevice"></a><b>FileDevice Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>FileDevice No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the file pseudo-device can be used for new printer queues.
|
||||
The URI "file:///dev/null" is always allowed.
|
||||
<dt><b>Group </b><i>group-name-or-number</i>
|
||||
<dt><a name="Group"></a><b>Group </b><i>group-name-or-number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the group name or ID that will be used when executing external programs.
|
||||
The default group is operating system specific but is usually "lp" or "nobody".
|
||||
<dt><b>LogFilePerm </b><i>mode</i>
|
||||
<dt><a name="LogFilePerm"></a><b>LogFilePerm </b><i>mode</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the permissions of all log files that the scheduler writes.
|
||||
The default is "0644".
|
||||
<dt><b>PageLog </b>[ <i>filename</i> ]
|
||||
<dt><a name="PageLog"></a><b>PageLog </b>[ <i>filename</i> ]
|
||||
<dd style="margin-left: 5.0em"><dt><b>PageLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the page log filename.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
@@ -106,40 +106,41 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
</pre>
|
||||
The default is "/var/log/cups/page_log".
|
||||
<dt><b>RemoteRoot </b><i>username</i>
|
||||
<dt><a name="RemoteRoot"></a><b>RemoteRoot </b><i>username</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the username that is associated with unauthenticated accesses by clients claiming to be the root user.
|
||||
The default is "remroot".
|
||||
<dt><b>RequestRoot </b><i>directory</i>
|
||||
<dt><a name="RequestRoot"></a><b>RequestRoot </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory that contains print jobs and other HTTP request data.
|
||||
The default is "/var/spool/cups".
|
||||
<dt><b>Sandboxing off</b>
|
||||
<dt><a name="Sandboxing"></a><b>Sandboxing off</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Sandboxing relaxed</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Sandboxing strict</b>
|
||||
<dd style="margin-left: 5.0em">Specifies the level of security sandboxing that is applied to print filters, backends, and other child processes of the scheduler.
|
||||
The default is "strict".
|
||||
This directive is currently only used/supported on OS X.
|
||||
<dt><b>ServerBin </b><i>directory</i>
|
||||
<dt><a name="ServerBin"></a><b>ServerBin </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory containing the backends, CGI programs, filters, helper programs, notifiers, and port monitors.
|
||||
The default is "/usr/lib/cups" or "/usr/libexec/cups" depending on the platform.
|
||||
<dt><b>ServerKeychain </b><i>path</i>
|
||||
<dt><a name="ServerKeychain"></a><b>ServerKeychain </b><i>path</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the location of TLS certificates and private keys.
|
||||
The default is "/Library/Keychains/System.keychain" on OS X and "/etc/cups/ssl" on all other operating systems.
|
||||
<dt><b>ServerRoot </b><i>directory</i>
|
||||
OS X uses its keychain database to store certificates and keys while other platforms use separate files in the specified directory, *.crt for PEM-encoded certificates and *.key for PEM-encoded private keys.
|
||||
<dt><a name="ServerRoot"></a><b>ServerRoot </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory containing the server configuration files.
|
||||
The default is "/etc/cups".
|
||||
<dt><b>SyncOnClose Yes</b>
|
||||
<dt><a name="SyncOnClose"></a><b>SyncOnClose Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>SyncOnClose No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the scheduler calls
|
||||
<b>fsync</b>(2)
|
||||
after writing configuration or state files.
|
||||
The default is "No".
|
||||
<dt><b>SystemGroup </b><i>group-name </i>[ ... <i>group-name</i> ]
|
||||
<dt><a name="SystemGroup"></a><b>SystemGroup </b><i>group-name </i>[ ... <i>group-name</i> ]
|
||||
<dd style="margin-left: 5.0em">Specifies the group(s) to use for <i>@SYSTEM</i> group authentication.
|
||||
The default contains "admin", "lpadmin", "root", "sys", and/or "system".
|
||||
<dt><b>TempDir </b><i>directory</i>
|
||||
<dt><a name="TempDir"></a><b>TempDir </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory where temporary files are stored.
|
||||
The default is "/var/spool/cups/tmp".
|
||||
<dt><b>User </b><i>username</i>
|
||||
<dt><a name="User"></a><b>User </b><i>username</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the user name or ID that is used when running external programs.
|
||||
The default is "lp".
|
||||
</dl>
|
||||
@@ -154,7 +155,7 @@ The default is "lp".
|
||||
<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-2014 by Apple Inc.
|
||||
Copyright © 2007-2015 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -28,7 +28,7 @@ Comment lines start with the # character.
|
||||
The following top-level directives are understood by
|
||||
<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8):</a>
|
||||
<dl class="man">
|
||||
<dt><b>AccessLogLevel config</b>
|
||||
<dt><a name="AccessLogLevel"></a><b>AccessLogLevel config</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLogLevel actions</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLogLevel all</b>
|
||||
<dd style="margin-left: 5.0em">Specifies the logging level for the AccessLog file.
|
||||
@@ -36,67 +36,67 @@ The "config" level logs when printers and classes are added, deleted, or modifie
|
||||
The "actions" level logs when print jobs are submitted, held, released, modified, or canceled, and any of the conditions for "config".
|
||||
The "all" level logs all requests.
|
||||
The default access log level is "actions".
|
||||
<dt><b>AutoPurgeJobs Yes</b>
|
||||
<dt><a name="AutoPurgeJobs"></a><b>AutoPurgeJobs Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AutoPurgeJobs No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether to purge job history data automatically when it is no longer required for quotas.
|
||||
The default is "No".
|
||||
<dt><b>BrowseLocalProtocols all</b>
|
||||
<dt><a name="BrowseLocalProtocols"></a><b>BrowseLocalProtocols all</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>BrowseLocalProtocols dnssd</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>BrowseLocalProtocols none</b>
|
||||
<dd style="margin-left: 5.0em">Specifies which protocols to use for local printer sharing.
|
||||
The default is "dnssd" on systems that support Bonjour and "none" otherwise.
|
||||
<dt><b>BrowseWebIF Yes</b>
|
||||
<dt><a name="BrowseWebIF"></a><b>BrowseWebIF Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>BrowseWebIF No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether the CUPS web interface is advertised.
|
||||
The default is "No".
|
||||
<dt><b>Browsing Yes</b>
|
||||
<dt><a name="Browsing"></a><b>Browsing Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Browsing No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether shared printers are advertised.
|
||||
The default is "No".
|
||||
<dt><b>Classification </b><i>banner</i>
|
||||
<dt><a name="Classification"></a><b>Classification </b><i>banner</i>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies the security classification of the server.
|
||||
Any valid banner name can be used, including "classified", "confidential", "secret", "topsecret", and "unclassified", or the banner can be omitted to disable secure printing functions.
|
||||
The default is no classification banner.
|
||||
<dt><b>ClassifyOverride Yes</b>
|
||||
<dt><a name="ClassifyOverride"></a><b>ClassifyOverride Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ClassifyOverride No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether users may override the classification (cover page) of individual print jobs using the "job-sheets" option.
|
||||
The default is "No".
|
||||
<dt><b>DefaultAuthType Basic</b>
|
||||
<dt><a name="DefaultAuthType"></a><b>DefaultAuthType Basic</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultAuthType Negotiate</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies the default type of authentication to use.
|
||||
The default is "Basic".
|
||||
<dt><b>DefaultEncryption Never</b>
|
||||
<dt><a name="DefaultEncryption"></a><b>DefaultEncryption Never</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultEncryption IfRequested</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultEncryption Required</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether encryption will be used for authenticated requests.
|
||||
The default is "Required".
|
||||
<dt><b>DefaultLanguage </b><i>locale</i>
|
||||
<dt><a name="DefaultLanguage"></a><b>DefaultLanguage </b><i>locale</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default language to use for text and web content.
|
||||
The default is "en".
|
||||
<dt><b>DefaultPaperSize Auto</b>
|
||||
<dt><a name="DefaultPaperSize"></a><b>DefaultPaperSize Auto</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultPaperSize None</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultPaperSize </b><i>sizename</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default paper size for new print queues. "Auto" uses a locale-specific default, while "None" specifies there is no default paper size.
|
||||
Specific size names are typically "Letter" or "A4".
|
||||
The default is "Auto".
|
||||
<dt><b>DefaultPolicy </b><i>policy-name</i>
|
||||
<dt><a name="DefaultPolicy"></a><b>DefaultPolicy </b><i>policy-name</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default access policy to use.
|
||||
The default access policy is "default".
|
||||
<dt><b>DefaultShared Yes</b>
|
||||
<dt><a name="DefaultShared"></a><b>DefaultShared Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultShared No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether local printers are shared by default.
|
||||
The default is "Yes".
|
||||
<dt><b>DirtyCleanInterval </b><i>seconds</i>
|
||||
<dt><a name="DirtyCleanInterval"></a><b>DirtyCleanInterval </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the delay for updating of configuration and state files.
|
||||
A value of 0 causes the update to happen as soon as possible, typically within a few milliseconds.
|
||||
The default value is "30".
|
||||
<dt><b>ErrorPolicy abort-job</b>
|
||||
<dt><a name="ErrorPolicy"></a><b>ErrorPolicy abort-job</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should be aborted (discarded) unless otherwise specified for the printer.
|
||||
<dt><b>ErrorPolicy retry-job</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should be retried at a later time unless otherwise specified for the printer.
|
||||
@@ -104,24 +104,24 @@ The default value is "30".
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should be retried immediately unless otherwise specified for the printer.
|
||||
<dt><b>ErrorPolicy stop-printer</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should stop the printer unless otherwise specified for the printer. The 'stop-printer' error policy is the default.
|
||||
<dt><b>FilterLimit </b><i>limit</i>
|
||||
<dt><a name="FilterLimit"></a><b>FilterLimit </b><i>limit</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum cost of filters that are run concurrently, which can be used to minimize disk, memory, and CPU resource problems.
|
||||
A limit of 0 disables filter limiting.
|
||||
An average print to a non-PostScript printer needs a filter limit of about 200.
|
||||
A PostScript printer needs about half that (100).
|
||||
Setting the limit below these thresholds will effectively limit the scheduler to printing a single job at any time.
|
||||
The default limit is "0".
|
||||
<dt><b>FilterNice </b><i>nice-value</i>
|
||||
<dt><a name="FilterNice"></a><b>FilterNice </b><i>nice-value</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the scheduling priority (
|
||||
<b>nice</b>(8)
|
||||
value) of filters that are run to print a job.
|
||||
The nice value ranges from 0, the highest priority, to 19, the lowest priority.
|
||||
The default is 0.
|
||||
<dt><b>GSSServiceName </b><i>name</i>
|
||||
<dt><a name="GSSServiceName"></a><b>GSSServiceName </b><i>name</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the service name when using Kerberos authentication.
|
||||
The default service name is "http."
|
||||
<dt><b>HostNameLookups On</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>HostNameLookups Off</b>
|
||||
<dd style="margin-left: 5.0em"><dt><a name="HostNameLookups"></a><b>HostNameLookups Off</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>HostNameLookups Double</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether to do reverse lookups on connecting clients.
|
||||
The "Double" setting causes
|
||||
@@ -130,50 +130,50 @@ to verify that the hostname resolved from the address matches one of the address
|
||||
Double lookups also prevent clients with unregistered addresses from connecting to your server.
|
||||
The default is "Off" to avoid the potential server performance problems with hostname lookups.
|
||||
Only set this option to "On" or "Double" if absolutely required.
|
||||
<dt><b>JobKillDelay </b><i>seconds</i>
|
||||
<dt><a name="JobKillDelay"></a><b>JobKillDelay </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of seconds to wait before killing the filters and backend associated with a canceled or held job.
|
||||
The default is "30".
|
||||
<dt><b>JobRetryInterval </b><i>seconds</i>
|
||||
<dt><a name="JobRetryInterval"></a><b>JobRetryInterval </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the interval between retries of jobs in seconds.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "30".
|
||||
<dt><b>JobRetryLimit </b><i>count</i>
|
||||
<dt><a name="JobRetryLimit"></a><b>JobRetryLimit </b><i>count</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of retries that are done for jobs.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "5".
|
||||
<dt><b>KeepAlive Yes</b>
|
||||
<dt><a name="KeepAlive"></a><b>KeepAlive Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>KeepAlive No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether to support HTTP keep-alive connections.
|
||||
The default is "Yes".
|
||||
<dt><b>KeepAliveTimeout </b><i>seconds</i>
|
||||
<dt><a name="KeepAliveTimeout"></a><b>KeepAliveTimeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies how long an idle client connection remains open.
|
||||
The default is "30".
|
||||
<dt><b><Limit </b><i>operation </i>...<b>> </b>... <b></Limit></b>
|
||||
<dt><a name="LimitIPP"></a><b><Limit </b><i>operation </i>...<b>> </b>... <b></Limit></b>
|
||||
<dd style="margin-left: 5.0em">Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATIONS".
|
||||
<dt><b><Limit </b><i>method </i>...<b>> </b>... <b></Limit></b>
|
||||
<dd style="margin-left: 5.0em"><dt><b><LimitExcept </b><i>method </i>...<b>> </b>... <b></LimitExcept></b>
|
||||
<dt><a name="Limit"></a><b><Limit </b><i>method </i>...<b>> </b>... <b></Limit></b>
|
||||
<dd style="margin-left: 5.0em"><dt><a name="LimitExcept"></a><b><LimitExcept </b><i>method </i>...<b>> </b>... <b></LimitExcept></b>
|
||||
<dd style="margin-left: 5.0em">Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHODS".
|
||||
<dt><b>LimitRequestBody </b><i>size</i>
|
||||
<dt><a name="LimitRequestBody"></a><b>LimitRequestBody </b><i>size</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum size of print files, IPP requests, and HTML form data.
|
||||
The default is "0" which disables the limit check.
|
||||
<dt><b>Listen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dt><a name="Listen"></a><b>Listen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Listen [</b><i>ipv6-address</i><b>]:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Listen *:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Listen </b><i>/path/to/domain/socket</i>
|
||||
<dd style="margin-left: 5.0em">Listens to the specified address and port or domain socket path for connections.
|
||||
Multiple Listen directives can be provided to listen on multiple addresses.
|
||||
The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.
|
||||
<dt><b>ListenBackLog </b><i>number</i>
|
||||
<dt><a name="ListenBackLog"></a><b>ListenBackLog </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of pending connections that will be allowed.
|
||||
This normally only affects very busy servers that have reached the MaxClients limit, but can also be triggered by large numbers of simultaneous connections.
|
||||
When the limit is reached, the operating system will refuse additional connections until the scheduler can accept the pending ones.
|
||||
The default is the OS-defined default limit, typically either "5" for older operating systems or "128" for newer operating systems.
|
||||
<dt><b><Location </b><i>/path</i><b>> </b>... <b></Location></b>
|
||||
<dt><a name="Location"></a><b><Location </b><i>/path</i><b>> </b>... <b></Location></b>
|
||||
<dd style="margin-left: 5.0em">Specifies access control for the named location.
|
||||
Paths are documented below in the section "LOCATION PATHS".
|
||||
<dt><b>LogDebugHistory </b><i>number</i>
|
||||
<dt><a name="LogDebugHistory"></a><b>LogDebugHistory </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of debugging messages that are retained for logging if an error occurs in a print job. Debug messages are logged regardless of the LogLevel setting.
|
||||
<dt><b>LogLevel </b>none
|
||||
<dt><a name="LogLevel"></a><b>LogLevel </b>none
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogLevel </b>emerg
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogLevel </b>alert
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogLevel </b>crit
|
||||
@@ -186,45 +186,45 @@ Paths are documented below in the section "LOCATION PATHS".
|
||||
<dd style="margin-left: 5.0em">Specifies the level of logging for the ErrorLog file.
|
||||
The value "none" stops all logging while "debug2" logs everything.
|
||||
The default is "warn".
|
||||
<dt><b>LogTimeFormat </b>standard
|
||||
<dt><a name="LogTimeFormat"></a><b>LogTimeFormat </b>standard
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogTimeFormat </b>usecs
|
||||
<dd style="margin-left: 5.0em">Specifies the format of the date and time in the log files.
|
||||
The value "standard" is the default and logs whole seconds while "usecs" logs microseconds.
|
||||
<dt><b>MaxClients </b><i>number</i>
|
||||
<dt><a name="MaxClients"></a><b>MaxClients </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous clients that are allowed by the scheduler.
|
||||
The default is "100".
|
||||
<dt><b>MaxClientsPerHost </b><i>number</i>
|
||||
<dt><a name="MaxClientPerHost"></a><b>MaxClientsPerHost </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous clients that are allowed from a
|
||||
single address.
|
||||
The default is the MaxClients value.
|
||||
<dt><b>MaxCopies </b><i>number</i>
|
||||
<dt><a name="MaxCopies"></a><b>MaxCopies </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of copies that a user can print of each job.
|
||||
The default is "9999".
|
||||
<dt><b>MaxHoldTime </b><i>seconds</i>
|
||||
<dt><a name="MaxHoldTime"></a><b>MaxHoldTime </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum time a job may remain in the "indefinite" hold state before it is canceled.
|
||||
The default is "0" which disables cancellation of held jobs.
|
||||
<dt><b>MaxJobs </b><i>number</i>
|
||||
<dt><a name="MaxJobs"></a><b>MaxJobs </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous jobs that are allowed.
|
||||
Set to "0" to allow an unlimited number of jobs.
|
||||
The default is "500".
|
||||
<dt><b>MaxJobsPerPrinter </b><i>number</i>
|
||||
<dt><a name="MaxJobsPerPrinter"></a><b>MaxJobsPerPrinter </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous jobs that are allowed per printer.
|
||||
The default is "0" which allows up to MaxJobs jobs per printer.
|
||||
<dt><b>MaxJobsPerUser </b><i>number</i>
|
||||
<dt><a name="MaxJobsPerUser"></a><b>MaxJobsPerUser </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous jobs that are allowed per user.
|
||||
The default is "0" which allows up to MaxJobs jobs per user.
|
||||
<dt><b>MaxJobTime </b><i>seconds</i>
|
||||
<dt><a name="MaxJobTime"></a><b>MaxJobTime </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum time a job may take to print before it is canceled.
|
||||
Set to "0" to disable cancellation of "stuck" jobs.
|
||||
The default is "10800" (3 hours).
|
||||
<dt><b>MaxLogSize </b><i>size</i>
|
||||
<dt><a name="MaxLogSize"></a><b>MaxLogSize </b><i>size</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum size of the log files before they are rotated.
|
||||
The value "0" disables log rotation.
|
||||
The default is "1048576" (1MB).
|
||||
<dt><b>MultipleOperationTimeout </b><i>seconds</i>
|
||||
<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 "300" (5 minutes).
|
||||
<dt><b>PageLogFormat </b><i>format-string</i>
|
||||
<dt><a name="PageLogFormat"></a><b>PageLogFormat </b><i>format-string</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the format of PageLog lines.
|
||||
Sequences beginning with percent (%) characters are replaced with the corresponding information, while all other characters are copied literally.
|
||||
The following percent sequences are recognized:
|
||||
@@ -240,46 +240,47 @@ The following percent sequences are recognized:
|
||||
"%u" inserts the username.
|
||||
|
||||
</pre>
|
||||
The default is "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".
|
||||
<dt><b>PassEnv </b><i>variable </i>[ ... <i>variable </i>]
|
||||
The default is the empty string, which disables page logging.
|
||||
The string "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}" creates a page log with the standard items.
|
||||
<dt><a name="PassEnv"></a><b>PassEnv </b><i>variable </i>[ ... <i>variable </i>]
|
||||
<dd style="margin-left: 5.0em">Passes the specified environment variable(s) to child processes.
|
||||
<dt><b><Policy </b><i>name</i><b>> </b>... <b></Policy></b>
|
||||
<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><b>Port </b><i>number</i>
|
||||
<dt><a name="Port"></a><b>Port </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Listens to the specified port number for connections.
|
||||
<dt><b>PreserveJobFiles Yes</b>
|
||||
<dt><a name="PreserveJobFiles"></a><b>PreserveJobFiles Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobFiles No</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobFiles </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies whether job files (documents) are preserved after a job is printed.
|
||||
If a numeric value is specified, job files are preserved for the indicated number of seconds after printing.
|
||||
The default is "86400" (preserve 1 day).
|
||||
<dt><b>PreserveJobHistory Yes</b>
|
||||
<dt><a name="PreserveJobHistory"></a><b>PreserveJobHistory Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobHistory No</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobHistory </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the job history is preserved after a job is printed.
|
||||
If a numeric value is specified, the job history is preserved for the indicated number of seconds after printing.
|
||||
If "Yes", the job history is preserved until the MaxJobs limit is reached.
|
||||
The default is "Yes".
|
||||
<dt><b>ReloadTimeout </b><i>seconds</i>
|
||||
<dt><a name="ReloadTimeout"></a><b>ReloadTimeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the amount of time to wait for job completion before restarting the scheduler.
|
||||
The default is "30".
|
||||
<dt><b>RIPCache </b><i>size</i>
|
||||
<dt><a name="RIPCache"></a><b>RIPCache </b><i>size</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum amount of memory to use when converting documents into bitmaps for a printer.
|
||||
The default is "128m".
|
||||
<dt><b>ServerAdmin </b><i>email-address</i>
|
||||
<dt><a name="ServerAdmin"></a><b>ServerAdmin </b><i>email-address</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the email address of the server administrator.
|
||||
The default value is "root@ServerName".
|
||||
<dt><b>ServerAlias </b><i>hostname </i>[ ... <i>hostname </i>]
|
||||
<dt><a name="ServerAlias"></a><b>ServerAlias </b><i>hostname </i>[ ... <i>hostname </i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerAlias *</b>
|
||||
<dd style="margin-left: 5.0em">The ServerAlias directive is used for HTTP Host header validation when clients connect to the scheduler from external interfaces.
|
||||
Using the special name "*" can expose your system to known browser-based DNS rebinding attacks, even when accessing sites through a firewall.
|
||||
If the auto-discovery of alternate names does not work, we recommend listing each alternate name with a ServerAlias directive instead of using "*".
|
||||
<dt><b>ServerName </b><i>hostname</i>
|
||||
<dt><a name="ServerName"></a><b>ServerName </b><i>hostname</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the fully-qualified hostname of the server.
|
||||
The default is the value reported by the
|
||||
<b>hostname</b>(1)
|
||||
command.
|
||||
<dt><b>ServerTokens None</b>
|
||||
<dt><a name="ServerTokens"></a><b>ServerTokens None</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerTokens ProductOnly</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerTokens Major</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerTokens Minor</b>
|
||||
@@ -297,22 +298,28 @@ command.
|
||||
command.
|
||||
"Full" reports "CUPS 2.0.0 (UNAME) IPP/2.0".
|
||||
The default is "Minimal".
|
||||
<dt><b>SetEnv </b><i>variable value</i>
|
||||
<dt><a name="SetEnv"></a><b>SetEnv </b><i>variable value</i>
|
||||
<dd style="margin-left: 5.0em">Set the specified environment variable to be passed to child processes.
|
||||
<dt><dt><b>SSLListen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dt><a name="SSLListen"></a><b>SSLListen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLListen [</b><i>ipv6-address</i><b>]:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLListen *:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em">Listens on the specified address and port for encrypted connections.
|
||||
<dt><b>SSLPort </b><i>port</i>
|
||||
<dt><a name="SSLOptions"></a><b>SSLOptions </b>[<i>AllowRC4</i>] [<i>AllowSSL3</i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLOptions None</b>
|
||||
<dd style="margin-left: 5.0em">Sets encryption options.
|
||||
By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
|
||||
The <i>AllowRC4</i> option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
|
||||
The <i>AllowSSL3</i> option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
|
||||
<dt><a name="SSLPort"></a><b>SSLPort </b><i>port</i>
|
||||
<dd style="margin-left: 5.0em">Listens on the specified port for encrypted connections.
|
||||
<dt><b>StrictConformance Yes</b>
|
||||
<dt><a name="StrictConformance"></a><b>StrictConformance Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>StrictConformance No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the scheduler requires clients to strictly adhere to the IPP specifications.
|
||||
The default is "No".
|
||||
<dt><b>Timeout </b><i>seconds</i>
|
||||
<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 "300" (5 minutes).
|
||||
<dt><b>WebInterface yes</b>
|
||||
<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.
|
||||
The default is "No".
|
||||
@@ -582,7 +589,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-2014 by Apple Inc.
|
||||
Copyright © 2007-2015 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -71,9 +71,12 @@ ipptool - perform internet printing protocol requests
|
||||
<b>ipptool</b>
|
||||
sends IPP requests to the specified
|
||||
<i>printer-uri</i>
|
||||
and tests and/or displays the results. Each named
|
||||
and tests and/or displays the results.
|
||||
Each named
|
||||
<i>testfile</i>
|
||||
defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The
|
||||
defines one or more requests, including the expected response status, attributes, and values.
|
||||
Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed.
|
||||
The
|
||||
<i>testfile</i>
|
||||
format is described in
|
||||
<a href="man-ipptoolfile.html?TOPIC=Man+Pages"><b>ipptoolfile</b>(5).</a>
|
||||
@@ -102,7 +105,8 @@ must connect to the printer or server using IPv4.
|
||||
<b>ipptool</b>
|
||||
must connect to the printer or server using IPv6.
|
||||
<dt><b>-C</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
|
||||
<dd style="margin-left: 5.0em">Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP.
|
||||
The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
|
||||
<dt><b>-E</b>
|
||||
<dd style="margin-left: 5.0em">Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header.
|
||||
<dt><b>-I</b>
|
||||
@@ -110,9 +114,11 @@ must connect to the printer or server using IPv6.
|
||||
<b>ipptool</b>
|
||||
will continue past errors.
|
||||
<dt><b>-L</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
|
||||
<dd style="margin-left: 5.0em">Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP.
|
||||
The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
|
||||
<dt><b>-P</b><i> filename.plist</i>
|
||||
<dd style="margin-left: 5.0em">Specifies that the test results should be written to the named XML (Apple plist) file in addition to the plain text report. This option is incompatible with the <b>-i</b> (interval) and <b>-n</b> (repeat-count) options.
|
||||
<dd style="margin-left: 5.0em">Specifies that the test results should be written to the named XML (Apple plist) file in addition to the regular test report (<b>-t</b>).
|
||||
This option is incompatible with the <b>-i</b> (interval) and <b>-n</b> (repeat-count) options.
|
||||
<dt><b>-S</b>
|
||||
<dd style="margin-left: 5.0em">Forces (dedicated) TLS encryption when connecting to the server.
|
||||
<dt><b>-T</b><i> seconds</i>
|
||||
@@ -120,7 +126,8 @@ will continue past errors.
|
||||
<dt><b>-V</b><i> version</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used.
|
||||
<dt><b>-X</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the <b>-i</b> (interval) and <b>-n</b> (repeat-count) options.
|
||||
<dd style="margin-left: 5.0em">Specifies that XML (Apple plist) output is desired instead of the plain text report.
|
||||
This option is incompatible with the <b>-i</b> (interval) and <b>-n</b> (repeat-count) options.
|
||||
<dt><b>-c</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that CSV (comma-separated values) output is desired instead of the plain text output.
|
||||
<dt><b>-d</b><i> name=value</i>
|
||||
@@ -130,17 +137,22 @@ will continue past errors.
|
||||
<dt><b>-i</b><i> seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies that the (last)
|
||||
<i>testfile</i>
|
||||
should be repeated at the specified interval. This option is incompatible with the <b>-X</b> (XML plist output) option.
|
||||
should be repeated at the specified interval.
|
||||
This option is incompatible with the <b>-X</b> (XML plist output) option.
|
||||
<dt><b>-l</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that plain text output is desired.
|
||||
<dt><b>-n</b><i> repeat-count</i>
|
||||
<dd style="margin-left: 5.0em">Specifies that the (last)
|
||||
<i>testfile</i>
|
||||
should be repeated the specified number of times. This option is incompatible with the <i>-X</i> (XML plist output) option.
|
||||
should be repeated the specified number of times.
|
||||
This option is incompatible with the <i>-X</i> (XML plist output) option.
|
||||
<dt><b>-q</b>
|
||||
<dd style="margin-left: 5.0em">Be quiet and produce no output.
|
||||
<dt><b>-t</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that CUPS test report output is desired instead of the plain text output.
|
||||
<dt><b>-v</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that all request and response attributes should be output in CUPS test mode (<b>-t</b>). This is the default for XML output.
|
||||
<dd style="margin-left: 5.0em">Specifies that all request and response attributes should be output in CUPS test mode (<b>-t</b>).
|
||||
This is the default for XML output.
|
||||
</dl>
|
||||
<h2 class="title"><a name="EXIT_STATUS">Exit Status</a></h2>
|
||||
The
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<P>Every network printer or print server has a unique Internet Protocol (IP) address associated with it. This address is either configured manually or set using an automatic network protocol such as the <A HREF="#BOOTP">Boot Protocol (BOOTP)</A>, <A HREF="#DHCP">Dynamic Host Control Protocol (DHCP)</A>, Reverse Address Resolution Protocol (RARP), or ZeroConf.</P>
|
||||
|
||||
<P>You can normally find the IP address of a printer on the printer's control panel or by printing the configuration or status page. The <A HREF="#SNMP">Simple Network Management Protocol (SNMP)</A> can also be used to get the IP address remotely, which happens automatically when you visit the CUPS administration web page or choose an available CUPS device when adding a printer.</P>
|
||||
<P>You can normally find the IP address of a printer on the printer's control panel or by printing the configuration or status page. The <A HREF="#SNMP">Simple Network Management Protocol (SNMP)</A> can also be used to get the IP address remotely.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="CONFIG">Configuring the IP Address</A></H2>
|
||||
@@ -102,7 +102,7 @@ socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?option=value&opti
|
||||
|
||||
<H3><A NAME="IPP">Internet Printing Protocol (IPP)</A></H3>
|
||||
|
||||
<P>IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the <tt>http</tt>, <tt>ipp</tt>, and <tt>ipps</tt> URI schemes:</P>
|
||||
<P>IPP is the only protocol that CUPS supports natively and is supported by most network printers and print servers. IPP printing normally happens over port 631 and uses the <tt>http</tt> (Windows), <tt>ipp</tt>, and <tt>ipps</tt> URI schemes:</P>
|
||||
|
||||
<PRE>
|
||||
http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
|
||||
@@ -133,10 +133,6 @@ ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>optio
|
||||
</TR>
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD><TT>compression=gzip</TT></TD>
|
||||
<TD>Specifies that print data should be compressed before sending.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>encryption=always</TT></TD>
|
||||
<TD>Specifies that the connection to the IPP server should be encrypted using SSL.</TD>
|
||||
@@ -270,11 +266,11 @@ lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&op
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>sanitize_title=no</TT></TD>
|
||||
<TD>Specifies that the job title string should not be restricted to ASCII characters.</TD>
|
||||
<TD>Specifies that the job title string should not be restricted to ASCII alphanumeric and space characters.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>sanitize_title=yes</TT></TD>
|
||||
<TD>Specifies that the job title string should be restricted to ASCII characters.</TD>
|
||||
<TD>Specifies that the job title string should be restricted to ASCII alphanumeric and space characters.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>snmp=false</TT></TD>
|
||||
|
||||
@@ -47,7 +47,7 @@ different ways.</P>
|
||||
|
||||
<H2 CLASS="title"><A NAME="BEGIN">Where Do I Begin?</A></H2>
|
||||
|
||||
<P>Click on the <var>Administration</var> tab at the top of this page. Click on the <var>Add Printer</var> button and follow the prompts.</P>
|
||||
<P>Click on the <var>Administration</var> tab. Click on the <var>Add Printer</var> button and follow the prompts.</P>
|
||||
|
||||
<BLOCKQUOTE>When you are asked for a username and password, enter your login username and password or the "root" username and password. On OS X<sup>®</sup>, the login username (or "short name") is typically your first and last name in lowercase.</BLOCKQUOTE>
|
||||
|
||||
|
||||
+183
-168
@@ -14,12 +14,12 @@
|
||||
|
||||
<H2 CLASS="title"><A NAME="BASICS">The Basics</A></H2>
|
||||
|
||||
<P>Operation policies are used for all IPP requests sent to the scheduler and are evaluated <em>after</em> the <A HREF="ref-cupsd-conf.html#Location"><TT>Location</TT></A> based access control rules. This means that operation policies can only add additional security restrictions to a request, never relax them. Use <TT>Location</TT> based access control rules for server-wide limits and operation policies for limits on individual printers, tasks, or services.</P>
|
||||
<P>Operation policies are used for all IPP requests sent to the scheduler and are evaluated <em>after</em> the <A HREF="man-cupsd.conf.html#Location"><TT>Location</TT></A> based access control rules. This means that operation policies can only add additional security restrictions to a request, never relax them. Use <TT>Location</TT> based access control rules for server-wide limits and operation policies for limits on individual printers, tasks, or services.</P>
|
||||
|
||||
<P>Policies are stored in the <VAR>cupsd.conf</VAR> file in <A HREF="ref-cupsd-conf.html#Policy"><TT>Policy</TT></A> sections. Each policy has an alphanumeric name that is used to select it. Inside the policy section are one or more <A
|
||||
HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list the operations that are affected by the rules inside it. <A HREF="#LISTING01">Listing 1</A> shows the default operation policy, appropriately called "default", that is shipped with CUPS.</P>
|
||||
<P>Policies are stored in the <VAR>cupsd.conf</VAR> file in <A HREF="man-cupsd.conf.html#Policy"><TT>Policy</TT></A> sections. Each policy has an alphanumeric name that is used to select it. Inside the policy section are one or more <A
|
||||
HREF="man-cupsd.conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list the operations that are affected by the rules inside it. <A HREF="#LISTING01">Listing 1</A> shows the default operation policy, appropriately called "default", that is shipped with CUPS.</P>
|
||||
|
||||
<P>The easiest way to add a policy to the <VAR>cupsd.conf</VAR> file is to use the web interface. Click on the <VAR>Administration</VAR> tab and then the <VAR>Edit Configuration File</VAR> button to edit the current <VAR>cupsd.conf</VAR> file. Click on the <VAR>Save Changes</VAR> button to save the changes and restart the scheduler. If you edit the <VAR>cupsd.conf</VAR> file from the console, make sure to <A HREF="ref-cupsd-conf.html">restart the cupsd process</A> before trying to use the new policy.</P>
|
||||
<P>The easiest way to add a policy to the <VAR>cupsd.conf</VAR> file is to use the web interface. Click on the <VAR>Administration</VAR> tab and then the <VAR>Edit Configuration File</VAR> button to edit the current <VAR>cupsd.conf</VAR> file. Click on the <VAR>Save Changes</VAR> button to save the changes and restart the scheduler. If you edit the <VAR>cupsd.conf</VAR> file from the console, make sure to <A HREF="man-cupsd.conf.html">restart the cupsd process</A> before trying to use the new policy.</P>
|
||||
|
||||
<PRE CLASS="example">
|
||||
<EM>Listing 1: <A NAME="LISTING01">Default Operation Policy</A></EM>
|
||||
@@ -97,7 +97,7 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
|
||||
<P>The operation names are listed on a single line with spaces separating them. Each name corresponds to the IPP operation described in any of the IETF or PWG standards documents for the Internet Printing Protocol. <A HREF="#TABLE01">Table 1</A> lists all of the operations that have been defined along with their usage in CUPS.</P>
|
||||
|
||||
<P>The access control rules are listed after the <TT>Limit</TT> line and are the same as those used for <A HREF="ref-cupsd-conf.html#Location"><TT>Location</TT></A> sections. In this case, we require the owner of the job ("@OWNER") or a member of the <A HREF="ref-cupsd-conf.html#SystemGroup"><TT>SystemGroup</TT></A> ("@SYSTEM") to do the operation. Because we do not include an <A HREF="ref-cupsd-conf.html#AuthType"><TT>AuthType</TT></A> directive here, the user information can come from the IPP request itself or the authenticated username from the HTTP request. The administrative operations starting on line 9, however, <em>do</em> use the <TT>AuthType</TT> directive, and so administrative operations need to be authenticated:</P>
|
||||
<P>The access control rules are listed after the <TT>Limit</TT> line and are the same as those used for <A HREF="man-cupsd.conf.html#Location"><TT>Location</TT></A> sections. In this case, we require the owner of the job ("@OWNER") or a member of the <A HREF="man-cups-files.conf.html#SystemGroup"><TT>SystemGroup</TT></A> ("@SYSTEM") to do the operation. Because we do not include an <A HREF="man-cupsd.conf.html#AuthType"><TT>AuthType</TT></A> directive here, the user information can come from the IPP request itself or the authenticated username from the HTTP request. The administrative operations starting on line 9, however, <em>do</em> use the <TT>AuthType</TT> directive, and so administrative operations need to be authenticated:</P>
|
||||
|
||||
<PRE CLASS="example">
|
||||
9 <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class
|
||||
@@ -154,19 +154,39 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Print-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Creates a print job with a single file.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Print-URI</TT></TD>
|
||||
<TD NOWRAP><TT>Activate-Printer</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Create a print job with a single URI.</TD>
|
||||
<TD>Activates a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Validate-Job</TT></TD>
|
||||
<TD NOWRAP><TT>Cancel-Current-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Cancels the current job on a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Validates a print request before printing.</TD>
|
||||
<TD>Cancels a print job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-Jobs</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels all print jobs.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-My-Jobs</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels a user's print job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-Subscription</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels an event subscription.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Close-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Closes a user's print job so that it can be printed.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Create-Job</TT></TD>
|
||||
@@ -174,19 +194,29 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>Creates a print job with no files or URIs.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Send-Document</TT></TD>
|
||||
<TD NOWRAP><TT>Create-Job-Subscriptions</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Adds a file to a print job.</TD>
|
||||
<TD>Creates one or more event subscriptions for a job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Send-URI</TT></TD>
|
||||
<TD NOWRAP><TT>Create-Printer-Subscriptions</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Creates one or more event subscriptions for a printer or the server.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Deactivate-Printer</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Adds a URI to a print job.</TD>
|
||||
<TD>Deactivates a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-Job</TT></TD>
|
||||
<TD NOWRAP><TT>Disable-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels a print job.</TD>
|
||||
<TD>Stops a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Enable-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Starts a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Job-Attributes</TT></TD>
|
||||
@@ -198,70 +228,22 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets a list of jobs.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Notifications</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets (pending) events for an event subscription.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Printer-Attributes</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets information and options associated with a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Hold-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Holds a print job for printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Release-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Releases a print job for printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Restart-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Reprints a print job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Pause-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Stops a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Resume-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Starts a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Purge-Jobs</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels all jobs on the server or a printer or class
|
||||
and removes the job history information.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Set-Printer-Attributes</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Sets printer or class information; CUPS uses
|
||||
CUPS-Add-Modify-Printer and CUPS-Add-Modify-Class
|
||||
instead.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Set-Job-Attributes</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Changes job options.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Printer-Supported-Values</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets -supported attributes for a printer based on job
|
||||
options.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Create-Printer-Subscription</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Creates an event subscription for a printer or the server.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Create-Job-Subscription</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Creates an event subscription for a job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Subscription-Attributes</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
@@ -273,37 +255,17 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>Gets a list of event subscriptions.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Renew-Subscription</TT></TD>
|
||||
<TD NOWRAP><TT>Hold-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Renews an event subscription that is about to expire.</TD>
|
||||
<TD>Holds a print job for printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-Subscription</TT></TD>
|
||||
<TD NOWRAP><TT>Hold-New-Jobs</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels an event subscription.</TD>
|
||||
<TD>Holds new jobs submitted to a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Notifications</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets (pending) events for an event subscription.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Send-Notifications</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Sends events for an event subscription.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Get-Printer-Support-Files</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Gets printer driver files for a Novell client.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Enable-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Starts a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Disable-Printer</TT></TD>
|
||||
<TD NOWRAP><TT>Pause-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Stops a printer or class.</TD>
|
||||
</TR>
|
||||
@@ -313,31 +275,100 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>Stops a printer or class after the current job is finished.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Hold-New-Jobs</TT></TD>
|
||||
<TD NOWRAP><TT>Print-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Creates a print job with a single file.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Print-URI</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Holds new jobs submitted to a printer or class.</TD>
|
||||
<TD>Create a print job with a single URI.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Promote-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Prints a job before others.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Purge-Jobs</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Cancels all jobs on the server or a printer or class
|
||||
and removes the job history information.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Release-Held-New-Jobs</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Releases jobs that were held because of the
|
||||
Hold-New-Jobs operation.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Deactivate-Printer</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Deactivates a printer or class.</TD>
|
||||
<TD NOWRAP><TT>Release-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Releases a print job for printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Activate-Printer</TT></TD>
|
||||
<TD NOWRAP><TT>Renew-Subscription</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Renews an event subscription that is about to expire.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Reprocess-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Activates a printer or class.</TD>
|
||||
<TD>Reprints a job on a different printer or class; CUPS has the
|
||||
CUPS-Move-Job operation instead.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Restart-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Reprints a print job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Restart-Printer</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Restarts a printer or class, resuming print jobs as needed.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Resubmit-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Reprints a job with new options.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Resume-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Resumes printing of a stopped job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Resume-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Starts a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Schedule-Job-After</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Prints a job after others.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Send-Document</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Adds a file to a print job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Send-URI</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Adds a URI to a print job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Set-Printer-Attributes</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Sets printer or class information; CUPS uses
|
||||
CUPS-Add-Modify-Printer and CUPS-Add-Modify-Class
|
||||
for most attributes instead.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Set-Job-Attributes</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Changes job options.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Shutdown-Printer</TT></TD>
|
||||
<TD>No</TD>
|
||||
@@ -348,52 +379,47 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>No</TD>
|
||||
<TD>Powers a printer or class on.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Reprocess-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Reprints a job on a different printer or class; CUPS has the
|
||||
CUPS-Move-Job operation instead.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Cancel-Current-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Cancels the current job on a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Suspend-Current-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Stops the current job on a printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Resume-Job</TT></TD>
|
||||
<TD NOWRAP><TT>Validate-Document</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Resumes printing of a stopped job.</TD>
|
||||
<TD>Validates a document request before sending.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Promote-Job</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Prints a job before others.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>Schedule-Job-After</TT></TD>
|
||||
<TD>No</TD>
|
||||
<TD>Prints a job after others.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-Default</TT> *</TD>
|
||||
<TD NOWRAP><TT>Validate-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets the server/network default printer or class.</TD>
|
||||
<TD>Validates a print request before printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-Printers</TT> *</TD>
|
||||
<TD NOWRAP><TT>CUPS-Accept-Jobs</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets a list of printers and/or classes.</TD>
|
||||
<TD>Sets a printer's or class' printer-is-accepting-jobs
|
||||
attribute to true.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Add-Modify-Class</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Adds or modifies a class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Add-Modify-Printer</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Adds or modifies a printer.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Authenticate-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Authenticates a job for printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Delete-Class</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Removes a class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Delete-Printer</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
@@ -405,20 +431,34 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>Gets a list of classes.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Add-Modify-Class</TT></TD>
|
||||
<TD NOWRAP><TT>CUPS-Get-Default</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Adds or modifies a class.</TD>
|
||||
<TD>Gets the server/network default printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Delete-Class</TT> *</TD>
|
||||
<TD NOWRAP><TT>CUPS-Get-Devices</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Removes a class.</TD>
|
||||
<TD>Gets a list of printer devices.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Accept-Jobs</TT></TD>
|
||||
<TD NOWRAP><TT>CUPS-Get-Document</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Sets a printer's or class' printer-is-accepting-jobs
|
||||
attribute to true.</TD>
|
||||
<TD>Retrieves a document file from a job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-PPDs</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets a list of printer drivers or manufacturers.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-Printers</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets a list of printers and/or classes.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Move-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Moves a job to a different printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Reject-Jobs</TT></TD>
|
||||
@@ -431,31 +471,6 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
<TD>Yes</TD>
|
||||
<TD>Sets the server/network default printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-Devices</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets a list of printer devices.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-PPDs</TT> *</TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Gets a list of printer drivers or manufacturers.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Move-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Moves a job to a different printer or class.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Authenticate-Job</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Authenticates a job for printing.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD NOWRAP><TT>CUPS-Get-Document</TT></TD>
|
||||
<TD>Yes</TD>
|
||||
<TD>Retrieves a document file from a job.</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE></DIV>
|
||||
|
||||
@@ -477,7 +492,7 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
</Limit>
|
||||
</PRE>
|
||||
|
||||
<P>The directives inside the <TT>Limit</TT> subsection can use any of the normal limiting directives: <A HREF="ref-cupsd-conf.html#Allow"><TT>Allow</TT></A>, <A HREF="ref-cupsd-conf.html#AuthType"><TT>AuthType</TT></A>, <A HREF="ref-cupsd-conf.html#Deny"><TT>Deny</TT></A>, <A HREF="ref-cupsd-conf.html#Encryption"><TT>Encryption</TT></A>, <A HREF="ref-cupsd-conf.html#Require"><TT>Require</TT></A>, and <A HREF="ref-cupsd-conf.html#Satisfy"><TT>Satisfy</TT></A>. <A HREF="#TABLE02">Table 2</A> lists some basic "recipes" for different access control rules.</P>
|
||||
<P>The directives inside the <TT>Limit</TT> subsection can use any of the normal limiting directives: <A HREF="man-cupsd.conf.html#Allow"><TT>Allow</TT></A>, <A HREF="man-cupsd.conf.html#AuthType"><TT>AuthType</TT></A>, <A HREF="man-cupsd.conf.html#Deny"><TT>Deny</TT></A>, <A HREF="man-cupsd.conf.html#Encryption"><TT>Encryption</TT></A>, <A HREF="man-cupsd.conf.html#Require"><TT>Require</TT></A>, and <A HREF="man-cupsd.conf.html#Satisfy"><TT>Satisfy</TT></A>. <A HREF="#TABLE02">Table 2</A> lists some basic "recipes" for different access control rules.</P>
|
||||
|
||||
<DIV CLASS="table"><TABLE WIDTH="80%" SUMMARY="Access Control Recipes">
|
||||
<CAPTION>Table 2: <A NAME="TABLE02">Access Control Recipes</A></CAPTION>
|
||||
@@ -584,7 +599,7 @@ Allow from @LOCAL</PRE></TD>
|
||||
|
||||
<H2 CLASS="title"><A NAME="SELECT">Using Policies</A></H2>
|
||||
|
||||
<P>Once you have created a policy, you can use it in two ways. The first way is to assign it as the default policy for the system using the <A HREF="ref-cupsd-conf.html#DefaultPolicy"><TT>DefaultPolicy</TT></A> directive in the <VAR>cupsd.conf</VAR> file. For example, add the following line to the <VAR>cupsd.conf</VAR> file to use the "lab999" policy from the previous section:</P>
|
||||
<P>Once you have created a policy, you can use it in two ways. The first way is to assign it as the default policy for the system using the <A HREF="man-cupsd.conf.html#DefaultPolicy"><TT>DefaultPolicy</TT></A> directive in the <VAR>cupsd.conf</VAR> file. For example, add the following line to the <VAR>cupsd.conf</VAR> file to use the "lab999" policy from the previous section:</P>
|
||||
|
||||
<PRE CLASS="example">
|
||||
DefaultPolicy lab999
|
||||
|
||||
@@ -19,10 +19,7 @@ server.</P>
|
||||
|
||||
<H2 CLASS="title"><A NAME="AUTHENTICATION">Authentication Issues</A></H2>
|
||||
|
||||
<P>When you enable remote administration, the server will use
|
||||
Basic authentication for administration tasks. The current CUPS
|
||||
server supports Basic, Digest, Kerberos, and local certificate
|
||||
authentication:</P>
|
||||
<P>When you enable remote administration, the server will use Basic authentication for administration tasks. The current CUPS server supports Basic, Kerberos, and local certificate authentication:</P>
|
||||
|
||||
<OL>
|
||||
|
||||
@@ -120,7 +117,7 @@ variety of denial of service attacks:</P>
|
||||
|
||||
<H2 CLASS="title"><A NAME="ENCRYPTION">Encryption Issues</A></H2>
|
||||
|
||||
<P>CUPS supports 128-bit TLS encryption of network connections via the GNU TLS library, OS X Security framework, and Windows SSPI APIs. Secure deployment of TLS depends on proper certificate management and software maintenance.</P>
|
||||
<P>CUPS supports 128-bit TLS encryption of network connections via the GNU TLS library, OS X Security framework, and Windows Schannel APIs. Secure deployment of TLS depends on proper certificate management and software maintenance.</P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<H2 CLASS="title"><A NAME="OVERVIEW">Overview</A></H2>
|
||||
|
||||
<P>CUPS is developed by Apple Inc. and distributed as open source software under a combination of GNU GPL2 and GNU LGPL2 licenses with exceptions to allow linking to OpenSSL (which has a GPL-incompatible license) and for developers on Apple's operating systems to develop CUPS-based software until alternate license terms. Significant contributions to CUPS must be licensed to Apple using the <A HREF="https://www.cups.org/AppleContributorAgreement_2011-03-10.pdf">Apple Contributor Agreement</A>.</P>
|
||||
<P>CUPS is developed by Apple Inc. and distributed as open source software under a combination of GNU GPL2 and GNU LGPL2 licenses with exceptions to allow linking to OpenSSL (which has a GPL-incompatible license) and for developers on Apple's operating systems to develop CUPS-based software under alternate license terms. Significant contributions to CUPS must be licensed to Apple using the <A HREF="https://www.cups.org/AppleContributorAgreement_2011-03-10.pdf">Apple Contributor Agreement</A>.</P>
|
||||
|
||||
<P>Apple releases updates to the CUPS software approximately every three months. Each release has a version number consisting of the major version (currently 1), minor version (currently 6), and patch version (starting at 0) separated by the period, for example "1.6.0". Releases where only the patch version number changes will contain only bug fixes to the previous release, for example "1.6.1" includes bug fixes for the "1.6.0" release. New features require the major or minor version numbers to change, for example "1.6.0" release contains new features compared to the "1.5.3" release. Multiple beta and "candidate" releases generally precede each new feature release, for example "1.5b1", "1.5b2", and "1.5rc1" preceded the "1.5.0" release. Finally, we also post regular Subversion snapshot releases, for example "1.6svn-r10486", which represent a snapshot of the development for the next feature release.</P>
|
||||
|
||||
|
||||
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 6.6 KiB |
+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-2014 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-2015 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>ホーム - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">ホーム</a></li>
|
||||
<li><a href="/admin">管理</a></li>
|
||||
<li><a href="/classes/">クラス</a></li>
|
||||
<li><a href="/help/">ヘルプ</a></li>
|
||||
<li><a href="/jobs/">ジョブ</a></li>
|
||||
<li><a href="/printers/">プリンター</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS @CUPS_VERSION@</h1>
|
||||
<p>CUPS は、OS X<sup>®</sup> およびその他の UNIX <SUP>®</sup> 系 OS のために、<a href="http://www.apple.com/">Apple Inc.</a> によって開発された標準ベースのオープンソース印刷システムです。</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<h2>CUPS ユーザー向け</h2>
|
||||
<p><a href="help/overview.html">CUPS の概要</a></p>
|
||||
<p><a href="help/options.html">コマンドラインからの印刷とオプション</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups">ユーザーフォーラム</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS 管理者向け</h2>
|
||||
<p><a href="admin">プリンターとクラスの追加</a></p>
|
||||
<p><a href="help/policies.html">操作ポリシーの管理</a></p>
|
||||
<p><a href="help/network.html">ネットワークプリンターの使い方</a></p>
|
||||
<p><a href="help/man-cupsd.conf.html">ネットワークプリンターの使い方</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS 開発者向け</h2>
|
||||
<p><a href="help/api-overview.html">CUPS プログラミングの導入</a></p>
|
||||
<p><a href="help/api-cups.html">CUPS API</a></p>
|
||||
<p><a href="help/api-filter.html">フィルタとバックエンドのプログラミング</a></p>
|
||||
<p><a href="help/api-httpipp.html">HTTP と IPP の API</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups-devel">開発者フォーラム</a></p>
|
||||
</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-2015 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Home - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">Начало</a></li>
|
||||
<li><a href="/admin">Администрирование</a></li>
|
||||
<li><a href="/classes/">Группы</a></li>
|
||||
<li><a href="/help/">Справка</a></li>
|
||||
<li><a href="/jobs/">Задания</a></li>
|
||||
<li><a href="/printers/">Принтеры</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS 2.0.1</h1>
|
||||
<P>CUPS — поддерживающая большинство стандартов, свободная подсистема печати, разрабатываемая компанией <A HREF="http://www.apple.com/">Apple Inc.</A> для операционной системы Mac OS<SUP>®</SUP> X и других UNIX<SUP>®</SUP>-подобных операционных систем.</P>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<H2>CUPS для пользователей</H2>
|
||||
<P><A HREF="help/overview.html">Введение в CUPS</A></P>
|
||||
<P><A HREF="help/options.html">Печать из командной строки</A></P>
|
||||
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Форум пользователей</A></P>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<H2>CUPS для администраторов</H2>
|
||||
<P><A HREF="admin">Добавление принтеров и групп</A></P>
|
||||
<P><A HREF="help/policies.html">Управление доступом</A></P>
|
||||
<P><A HREF="help/network.html">Использование сетевых принтеров</A></P>
|
||||
<p><a href="help/man-cupsd.conf.html">Справочник по cupsd.conf</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
|
||||
<H2>CUPS для разработчиков</H2>
|
||||
<P><A HREF="help/api-overview.html">Введение в разработку CUPS</A></P>
|
||||
<P><A HREF="help/api-cups.html">CUPS API</A></P>
|
||||
<P><A HREF="help/api-filter.html">Разработка фильтров и модулей</A></P>
|
||||
<P><A HREF="help/api-httpipp.html">API доступа по HTTP и IPP</A></P>
|
||||
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Форум разработчиков</A></P>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2014) компании Apple Inc. Все права защищены.</div>
|
||||
</body>
|
||||
</html>
|
||||
+12
-9
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: error.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: error.c 12748 2015-06-24 15:58:40Z msweet $"
|
||||
*
|
||||
* Raster error handling for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -56,6 +56,8 @@ _cupsRasterAddError(const char *f, /* I - Printf-style error message */
|
||||
ssize_t bytes; /* Bytes in message string */
|
||||
|
||||
|
||||
DEBUG_printf(("_cupsRasterAddError(f=\"%s\", ...)", f));
|
||||
|
||||
va_start(ap, f);
|
||||
bytes = vsnprintf(s, sizeof(s), f, ap);
|
||||
va_end(ap);
|
||||
@@ -63,6 +65,8 @@ _cupsRasterAddError(const char *f, /* I - Printf-style error message */
|
||||
if (bytes <= 0)
|
||||
return;
|
||||
|
||||
DEBUG_printf(("1_cupsRasterAddError: %s", s));
|
||||
|
||||
bytes ++;
|
||||
|
||||
if ((size_t)bytes >= sizeof(s))
|
||||
@@ -185,7 +189,7 @@ get_error_buffer(void)
|
||||
* Initialize the global data exactly once...
|
||||
*/
|
||||
|
||||
DEBUG_puts("get_error_buffer()");
|
||||
DEBUG_puts("3get_error_buffer()");
|
||||
|
||||
pthread_once(&raster_key_once, raster_init);
|
||||
|
||||
@@ -196,7 +200,7 @@ get_error_buffer(void)
|
||||
if ((buf = (_cups_raster_error_t *)pthread_getspecific(raster_key))
|
||||
== NULL)
|
||||
{
|
||||
DEBUG_puts("get_error_buffer: allocating memory for thread...");
|
||||
DEBUG_puts("4get_error_buffer: allocating memory for thread.");
|
||||
|
||||
/*
|
||||
* No, allocate memory as set the pointer for the key...
|
||||
@@ -205,7 +209,7 @@ get_error_buffer(void)
|
||||
buf = calloc(1, sizeof(_cups_raster_error_t));
|
||||
pthread_setspecific(raster_key, buf);
|
||||
|
||||
DEBUG_printf((" buf=%p\n", buf));
|
||||
DEBUG_printf(("4get_error_buffer: buf=%p", buf));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -225,8 +229,7 @@ raster_init(void)
|
||||
{
|
||||
pthread_key_create(&raster_key, raster_destructor);
|
||||
|
||||
DEBUG_printf(("raster_init(): raster_key=%x(%u)\n", (unsigned)raster_key,
|
||||
(unsigned)raster_key));
|
||||
DEBUG_printf(("3raster_init(): raster_key=%x(%u)", (unsigned)raster_key, (unsigned)raster_key));
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +244,7 @@ raster_destructor(void *value) /* I - Data to free */
|
||||
/* Error buffer */
|
||||
|
||||
|
||||
DEBUG_printf(("raster_destructor(value=%p)\n", value));
|
||||
DEBUG_printf(("3raster_destructor(value=%p)", value));
|
||||
|
||||
if (buf->start)
|
||||
free(buf->start);
|
||||
@@ -272,5 +275,5 @@ get_error_buffer(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: error.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: error.c 12748 2015-06-24 15:58:40Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-7
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: gziptoany.c 12656 2015-05-22 17:27:37Z msweet $"
|
||||
*
|
||||
* GZIP/raw pre-filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -40,7 +40,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Check command-line...
|
||||
*/
|
||||
|
||||
if (argc != 7)
|
||||
if (argc < 6 || argc > 7)
|
||||
{
|
||||
_cupsLangPrintf(stderr,
|
||||
_("Usage: %s job-id user title copies options [file]"),
|
||||
@@ -62,8 +62,14 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Open the file...
|
||||
*/
|
||||
|
||||
if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
|
||||
if (argc == 6)
|
||||
{
|
||||
copies = 1;
|
||||
fp = cupsFileStdin();
|
||||
}
|
||||
else if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Unable to open \"%s\".\n", argv[6]);
|
||||
_cupsLangPrintError("ERROR", _("Unable to open print file"));
|
||||
return (1);
|
||||
}
|
||||
@@ -85,7 +91,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
_("Unable to write uncompressed print data: %s"),
|
||||
strerror(errno));
|
||||
cupsFileClose(fp);
|
||||
if (argc == 7)
|
||||
cupsFileClose(fp);
|
||||
|
||||
return (1);
|
||||
}
|
||||
@@ -97,12 +104,13 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Close the file and return...
|
||||
*/
|
||||
|
||||
cupsFileClose(fp);
|
||||
if (argc == 7)
|
||||
cupsFileClose(fp);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: gziptoany.c 12656 2015-05-22 17:27:37Z msweet $".
|
||||
*/
|
||||
|
||||
+51
-50
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: interpret.c 11848 2014-05-07 00:26:44Z msweet $"
|
||||
* "$Id: interpret.c 12748 2015-06-24 15:58:40Z msweet $"
|
||||
*
|
||||
* PPD command interpreter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -91,8 +91,8 @@ static int setpagedevice(_cups_ps_stack_t *st,
|
||||
cups_page_header2_t *h,
|
||||
int *preferred_bits);
|
||||
#ifdef DEBUG
|
||||
static void DEBUG_object(_cups_ps_obj_t *obj);
|
||||
static void DEBUG_stack(_cups_ps_stack_t *st);
|
||||
static void DEBUG_object(const char *prefix, _cups_ps_obj_t *obj);
|
||||
static void DEBUG_stack(const char *prefix, _cups_ps_stack_t *st);
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
@@ -547,8 +547,8 @@ _cupsRasterExecPS(
|
||||
while ((obj = scan_ps(st, &codeptr)) != NULL)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
DEBUG_printf(("_cupsRasterExecPS: Stack (%d objects)\n", st->num_objs));
|
||||
DEBUG_object(obj);
|
||||
DEBUG_printf(("_cupsRasterExecPS: Stack (%d objects)", st->num_objs));
|
||||
DEBUG_object("_cupsRasterExecPS", obj);
|
||||
#endif /* DEBUG */
|
||||
|
||||
switch (obj->type)
|
||||
@@ -561,11 +561,11 @@ _cupsRasterExecPS(
|
||||
pop_stack(st);
|
||||
|
||||
if (cleartomark_stack(st))
|
||||
_cupsRasterAddError("cleartomark: Stack underflow!\n");
|
||||
_cupsRasterAddError("cleartomark: Stack underflow.\n");
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts(" dup: ");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_puts("1_cupsRasterExecPS: dup");
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
break;
|
||||
|
||||
@@ -577,7 +577,7 @@ _cupsRasterExecPS(
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: copy");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
break;
|
||||
@@ -588,7 +588,7 @@ _cupsRasterExecPS(
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: dup");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
break;
|
||||
|
||||
@@ -600,7 +600,7 @@ _cupsRasterExecPS(
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: index");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
break;
|
||||
@@ -611,7 +611,7 @@ _cupsRasterExecPS(
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: pop");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
break;
|
||||
|
||||
@@ -630,7 +630,7 @@ _cupsRasterExecPS(
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: roll");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
@@ -642,7 +642,7 @@ _cupsRasterExecPS(
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: setpagedevice");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
break;
|
||||
|
||||
@@ -653,10 +653,9 @@ _cupsRasterExecPS(
|
||||
break;
|
||||
|
||||
case CUPS_PS_OTHER :
|
||||
_cupsRasterAddError("Unknown operator \"%s\"!\n", obj->value.other);
|
||||
_cupsRasterAddError("Unknown operator \"%s\".\n", obj->value.other);
|
||||
error = 1;
|
||||
DEBUG_printf(("_cupsRasterExecPS: Unknown operator \"%s\"!\n",
|
||||
obj->value.other));
|
||||
DEBUG_printf(("_cupsRasterExecPS: Unknown operator \"%s\".", obj->value.other));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -675,8 +674,8 @@ _cupsRasterExecPS(
|
||||
error_stack(st, "Stack not empty:");
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_puts("_cupsRasterExecPS: Stack not empty:");
|
||||
DEBUG_stack(st);
|
||||
DEBUG_puts("_cupsRasterExecPS: Stack not empty");
|
||||
DEBUG_stack("_cupsRasterExecPS", st);
|
||||
#endif /* DEBUG */
|
||||
|
||||
delete_stack(st);
|
||||
@@ -977,7 +976,7 @@ roll_stack(_cups_ps_stack_t *st, /* I - Stack */
|
||||
int n; /* Index into array */
|
||||
|
||||
|
||||
DEBUG_printf((" roll_stack(st=%p, s=%d, c=%d)\n", st, s, c));
|
||||
DEBUG_printf(("3roll_stack(st=%p, s=%d, c=%d)", st, s, c));
|
||||
|
||||
/*
|
||||
* Range check input...
|
||||
@@ -1435,7 +1434,7 @@ setpagedevice(
|
||||
* Now pull /name and value pairs from the dictionary...
|
||||
*/
|
||||
|
||||
DEBUG_puts("setpagedevice: Dictionary:");
|
||||
DEBUG_puts("3setpagedevice: Dictionary:");
|
||||
|
||||
for (obj ++; obj < end; obj ++)
|
||||
{
|
||||
@@ -1450,8 +1449,8 @@ setpagedevice(
|
||||
obj ++;
|
||||
|
||||
#ifdef DEBUG
|
||||
DEBUG_printf(("setpagedevice: /%s ", name));
|
||||
DEBUG_object(obj);
|
||||
DEBUG_printf(("4setpagedevice: /%s ", name));
|
||||
DEBUG_object("setpagedevice", obj);
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
@@ -1601,7 +1600,7 @@ setpagedevice(
|
||||
* Ignore unknown name+value...
|
||||
*/
|
||||
|
||||
DEBUG_printf((" Unknown name (\"%s\") or value...\n", name));
|
||||
DEBUG_printf(("4setpagedevice: Unknown name (\"%s\") or value...\n", name));
|
||||
|
||||
while (obj[1].type != CUPS_PS_NAME && obj < end)
|
||||
obj ++;
|
||||
@@ -1618,91 +1617,92 @@ setpagedevice(
|
||||
*/
|
||||
|
||||
static void
|
||||
DEBUG_object(_cups_ps_obj_t *obj) /* I - Object to print */
|
||||
DEBUG_object(const char *prefix, /* I - Prefix string */
|
||||
_cups_ps_obj_t *obj) /* I - Object to print */
|
||||
{
|
||||
switch (obj->type)
|
||||
{
|
||||
case CUPS_PS_NAME :
|
||||
DEBUG_printf(("/%s\n", obj->value.name));
|
||||
DEBUG_printf(("4%s: /%s\n", prefix, obj->value.name));
|
||||
break;
|
||||
|
||||
case CUPS_PS_NUMBER :
|
||||
DEBUG_printf(("%g\n", obj->value.number));
|
||||
DEBUG_printf(("4%s: %g\n", prefix, obj->value.number));
|
||||
break;
|
||||
|
||||
case CUPS_PS_STRING :
|
||||
DEBUG_printf(("(%s)\n", obj->value.string));
|
||||
DEBUG_printf(("4%s: (%s)\n", prefix, obj->value.string));
|
||||
break;
|
||||
|
||||
case CUPS_PS_BOOLEAN :
|
||||
if (obj->value.boolean)
|
||||
DEBUG_puts("true");
|
||||
DEBUG_printf(("4%s: true", prefix));
|
||||
else
|
||||
DEBUG_puts("false");
|
||||
DEBUG_printf(("4%s: false", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_NULL :
|
||||
DEBUG_puts("null");
|
||||
DEBUG_printf(("4%s: null", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_START_ARRAY :
|
||||
DEBUG_puts("[");
|
||||
DEBUG_printf(("4%s: [", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_END_ARRAY :
|
||||
DEBUG_puts("]");
|
||||
DEBUG_printf(("4%s: ]", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_START_DICT :
|
||||
DEBUG_puts("<<");
|
||||
DEBUG_printf(("4%s: <<", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_END_DICT :
|
||||
DEBUG_puts(">>");
|
||||
DEBUG_printf(("4%s: >>", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_START_PROC :
|
||||
DEBUG_puts("{");
|
||||
DEBUG_printf(("4%s: {", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_END_PROC :
|
||||
DEBUG_puts("}");
|
||||
DEBUG_printf(("4%s: }", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_CLEARTOMARK :
|
||||
DEBUG_puts("--cleartomark--");
|
||||
DEBUG_printf(("4%s: --cleartomark--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_COPY :
|
||||
DEBUG_puts("--copy--");
|
||||
DEBUG_printf(("4%s: --copy--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_DUP :
|
||||
DEBUG_puts("--dup--");
|
||||
DEBUG_printf(("4%s: --dup--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_INDEX :
|
||||
DEBUG_puts("--index--");
|
||||
DEBUG_printf(("4%s: --index--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_POP :
|
||||
DEBUG_puts("--pop--");
|
||||
DEBUG_printf(("4%s: --pop--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_ROLL :
|
||||
DEBUG_puts("--roll--");
|
||||
DEBUG_printf(("4%s: --roll--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_SETPAGEDEVICE :
|
||||
DEBUG_puts("--setpagedevice--");
|
||||
DEBUG_printf(("4%s: --setpagedevice--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_STOPPED :
|
||||
DEBUG_puts("--stopped--");
|
||||
DEBUG_printf(("4%s: --stopped--", prefix));
|
||||
break;
|
||||
|
||||
case CUPS_PS_OTHER :
|
||||
DEBUG_printf(("--%s--\n", obj->value.other));
|
||||
DEBUG_printf(("4%s: --%s--", prefix, obj->value.other));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1713,18 +1713,19 @@ DEBUG_object(_cups_ps_obj_t *obj) /* I - Object to print */
|
||||
*/
|
||||
|
||||
static void
|
||||
DEBUG_stack(_cups_ps_stack_t *st) /* I - Stack */
|
||||
DEBUG_stack(const char *prefix, /* I - Prefix string */
|
||||
_cups_ps_stack_t *st) /* I - Stack */
|
||||
{
|
||||
int c; /* Looping var */
|
||||
_cups_ps_obj_t *obj; /* Current object on stack */
|
||||
|
||||
|
||||
for (obj = st->objs, c = st->num_objs; c > 0; c --, obj ++)
|
||||
DEBUG_object(obj);
|
||||
DEBUG_object(prefix, obj);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: interpret.c 11848 2014-05-07 00:26:44Z msweet $".
|
||||
* End of "$Id: interpret.c 12748 2015-06-24 15:58:40Z msweet $".
|
||||
*/
|
||||
|
||||
+9
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: pstops.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: pstops.c 12656 2015-05-22 17:27:37Z msweet $"
|
||||
*
|
||||
* PostScript filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -264,7 +264,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
|
||||
{
|
||||
_cupsLangPrintError("ERROR", _("Unable to open print file"));
|
||||
if (!JobCanceled)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Unable to open \"%s\".\n", argv[6]);
|
||||
_cupsLangPrintError("ERROR", _("Unable to open print file"));
|
||||
}
|
||||
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
@@ -3400,5 +3405,5 @@ write_options(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: pstops.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: pstops.c 12656 2015-05-22 17:27:37Z msweet $".
|
||||
*/
|
||||
|
||||
+131
-33
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: raster.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: raster.c 12748 2015-06-24 15:58:40Z msweet $"
|
||||
*
|
||||
* Raster file routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* This file is part of the CUPS Imaging library.
|
||||
@@ -50,6 +50,9 @@ struct _cups_raster_s /**** Raster stream data ****/
|
||||
*bufptr, /* Current (read) position in buffer */
|
||||
*bufend; /* End of current (read) buffer */
|
||||
size_t bufsize; /* Buffer size */
|
||||
#ifdef DEBUG
|
||||
size_t iocount; /* Number of bytes read/written */
|
||||
#endif /* DEBUG */
|
||||
};
|
||||
|
||||
|
||||
@@ -193,7 +196,7 @@ cupsRasterOpenIO(
|
||||
r->sync == CUPS_RASTER_REVSYNCv2)
|
||||
r->swapped = 1;
|
||||
|
||||
DEBUG_printf(("r->swapped=%d, r->sync=%08x\n", r->swapped, r->sync));
|
||||
DEBUG_printf(("1cupsRasterOpenIO: r->swapped=%d, r->sync=%08x\n", r->swapped, r->sync));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -256,7 +259,10 @@ cupsRasterReadHeader(
|
||||
*/
|
||||
|
||||
if (!cups_raster_read_header(r))
|
||||
{
|
||||
memset(h, 0, sizeof(cups_page_header_t));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the header to the user-supplied buffer...
|
||||
@@ -284,8 +290,13 @@ cupsRasterReadHeader2(
|
||||
* Get the raster header...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("cupsRasterReadHeader2(r=%p, h=%p)", r, h));
|
||||
|
||||
if (!cups_raster_read_header(r))
|
||||
{
|
||||
memset(h, 0, sizeof(cups_page_header2_t));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the header to the user-supplied buffer...
|
||||
@@ -319,9 +330,16 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
unsigned count; /* Repetition count */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsRasterReadPixels(r=%p, p=%p, len=%u)", r, p, len));
|
||||
|
||||
if (r == NULL || r->mode != CUPS_RASTER_READ || r->remaining == 0 ||
|
||||
r->header.cupsBytesPerLine == 0)
|
||||
{
|
||||
DEBUG_puts("1cupsRasterReadPixels: Returning 0.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cupsRasterReadPixels: compressed=%d, remaining=%u", r->compressed, r->remaining));
|
||||
|
||||
if (!r->compressed)
|
||||
{
|
||||
@@ -332,7 +350,10 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
r->remaining -= len / r->header.cupsBytesPerLine;
|
||||
|
||||
if (cups_raster_io(r, p, len) < (ssize_t)len)
|
||||
{
|
||||
DEBUG_puts("1cupsRasterReadPixels: Read error, returning 0.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Swap bytes as needed...
|
||||
@@ -348,6 +369,8 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
* Return...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("1cupsRasterReadPixels: Returning %u", len));
|
||||
|
||||
return (len);
|
||||
}
|
||||
|
||||
@@ -376,9 +399,12 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
*/
|
||||
|
||||
if (!cups_raster_read(r, &byte, 1))
|
||||
{
|
||||
DEBUG_puts("1cupsRasterReadPixels: Read error, returning 0.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
r->count = byte + 1;
|
||||
r->count = (unsigned)byte + 1;
|
||||
|
||||
if (r->count > 1)
|
||||
ptr = r->pixels;
|
||||
@@ -393,7 +419,10 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
*/
|
||||
|
||||
if (!cups_raster_read(r, &byte, 1))
|
||||
{
|
||||
DEBUG_puts("1cupsRasterReadPixels: Read error, returning 0.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (byte & 128)
|
||||
{
|
||||
@@ -407,7 +436,10 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
count = (unsigned)bytes;
|
||||
|
||||
if (!cups_raster_read(r, temp, count))
|
||||
{
|
||||
DEBUG_puts("1cupsRasterReadPixels: Read error, returning 0.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
temp += count;
|
||||
bytes -= count;
|
||||
@@ -418,7 +450,7 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
* Repeat the next N bytes...
|
||||
*/
|
||||
|
||||
count = (byte + 1) * r->bpp;
|
||||
count = ((unsigned)byte + 1) * r->bpp;
|
||||
if (count > (unsigned)bytes)
|
||||
count = (unsigned)bytes;
|
||||
|
||||
@@ -428,7 +460,10 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
bytes -= count;
|
||||
|
||||
if (!cups_raster_read(r, temp, r->bpp))
|
||||
{
|
||||
DEBUG_puts("1cupsRasterReadPixels: Read error, returning 0.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
temp += r->bpp;
|
||||
count -= r->bpp;
|
||||
@@ -500,6 +535,8 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
|
||||
p += bytes;
|
||||
}
|
||||
|
||||
DEBUG_printf(("1cupsRasterReadPixels: Returning %u", len));
|
||||
|
||||
return (len);
|
||||
}
|
||||
|
||||
@@ -603,8 +640,9 @@ cupsRasterWriteHeader(
|
||||
fh.cupsInteger[15] = htonl(r->header.cupsInteger[15]);
|
||||
/* VendorLength */
|
||||
|
||||
memcpy(fh.cupsReal, r->header.cupsReal,
|
||||
sizeof(fh.cupsReal) + sizeof(fh.cupsString));
|
||||
void *dst = fh.cupsReal; /* Bypass bogus compiler warning */
|
||||
void *src = r->header.cupsReal;
|
||||
memcpy(dst, src, sizeof(fh.cupsReal) + sizeof(fh.cupsString));
|
||||
/* VendorData */
|
||||
|
||||
strlcpy(fh.cupsRenderingIntent, r->header.cupsRenderingIntent,
|
||||
@@ -699,14 +737,10 @@ cupsRasterWriteHeader2(
|
||||
fh.cupsInteger[0] = htonl(r->header.cupsInteger[0]);
|
||||
fh.cupsInteger[1] = htonl(r->header.cupsInteger[1]);
|
||||
fh.cupsInteger[2] = htonl(r->header.cupsInteger[2]);
|
||||
fh.cupsInteger[3] = htonl((unsigned)(r->header.cupsImagingBBox[0] *
|
||||
r->header.HWResolution[0]));
|
||||
fh.cupsInteger[4] = htonl((unsigned)(r->header.cupsImagingBBox[1] *
|
||||
r->header.HWResolution[1]));
|
||||
fh.cupsInteger[5] = htonl((unsigned)(r->header.cupsImagingBBox[2] *
|
||||
r->header.HWResolution[0]));
|
||||
fh.cupsInteger[6] = htonl((unsigned)(r->header.cupsImagingBBox[3] *
|
||||
r->header.HWResolution[1]));
|
||||
fh.cupsInteger[3] = htonl((unsigned)(r->header.cupsImagingBBox[0] * r->header.HWResolution[0] / 72.0));
|
||||
fh.cupsInteger[4] = htonl((unsigned)(r->header.cupsImagingBBox[1] * r->header.HWResolution[1] / 72.0));
|
||||
fh.cupsInteger[5] = htonl((unsigned)(r->header.cupsImagingBBox[2] * r->header.HWResolution[0] / 72.0));
|
||||
fh.cupsInteger[6] = htonl((unsigned)(r->header.cupsImagingBBox[3] * r->header.HWResolution[1] / 72.0));
|
||||
fh.cupsInteger[7] = htonl(0xffffff);
|
||||
|
||||
return (cups_raster_io(r, (unsigned char *)&fh, sizeof(fh)) == sizeof(fh));
|
||||
@@ -792,10 +826,15 @@ cupsRasterWritePixels(cups_raster_t *r, /* I - Raster stream */
|
||||
* Write the byte-swapped buffer...
|
||||
*/
|
||||
|
||||
return ((unsigned)cups_raster_io(r, r->buffer, len));
|
||||
bytes = cups_raster_io(r, r->buffer, len);
|
||||
}
|
||||
else
|
||||
return ((unsigned)cups_raster_io(r, p, len));
|
||||
bytes = cups_raster_io(r, p, len);
|
||||
|
||||
if (bytes < len)
|
||||
return (0);
|
||||
else
|
||||
return (len);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -819,7 +858,7 @@ cupsRasterWritePixels(cups_raster_t *r, /* I - Raster stream */
|
||||
|
||||
if (memcmp(p, r->pcurrent, (size_t)bytes))
|
||||
{
|
||||
if (!cups_raster_write(r, r->pixels))
|
||||
if (cups_raster_write(r, r->pixels) <= 0)
|
||||
return (0);
|
||||
|
||||
r->count = 0;
|
||||
@@ -848,10 +887,15 @@ cupsRasterWritePixels(cups_raster_t *r, /* I - Raster stream */
|
||||
r->remaining --;
|
||||
|
||||
if (r->remaining == 0)
|
||||
return ((unsigned)cups_raster_write(r, r->pixels));
|
||||
{
|
||||
if (cups_raster_write(r, r->pixels) <= 0)
|
||||
return (0);
|
||||
else
|
||||
return (len);
|
||||
}
|
||||
else if (r->count == 256)
|
||||
{
|
||||
if (cups_raster_write(r, r->pixels) == 0)
|
||||
if (cups_raster_write(r, r->pixels) <= 0)
|
||||
return (0);
|
||||
|
||||
r->count = 0;
|
||||
@@ -888,7 +932,10 @@ cupsRasterWritePixels(cups_raster_t *r, /* I - Raster stream */
|
||||
r->remaining --;
|
||||
|
||||
if (r->remaining == 0)
|
||||
return ((unsigned)cups_raster_write(r, r->pixels));
|
||||
{
|
||||
if (cups_raster_write(r, r->pixels) <= 0)
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -908,9 +955,13 @@ cups_raster_read_header(
|
||||
size_t len; /* Length for read/swap */
|
||||
|
||||
|
||||
DEBUG_printf(("3cups_raster_read_header(r=%p), r->mode=%d", r, r ? r->mode : 0));
|
||||
|
||||
if (r == NULL || r->mode != CUPS_RASTER_READ)
|
||||
return (0);
|
||||
|
||||
DEBUG_printf(("4cups_raster_read_header: r->iocount=" CUPS_LLFMT, CUPS_LLCAST r->iocount));
|
||||
|
||||
/*
|
||||
* Get the length of the raster header...
|
||||
*/
|
||||
@@ -920,6 +971,8 @@ cups_raster_read_header(
|
||||
else
|
||||
len = sizeof(cups_page_header2_t);
|
||||
|
||||
DEBUG_printf(("4cups_raster_read_header: len=%d", (int)len));
|
||||
|
||||
/*
|
||||
* Read the header...
|
||||
*/
|
||||
@@ -927,7 +980,10 @@ cups_raster_read_header(
|
||||
memset(&(r->header), 0, sizeof(r->header));
|
||||
|
||||
if (cups_raster_read(r, (unsigned char *)&(r->header), len) < (ssize_t)len)
|
||||
{
|
||||
DEBUG_printf(("4cups_raster_read_header: EOF, r->iocount=" CUPS_LLFMT, CUPS_LLCAST r->iocount));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Swap bytes as needed...
|
||||
@@ -939,21 +995,19 @@ cups_raster_read_header(
|
||||
temp; /* Temporary copy */
|
||||
|
||||
|
||||
DEBUG_puts("Swapping header bytes...");
|
||||
DEBUG_puts("4cups_raster_read_header: Swapping header bytes.");
|
||||
|
||||
for (len = 81, s = &(r->header.AdvanceDistance);
|
||||
len > 0;
|
||||
len --, s ++)
|
||||
{
|
||||
DEBUG_printf(("%08x =>", *s));
|
||||
|
||||
temp = *s;
|
||||
*s = ((temp & 0xff) << 24) |
|
||||
((temp & 0xff00) << 8) |
|
||||
((temp & 0xff0000) >> 8) |
|
||||
((temp & 0xff000000) >> 24);
|
||||
|
||||
DEBUG_printf((" %08x\n", *s));
|
||||
DEBUG_printf(("4cups_raster_read_header: %08x => %08x", temp, *s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -963,7 +1017,9 @@ cups_raster_read_header(
|
||||
|
||||
cups_raster_update(r);
|
||||
|
||||
return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0);
|
||||
DEBUG_printf(("4cups_raster_read_header: cupsBitsPerPixel=%u, cupsBitsPerColor=%u, cupsBytesPerLine=%u, cupsWidth=%u, cupsHeight=%u, r->bpp=%d", r->header.cupsBitsPerPixel, r->header.cupsBitsPerColor, r->header.cupsBytesPerLine, r->header.cupsWidth, r->header.cupsHeight, r->bpp));
|
||||
|
||||
return (r->header.cupsBitsPerPixel != 0 && r->header.cupsBitsPerColor != 0 && r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -980,20 +1036,31 @@ cups_raster_io(cups_raster_t *r, /* I - Raster stream */
|
||||
total; /* Total bytes read/written */
|
||||
|
||||
|
||||
DEBUG_printf(("4cups_raster_io(r=%p, buf=%p, bytes=" CUPS_LLFMT ")", r, buf, CUPS_LLCAST bytes));
|
||||
DEBUG_printf(("5cups_raster_io(r=%p, buf=%p, bytes=" CUPS_LLFMT ")", r, buf, CUPS_LLCAST bytes));
|
||||
|
||||
for (total = 0; total < (ssize_t)bytes; total += count, buf += count)
|
||||
{
|
||||
count = (*r->iocb)(r->ctx, buf, bytes - (size_t)total);
|
||||
|
||||
DEBUG_printf(("5cups_raster_io: count=%d, total=%d", (int)count,
|
||||
(int)total));
|
||||
DEBUG_printf(("6cups_raster_io: count=%d, total=%d", (int)count, (int)total));
|
||||
if (count == 0)
|
||||
{
|
||||
DEBUG_puts("6cups_raster_io: Returning 0.");
|
||||
return (0);
|
||||
}
|
||||
else if (count < 0)
|
||||
{
|
||||
DEBUG_puts("6cups_raster_io: Returning -1 on error.");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
r->iocount += (size_t)count;
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
DEBUG_printf(("6cups_raster_io: Returning " CUPS_LLFMT ".", CUPS_LLCAST total));
|
||||
|
||||
return (total);
|
||||
}
|
||||
|
||||
@@ -1012,7 +1079,7 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
|
||||
total; /* Total bytes read */
|
||||
|
||||
|
||||
DEBUG_printf(("cups_raster_read(r=%p, buf=%p, bytes=" CUPS_LLFMT ")\n", r, buf, CUPS_LLCAST bytes));
|
||||
DEBUG_printf(("5cups_raster_read(r=%p, buf=%p, bytes=" CUPS_LLFMT ")\n", r, buf, CUPS_LLCAST bytes));
|
||||
|
||||
if (!r->compressed)
|
||||
return (cups_raster_io(r, buf, bytes));
|
||||
@@ -1022,6 +1089,8 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
|
||||
*/
|
||||
|
||||
count = (ssize_t)(2 * r->header.cupsBytesPerLine);
|
||||
if (count < 65536)
|
||||
count = 65536;
|
||||
|
||||
if ((size_t)count > r->bufsize)
|
||||
{
|
||||
@@ -1054,7 +1123,7 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
|
||||
{
|
||||
count = (ssize_t)bytes - total;
|
||||
|
||||
DEBUG_printf(("count=" CUPS_LLFMT ", remaining=" CUPS_LLFMT ", buf=%p, bufptr=%p, bufend=%p...\n", CUPS_LLCAST count, CUPS_LLCAST remaining, buf, r->bufptr, r->bufend));
|
||||
DEBUG_printf(("6cups_raster_read: count=" CUPS_LLFMT ", remaining=" CUPS_LLFMT ", buf=%p, bufptr=%p, bufend=%p", CUPS_LLCAST count, CUPS_LLCAST remaining, buf, r->bufptr, r->bufend));
|
||||
|
||||
if (remaining == 0)
|
||||
{
|
||||
@@ -1070,6 +1139,10 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
|
||||
|
||||
r->bufptr = r->buffer;
|
||||
r->bufend = r->buffer + remaining;
|
||||
|
||||
#ifdef DEBUG
|
||||
r->iocount += (size_t)remaining;
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1082,6 +1155,10 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
|
||||
if (count <= 0)
|
||||
return (0);
|
||||
|
||||
#ifdef DEBUG
|
||||
r->iocount += (size_t)count;
|
||||
#endif /* DEBUG */
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1131,6 +1208,8 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_printf(("6cups_raster_read: Returning %ld", (long)total));
|
||||
|
||||
return (total);
|
||||
}
|
||||
|
||||
@@ -1233,6 +1312,9 @@ cups_raster_update(cups_raster_t *r) /* I - Raster stream */
|
||||
else
|
||||
r->bpp = (r->header.cupsBitsPerColor + 7) / 8;
|
||||
|
||||
if (r->bpp == 0)
|
||||
r->bpp = 1;
|
||||
|
||||
/*
|
||||
* Set the number of remaining rows...
|
||||
*/
|
||||
@@ -1277,13 +1359,16 @@ cups_raster_write(
|
||||
count; /* Count */
|
||||
|
||||
|
||||
DEBUG_printf(("cups_raster_write(r=%p, pixels=%p)\n", r, pixels));
|
||||
DEBUG_printf(("3cups_raster_write(r=%p, pixels=%p)\n", r, pixels));
|
||||
|
||||
/*
|
||||
* Allocate a write buffer as needed...
|
||||
*/
|
||||
|
||||
count = r->header.cupsBytesPerLine * 2;
|
||||
if (count < 65536)
|
||||
count = 65536;
|
||||
|
||||
if ((size_t)count > r->bufsize)
|
||||
{
|
||||
if (r->buffer)
|
||||
@@ -1292,7 +1377,10 @@ cups_raster_write(
|
||||
wptr = malloc(count);
|
||||
|
||||
if (!wptr)
|
||||
{
|
||||
DEBUG_printf(("4cups_raster_write: Unable to allocate " CUPS_LLFMT " bytes for raster buffer: %s", CUPS_LLCAST count, strerror(errno)));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
r->buffer = wptr;
|
||||
r->bufsize = count;
|
||||
@@ -1365,6 +1453,8 @@ cups_raster_write(
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_printf(("4cups_raster_write: Writing " CUPS_LLFMT " bytes.", CUPS_LLCAST (wptr - r->buffer)));
|
||||
|
||||
return (cups_raster_io(r, r->buffer, (size_t)(wptr - r->buffer)));
|
||||
}
|
||||
|
||||
@@ -1389,7 +1479,12 @@ cups_read_fd(void *ctx, /* I - File descriptor as pointer */
|
||||
while ((count = read(fd, buf, bytes)) < 0)
|
||||
#endif /* WIN32 */
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("4cups_read_fd: %s", strerror(errno)));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
DEBUG_printf(("4cups_read_fd: Returning %d bytes.", (int)count));
|
||||
|
||||
return (count);
|
||||
}
|
||||
@@ -1441,12 +1536,15 @@ cups_write_fd(void *ctx, /* I - File descriptor pointer */
|
||||
while ((count = write(fd, buf, bytes)) < 0)
|
||||
#endif /* WIN32 */
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("4cups_write_fd: %s", strerror(errno)));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
return (count);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: raster.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: raster.c 12748 2015-06-24 15:58:40Z msweet $".
|
||||
*/
|
||||
|
||||
+29
-17
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertoepson.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: rastertoepson.c 12618 2015-05-06 20:28:48Z msweet $"
|
||||
*
|
||||
* EPSON ESC/P and ESC/P2 filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -201,14 +201,14 @@ StartPage(
|
||||
if (Model < EPSON_ICOLOR)
|
||||
{
|
||||
pwrite("\033(U\001\000", 5); /* Resolution/units */
|
||||
putchar(3600 / header->HWResolution[1]);
|
||||
putchar((int)(3600 / header->HWResolution[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
pwrite("\033(U\005\000", 5);
|
||||
putchar(1440 / header->HWResolution[1]);
|
||||
putchar(1440 / header->HWResolution[1]);
|
||||
putchar(1440 / header->HWResolution[0]);
|
||||
putchar((int)(1440 / header->HWResolution[1]));
|
||||
putchar((int)(1440 / header->HWResolution[1]));
|
||||
putchar((int)(1440 / header->HWResolution[0]));
|
||||
putchar(0xa0); /* n/1440ths... */
|
||||
putchar(0x05);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ StartPage(
|
||||
|
||||
if (header->cupsCompression || DotBytes)
|
||||
{
|
||||
if ((CompBuffer = calloc(2, header->cupsWidth)) == NULL)
|
||||
if ((CompBuffer = calloc(2, header->cupsWidth + 1)) == NULL)
|
||||
{
|
||||
fputs("ERROR: Unable to allocate memory\n", stderr);
|
||||
exit(1);
|
||||
@@ -655,13 +655,19 @@ OutputLine(
|
||||
}
|
||||
|
||||
for (width = header->cupsWidth, tempptr = CompBuffer;
|
||||
width > 0;
|
||||
width > 1;
|
||||
width -= 2, tempptr += 2, oddptr += DotBytes * 2,
|
||||
evenptr += DotBytes * 2)
|
||||
{
|
||||
evenptr[0] = tempptr[0];
|
||||
oddptr[0] = tempptr[1];
|
||||
}
|
||||
|
||||
if (width == 1)
|
||||
{
|
||||
evenptr[0] = tempptr[0];
|
||||
oddptr[0] = tempptr[1];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -811,8 +817,8 @@ OutputRows(
|
||||
{
|
||||
putchar(0x1b);
|
||||
putchar('$');
|
||||
putchar(i & 255);
|
||||
putchar(i >> 8);
|
||||
putchar((int)(i & 255));
|
||||
putchar((int)(i >> 8));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -853,8 +859,8 @@ OutputRows(
|
||||
}
|
||||
|
||||
n = dot_count / DotBytes;
|
||||
putchar(n & 255);
|
||||
putchar(n / 256);
|
||||
putchar((int)(n & 255));
|
||||
putchar((int)(n / 256));
|
||||
|
||||
/*
|
||||
* Write the graphics data...
|
||||
@@ -873,6 +879,9 @@ OutputRows(
|
||||
putchar(0);
|
||||
}
|
||||
|
||||
if (dot_count & 1)
|
||||
putchar(*ptr);
|
||||
|
||||
/*
|
||||
* Move the head back and print the odd bytes...
|
||||
*/
|
||||
@@ -883,8 +892,8 @@ OutputRows(
|
||||
{
|
||||
putchar(0x1b);
|
||||
putchar('$');
|
||||
putchar(i & 255);
|
||||
putchar(i >> 8);
|
||||
putchar((int)(i & 255));
|
||||
putchar((int)(i >> 8));
|
||||
}
|
||||
|
||||
if (header->HWResolution[0] == 120)
|
||||
@@ -893,14 +902,17 @@ OutputRows(
|
||||
printf("\033*\003"); /* Select bit image */
|
||||
|
||||
n = (unsigned)dot_count / DotBytes;
|
||||
putchar(n & 255);
|
||||
putchar(n / 256);
|
||||
putchar((int)(n & 255));
|
||||
putchar((int)(n / 256));
|
||||
|
||||
for (n = dot_count / 2, ptr = dot_ptr + 1; n > 0; n --, ptr += 2)
|
||||
{
|
||||
putchar(0);
|
||||
putchar(*ptr);
|
||||
}
|
||||
|
||||
if (dot_count & 1)
|
||||
putchar(0);
|
||||
}
|
||||
else
|
||||
pwrite(dot_ptr, dot_count);
|
||||
@@ -1138,5 +1150,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: rastertoepson.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: rastertoepson.c 12618 2015-05-06 20:28:48Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertohp.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: rastertohp.c 12575 2015-03-26 16:36:54Z msweet $"
|
||||
*
|
||||
* Hewlett-Packard Page Control Language filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -354,7 +354,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
|
||||
* Allocate memory for a line of graphics...
|
||||
*/
|
||||
|
||||
if ((Planes[0] = malloc(header->cupsBytesPerLine)) == NULL)
|
||||
if ((Planes[0] = malloc(header->cupsBytesPerLine + NumPlanes)) == NULL)
|
||||
{
|
||||
fputs("ERROR: Unable to allocate memory\n", stderr);
|
||||
exit(1);
|
||||
@@ -369,7 +369,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
|
||||
BitBuffer = NULL;
|
||||
|
||||
if (header->cupsCompression)
|
||||
CompBuffer = malloc(header->cupsBytesPerLine * 2);
|
||||
CompBuffer = malloc(header->cupsBytesPerLine * 2 + 2);
|
||||
else
|
||||
CompBuffer = NULL;
|
||||
}
|
||||
@@ -871,5 +871,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: rastertohp.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: rastertohp.c 12575 2015-03-26 16:36:54Z msweet $".
|
||||
*/
|
||||
|
||||
+14
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertopwg.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: rastertopwg.c 12610 2015-05-06 12:24:54Z msweet $"
|
||||
*
|
||||
* CUPS raster to PWG raster format filter for CUPS.
|
||||
*
|
||||
* Copyright 2011, 2014 Apple Inc.
|
||||
* Copyright 2011, 2014-2015 Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright law.
|
||||
@@ -401,6 +401,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Copy raster data...
|
||||
*/
|
||||
|
||||
if (linesize < inheader.cupsBytesPerLine)
|
||||
linesize = inheader.cupsBytesPerLine;
|
||||
|
||||
line = malloc(linesize);
|
||||
|
||||
memset(line, white, linesize);
|
||||
@@ -415,7 +418,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
for (y = inheader.cupsHeight; y > 0; y --)
|
||||
{
|
||||
cupsRasterReadPixels(inras, line + lineoffset, inheader.cupsBytesPerLine);
|
||||
if (cupsRasterReadPixels(inras, line + lineoffset, inheader.cupsBytesPerLine) != inheader.cupsBytesPerLine)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Error reading raster data."));
|
||||
fprintf(stderr, "DEBUG: Unable to read line %d for page %d.\n",
|
||||
inheader.cupsHeight - y + page_top + 1, page);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Error sending raster data."));
|
||||
@@ -449,5 +459,5 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: rastertopwg.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: rastertopwg.c 12610 2015-05-06 12:24:54Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11558 2014-02-06 18:33:34Z msweet $"
|
||||
# "$Id: Makefile 12347 2014-12-09 21:47:23Z msweet $"
|
||||
#
|
||||
# Locale file makefile for CUPS.
|
||||
#
|
||||
@@ -159,7 +159,7 @@ pot: checkpo po2strings
|
||||
#
|
||||
|
||||
checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $<...
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o checkpo checkpo.o \
|
||||
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
@@ -178,7 +178,7 @@ checkall: checkpo
|
||||
#
|
||||
|
||||
po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $<...
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o po2strings po2strings.o \
|
||||
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
@@ -192,7 +192,7 @@ po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
|
||||
#
|
||||
|
||||
strings2po: strings2po.o
|
||||
echo Linking $<...
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o strings2po strings2po.o
|
||||
|
||||
|
||||
@@ -204,5 +204,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11558 2014-02-06 18:33:34Z msweet $".
|
||||
# End of "$Id: Makefile 12347 2014-12-09 21:47:23Z msweet $".
|
||||
#
|
||||
|
||||
+533
-528
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -189,6 +189,7 @@
|
||||
" --domain regex Match domain to regular expression." = " --domain regex Match domain to regular expression.";
|
||||
" --exec utility [argument ...] ;\n Execute program if true." = " --exec utility [argument ...] ;\n Execute program if true.";
|
||||
" --false Always false." = " --false Always false.";
|
||||
" --help Show help." = " --help Show help.";
|
||||
" --help Show this help." = " --help Show this help.";
|
||||
" --host regex Match hostname to regular expression." = " --host regex Match hostname to regular expression.";
|
||||
" --lf End lines with LF (UNIX/Linux/OS X)." = " --lf End lines with LF (UNIX/Linux/OS X).";
|
||||
@@ -203,11 +204,13 @@
|
||||
" --print-name Print service name if true." = " --print-name Print service name if true.";
|
||||
" --quiet Quietly report match via exit code." = " --quiet Quietly report match via exit code.";
|
||||
" --remote True if service is remote." = " --remote True if service is remote.";
|
||||
" --stop-after-include-error\n Stop tests after a failed INCLUDE." = " --stop-after-include-error\n Stop tests after a failed INCLUDE.";
|
||||
" --true Always true." = " --true Always true.";
|
||||
" --txt key True if the TXT record contains the key." = " --txt key True if the TXT record contains the key.";
|
||||
" --txt-* regex Match TXT record key to regular expression." = " --txt-* regex Match TXT record key to regular expression.";
|
||||
" --uri regex Match URI to regular expression." = " --uri regex Match URI to regular expression.";
|
||||
" --version Show program version." = " --version Show program version.";
|
||||
" --version Show version." = " --version Show version.";
|
||||
" -4 Connect using IPv4." = " -4 Connect using IPv4.";
|
||||
" -6 Connect using IPv6." = " -6 Connect using IPv6.";
|
||||
" -C Send requests using chunking (default)." = " -C Send requests using chunking (default).";
|
||||
@@ -221,6 +224,7 @@
|
||||
" -I include-dir Add include directory to search path." = " -I include-dir Add include directory to search path.";
|
||||
" -I {filename,filters,none,profiles}" = " -I {filename,filters,none,profiles}";
|
||||
" -L Send requests using content-length." = " -L Send requests using content-length.";
|
||||
" -P filename.plist Produce XML plist to a file and test report to standard output." = " -P filename.plist Produce XML plist to a file and test report to standard output.";
|
||||
" -P filename.ppd Set PPD file." = " -P filename.ppd Set PPD file.";
|
||||
" -P number[-number] Match port to number or range." = " -P number[-number] Match port to number or range.";
|
||||
" -R root-directory Set alternate root." = " -R root-directory Set alternate root.";
|
||||
@@ -233,6 +237,7 @@
|
||||
" -X Produce XML plist instead of plain text." = " -X Produce XML plist instead of plain text.";
|
||||
" -a Browse for all services." = " -a Browse for all services.";
|
||||
" -a Export all printers." = " -a Export all printers.";
|
||||
" -c Produce CSV output." = " -c Produce CSV output.";
|
||||
" -c catalog.po Load the specified message catalog." = " -c catalog.po Load the specified message catalog.";
|
||||
" -c cups-files.conf Set cups-files.conf file to use." = " -c cups-files.conf Set cups-files.conf file to use.";
|
||||
" -c cupsd.conf Set cupsd.conf file to use." = " -c cupsd.conf Set cupsd.conf file to use.";
|
||||
@@ -251,6 +256,7 @@
|
||||
" -i seconds Repeat the last file with the given time interval." = " -i seconds Repeat the last file with the given time interval.";
|
||||
" -j job-id[,N] Filter file N from the specified job (default is file 1)." = " -j job-id[,N] Filter file N from the specified job (default is file 1).";
|
||||
" -l List attributes." = " -l List attributes.";
|
||||
" -l Produce plain text output." = " -l Produce plain text output.";
|
||||
" -l Run cupsd on demand." = " -l Run cupsd on demand.";
|
||||
" -l lang[,lang,...] Specify the output language(s) (locale)." = " -l lang[,lang,...] Specify the output language(s) (locale).";
|
||||
" -m Use the ModelName value as the filename." = " -m Use the ModelName value as the filename.";
|
||||
@@ -602,7 +608,6 @@
|
||||
"7 inches/sec." = "7 inches/sec.";
|
||||
"7 x 9" = "7 x 9";
|
||||
"70" = "70";
|
||||
"720dpi" = "720dpi";
|
||||
"75" = "75";
|
||||
"8" = "8";
|
||||
"8 inches/sec." = "8 inches/sec.";
|
||||
@@ -1008,8 +1013,6 @@
|
||||
"Name OID uses indefinite length" = "Name OID uses indefinite length";
|
||||
"Nested classes are not allowed." = "Nested classes are not allowed.";
|
||||
"Never" = "Never";
|
||||
"New Stylus Color Series" = "New Stylus Color Series";
|
||||
"New Stylus Photo Series" = "New Stylus Photo Series";
|
||||
"No" = "No";
|
||||
"No Content" = "No Content";
|
||||
"No PPD name" = "No PPD name";
|
||||
@@ -1164,8 +1167,6 @@
|
||||
"Starting Banner" = "Starting Banner";
|
||||
"Starting page %d." = "Starting page %d.";
|
||||
"Statement" = "Statement";
|
||||
"Stylus Color Series" = "Stylus Color Series";
|
||||
"Stylus Photo Series" = "Stylus Photo Series";
|
||||
"Subscription #%d does not exist." = "Subscription #%d does not exist.";
|
||||
"Substitutions:" = "Substitutions:";
|
||||
"Super A" = "Super A";
|
||||
|
||||
+38
-16
@@ -32,7 +32,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.4.6\n"
|
||||
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
|
||||
"POT-Creation-Date: 2014-06-26 14:29-0400\n"
|
||||
"POT-Creation-Date: 2014-08-29 22:25-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"
|
||||
@@ -973,6 +973,9 @@ msgstr ""
|
||||
msgid " --false Always false."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show help."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show this help."
|
||||
msgstr ""
|
||||
|
||||
@@ -1015,6 +1018,11 @@ msgstr ""
|
||||
msgid " --remote True if service is remote."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
" --stop-after-include-error\n"
|
||||
" Stop tests after a failed INCLUDE."
|
||||
msgstr ""
|
||||
|
||||
msgid " --true Always true."
|
||||
msgstr ""
|
||||
|
||||
@@ -1030,6 +1038,9 @@ msgstr ""
|
||||
msgid " --version Show program version."
|
||||
msgstr ""
|
||||
|
||||
msgid " --version Show version."
|
||||
msgstr ""
|
||||
|
||||
msgid " -4 Connect using IPv4."
|
||||
msgstr " -4 Connecta fent servir IPv4."
|
||||
|
||||
@@ -1075,6 +1086,11 @@ msgid " -L Send requests using content-length."
|
||||
msgstr ""
|
||||
" -L Envia les peticions fent servir content-length."
|
||||
|
||||
msgid ""
|
||||
" -P filename.plist Produce XML plist to a file and test report to "
|
||||
"standard output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -P filename.ppd Set PPD file."
|
||||
msgstr " -P nomfitxer.ppd Estableix el fitxer PPD."
|
||||
|
||||
@@ -1118,6 +1134,9 @@ msgstr ""
|
||||
msgid " -a Export all printers."
|
||||
msgstr " -a Exporta totes les impressores."
|
||||
|
||||
msgid " -c Produce CSV output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -c catalog.po Load the specified message catalog."
|
||||
msgstr " -c catàleg.po Carrega el catàleg de missatges indicat."
|
||||
|
||||
@@ -1183,6 +1202,9 @@ msgstr ""
|
||||
msgid " -l List attributes."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Produce plain text output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Run cupsd on demand."
|
||||
msgstr ""
|
||||
|
||||
@@ -2422,9 +2444,6 @@ msgstr "7 x 9"
|
||||
msgid "70"
|
||||
msgstr "70"
|
||||
|
||||
msgid "720dpi"
|
||||
msgstr "720ppp"
|
||||
|
||||
msgid "75"
|
||||
msgstr "75"
|
||||
|
||||
@@ -3734,12 +3753,6 @@ msgstr "No es permeten les classes imbricades."
|
||||
msgid "Never"
|
||||
msgstr "Mai"
|
||||
|
||||
msgid "New Stylus Color Series"
|
||||
msgstr "Sèrie New Stylus Color"
|
||||
|
||||
msgid "New Stylus Photo Series"
|
||||
msgstr "Sèrie New Stylus Photo"
|
||||
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
@@ -4217,12 +4230,6 @@ msgstr "S'està començant la pàgina %d."
|
||||
msgid "Statement"
|
||||
msgstr "Declaració"
|
||||
|
||||
msgid "Stylus Color Series"
|
||||
msgstr "Sèrie Stylus Color"
|
||||
|
||||
msgid "Stylus Photo Series"
|
||||
msgstr "Sèrie Stylus Photo"
|
||||
|
||||
#, c-format
|
||||
msgid "Subscription #%d does not exist."
|
||||
msgstr "La subscripció #%d no existeix."
|
||||
@@ -6080,6 +6087,9 @@ msgstr "La variable-bindings fa servir una longitud indefinida"
|
||||
#~ msgid "3.5\" Disk - 2 1/8 x 2 3/4\""
|
||||
#~ msgstr "Disc de 3.5 - 2 1/8 x 2 3/4\""
|
||||
|
||||
#~ msgid "720dpi"
|
||||
#~ msgstr "720ppp"
|
||||
|
||||
#~ msgid "Address - 1 1/8 x 3 1/2\""
|
||||
#~ msgstr "Adreça - 1 1/8 x 3 1/2\""
|
||||
|
||||
@@ -6117,6 +6127,12 @@ msgstr "La variable-bindings fa servir una longitud indefinida"
|
||||
#~ msgid "Large Address - 1 4/10 x 3 1/2\""
|
||||
#~ msgstr "Adreça gran - 1 4/10 x 3 1/2\""
|
||||
|
||||
#~ msgid "New Stylus Color Series"
|
||||
#~ msgstr "Sèrie New Stylus Color"
|
||||
|
||||
#~ msgid "New Stylus Photo Series"
|
||||
#~ msgstr "Sèrie New Stylus Photo"
|
||||
|
||||
#~ msgid "Output for printer %s is sent to %s"
|
||||
#~ msgstr "La sortida de la impressora %s s'envia a %s"
|
||||
|
||||
@@ -6181,6 +6197,12 @@ msgstr "La variable-bindings fa servir una longitud indefinida"
|
||||
#~ msgid "Shipping Address - 2 5/16 x 4\""
|
||||
#~ msgstr "Adreça de lliurament - 2 5/16 x 4\""
|
||||
|
||||
#~ msgid "Stylus Color Series"
|
||||
#~ msgstr "Sèrie Stylus Color"
|
||||
|
||||
#~ msgid "Stylus Photo Series"
|
||||
#~ msgstr "Sèrie Stylus Photo"
|
||||
|
||||
#~ msgid "The output bin is almost full."
|
||||
#~ msgstr "La safata de sortida és gairebé plena."
|
||||
|
||||
|
||||
+38
-16
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
|
||||
"POT-Creation-Date: 2014-06-26 14:29-0400\n"
|
||||
"POT-Creation-Date: 2014-08-29 22:25-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"
|
||||
@@ -826,6 +826,9 @@ msgstr ""
|
||||
msgid " --false Always false."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show help."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show this help."
|
||||
msgstr ""
|
||||
|
||||
@@ -868,6 +871,11 @@ msgstr ""
|
||||
msgid " --remote True if service is remote."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
" --stop-after-include-error\n"
|
||||
" Stop tests after a failed INCLUDE."
|
||||
msgstr ""
|
||||
|
||||
msgid " --true Always true."
|
||||
msgstr ""
|
||||
|
||||
@@ -883,6 +891,9 @@ msgstr ""
|
||||
msgid " --version Show program version."
|
||||
msgstr ""
|
||||
|
||||
msgid " --version Show version."
|
||||
msgstr ""
|
||||
|
||||
msgid " -4 Connect using IPv4."
|
||||
msgstr ""
|
||||
|
||||
@@ -923,6 +934,11 @@ msgstr ""
|
||||
msgid " -L Send requests using content-length."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
" -P filename.plist Produce XML plist to a file and test report to "
|
||||
"standard output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -P filename.ppd Set PPD file."
|
||||
msgstr ""
|
||||
|
||||
@@ -961,6 +977,9 @@ msgstr ""
|
||||
msgid " -a Export all printers."
|
||||
msgstr ""
|
||||
|
||||
msgid " -c Produce CSV output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -c catalog.po Load the specified message catalog."
|
||||
msgstr ""
|
||||
|
||||
@@ -1018,6 +1037,9 @@ msgstr ""
|
||||
msgid " -l List attributes."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Produce plain text output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Run cupsd on demand."
|
||||
msgstr ""
|
||||
|
||||
@@ -2234,9 +2256,6 @@ msgstr ""
|
||||
msgid "70"
|
||||
msgstr "70"
|
||||
|
||||
msgid "720dpi"
|
||||
msgstr "720 dpi"
|
||||
|
||||
msgid "75"
|
||||
msgstr "75"
|
||||
|
||||
@@ -3524,12 +3543,6 @@ msgstr ""
|
||||
msgid "Never"
|
||||
msgstr "Nikdy"
|
||||
|
||||
msgid "New Stylus Color Series"
|
||||
msgstr "New Stylus Color Series"
|
||||
|
||||
msgid "New Stylus Photo Series"
|
||||
msgstr "New Stylus Photo Series"
|
||||
|
||||
msgid "No"
|
||||
msgstr "Ne"
|
||||
|
||||
@@ -4003,12 +4016,6 @@ msgstr ""
|
||||
msgid "Statement"
|
||||
msgstr "Prohlášení"
|
||||
|
||||
msgid "Stylus Color Series"
|
||||
msgstr "Stylus Color Series"
|
||||
|
||||
msgid "Stylus Photo Series"
|
||||
msgstr "Stylus Photo Series"
|
||||
|
||||
#, c-format
|
||||
msgid "Subscription #%d does not exist."
|
||||
msgstr ""
|
||||
@@ -5675,6 +5682,9 @@ msgstr "nepojmenovaný"
|
||||
msgid "variable-bindings uses indefinite length"
|
||||
msgstr "\"variable-bindings\" má neomezenou délku"
|
||||
|
||||
#~ msgid "720dpi"
|
||||
#~ msgstr "720 dpi"
|
||||
|
||||
#~ msgid "Enter old password:"
|
||||
#~ msgstr "Zadejte původní heslo:"
|
||||
|
||||
@@ -5684,5 +5694,17 @@ msgstr "\"variable-bindings\" má neomezenou délku"
|
||||
#~ msgid "Enter password:"
|
||||
#~ msgstr "Zadejte heslo:"
|
||||
|
||||
#~ msgid "New Stylus Color Series"
|
||||
#~ msgstr "New Stylus Color Series"
|
||||
|
||||
#~ msgid "New Stylus Photo Series"
|
||||
#~ msgstr "New Stylus Photo Series"
|
||||
|
||||
#~ msgid "Purge Jobs"
|
||||
#~ msgstr "Výmaz úloh"
|
||||
|
||||
#~ msgid "Stylus Color Series"
|
||||
#~ msgstr "Stylus Color Series"
|
||||
|
||||
#~ msgid "Stylus Photo Series"
|
||||
#~ msgstr "Stylus Photo Series"
|
||||
|
||||
+5730
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+2145
-418
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+38
-16
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
|
||||
"POT-Creation-Date: 2014-06-26 14:29-0400\n"
|
||||
"POT-Creation-Date: 2014-08-29 22:25-0400\n"
|
||||
"PO-Revision-Date: 2012-12-12 11:12+0100\n"
|
||||
"Last-Translator: denis meramdjougoma <dcmeram@libertysurf.fr>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -826,6 +826,9 @@ msgstr ""
|
||||
msgid " --false Always false."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show help."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show this help."
|
||||
msgstr ""
|
||||
|
||||
@@ -868,6 +871,11 @@ msgstr ""
|
||||
msgid " --remote True if service is remote."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
" --stop-after-include-error\n"
|
||||
" Stop tests after a failed INCLUDE."
|
||||
msgstr ""
|
||||
|
||||
msgid " --true Always true."
|
||||
msgstr ""
|
||||
|
||||
@@ -883,6 +891,9 @@ msgstr ""
|
||||
msgid " --version Show program version."
|
||||
msgstr ""
|
||||
|
||||
msgid " --version Show version."
|
||||
msgstr ""
|
||||
|
||||
msgid " -4 Connect using IPv4."
|
||||
msgstr ""
|
||||
|
||||
@@ -923,6 +934,11 @@ msgstr ""
|
||||
msgid " -L Send requests using content-length."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
" -P filename.plist Produce XML plist to a file and test report to "
|
||||
"standard output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -P filename.ppd Set PPD file."
|
||||
msgstr ""
|
||||
|
||||
@@ -961,6 +977,9 @@ msgstr ""
|
||||
msgid " -a Export all printers."
|
||||
msgstr ""
|
||||
|
||||
msgid " -c Produce CSV output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -c catalog.po Load the specified message catalog."
|
||||
msgstr ""
|
||||
|
||||
@@ -1018,6 +1037,9 @@ msgstr ""
|
||||
msgid " -l List attributes."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Produce plain text output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Run cupsd on demand."
|
||||
msgstr ""
|
||||
|
||||
@@ -2234,9 +2256,6 @@ msgstr ""
|
||||
msgid "70"
|
||||
msgstr "70"
|
||||
|
||||
msgid "720dpi"
|
||||
msgstr "720 ppp"
|
||||
|
||||
msgid "75"
|
||||
msgstr "75"
|
||||
|
||||
@@ -3521,12 +3540,6 @@ msgstr ""
|
||||
msgid "Never"
|
||||
msgstr "Jamais"
|
||||
|
||||
msgid "New Stylus Color Series"
|
||||
msgstr "Nouvelles série Stylus Color"
|
||||
|
||||
msgid "New Stylus Photo Series"
|
||||
msgstr "Nouvelles série Stylus Photo"
|
||||
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
@@ -4000,12 +4013,6 @@ msgstr ""
|
||||
msgid "Statement"
|
||||
msgstr "Déclaration"
|
||||
|
||||
msgid "Stylus Color Series"
|
||||
msgstr "Série Stylus Color"
|
||||
|
||||
msgid "Stylus Photo Series"
|
||||
msgstr "Série Stylus Photo"
|
||||
|
||||
#, c-format
|
||||
msgid "Subscription #%d does not exist."
|
||||
msgstr ""
|
||||
@@ -5677,6 +5684,9 @@ msgstr "sans titre"
|
||||
msgid "variable-bindings uses indefinite length"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "720dpi"
|
||||
#~ msgstr "720 ppp"
|
||||
|
||||
#~ msgid "Enter old password:"
|
||||
#~ msgstr "Ancien mot de passe :"
|
||||
|
||||
@@ -5686,5 +5696,17 @@ msgstr ""
|
||||
#~ msgid "Enter password:"
|
||||
#~ msgstr "Entrez le nouveau mot de passe :"
|
||||
|
||||
#~ msgid "New Stylus Color Series"
|
||||
#~ msgstr "Nouvelles série Stylus Color"
|
||||
|
||||
#~ msgid "New Stylus Photo Series"
|
||||
#~ msgstr "Nouvelles série Stylus Photo"
|
||||
|
||||
#~ msgid "Purge Jobs"
|
||||
#~ msgstr "Purger les tâches"
|
||||
|
||||
#~ msgid "Stylus Color Series"
|
||||
#~ msgstr "Série Stylus Color"
|
||||
|
||||
#~ msgid "Stylus Photo Series"
|
||||
#~ msgstr "Série Stylus Photo"
|
||||
|
||||
+38
-16
@@ -29,7 +29,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: CUPS 1.6\n"
|
||||
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
|
||||
"POT-Creation-Date: 2014-06-26 14:29-0400\n"
|
||||
"POT-Creation-Date: 2014-08-29 22:25-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"
|
||||
@@ -974,6 +974,9 @@ msgstr ""
|
||||
msgid " --false Always false."
|
||||
msgstr " --false Sempre falso."
|
||||
|
||||
msgid " --help Show help."
|
||||
msgstr ""
|
||||
|
||||
msgid " --help Show this help."
|
||||
msgstr " --help Mostra questo aiuto."
|
||||
|
||||
@@ -1026,6 +1029,11 @@ msgstr ""
|
||||
msgid " --remote True if service is remote."
|
||||
msgstr " --remote Vero se il servizio è remoto."
|
||||
|
||||
msgid ""
|
||||
" --stop-after-include-error\n"
|
||||
" Stop tests after a failed INCLUDE."
|
||||
msgstr ""
|
||||
|
||||
msgid " --true Always true."
|
||||
msgstr " --true Sempre vero."
|
||||
|
||||
@@ -1044,6 +1052,9 @@ msgstr ""
|
||||
msgid " --version Show program version."
|
||||
msgstr " --version Mostra la versione del programma."
|
||||
|
||||
msgid " --version Show version."
|
||||
msgstr ""
|
||||
|
||||
msgid " -4 Connect using IPv4."
|
||||
msgstr " -4 Connetti utilizzando IPv4."
|
||||
|
||||
@@ -1089,6 +1100,11 @@ msgstr " -I {file,filtri,nessuno,profili}"
|
||||
msgid " -L Send requests using content-length."
|
||||
msgstr " -L Invia richieste utilizzando content-length."
|
||||
|
||||
msgid ""
|
||||
" -P filename.plist Produce XML plist to a file and test report to "
|
||||
"standard output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -P filename.ppd Set PPD file."
|
||||
msgstr " -P filename.ppd Imposta il file PPD."
|
||||
|
||||
@@ -1134,6 +1150,9 @@ msgstr " -a Mostra tutti i servizi."
|
||||
msgid " -a Export all printers."
|
||||
msgstr " -a Esporta tutte le stampanti."
|
||||
|
||||
msgid " -c Produce CSV output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -c catalog.po Load the specified message catalog."
|
||||
msgstr ""
|
||||
" -c catalog.po Carica il catalogo del messaggio specificato."
|
||||
@@ -1202,6 +1221,9 @@ msgstr ""
|
||||
msgid " -l List attributes."
|
||||
msgstr " -l Elenca gli attributi."
|
||||
|
||||
msgid " -l Produce plain text output."
|
||||
msgstr ""
|
||||
|
||||
msgid " -l Run cupsd on demand."
|
||||
msgstr ""
|
||||
|
||||
@@ -2500,9 +2522,6 @@ msgstr "7 x 9"
|
||||
msgid "70"
|
||||
msgstr "70"
|
||||
|
||||
msgid "720dpi"
|
||||
msgstr "720dpi"
|
||||
|
||||
msgid "75"
|
||||
msgstr "75"
|
||||
|
||||
@@ -3808,12 +3827,6 @@ msgstr "Le classi nidificate non sono consentite."
|
||||
msgid "Never"
|
||||
msgstr "Mai"
|
||||
|
||||
msgid "New Stylus Color Series"
|
||||
msgstr "Nuova Stylus Color Series"
|
||||
|
||||
msgid "New Stylus Photo Series"
|
||||
msgstr "Nuova Stylus Photo Series"
|
||||
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
@@ -4291,12 +4304,6 @@ msgstr "Pagina iniziale %d."
|
||||
msgid "Statement"
|
||||
msgstr "Rapporto"
|
||||
|
||||
msgid "Stylus Color Series"
|
||||
msgstr "Stylus Color Series"
|
||||
|
||||
msgid "Stylus Photo Series"
|
||||
msgstr "Stylus Photo Series"
|
||||
|
||||
#, c-format
|
||||
msgid "Subscription #%d does not exist."
|
||||
msgstr "La sottoscrizione #%d non esiste."
|
||||
@@ -6066,6 +6073,9 @@ msgstr "variable-bindings utilizza una lunghezza indefinita"
|
||||
#~ msgid "%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes"
|
||||
#~ msgstr "%-6s %-10.10s %-4d %-10d %-27.27s %.0f byte"
|
||||
|
||||
#~ msgid "720dpi"
|
||||
#~ msgstr "720dpi"
|
||||
|
||||
#~ msgid "Bad printer URI."
|
||||
#~ msgstr "L'URI della stampante non è valido."
|
||||
|
||||
@@ -6078,6 +6088,12 @@ msgstr "variable-bindings utilizza una lunghezza indefinita"
|
||||
#~ msgid "Enter password:"
|
||||
#~ msgstr "Digitare la password:"
|
||||
|
||||
#~ msgid "New Stylus Color Series"
|
||||
#~ msgstr "Nuova Stylus Color Series"
|
||||
|
||||
#~ msgid "New Stylus Photo Series"
|
||||
#~ msgstr "Nuova Stylus Photo Series"
|
||||
|
||||
#~ msgid "Output for printer %s is sent to %s"
|
||||
#~ msgstr "L'output della stampante %s è stato inviato a %s"
|
||||
|
||||
@@ -6104,6 +6120,12 @@ msgstr "variable-bindings utilizza una lunghezza indefinita"
|
||||
#~ msgstr ""
|
||||
#~ "Rank Owner Pri Job Files Total Size"
|
||||
|
||||
#~ msgid "Stylus Color Series"
|
||||
#~ msgstr "Stylus Color Series"
|
||||
|
||||
#~ msgid "Stylus Photo Series"
|
||||
#~ msgstr "Stylus Photo Series"
|
||||
|
||||
#~ msgid "The output bin is almost full."
|
||||
#~ msgstr "Il raccoglitore di uscita è quasi pieno."
|
||||
|
||||
|
||||
+1932
-135
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+1180
-6059
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+4
-4
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 11919 2014-06-11 15:38:28Z msweet $"
|
||||
# "$Id: Makefile 12815 2015-07-30 15:03:38Z msweet $"
|
||||
#
|
||||
# Man page makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 1993-2006 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -43,6 +43,7 @@ MAN5 = classes.conf.$(MAN5EXT) \
|
||||
cups-files.conf.$(MAN5EXT) \
|
||||
cups-snmp.conf.$(MAN5EXT) \
|
||||
cupsd.conf.$(MAN5EXT) \
|
||||
cupsd-logs.$(MAN5EXT) \
|
||||
ipptoolfile.$(MAN5EXT) \
|
||||
mailto.conf.$(MAN5EXT) \
|
||||
mime.convs.$(MAN5EXT) \
|
||||
@@ -61,7 +62,6 @@ MAN8 = cupsaccept.$(MAN8EXT) \
|
||||
cups-snmp.$(MAN8EXT) \
|
||||
cupsd.$(MAN8EXT) \
|
||||
cupsd-helper.$(MAN8EXT) \
|
||||
cupsd-logs.$(MAN8EXT) \
|
||||
cupsenable.$(MAN8EXT) \
|
||||
lpadmin.$(MAN8EXT) \
|
||||
lpinfo.$(MAN8EXT) \
|
||||
@@ -228,5 +228,5 @@ mantohtml: mantohtml.o ../cups/$(LIBCUPSSTATIC)
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11919 2014-06-11 15:38:28Z msweet $".
|
||||
# End of "$Id: Makefile 12815 2015-07-30 15:03:38Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: client.conf.man.in 11851 2014-05-07 23:55:35Z msweet $"
|
||||
.\" "$Id: client.conf.man.in 12215 2014-10-20 18:24:56Z msweet $"
|
||||
.\"
|
||||
.\" client.conf man page for CUPS.
|
||||
.\"
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH client.conf 5 "CUPS" "7 May 2014" "Apple Inc."
|
||||
.TH client.conf 5 "CUPS" "20 October 2014" "Apple Inc."
|
||||
.SH NAME
|
||||
client.conf \- client configuration file for cups (deprecated)
|
||||
.SH DESCRIPTION
|
||||
@@ -56,6 +56,14 @@ Specifies the address and optionally the port to use when connecting to the serv
|
||||
\fBServerName \fIhostname-or-ip-address\fR[\fI:port\fR]\fB/version=1.1\fR
|
||||
Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier.
|
||||
.TP 5
|
||||
\fBSSLOptions \fR[\fIAllowRC4\fR] [\fIAllowSSL3\fR]
|
||||
.TP 5
|
||||
\fBSSLOptions None\fR
|
||||
Sets encryption options (only in /etc/cups/client.conf).
|
||||
By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
|
||||
The \fIAllowRC4\fR option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
|
||||
The \fIAllowSSL3\fR option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
|
||||
.TP 5
|
||||
\fBUser \fIname\fR
|
||||
Specifies the default user name to use for requests.
|
||||
.TP 5
|
||||
@@ -72,5 +80,5 @@ CUPS Online Help (http://localhost:631/help)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2014 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: client.conf.man.in 11851 2014-05-07 23:55:35Z msweet $".
|
||||
.\" End of "$Id: client.conf.man.in 12215 2014-10-20 18:24:56Z msweet $".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cups-files.conf.man.in 11927 2014-06-13 00:01:23Z msweet $"
|
||||
.\" "$Id: cups-files.conf.man.in 12477 2015-02-02 18:38:25Z msweet $"
|
||||
.\"
|
||||
.\" cups-files.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2014 by Apple Inc.
|
||||
.\" Copyright 2007-2015 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH cups-files.conf 5 "CUPS" "11 June 2014" "Apple Inc."
|
||||
.TH cups-files.conf 5 "CUPS" "2 February 2015" "Apple Inc."
|
||||
.SH NAME
|
||||
cups\-files.conf \- file and directory configuration file for cups
|
||||
.SH DESCRIPTION
|
||||
@@ -27,6 +27,7 @@ Comment lines start with the # character.
|
||||
.SS DIRECTIVES
|
||||
The following directives are understood by
|
||||
.BR cupsd (8):
|
||||
.\"#AccessLog
|
||||
.TP 5
|
||||
\fBAccessLog\fR
|
||||
.TP 5
|
||||
@@ -43,6 +44,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
.fi
|
||||
The default is "/var/log/cups/access_log".
|
||||
.\"#ConfigFilePerm
|
||||
.TP 5
|
||||
\fBConfigFilePerm \fImode\fR
|
||||
Specifies the permissions for all configuration files that the scheduler writes.
|
||||
@@ -51,14 +53,17 @@ The default is "0644" on OS X and "0640" on all other operating systems.
|
||||
\fBNote:\fR The permissions for the \fIprinters.conf\fR file are currently masked to only allow access from the scheduler user (typically root).
|
||||
This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system.
|
||||
There is no way to disable this security feature.
|
||||
.\"#DataDir
|
||||
.TP 5
|
||||
\fBDataDir \fIpath\fR
|
||||
Specifies the directory where data files can be found.
|
||||
The default is usually "/usr/share/cups".
|
||||
.\"#DocumentRoot
|
||||
.TP 5
|
||||
\fBDocumentRoot \fIdirectory\fR
|
||||
Specifies the root directory for the CUPS web interface content.
|
||||
The default is usually "/usr/share/doc/cups".
|
||||
.\"#ErrorLog
|
||||
.TP 5
|
||||
\fBErrorLog\fR
|
||||
.TP 5
|
||||
@@ -75,6 +80,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
.fi
|
||||
The default is "/var/log/cups/error_log".
|
||||
.\"#FatalErrors
|
||||
.TP 5
|
||||
\fBFatalErrors none\fR
|
||||
.TP 5
|
||||
@@ -107,20 +113,24 @@ Log file creation or write errors are fatal.
|
||||
.B permissions
|
||||
Bad startup file permissions are fatal, for example shared TLS certificate and key files with world-read permissions.
|
||||
.RE
|
||||
.\"#FileDevice
|
||||
.TP 5
|
||||
\fBFileDevice Yes\fR
|
||||
.TP 5
|
||||
\fBFileDevice No\fR
|
||||
Specifies whether the file pseudo-device can be used for new printer queues.
|
||||
The URI "file:///dev/null" is always allowed.
|
||||
.\"#Group
|
||||
.TP 5
|
||||
\fBGroup \fIgroup-name-or-number\fR
|
||||
Specifies the group name or ID that will be used when executing external programs.
|
||||
The default group is operating system specific but is usually "lp" or "nobody".
|
||||
.\"#LogFilePerm
|
||||
.TP 5
|
||||
\fBLogFilePerm \fImode\fR
|
||||
Specifies the permissions of all log files that the scheduler writes.
|
||||
The default is "0644".
|
||||
.\"#PageLog
|
||||
.TP 5
|
||||
\fBPageLog \fR[ \fIfilename\fR ]
|
||||
.TP 5
|
||||
@@ -135,14 +145,17 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
.fi
|
||||
The default is "/var/log/cups/page_log".
|
||||
.\"#RemoteRoot
|
||||
.TP 5
|
||||
\fBRemoteRoot \fIusername\fR
|
||||
Specifies the username that is associated with unauthenticated accesses by clients claiming to be the root user.
|
||||
The default is "remroot".
|
||||
.\"#RequestRoot
|
||||
.TP 5
|
||||
\fBRequestRoot \fIdirectory\fR
|
||||
Specifies the directory that contains print jobs and other HTTP request data.
|
||||
The default is "/var/spool/cups".
|
||||
.\"#Sandboxing
|
||||
.TP 5
|
||||
\fBSandboxing off\fR
|
||||
.TP 5
|
||||
@@ -152,18 +165,23 @@ The default is "/var/spool/cups".
|
||||
Specifies the level of security sandboxing that is applied to print filters, backends, and other child processes of the scheduler.
|
||||
The default is "strict".
|
||||
This directive is currently only used/supported on OS X.
|
||||
.\"#ServerBin
|
||||
.TP 5
|
||||
\fBServerBin \fIdirectory\fR
|
||||
Specifies the directory containing the backends, CGI programs, filters, helper programs, notifiers, and port monitors.
|
||||
The default is "/usr/lib/cups" or "/usr/libexec/cups" depending on the platform.
|
||||
.\"#ServerKeychain
|
||||
.TP 5
|
||||
\fBServerKeychain \fIpath\fR
|
||||
Specifies the location of TLS certificates and private keys.
|
||||
The default is "/Library/Keychains/System.keychain" on OS X and "/etc/cups/ssl" on all other operating systems.
|
||||
OS X uses its keychain database to store certificates and keys while other platforms use separate files in the specified directory, *.crt for PEM-encoded certificates and *.key for PEM-encoded private keys.
|
||||
.\"#ServerRoot
|
||||
.TP 5
|
||||
\fBServerRoot \fIdirectory\fR
|
||||
Specifies the directory containing the server configuration files.
|
||||
The default is "/etc/cups".
|
||||
.\"#SyncOnClose
|
||||
.TP 5
|
||||
\fBSyncOnClose Yes\fR
|
||||
.TP 5
|
||||
@@ -172,14 +190,17 @@ Specifies whether the scheduler calls
|
||||
.BR fsync (2)
|
||||
after writing configuration or state files.
|
||||
The default is "No".
|
||||
.\"#SystemGroup
|
||||
.TP 5
|
||||
\fBSystemGroup \fIgroup-name \fR[ ... \fIgroup-name\fR ]
|
||||
Specifies the group(s) to use for \fI@SYSTEM\fR group authentication.
|
||||
The default contains "admin", "lpadmin", "root", "sys", and/or "system".
|
||||
.\"#TempDir
|
||||
.TP 5
|
||||
\fBTempDir \fIdirectory\fR
|
||||
Specifies the directory where temporary files are stored.
|
||||
The default is "/var/spool/cups/tmp".
|
||||
.\"#User
|
||||
.TP 5
|
||||
\fBUser \fIusername\fR
|
||||
Specifies the user name or ID that is used when running external programs.
|
||||
@@ -195,7 +216,7 @@ The default is "lp".
|
||||
.BR subscriptions.conf (5),
|
||||
CUPS Online Help (http://localhost:631/help)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2014 by Apple Inc.
|
||||
Copyright \[co] 2007-2015 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cups-files.conf.man.in 11927 2014-06-13 00:01:23Z msweet $".
|
||||
.\" End of "$Id: cups-files.conf.man.in 12477 2015-02-02 18:38:25Z msweet $".
|
||||
.\"
|
||||
|
||||
+78
-7
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupsd.conf.man.in 12059 2014-07-28 14:04:32Z msweet $"
|
||||
.\" "$Id: cupsd.conf.man.in 12769 2015-06-30 16:13:48Z msweet $"
|
||||
.\"
|
||||
.\" cupsd.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2014 by Apple Inc.
|
||||
.\" Copyright 2007-2015 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH cupsd.conf 5 "CUPS" "28 July 2014" "Apple Inc."
|
||||
.TH cupsd.conf 5 "CUPS" "30 June 2015" "Apple Inc."
|
||||
.SH NAME
|
||||
cupsd.conf \- server configuration file for cups
|
||||
.SH DESCRIPTION
|
||||
@@ -34,6 +34,7 @@ Comment lines start with the # character.
|
||||
.SS TOP-LEVEL DIRECTIVES
|
||||
The following top-level directives are understood by
|
||||
.BR cupsd (8):
|
||||
.\"#AccessLogLevel
|
||||
.TP 5
|
||||
\fBAccessLogLevel config\fR
|
||||
.TP 5
|
||||
@@ -45,6 +46,7 @@ The "config" level logs when printers and classes are added, deleted, or modifie
|
||||
The "actions" level logs when print jobs are submitted, held, released, modified, or canceled, and any of the conditions for "config".
|
||||
The "all" level logs all requests.
|
||||
The default access log level is "actions".
|
||||
.\"#AutoPurgeJobs
|
||||
.TP 5
|
||||
\fBAutoPurgeJobs Yes\fR
|
||||
.TP 5
|
||||
@@ -52,6 +54,7 @@ The default access log level is "actions".
|
||||
.br
|
||||
Specifies whether to purge job history data automatically when it is no longer required for quotas.
|
||||
The default is "No".
|
||||
.\"#BrowseLocalProtocols
|
||||
.TP 5
|
||||
\fBBrowseLocalProtocols all\fR
|
||||
.TP 5
|
||||
@@ -60,6 +63,7 @@ The default is "No".
|
||||
\fBBrowseLocalProtocols none\fR
|
||||
Specifies which protocols to use for local printer sharing.
|
||||
The default is "dnssd" on systems that support Bonjour and "none" otherwise.
|
||||
.\"#BrowseWebIF
|
||||
.TP 5
|
||||
\fBBrowseWebIF Yes\fR
|
||||
.TP 5
|
||||
@@ -67,6 +71,7 @@ The default is "dnssd" on systems that support Bonjour and "none" otherwise.
|
||||
.br
|
||||
Specifies whether the CUPS web interface is advertised.
|
||||
The default is "No".
|
||||
.\"#Browsing
|
||||
.TP 5
|
||||
\fBBrowsing Yes\fR
|
||||
.TP 5
|
||||
@@ -74,12 +79,14 @@ The default is "No".
|
||||
.br
|
||||
Specifies whether shared printers are advertised.
|
||||
The default is "No".
|
||||
.\"#Classification
|
||||
.TP 5
|
||||
\fBClassification \fIbanner\fR
|
||||
.br
|
||||
Specifies the security classification of the server.
|
||||
Any valid banner name can be used, including "classified", "confidential", "secret", "topsecret", and "unclassified", or the banner can be omitted to disable secure printing functions.
|
||||
The default is no classification banner.
|
||||
.\"#ClassifyOverride
|
||||
.TP 5
|
||||
\fBClassifyOverride Yes\fR
|
||||
.TP 5
|
||||
@@ -87,6 +94,7 @@ The default is no classification banner.
|
||||
.br
|
||||
Specifies whether users may override the classification (cover page) of individual print jobs using the "job-sheets" option.
|
||||
The default is "No".
|
||||
.\"#DefaultAuthType
|
||||
.TP 5
|
||||
\fBDefaultAuthType Basic\fR
|
||||
.TP 5
|
||||
@@ -94,6 +102,7 @@ The default is "No".
|
||||
.br
|
||||
Specifies the default type of authentication to use.
|
||||
The default is "Basic".
|
||||
.\"#DefaultEncryption
|
||||
.TP 5
|
||||
\fBDefaultEncryption Never\fR
|
||||
.TP 5
|
||||
@@ -102,10 +111,12 @@ The default is "Basic".
|
||||
\fBDefaultEncryption Required\fR
|
||||
Specifies whether encryption will be used for authenticated requests.
|
||||
The default is "Required".
|
||||
.\"#DefaultLanguage
|
||||
.TP 5
|
||||
\fBDefaultLanguage \fIlocale\fR
|
||||
Specifies the default language to use for text and web content.
|
||||
The default is "en".
|
||||
.\"#DefaultPaperSize
|
||||
.TP 5
|
||||
\fBDefaultPaperSize Auto\fR
|
||||
.TP 5
|
||||
@@ -115,21 +126,25 @@ The default is "en".
|
||||
Specifies the default paper size for new print queues. "Auto" uses a locale-specific default, while "None" specifies there is no default paper size.
|
||||
Specific size names are typically "Letter" or "A4".
|
||||
The default is "Auto".
|
||||
.\"#DefaultPolicy
|
||||
.TP 5
|
||||
\fBDefaultPolicy \fIpolicy-name\fR
|
||||
Specifies the default access policy to use.
|
||||
The default access policy is "default".
|
||||
.\"#DefaultShared
|
||||
.TP 5
|
||||
\fBDefaultShared Yes\fR
|
||||
.TP 5
|
||||
\fBDefaultShared No\fR
|
||||
Specifies whether local printers are shared by default.
|
||||
The default is "Yes".
|
||||
.\"#DirtyCleanInterval
|
||||
.TP 5
|
||||
\fBDirtyCleanInterval \fIseconds\fR
|
||||
Specifies the delay for updating of configuration and state files.
|
||||
A value of 0 causes the update to happen as soon as possible, typically within a few milliseconds.
|
||||
The default value is "30".
|
||||
.\"#ErrorPolicy
|
||||
.TP 5
|
||||
\fBErrorPolicy abort-job\fR
|
||||
Specifies that a failed print job should be aborted (discarded) unless otherwise specified for the printer.
|
||||
@@ -142,6 +157,7 @@ Specifies that a failed print job should be retried immediately unless otherwise
|
||||
.TP 5
|
||||
\fBErrorPolicy stop-printer\fR
|
||||
Specifies that a failed print job should stop the printer unless otherwise specified for the printer. The 'stop-printer' error policy is the default.
|
||||
.\"#FilterLimit
|
||||
.TP 5
|
||||
\fBFilterLimit \fIlimit\fR
|
||||
Specifies the maximum cost of filters that are run concurrently, which can be used to minimize disk, memory, and CPU resource problems.
|
||||
@@ -150,6 +166,7 @@ An average print to a non-PostScript printer needs a filter limit of about 200.
|
||||
A PostScript printer needs about half that (100).
|
||||
Setting the limit below these thresholds will effectively limit the scheduler to printing a single job at any time.
|
||||
The default limit is "0".
|
||||
.\"#FilterNice
|
||||
.TP 5
|
||||
\fBFilterNice \fInice-value\fR
|
||||
Specifies the scheduling priority (
|
||||
@@ -157,11 +174,13 @@ Specifies the scheduling priority (
|
||||
value) of filters that are run to print a job.
|
||||
The nice value ranges from 0, the highest priority, to 19, the lowest priority.
|
||||
The default is 0.
|
||||
.\"#GSSServiceName
|
||||
.TP 5
|
||||
\fBGSSServiceName \fIname\fR
|
||||
Specifies the service name when using Kerberos authentication.
|
||||
The default service name is "http."
|
||||
.TP 5
|
||||
.\"#HostNameLookups
|
||||
\fBHostNameLookups On\fR
|
||||
.TP 5
|
||||
\fBHostNameLookups Off\fR
|
||||
@@ -174,42 +193,52 @@ to verify that the hostname resolved from the address matches one of the address
|
||||
Double lookups also prevent clients with unregistered addresses from connecting to your server.
|
||||
The default is "Off" to avoid the potential server performance problems with hostname lookups.
|
||||
Only set this option to "On" or "Double" if absolutely required.
|
||||
.\"#JobKillDelay
|
||||
.TP 5
|
||||
\fBJobKillDelay \fIseconds\fR
|
||||
Specifies the number of seconds to wait before killing the filters and backend associated with a canceled or held job.
|
||||
The default is "30".
|
||||
.\"#JobRetryInterval
|
||||
.TP 5
|
||||
\fBJobRetryInterval \fIseconds\fR
|
||||
Specifies the interval between retries of jobs in seconds.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "30".
|
||||
.\"#JobRetryLimit
|
||||
.TP 5
|
||||
\fBJobRetryLimit \fIcount\fR
|
||||
Specifies the number of retries that are done for jobs.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "5".
|
||||
.\"#KeepAlive
|
||||
.TP 5
|
||||
\fBKeepAlive Yes\fR
|
||||
.TP 5
|
||||
\fBKeepAlive No\fR
|
||||
Specifies whether to support HTTP keep-alive connections.
|
||||
The default is "Yes".
|
||||
.\"#KeepAliveTimeout
|
||||
.TP 5
|
||||
\fBKeepAliveTimeout \fIseconds\fR
|
||||
Specifies how long an idle client connection remains open.
|
||||
The default is "30".
|
||||
.\"#LimitIPP
|
||||
.TP 5
|
||||
\fB<Limit \fIoperation \fR...\fB> \fR... \fB</Limit>\fR
|
||||
Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATIONS".
|
||||
.\"#Limit
|
||||
.TP 5
|
||||
\fB<Limit \fImethod \fR...\fB> \fR... \fB</Limit>\fR
|
||||
.\"#LimitExcept
|
||||
.TP 5
|
||||
\fB<LimitExcept \fImethod \fR...\fB> \fR... \fB</LimitExcept>\fR
|
||||
Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHODS".
|
||||
.\"#LimitRequestBody
|
||||
.TP 5
|
||||
\fBLimitRequestBody \fIsize\fR
|
||||
Specifies the maximum size of print files, IPP requests, and HTML form data.
|
||||
The default is "0" which disables the limit check.
|
||||
.\"#Listen
|
||||
.TP 5
|
||||
\fBListen \fIipv4-address\fB:\fIport\fR
|
||||
.TP 5
|
||||
@@ -221,19 +250,23 @@ The default is "0" which disables the limit check.
|
||||
Listens to the specified address and port or domain socket path for connections.
|
||||
Multiple Listen directives can be provided to listen on multiple addresses.
|
||||
The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.
|
||||
.\"#ListenBackLog
|
||||
.TP 5
|
||||
\fBListenBackLog \fInumber\fR
|
||||
Specifies the number of pending connections that will be allowed.
|
||||
This normally only affects very busy servers that have reached the MaxClients limit, but can also be triggered by large numbers of simultaneous connections.
|
||||
When the limit is reached, the operating system will refuse additional connections until the scheduler can accept the pending ones.
|
||||
The default is the OS-defined default limit, typically either "5" for older operating systems or "128" for newer operating systems.
|
||||
.\"#Location
|
||||
.TP 5
|
||||
\fB<Location \fI/path\fB> \fR... \fB</Location>\fR
|
||||
Specifies access control for the named location.
|
||||
Paths are documented below in the section "LOCATION PATHS".
|
||||
.\"#LogDebugHistory
|
||||
.TP 5
|
||||
\fBLogDebugHistory \fInumber\fR
|
||||
Specifies the number of debugging messages that are retained for logging if an error occurs in a print job. Debug messages are logged regardless of the LogLevel setting.
|
||||
.\"#LogLevel
|
||||
.TP 5
|
||||
\fBLogLevel \fRnone
|
||||
.TP 5
|
||||
@@ -257,56 +290,68 @@ Specifies the number of debugging messages that are retained for logging if an e
|
||||
Specifies the level of logging for the ErrorLog file.
|
||||
The value "none" stops all logging while "debug2" logs everything.
|
||||
The default is "warn".
|
||||
.\"#LogTimeFormat
|
||||
.TP 5
|
||||
\fBLogTimeFormat \fRstandard
|
||||
.TP 5
|
||||
\fBLogTimeFormat \fRusecs
|
||||
Specifies the format of the date and time in the log files.
|
||||
The value "standard" is the default and logs whole seconds while "usecs" logs microseconds.
|
||||
.\"#MaxClients
|
||||
.TP 5
|
||||
\fBMaxClients \fInumber\fR
|
||||
Specifies the maximum number of simultaneous clients that are allowed by the scheduler.
|
||||
The default is "100".
|
||||
.\"#MaxClientPerHost
|
||||
.TP 5
|
||||
\fBMaxClientsPerHost \fInumber\fR
|
||||
Specifies the maximum number of simultaneous clients that are allowed from a
|
||||
single address.
|
||||
The default is the MaxClients value.
|
||||
.\"#MaxCopies
|
||||
.TP 5
|
||||
\fBMaxCopies \fInumber\fR
|
||||
Specifies the maximum number of copies that a user can print of each job.
|
||||
The default is "9999".
|
||||
.\"#MaxHoldTime
|
||||
.TP 5
|
||||
\fBMaxHoldTime \fIseconds\fR
|
||||
Specifies the maximum time a job may remain in the "indefinite" hold state before it is canceled.
|
||||
The default is "0" which disables cancellation of held jobs.
|
||||
.\"#MaxJobs
|
||||
.TP 5
|
||||
\fBMaxJobs \fInumber\fR
|
||||
Specifies the maximum number of simultaneous jobs that are allowed.
|
||||
Set to "0" to allow an unlimited number of jobs.
|
||||
The default is "500".
|
||||
.\"#MaxJobsPerPrinter
|
||||
.TP 5
|
||||
\fBMaxJobsPerPrinter \fInumber\fR
|
||||
Specifies the maximum number of simultaneous jobs that are allowed per printer.
|
||||
The default is "0" which allows up to MaxJobs jobs per printer.
|
||||
.\"#MaxJobsPerUser
|
||||
.TP 5
|
||||
\fBMaxJobsPerUser \fInumber\fR
|
||||
Specifies the maximum number of simultaneous jobs that are allowed per user.
|
||||
The default is "0" which allows up to MaxJobs jobs per user.
|
||||
.\"#MaxJobTime
|
||||
.TP 5
|
||||
\fBMaxJobTime \fIseconds\fR
|
||||
Specifies the maximum time a job may take to print before it is canceled.
|
||||
Set to "0" to disable cancellation of "stuck" jobs.
|
||||
The default is "10800" (3 hours).
|
||||
.\"#MaxLogSize
|
||||
.TP 5
|
||||
\fBMaxLogSize \fIsize\fR
|
||||
Specifies the maximum size of the log files before they are rotated.
|
||||
The value "0" disables log rotation.
|
||||
The default is "1048576" (1MB).
|
||||
.\"#MultipleOperationTimeout
|
||||
.TP 5
|
||||
\fBMultipleOperationTimeout \fIseconds\fR
|
||||
Specifies the maximum amount of time to allow between files in a multiple file print job.
|
||||
The default is "300" (5 minutes).
|
||||
.\"#PageLogFormat
|
||||
.TP 5
|
||||
\fBPageLogFormat \fIformat-string\fR
|
||||
Specifies the format of PageLog lines.
|
||||
@@ -324,16 +369,21 @@ The following percent sequences are recognized:
|
||||
"%u" inserts the username.
|
||||
|
||||
.fi
|
||||
The default is "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".
|
||||
The default is the empty string, which disables page logging.
|
||||
The string "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}" creates a page log with the standard items.
|
||||
.\"#PassEnv
|
||||
.TP 5
|
||||
\fBPassEnv \fIvariable \fR[ ... \fIvariable \fR]
|
||||
Passes the specified environment variable(s) to child processes.
|
||||
.\"#Policy
|
||||
.TP 5
|
||||
\fB<Policy \fIname\fB> \fR... \fB</Policy>\fR
|
||||
Specifies access control for the named policy.
|
||||
.\"#Port
|
||||
.TP 5
|
||||
\fBPort \fInumber\fR
|
||||
Listens to the specified port number for connections.
|
||||
.\"#PreserveJobFiles
|
||||
.TP 5
|
||||
\fBPreserveJobFiles Yes\fR
|
||||
.TP 5
|
||||
@@ -343,6 +393,7 @@ Listens to the specified port number for connections.
|
||||
Specifies whether job files (documents) are preserved after a job is printed.
|
||||
If a numeric value is specified, job files are preserved for the indicated number of seconds after printing.
|
||||
The default is "86400" (preserve 1 day).
|
||||
.\"#PreserveJobHistory
|
||||
.TP 5
|
||||
\fBPreserveJobHistory Yes\fR
|
||||
.TP 5
|
||||
@@ -353,18 +404,22 @@ Specifies whether the job history is preserved after a job is printed.
|
||||
If a numeric value is specified, the job history is preserved for the indicated number of seconds after printing.
|
||||
If "Yes", the job history is preserved until the MaxJobs limit is reached.
|
||||
The default is "Yes".
|
||||
.\"#ReloadTimeout
|
||||
.TP 5
|
||||
\fBReloadTimeout \fIseconds\fR
|
||||
Specifies the amount of time to wait for job completion before restarting the scheduler.
|
||||
The default is "30".
|
||||
.\"#RIPCache
|
||||
.TP 5
|
||||
\fBRIPCache \fIsize\fR
|
||||
Specifies the maximum amount of memory to use when converting documents into bitmaps for a printer.
|
||||
The default is "128m".
|
||||
.\"#ServerAdmin
|
||||
.TP 5
|
||||
\fBServerAdmin \fIemail-address\fR
|
||||
Specifies the email address of the server administrator.
|
||||
The default value is "root@ServerName".
|
||||
.\"#ServerAlias
|
||||
.TP 5
|
||||
\fBServerAlias \fIhostname \fR[ ... \fIhostname \fR]
|
||||
.TP 5
|
||||
@@ -372,12 +427,14 @@ The default value is "root@ServerName".
|
||||
The ServerAlias directive is used for HTTP Host header validation when clients connect to the scheduler from external interfaces.
|
||||
Using the special name "*" can expose your system to known browser-based DNS rebinding attacks, even when accessing sites through a firewall.
|
||||
If the auto-discovery of alternate names does not work, we recommend listing each alternate name with a ServerAlias directive instead of using "*".
|
||||
.\"#ServerName
|
||||
.TP 5
|
||||
\fBServerName \fIhostname\fR
|
||||
Specifies the fully-qualified hostname of the server.
|
||||
The default is the value reported by the
|
||||
.BR hostname (1)
|
||||
command.
|
||||
.\"#ServerTokens
|
||||
.TP 5
|
||||
\fBServerTokens None\fR
|
||||
.TP 5
|
||||
@@ -403,10 +460,11 @@ Specifies what information is included in the Server header of HTTP responses.
|
||||
command.
|
||||
"Full" reports "CUPS 2.0.0 (UNAME) IPP/2.0".
|
||||
The default is "Minimal".
|
||||
.\"#SetEnv
|
||||
.TP 5
|
||||
\fBSetEnv \fIvariable value\fR
|
||||
Set the specified environment variable to be passed to child processes.
|
||||
.TP 5
|
||||
.\"#SSLListen
|
||||
.TP 5
|
||||
\fBSSLListen \fIipv4-address\fB:\fIport\fR
|
||||
.TP 5
|
||||
@@ -414,19 +472,32 @@ Set the specified environment variable to be passed to child processes.
|
||||
.TP 5
|
||||
\fBSSLListen *:\fIport\fR
|
||||
Listens on the specified address and port for encrypted connections.
|
||||
.\"#SSLOptions
|
||||
.TP 5
|
||||
\fBSSLOptions \fR[\fIAllowRC4\fR] [\fIAllowSSL3\fR]
|
||||
.TP 5
|
||||
\fBSSLOptions None\fR
|
||||
Sets encryption options.
|
||||
By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
|
||||
The \fIAllowRC4\fR option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
|
||||
The \fIAllowSSL3\fR option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
|
||||
.\"#SSLPort
|
||||
.TP 5
|
||||
\fBSSLPort \fIport\fR
|
||||
Listens on the specified port for encrypted connections.
|
||||
.\"#StrictConformance
|
||||
.TP 5
|
||||
\fBStrictConformance Yes\fR
|
||||
.TP 5
|
||||
\fBStrictConformance No\fR
|
||||
Specifies whether the scheduler requires clients to strictly adhere to the IPP specifications.
|
||||
The default is "No".
|
||||
.\"#Timeout
|
||||
.TP 5
|
||||
\fBTimeout \fIseconds\fR
|
||||
Specifies the HTTP request timeout.
|
||||
The default is "300" (5 minutes).
|
||||
.\"#WebInterface
|
||||
.TP 5
|
||||
\fBWebInterface yes\fR
|
||||
.TP 5
|
||||
@@ -799,7 +870,7 @@ 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-2014 by Apple Inc.
|
||||
Copyright \[co] 2007-2015 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupsd.conf.man.in 12059 2014-07-28 14:04:32Z msweet $".
|
||||
.\" End of "$Id: cupsd.conf.man.in 12769 2015-06-30 16:13:48Z msweet $".
|
||||
.\"
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário