Comparar commits
4 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| c8d724e6bb | |||
| 00d0ae86f6 | |||
| a215cf8413 | |||
| 4ef75dec45 |
@@ -0,0 +1,201 @@
|
||||
CHANGES-2.0.txt
|
||||
---------------
|
||||
|
||||
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)
|
||||
- Added systemd support (STR #3917)
|
||||
- Added support for re-sending a job as a raster file if a higher-level
|
||||
format such as PDF fails (<rdar://problem/15583721>)
|
||||
- Added support for regular expression matching in the MIME type rules
|
||||
(<rdar://problem/11131245>)
|
||||
- Added support for TLS certificate validation and policy enforcement
|
||||
(STR #1616)
|
||||
- Added support for simultaneous XML and test output from ipptool.
|
||||
- Added support for PAUSE directive in ipptool test files.
|
||||
- Added support for auto-typing of TIFF files by ipptool (STR #4418)
|
||||
- The scheduler now returns completed jobs in the correct newest-to-
|
||||
oldest order (STR #4396)
|
||||
- The configure script now supports target-specific tools for pkg-config
|
||||
and others (STR #4423)
|
||||
- The ipptool program now supports EXPECT statements for collection
|
||||
member attributes (<rdar://problem/15355218>)
|
||||
- The ipptool program now supports collection attributes with multiple
|
||||
values (<rdar://problem/15355124>)
|
||||
- The sample drivers now include all of the installed localizations by
|
||||
default (<rdar://problem/14756625>)
|
||||
- Adopted Linux man page conventions and updated all man pages
|
||||
(STR #4372, STR #4329)
|
||||
- The scheduler now supports the "first-index" operation attribute for
|
||||
the Get-Jobs operation (STR #2913)
|
||||
- Changed the default AccessLogLevel and PageLogFormat to disable the
|
||||
access_log and page_log files by default (<rdar://problem/16495000>)
|
||||
- cupsRasterInterpretPPD now supports the Orientation header in order to
|
||||
support long-edge feed raster printers (<rdar://problem/15837926>)
|
||||
- The scheduler now allows run-as-root backends to have group read and
|
||||
execute permissions (STR #2935)
|
||||
- The ippFindAttribute and ippFindNextAttribute functions now support
|
||||
hierarchical searches (STR #4395)
|
||||
- Dropped OpenSSL support in favor of GNU TLS.
|
||||
- Dropped "dark wake" support on OS X, which was preventing portables
|
||||
from going to sleep when there was a stuck job. We now use a variation
|
||||
of the CUPS 1.4 sleep support to do a cleaner sleep
|
||||
(<rdar://problem/14323704>)
|
||||
- Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX)
|
||||
- Dropped lppasswd and support for Digest authentication in in the
|
||||
scheduler (STR #4321)
|
||||
- The cupsGetClasses, cupsGetPrinters, and cupsTempFile functions are no
|
||||
longer supported.
|
||||
- The scheduler now caches more job history data and limits the number
|
||||
of completed jobs returned by Get-Jobs as needed in order to prevent a
|
||||
denial-of-service on busy servers (STR #2913)
|
||||
- The filter/backend sandbox on OS X now defaults to a more strict
|
||||
whitelist (<rdar://problem/15939788>)
|
||||
- Increased the default idle exit timeout to 60 seconds on OS X
|
||||
(<rdar://problem/16041820>)
|
||||
- Printer classes were not accessible on OS X
|
||||
(<rdar://problem/16385643>)
|
||||
- The scheduler now uses </DefaultPrinter> to close the default printer
|
||||
definition in printers.conf (STR #4153)
|
||||
- Canceling all jobs in the web interface now just cancels the jobs
|
||||
(STR #1914)
|
||||
+38
-118
@@ -1,122 +1,42 @@
|
||||
CHANGES.txt - 2.0.1 - 2014-11-14
|
||||
CHANGES.txt - 2.1b1 - 2015-06-03
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V2.0.1
|
||||
CHANGES IN CUPS V2.1b1
|
||||
|
||||
- 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)
|
||||
- Improved speed of ppdMarkDefaults for complex/large PPDs
|
||||
(<rdar://problem/15146999>)
|
||||
- The IPP backend now stops sending print data if the printer indicates
|
||||
the job has been aborted or canceled (<rdar://problem/17837631>)
|
||||
- The IPP backend now sends the job-pages-per-set attribute when
|
||||
printing multiple copy jobs with finishings
|
||||
(<rdar://problem/16792757>)
|
||||
- The IPP backend now updates the cupsMandatory values when the printer
|
||||
configuration changes (<rdar://problem/18126570>)
|
||||
- No longer install banner files since third-party banner filters now
|
||||
supply their own (STR #4518)
|
||||
- Added support for EXPECT-ALL directive in ipptool test files
|
||||
(STR #4469)
|
||||
- Added support for WITH-VALUE-FROM predicate in ipptool test files
|
||||
(STR #4470)
|
||||
- The scheduler no longer listens on the loopback interface unless the
|
||||
web interface or printer sharing are enabled
|
||||
(<rdar://problem/9136448>)
|
||||
- Added a PPD generator for IPP Everywhere printers (STR #4258)
|
||||
- Now install "default" versions of more configuration files
|
||||
(<rdar://problem/19024491>)
|
||||
- The cupstestppd program did not handle "maxsize(nnn)" entries in
|
||||
cupsFilter/cupsFilter2 values (<rdar://problem/18974858>)
|
||||
- The scheduler now checks the return value of rename() calls
|
||||
(STR #4589)
|
||||
- The scheduler now validates ErrorPolicy values in config files
|
||||
(STR #4591)
|
||||
- Long cookies caused the web interface to stop working (STR #4619)
|
||||
- Added SSLOptions values to allow Diffie-Hellman key exchange and
|
||||
disable TLS/1.0 support.
|
||||
- Updated the scheduler to support more IPP Everywhere attributes
|
||||
(STR #4630)
|
||||
- The scheduler now supports advanced ASL and journald logging when
|
||||
"syslog" output is configured (STR #4474)
|
||||
- The scheduler now supports logging to stderr when running in the
|
||||
foreground (STR #4505)
|
||||
|
||||
|
||||
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)
|
||||
- Added systemd support (STR #3917)
|
||||
- Added support for re-sending a job as a raster file if a higher-level
|
||||
format such as PDF fails (<rdar://problem/15583721>)
|
||||
- Added support for regular expression matching in the MIME type rules
|
||||
(<rdar://problem/11131245>)
|
||||
- Added support for TLS certificate validation and policy enforcement
|
||||
(STR #1616)
|
||||
- Added support for simultaneous XML and test output from ipptool.
|
||||
- Added support for PAUSE directive in ipptool test files.
|
||||
- Added support for auto-typing of TIFF files by ipptool (STR #4418)
|
||||
- The scheduler now returns completed jobs in the correct newest-to-
|
||||
oldest order (STR #4396)
|
||||
- The configure script now supports target-specific tools for pkg-config
|
||||
and others (STR #4423)
|
||||
- The ipptool program now supports EXPECT statements for collection
|
||||
member attributes (<rdar://problem/15355218>)
|
||||
- The ipptool program now supports collection attributes with multiple
|
||||
values (<rdar://problem/15355124>)
|
||||
- The sample drivers now include all of the installed localizations by
|
||||
default (<rdar://problem/14756625>)
|
||||
- Adopted Linux man page conventions and updated all man pages
|
||||
(STR #4372, STR #4329)
|
||||
- The scheduler now supports the "first-index" operation attribute for
|
||||
the Get-Jobs operation (STR #2913)
|
||||
- Changed the default AccessLogLevel and PageLogFormat to disable the
|
||||
access_log and page_log files by default (<rdar://problem/16495000>)
|
||||
- cupsRasterInterpretPPD now supports the Orientation header in order to
|
||||
support long-edge feed raster printers (<rdar://problem/15837926>)
|
||||
- The scheduler now allows run-as-root backends to have group read and
|
||||
execute permissions (STR #2935)
|
||||
- The ippFindAttribute and ippFindNextAttribute functions now support
|
||||
hierarchical searches (STR #4395)
|
||||
- Dropped OpenSSL support in favor of GNU TLS.
|
||||
- Dropped "dark wake" support on OS X, which was preventing portables
|
||||
from going to sleep when there was a stuck job. We now use a variation
|
||||
of the CUPS 1.4 sleep support to do a cleaner sleep
|
||||
(<rdar://problem/14323704>)
|
||||
- Dropped support for AIX, HP-UX, and OSF/1 (aka Digital UNIX)
|
||||
- Dropped lppasswd and support for Digest authentication in in the
|
||||
scheduler (STR #4321)
|
||||
- The cupsGetClasses, cupsGetPrinters, and cupsTempFile functions are no
|
||||
longer supported.
|
||||
- The scheduler now caches more job history data and limits the number
|
||||
of completed jobs returned by Get-Jobs as needed in order to prevent a
|
||||
denial-of-service on busy servers (STR #2913)
|
||||
- The filter/backend sandbox on OS X now defaults to a more strict
|
||||
whitelist (<rdar://problem/15939788>)
|
||||
- Increased the default idle exit timeout to 60 seconds on OS X
|
||||
(<rdar://problem/16041820>)
|
||||
- Printer classes were not accessible on OS X
|
||||
(<rdar://problem/16385643>)
|
||||
- The scheduler now uses </DefaultPrinter> to close the default printer
|
||||
definition in printers.conf (STR #4153)
|
||||
- Canceling all jobs in the web interface now just cancels the jobs
|
||||
(STR #1914)
|
||||
|
||||
+5
-1
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v2.0.1 - 2014-11-14
|
||||
INSTALL - CUPS v2.1b1 - 2015-06-08
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
@@ -141,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,
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makedefs.in 11716 2014-03-21 14:50:24Z msweet $"
|
||||
# "$Id: Makedefs.in 12519 2015-02-17 13:10:19Z msweet $"
|
||||
#
|
||||
# Common makefile definitions for CUPS.
|
||||
#
|
||||
@@ -264,5 +264,5 @@ USBQUIRKS = @USBQUIRKS@
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makedefs.in 11716 2014-03-21 14:50:24Z msweet $"
|
||||
# End of "$Id: Makedefs.in 12519 2015-02-17 13:10:19Z msweet $"
|
||||
#
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 12145 2014-09-02 15:00:50Z msweet $"
|
||||
# "$Id: Makefile 12414 2015-01-21 00:02:04Z 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
|
||||
@@ -348,5 +348,5 @@ dist: all
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 12145 2014-09-02 15:00:50Z msweet $".
|
||||
# End of "$Id: Makefile 12414 2015-01-21 00:02:04Z msweet $".
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
README - CUPS v2.0.1 - 2014-11-14
|
||||
README - CUPS v2.1b1 - 2015-06-08
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
@@ -140,7 +140,7 @@ PRINTING FILES
|
||||
|
||||
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.
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $"
|
||||
* "$Id: dnssd.c 12659 2015-05-22 19:06:41Z 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 12659 2015-05-22 19:06:41Z msweet $".
|
||||
*/
|
||||
|
||||
+56
-329
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $"
|
||||
* "$Id: ipp.c 12676 2015-05-28 01:19:14Z msweet $"
|
||||
*
|
||||
* IPP backend 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
|
||||
@@ -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? */
|
||||
@@ -121,6 +122,7 @@ static const char * const pattrs[] = /* Printer attributes we want */
|
||||
"printer-alert",
|
||||
"printer-alert-description",
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-mandatory-job-attributes",
|
||||
"printer-state",
|
||||
"printer-state-message",
|
||||
"printer-state-reasons"
|
||||
@@ -144,6 +146,8 @@ static cups_option_t *attr_cache = NULL;
|
||||
static cups_array_t *state_reasons; /* Array of printe-state-reasons keywords */
|
||||
static char tmpfilename[1024] = "";
|
||||
/* Temporary spool file name */
|
||||
static char mandatory_attrs[1024] = "";
|
||||
/* cupsMandatory value */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1294,11 +1298,16 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Load the PPD file and generate PWG attribute mapping information...
|
||||
*/
|
||||
|
||||
ppd_attr_t *mandatory; /* cupsMandatory value */
|
||||
|
||||
ppd = ppdOpenFile(getenv("PPD"));
|
||||
pc = _ppdCacheCreateWithPPD(ppd);
|
||||
|
||||
ppdMarkDefaults(ppd);
|
||||
cupsMarkOptions(ppd, num_options, options);
|
||||
|
||||
if ((mandatory = ppdFindAttr(ppd, "cupsMandatory", NULL)) != NULL)
|
||||
strlcpy(mandatory_attrs, mandatory->value, sizeof(mandatory_attrs));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1396,6 +1405,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;
|
||||
@@ -1457,6 +1467,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED)
|
||||
goto cleanup;
|
||||
else if (ipp_status == IPP_STATUS_ERROR_FORBIDDEN ||
|
||||
ipp_status == IPP_STATUS_ERROR_NOT_AUTHORIZED ||
|
||||
ipp_status == IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED)
|
||||
{
|
||||
const char *www_auth = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE);
|
||||
@@ -2015,12 +2026,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
remote_job_states[job_state->values[0].integer -
|
||||
IPP_JOB_PENDING]);
|
||||
|
||||
if ((job_sheets = ippFindAttribute(response,
|
||||
"job-media-sheets-completed",
|
||||
IPP_TAG_INTEGER)) == NULL)
|
||||
job_sheets = ippFindAttribute(response,
|
||||
"job-impressions-completed",
|
||||
IPP_TAG_INTEGER);
|
||||
if ((job_sheets = ippFindAttribute(response, "job-impressions-completed", IPP_TAG_INTEGER)) == NULL)
|
||||
job_sheets = ippFindAttribute(response, "job-media-sheets-completed", IPP_TAG_INTEGER);
|
||||
|
||||
if (job_sheets)
|
||||
fprintf(stderr, "PAGE: total %d\n",
|
||||
@@ -2336,6 +2343,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...
|
||||
*/
|
||||
@@ -2448,6 +2464,8 @@ monitor_printer(
|
||||
new_reasons |= _CUPS_JSR_JOB_PASSWORD_WAIT;
|
||||
else if (!strcmp(attr->values[i].string.text, "job-release-wait"))
|
||||
new_reasons |= _CUPS_JSR_JOB_RELEASE_WAIT;
|
||||
else if (!strncmp(attr->values[i].string.text, "job-canceled-", 13) || !strcmp(attr->values[i].string.text, "aborted-by-system"))
|
||||
job_canceled = 1;
|
||||
}
|
||||
|
||||
if (new_reasons != monitor->job_reasons)
|
||||
@@ -2485,6 +2503,8 @@ monitor_printer(
|
||||
* Disconnect from the printer - we'll reconnect on the next poll...
|
||||
*/
|
||||
|
||||
monitor_disconnect:
|
||||
|
||||
_httpDisconnect(http);
|
||||
}
|
||||
|
||||
@@ -2546,19 +2566,10 @@ new_request(
|
||||
ipp_attribute_t *print_color_mode_sup)
|
||||
/* I - Printer supports print-color-mode */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ipp_t *request; /* Request data */
|
||||
const char *keyword; /* PWG keyword */
|
||||
_pwg_size_t *size; /* PWG media size */
|
||||
ipp_t *media_col, /* media-col value */
|
||||
*media_size; /* media-size value */
|
||||
const char *media_source, /* media-source value */
|
||||
*media_type, /* media-type value */
|
||||
*collate_str, /* multiple-document-handling value */
|
||||
*mandatory; /* Mandatory attributes */
|
||||
ipp_tag_t group; /* Current group */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
const char *color_attr_name; /* Supported color attribute */
|
||||
char buffer[1024]; /* Value buffer */
|
||||
|
||||
|
||||
@@ -2578,36 +2589,31 @@ new_request(
|
||||
* Add standard attributes...
|
||||
*/
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
fprintf(stderr, "DEBUG: printer-uri=\"%s\"\n", uri);
|
||||
|
||||
if (user && *user)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
|
||||
"requesting-user-name", NULL, user);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, user);
|
||||
fprintf(stderr, "DEBUG: requesting-user-name=\"%s\"\n", user);
|
||||
}
|
||||
|
||||
if (title && *title)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
|
||||
title);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title);
|
||||
fprintf(stderr, "DEBUG: job-name=\"%s\"\n", title);
|
||||
}
|
||||
|
||||
if (format && op != IPP_CREATE_JOB)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, format);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format", NULL, format);
|
||||
fprintf(stderr, "DEBUG: document-format=\"%s\"\n", format);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
if (compression && op != IPP_OP_CREATE_JOB && op != IPP_OP_VALIDATE_JOB)
|
||||
{
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"compression", NULL, compression);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "compression", NULL, compression);
|
||||
fprintf(stderr, "DEBUG: compression=\"%s\"\n", compression);
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
||||
@@ -2620,313 +2626,13 @@ new_request(
|
||||
{
|
||||
if (pc)
|
||||
{
|
||||
int num_finishings = 0, /* Number of finishing values */
|
||||
finishings[10]; /* Finishing enum values */
|
||||
ppd_choice_t *choice; /* Marked choice */
|
||||
|
||||
/*
|
||||
* Send standard IPP attributes...
|
||||
*/
|
||||
|
||||
fputs("DEBUG: Adding standard IPP operation/job attributes.\n", stderr);
|
||||
|
||||
if (pc->password &&
|
||||
(keyword = cupsGetOption("job-password", num_options,
|
||||
options)) != NULL)
|
||||
{
|
||||
ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", keyword, (int)strlen(keyword));
|
||||
|
||||
if ((keyword = cupsGetOption("job-password-encryption", num_options,
|
||||
options)) == NULL)
|
||||
keyword = "none";
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"job-password-encryption", NULL, keyword);
|
||||
}
|
||||
|
||||
if (pc->account_id)
|
||||
{
|
||||
if ((keyword = cupsGetOption("job-account-id", num_options,
|
||||
options)) == NULL)
|
||||
keyword = cupsGetOption("job-billing", num_options, options);
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME, "job-account-id",
|
||||
NULL, keyword);
|
||||
}
|
||||
|
||||
if (pc->accounting_user_id)
|
||||
{
|
||||
if ((keyword = cupsGetOption("job-accounting-user-id", num_options,
|
||||
options)) == NULL)
|
||||
keyword = user;
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_NAME,
|
||||
"job-accounting-user-id", NULL, keyword);
|
||||
}
|
||||
|
||||
for (mandatory = (char *)cupsArrayFirst(pc->mandatory);
|
||||
mandatory;
|
||||
mandatory = (char *)cupsArrayNext(pc->mandatory))
|
||||
{
|
||||
if (strcmp(mandatory, "copies") &&
|
||||
strcmp(mandatory, "destination-uris") &&
|
||||
strcmp(mandatory, "finishings") &&
|
||||
strcmp(mandatory, "job-account-id") &&
|
||||
strcmp(mandatory, "job-accounting-user-id") &&
|
||||
strcmp(mandatory, "job-password") &&
|
||||
strcmp(mandatory, "job-password-encryption") &&
|
||||
strcmp(mandatory, "media") &&
|
||||
strncmp(mandatory, "media-col", 9) &&
|
||||
strcmp(mandatory, "multiple-document-handling") &&
|
||||
strcmp(mandatory, "output-bin") &&
|
||||
strcmp(mandatory, "print-color-mode") &&
|
||||
strcmp(mandatory, "print-quality") &&
|
||||
strcmp(mandatory, "sides") &&
|
||||
(keyword = cupsGetOption(mandatory, num_options, options)) != NULL)
|
||||
{
|
||||
_ipp_option_t *opt = _ippFindOption(mandatory);
|
||||
/* Option type */
|
||||
ipp_tag_t value_tag = opt ? opt->value_tag : IPP_TAG_NAME;
|
||||
/* Value type */
|
||||
|
||||
switch (value_tag)
|
||||
{
|
||||
case IPP_TAG_INTEGER :
|
||||
case IPP_TAG_ENUM :
|
||||
ippAddInteger(request, IPP_TAG_JOB, value_tag, mandatory,
|
||||
atoi(keyword));
|
||||
break;
|
||||
case IPP_TAG_BOOLEAN :
|
||||
ippAddBoolean(request, IPP_TAG_JOB, mandatory,
|
||||
!_cups_strcasecmp(keyword, "true"));
|
||||
break;
|
||||
case IPP_TAG_RANGE :
|
||||
{
|
||||
int lower, upper; /* Range */
|
||||
|
||||
if (sscanf(keyword, "%d-%d", &lower, &upper) != 2)
|
||||
lower = upper = atoi(keyword);
|
||||
|
||||
ippAddRange(request, IPP_TAG_JOB, mandatory, lower, upper);
|
||||
}
|
||||
break;
|
||||
case IPP_TAG_STRING :
|
||||
ippAddOctetString(request, IPP_TAG_JOB, mandatory, keyword, (int)strlen(keyword));
|
||||
break;
|
||||
default :
|
||||
if (!strcmp(mandatory, "print-color-mode") && !strcmp(keyword, "monochrome"))
|
||||
{
|
||||
if (ippContainsString(print_color_mode_sup, "auto-monochrome"))
|
||||
keyword = "auto-monochrome";
|
||||
else if (ippContainsString(print_color_mode_sup, "process-monochrome") && !ippContainsString(print_color_mode_sup, "monochrome"))
|
||||
keyword = "process-monochrome";
|
||||
}
|
||||
|
||||
ippAddString(request, IPP_TAG_JOB, value_tag, mandatory,
|
||||
NULL, keyword);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("PageSize", num_options, options)) == NULL)
|
||||
keyword = cupsGetOption("media", num_options, options);
|
||||
|
||||
if ((size = _ppdCacheGetSize(pc, keyword)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Add a media-col value...
|
||||
*/
|
||||
|
||||
media_size = ippNew();
|
||||
ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"x-dimension", size->width);
|
||||
ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"y-dimension", size->length);
|
||||
|
||||
media_col = ippNew();
|
||||
ippAddCollection(media_col, IPP_TAG_ZERO, "media-size", media_size);
|
||||
|
||||
media_source = _ppdCacheGetSource(pc, cupsGetOption("InputSlot",
|
||||
num_options,
|
||||
options));
|
||||
media_type = _ppdCacheGetType(pc, cupsGetOption("MediaType",
|
||||
num_options,
|
||||
options));
|
||||
|
||||
for (i = 0; i < media_col_sup->num_values; i ++)
|
||||
{
|
||||
if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-left-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-left-margin", size->left);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-bottom-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-bottom-margin", size->bottom);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-right-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-right-margin", size->right);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-top-margin"))
|
||||
ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
|
||||
"media-top-margin", size->top);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-source") && media_source)
|
||||
ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
|
||||
"media-source", NULL, media_source);
|
||||
else if (!strcmp(media_col_sup->values[i].string.text,
|
||||
"media-type") && media_type)
|
||||
ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
|
||||
"media-type", NULL, media_type);
|
||||
}
|
||||
|
||||
ippAddCollection(request, IPP_TAG_JOB, "media-col", media_col);
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("output-bin", num_options,
|
||||
options)) == NULL)
|
||||
{
|
||||
if ((choice = ppdFindMarkedChoice(ppd, "OutputBin")) != NULL)
|
||||
keyword = _ppdCacheGetBin(pc, choice->choice);
|
||||
}
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-bin",
|
||||
NULL, keyword);
|
||||
|
||||
color_attr_name = print_color_mode_sup ? "print-color-mode" : "output-mode";
|
||||
|
||||
if ((keyword = cupsGetOption("print-color-mode", num_options,
|
||||
options)) == NULL)
|
||||
{
|
||||
if ((choice = ppdFindMarkedChoice(ppd, "ColorModel")) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, "Gray"))
|
||||
keyword = "monochrome";
|
||||
else
|
||||
keyword = "color";
|
||||
}
|
||||
}
|
||||
|
||||
if (keyword && !strcmp(keyword, "monochrome"))
|
||||
{
|
||||
if (ippContainsString(print_color_mode_sup, "auto-monochrome"))
|
||||
keyword = "auto-monochrome";
|
||||
else if (ippContainsString(print_color_mode_sup, "process-monochrome") && !ippContainsString(print_color_mode_sup, "monochrome"))
|
||||
keyword = "process-monochrome";
|
||||
}
|
||||
|
||||
if (keyword)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, color_attr_name,
|
||||
NULL, keyword);
|
||||
|
||||
if ((keyword = cupsGetOption("print-quality", num_options,
|
||||
options)) != NULL)
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
atoi(keyword));
|
||||
else if ((choice = ppdFindMarkedChoice(ppd, "cupsPrintQuality")) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, "draft"))
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
IPP_QUALITY_DRAFT);
|
||||
else if (!_cups_strcasecmp(choice->choice, "normal"))
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
IPP_QUALITY_NORMAL);
|
||||
else if (!_cups_strcasecmp(choice->choice, "high"))
|
||||
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
|
||||
IPP_QUALITY_HIGH);
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("sides", num_options, options)) != NULL)
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, keyword);
|
||||
else if (pc->sides_option &&
|
||||
(choice = ppdFindMarkedChoice(ppd, pc->sides_option)) != NULL)
|
||||
{
|
||||
if (!_cups_strcasecmp(choice->choice, pc->sides_1sided))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, "one-sided");
|
||||
else if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_long))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, "two-sided-long-edge");
|
||||
if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_short))
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
|
||||
NULL, "two-sided-short-edge");
|
||||
}
|
||||
|
||||
if ((keyword = cupsGetOption("multiple-document-handling",
|
||||
num_options, options)) != NULL)
|
||||
{
|
||||
if (strstr(keyword, "uncollated"))
|
||||
keyword = "false";
|
||||
else
|
||||
keyword = "true";
|
||||
}
|
||||
else if ((keyword = cupsGetOption("collate", num_options,
|
||||
options)) == NULL)
|
||||
keyword = "true";
|
||||
|
||||
if (format)
|
||||
{
|
||||
if (!_cups_strcasecmp(format, "image/gif") ||
|
||||
!_cups_strcasecmp(format, "image/jp2") ||
|
||||
!_cups_strcasecmp(format, "image/jpeg") ||
|
||||
!_cups_strcasecmp(format, "image/png") ||
|
||||
!_cups_strcasecmp(format, "image/tiff") ||
|
||||
!_cups_strncasecmp(format, "image/x-", 8))
|
||||
{
|
||||
/*
|
||||
* Collation makes no sense for single page image formats...
|
||||
*/
|
||||
|
||||
keyword = "false";
|
||||
}
|
||||
else if (!_cups_strncasecmp(format, "image/", 6) ||
|
||||
!_cups_strcasecmp(format, "application/vnd.cups-raster"))
|
||||
{
|
||||
/*
|
||||
* Multi-page image formats will have copies applied by the upstream
|
||||
* filters...
|
||||
*/
|
||||
|
||||
copies = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (doc_handling_sup)
|
||||
{
|
||||
if (!_cups_strcasecmp(keyword, "true"))
|
||||
collate_str = "separate-documents-collated-copies";
|
||||
else
|
||||
collate_str = "separate-documents-uncollated-copies";
|
||||
|
||||
for (i = 0; i < doc_handling_sup->num_values; i ++)
|
||||
if (!strcmp(doc_handling_sup->values[i].string.text, collate_str))
|
||||
{
|
||||
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD,
|
||||
"multiple-document-handling", NULL, collate_str);
|
||||
break;
|
||||
}
|
||||
|
||||
if (i >= doc_handling_sup->num_values)
|
||||
copies = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Map finishing options...
|
||||
*/
|
||||
|
||||
num_finishings = _ppdCacheGetFinishingValues(pc, num_options, options,
|
||||
(int)(sizeof(finishings) /
|
||||
sizeof(finishings[0])),
|
||||
finishings);
|
||||
if (num_finishings > 0)
|
||||
ippAddIntegers(request, IPP_TAG_JOB, IPP_TAG_ENUM, "finishings",
|
||||
num_finishings, finishings);
|
||||
copies = _cupsConvertOptions(request, ppd, pc, media_col_sup, doc_handling_sup, print_color_mode_sup, user, format, copies, num_options, options);
|
||||
|
||||
/*
|
||||
* Map FaxOut options...
|
||||
@@ -3208,6 +2914,7 @@ report_printer_state(ipp_t *ipp) /* I - IPP response */
|
||||
{
|
||||
ipp_attribute_t *pa, /* printer-alert */
|
||||
*pam, /* printer-alert-message */
|
||||
*pmja, /* printer-mandatory-job-attributes */
|
||||
*psm, /* printer-state-message */
|
||||
*reasons, /* printer-state-reasons */
|
||||
*marker; /* marker-* attributes */
|
||||
@@ -3228,6 +2935,26 @@ report_printer_state(ipp_t *ipp) /* I - IPP response */
|
||||
IPP_TAG_TEXT)) != NULL)
|
||||
report_attr(pam);
|
||||
|
||||
if ((pmja = ippFindAttribute(ipp, "printer-mandatory-job-attributes", IPP_TAG_KEYWORD)) != NULL)
|
||||
{
|
||||
int i, /* Looping var */
|
||||
count = ippGetCount(pmja); /* Number of values */
|
||||
|
||||
for (i = 0, valptr = value; i < count; i ++, valptr += strlen(valptr))
|
||||
{
|
||||
if (i)
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value), " %s", ippGetString(pmja, i, NULL));
|
||||
else
|
||||
strlcpy(value, ippGetString(pmja, i, NULL), sizeof(value));
|
||||
}
|
||||
|
||||
if (strcmp(value, mandatory_attrs))
|
||||
{
|
||||
strlcpy(mandatory_attrs, value, sizeof(mandatory_attrs));
|
||||
fprintf(stderr, "PPD: cupsMandatory=\"%s\"\n", value);
|
||||
}
|
||||
}
|
||||
|
||||
if ((psm = ippFindAttribute(ipp, "printer-state-message",
|
||||
IPP_TAG_TEXT)) != NULL)
|
||||
{
|
||||
@@ -3756,5 +3483,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 12676 2015-05-28 01:19:14Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -224,3 +224,6 @@
|
||||
|
||||
# Canon MX320 (STR #4482)
|
||||
0x04A9 0x1736 unidir
|
||||
|
||||
# All Intermec devices (STR #4553)
|
||||
0x067e no-reattach
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: snmp-supplies.c 12228 2014-10-21 13:42:05Z msweet $"
|
||||
* "$Id: snmp-supplies.c 12227 2014-10-21 13:42:04Z msweet $"
|
||||
*
|
||||
* SNMP supplies functions for CUPS.
|
||||
*
|
||||
@@ -1098,5 +1098,5 @@ utf16_to_utf8(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: snmp-supplies.c 12228 2014-10-21 13:42:05Z msweet $".
|
||||
* End of "$Id: snmp-supplies.c 12227 2014-10-21 13:42:04Z msweet $".
|
||||
*/
|
||||
|
||||
+549
-383
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 12348 2014-12-09 22:10:45Z 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 12348 2014-12-09 22:10:45Z msweet $".
|
||||
*/
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11777 2014-03-28 19:18:10Z msweet $"
|
||||
# "$Id: Makefile 12519 2015-02-17 13:10:19Z msweet $"
|
||||
#
|
||||
# CGI makefile for CUPS.
|
||||
#
|
||||
@@ -353,5 +353,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11777 2014-03-28 19:18:10Z msweet $".
|
||||
# End of "$Id: Makefile 12519 2015-02-17 13:10:19Z msweet $".
|
||||
#
|
||||
|
||||
+90
-11
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: admin.c 12123 2014-08-28 14:24:45Z msweet $"
|
||||
* "$Id: admin.c 12516 2015-02-12 20:18:11Z msweet $"
|
||||
*
|
||||
* Administration CGI 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
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
|
||||
#include "cgi-private.h"
|
||||
#include <cups/http-private.h>
|
||||
#include <cups/ppd-private.h>
|
||||
#include <cups/adminutil.h>
|
||||
#include <cups/ppd.h>
|
||||
#include <errno.h>
|
||||
@@ -38,12 +40,7 @@ static int current_device = 0; /* Current device shown */
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void choose_device_cb(const char *device_class,
|
||||
const char *device_id, const char *device_info,
|
||||
const char *device_make_and_model,
|
||||
const char *device_uri,
|
||||
const char *device_location,
|
||||
const char *title);
|
||||
static void choose_device_cb(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, const char *title);
|
||||
static void do_add_rss_subscription(http_t *http);
|
||||
static void do_am_class(http_t *http, int modify);
|
||||
static void do_am_printer(http_t *http, int modify);
|
||||
@@ -61,6 +58,7 @@ static void do_set_sharing(http_t *http);
|
||||
static char *get_option_value(ppd_file_t *ppd, const char *name,
|
||||
char *buffer, size_t bufsize);
|
||||
static double get_points(double number, const char *uval);
|
||||
static char *get_printer_ppd(const char *uri, char *buffer, size_t bufsize);
|
||||
|
||||
|
||||
/*
|
||||
@@ -832,7 +830,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
const cgi_file_t *file; /* Uploaded file, if any */
|
||||
const char *var; /* CGI variable */
|
||||
char uri[HTTP_MAX_URI], /* Device or printer URI */
|
||||
*uriptr; /* Pointer into URI */
|
||||
*uriptr, /* Pointer into URI */
|
||||
evefile[1024] = ""; /* IPP Everywhere PPD file */
|
||||
int maxrate; /* Maximum baud rate */
|
||||
char baudrate[255]; /* Baud rate string */
|
||||
const char *name, /* Pointer to class name */
|
||||
@@ -1331,7 +1330,9 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
if (!file)
|
||||
{
|
||||
var = cgiGetVariable("PPD_NAME");
|
||||
if (strcmp(var, "__no_change__"))
|
||||
if (!strcmp(var, "everywhere"))
|
||||
get_printer_ppd(cgiGetVariable("DEVICE_URI"), evefile, sizeof(evefile));
|
||||
else if (strcmp(var, "__no_change__"))
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
|
||||
NULL, var);
|
||||
}
|
||||
@@ -1384,6 +1385,11 @@ do_am_printer(http_t *http, /* I - HTTP connection */
|
||||
|
||||
if (file)
|
||||
ippDelete(cupsDoFileRequest(http, request, "/admin/", file->tempfile));
|
||||
else if (evefile[0])
|
||||
{
|
||||
ippDelete(cupsDoFileRequest(http, request, "/admin/", evefile));
|
||||
unlink(evefile);
|
||||
}
|
||||
else
|
||||
ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
|
||||
@@ -4198,5 +4204,78 @@ get_points(double number, /* I - Original number */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: admin.c 12123 2014-08-28 14:24:45Z msweet $".
|
||||
* 'get_printer_ppd()' - Get an IPP Everywhere PPD file for the given URI.
|
||||
*/
|
||||
|
||||
static char * /* O - Filename or NULL */
|
||||
get_printer_ppd(const char *uri, /* I - Printer URI */
|
||||
char *buffer, /* I - Filename buffer */
|
||||
size_t bufsize) /* I - Size of filename buffer */
|
||||
{
|
||||
http_t *http; /* Connection to printer */
|
||||
ipp_t *request, /* Get-Printer-Attributes request */
|
||||
*response; /* Get-Printer-Attributes response */
|
||||
char resolved[1024], /* Resolved URI */
|
||||
scheme[32], /* URI scheme */
|
||||
userpass[256], /* Username:password */
|
||||
host[256], /* Hostname */
|
||||
resource[256]; /* Resource path */
|
||||
int port; /* Port number */
|
||||
|
||||
|
||||
/*
|
||||
* Connect to the printer...
|
||||
*/
|
||||
|
||||
if (strstr(uri, "._tcp"))
|
||||
{
|
||||
/*
|
||||
* Resolve URI...
|
||||
*/
|
||||
|
||||
if (!_httpResolveURI(uri, resolved, sizeof(resolved), _HTTP_RESOLVE_DEFAULT, NULL, NULL))
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unable to resolve \"%s\".\n", uri);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
uri = resolved;
|
||||
}
|
||||
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Bad printer URI \"%s\".\n", uri);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
http = httpConnect2(host, port, NULL, AF_UNSPEC, !strcmp(scheme, "ipps") ? HTTP_ENCRYPTION_ALWAYS : HTTP_ENCRYPTION_IF_REQUESTED, 1, 30000, NULL);
|
||||
if (!http)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unable to connect to \"%s:%d\": %s\n", host, port, cupsLastErrorString());
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a Get-Printer-Attributes request...
|
||||
*/
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
if (!_ppdCreateFromIPP(buffer, bufsize, response))
|
||||
fprintf(stderr, "ERROR: Unable to create PPD file: %s\n", strerror(errno));
|
||||
|
||||
ippDelete(response);
|
||||
httpClose(http);
|
||||
|
||||
if (buffer[0])
|
||||
return (buffer);
|
||||
else
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: admin.c 12516 2015-02-12 20:18:11Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: help-index.c 12644 2015-05-19 21:22:35Z msweet $"
|
||||
*
|
||||
* Online help index 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
|
||||
@@ -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);
|
||||
@@ -1220,7 +1220,7 @@ help_new_node(const char *filename, /* I - Filename */
|
||||
|
||||
n->filename = strdup(filename);
|
||||
n->anchor = anchor ? strdup(anchor) : NULL;
|
||||
n->section = (section && *section) ? strdup(section) : NULL;
|
||||
n->section = *section ? strdup(section) : NULL;
|
||||
n->text = strdup(text);
|
||||
n->mtime = mtime;
|
||||
n->offset = offset;
|
||||
@@ -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 12644 2015-05-19 21:22:35Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-18
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $"
|
||||
* "$Id: ipp-var.c 12700 2015-06-08 18:32:35Z 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
|
||||
@@ -1202,21 +1202,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 +1547,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 12700 2015-06-08 18:32:35Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-36
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $"
|
||||
* "$Id: template.c 12700 2015-06-08 18:32:35Z 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 12700 2015-06-08 18:32:35Z msweet $".
|
||||
*/
|
||||
|
||||
+27
-8
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: var.c 12034 2014-07-16 19:37:34Z msweet $"
|
||||
* "$Id: var.c 12621 2015-05-06 21:32:18Z msweet $"
|
||||
*
|
||||
* CGI form variable and array functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -626,6 +626,8 @@ cgi_initialize_cookies(void)
|
||||
|
||||
while (*cookie)
|
||||
{
|
||||
int skip = 0; /* Skip this cookie? */
|
||||
|
||||
/*
|
||||
* Skip leading whitespace...
|
||||
*/
|
||||
@@ -641,9 +643,14 @@ cgi_initialize_cookies(void)
|
||||
|
||||
for (ptr = name; *cookie && *cookie != '=';)
|
||||
if (ptr < (name + sizeof(name) - 1))
|
||||
{
|
||||
*ptr++ = *cookie++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
{
|
||||
skip = 1;
|
||||
cookie ++;
|
||||
}
|
||||
|
||||
if (*cookie != '=')
|
||||
break;
|
||||
@@ -659,26 +666,38 @@ cgi_initialize_cookies(void)
|
||||
{
|
||||
for (cookie ++, ptr = value; *cookie && *cookie != '\"';)
|
||||
if (ptr < (value + sizeof(value) - 1))
|
||||
{
|
||||
*ptr++ = *cookie++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
{
|
||||
skip = 1;
|
||||
cookie ++;
|
||||
}
|
||||
|
||||
if (*cookie == '\"')
|
||||
cookie ++;
|
||||
else
|
||||
skip = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ptr = value; *cookie && *cookie != ';';)
|
||||
if (ptr < (value + sizeof(value) - 1))
|
||||
{
|
||||
*ptr++ = *cookie++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
{
|
||||
skip = 1;
|
||||
cookie ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (*cookie == ';')
|
||||
cookie ++;
|
||||
else if (*cookie)
|
||||
break;
|
||||
skip = 1;
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
@@ -687,7 +706,7 @@ cgi_initialize_cookies(void)
|
||||
* "$"...
|
||||
*/
|
||||
|
||||
if (name[0] != '$')
|
||||
if (name[0] != '$' && !skip)
|
||||
num_cookies = cupsAddOption(name, value, num_cookies, &cookies);
|
||||
}
|
||||
}
|
||||
@@ -1278,5 +1297,5 @@ cgi_unlink_file(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: var.c 12034 2014-07-16 19:37:34Z msweet $".
|
||||
* End of "$Id: var.c 12621 2015-05-06 21:32:18Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
|
||||
# "$Id: Makefile 12533 2015-02-27 12:30:26Z msweet $"
|
||||
#
|
||||
# Configuration file makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2012 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
|
||||
@@ -76,8 +76,8 @@ install-data:
|
||||
else \
|
||||
$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \
|
||||
fi ; \
|
||||
$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \
|
||||
done
|
||||
$(INSTALL_CONFIG) -g $(CUPS_GROUP) cupsd.conf $(SERVERROOT)/cupsd.conf.default
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/mime
|
||||
for file in $(REPLACE); do \
|
||||
if test -r $(DATADIR)/mime/$$file ; then \
|
||||
@@ -139,5 +139,5 @@ uninstall:
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
|
||||
# End of "$Id: Makefile 12533 2015-02-27 12:30:26Z msweet $".
|
||||
#
|
||||
|
||||
@@ -75,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 12195 2014-10-02 18:45:59Z msweet $"
|
||||
dnl "$Id: cups-common.m4 12697 2015-06-08 17:42:16Z 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.0.1
|
||||
CUPS_VERSION=2.1b1
|
||||
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'`"
|
||||
@@ -137,6 +137,7 @@ AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
|
||||
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
|
||||
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
|
||||
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
|
||||
AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
|
||||
|
||||
dnl Checks for iconv.h and iconv_open
|
||||
AC_CHECK_HEADER(iconv.h,
|
||||
@@ -145,6 +146,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)...
|
||||
@@ -462,5 +466,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 12195 2014-10-02 18:45:59Z msweet $".
|
||||
dnl End of "$Id: cups-common.m4 12697 2015-06-08 17:42:16Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 11789 2014-04-02 16:52:53Z msweet $"
|
||||
dnl "$Id: cups-defaults.m4 12350 2014-12-09 22:18:21Z msweet $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2006-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -409,5 +409,5 @@ AC_SUBST(CUPS_WEBIF)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 11789 2014-04-02 16:52:53Z msweet $".
|
||||
dnl End of "$Id: cups-defaults.m4 12350 2014-12-09 22:18:21Z 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 12324 2014-12-09 20:28:39Z 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 12324 2014-12-09 20:28:39Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 12122 2014-08-28 12:55:52Z msweet $"
|
||||
dnl "$Id: cups-ssl.m4 12645 2015-05-20 01:20:52Z msweet $"
|
||||
dnl
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2014 by Apple Inc.
|
||||
dnl Copyright 2007-2015 by Apple Inc.
|
||||
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
dnl
|
||||
dnl These coded instructions, statements, and computer programs are the
|
||||
@@ -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,
|
||||
@@ -54,6 +53,10 @@ if test x$enable_ssl != xno; then
|
||||
|
||||
AC_DEFINE(HAVE_CSSMERRORSTRING)
|
||||
AC_DEFINE(HAVE_SECKEYCHAINOPEN)])
|
||||
|
||||
if test $uversion -ge 150; then
|
||||
AC_DEFINE(HAVE_SSLSETENABLEDCIPHERS)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -76,12 +79,12 @@ 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
|
||||
@@ -96,8 +99,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)
|
||||
@@ -106,5 +108,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 12122 2014-08-28 12:55:52Z msweet $".
|
||||
dnl End of "$Id: cups-ssl.m4 12645 2015-05-20 01:20:52Z 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 12691 2015-06-04 18:00:31Z msweet $"
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
@@ -68,6 +68,15 @@ if test x$enable_systemd != xno; then
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_CHECKING(for libsystemd-journal)
|
||||
if $PKGCONFIG --exists libsystemd-journal; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
|
||||
ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
|
||||
AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H))
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -166,11 +175,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 12691 2015-06-04 18:00:31Z msweet $".
|
||||
dnl
|
||||
|
||||
+32
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: config.h.in 12140 2014-08-30 01:51:22Z msweet $"
|
||||
* "$Id: config.h.in 12687 2015-06-03 17:19:04Z msweet $"
|
||||
*
|
||||
* Configuration file 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
|
||||
@@ -242,6 +242,20 @@
|
||||
#undef HAVE_VSYSLOG
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the ASL functions?
|
||||
*/
|
||||
|
||||
#undef HAVE_ASL_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the systemd journal functions?
|
||||
*/
|
||||
|
||||
#undef HAVE_SYSTEMD_SD_JOURNAL_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the (v)snprintf() functions?
|
||||
*/
|
||||
@@ -305,6 +319,13 @@
|
||||
#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?
|
||||
*/
|
||||
@@ -341,6 +362,13 @@
|
||||
#undef HAVE_SECKEYCHAINOPEN
|
||||
|
||||
|
||||
/*
|
||||
* Do we have (a working) SSLSetEnabledCiphers function?
|
||||
*/
|
||||
|
||||
#undef HAVE_SSLSETENABLEDCIPHERS
|
||||
|
||||
|
||||
/*
|
||||
* Do we have libpaper?
|
||||
*/
|
||||
@@ -624,7 +652,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)
|
||||
@@ -712,5 +740,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
|
||||
#endif /* !_CUPS_CONFIG_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: config.h.in 12140 2014-08-30 01:51:22Z msweet $".
|
||||
* End of "$Id: config.h.in 12687 2015-06-03 17:19:04Z msweet $".
|
||||
*/
|
||||
|
||||
externo
+108
-13
@@ -659,8 +659,7 @@ EXPORT_SSLLIBS
|
||||
SSLLIBS
|
||||
SSLFLAGS
|
||||
IPPALIASES
|
||||
CUPS_SERVERKEY
|
||||
CUPS_SERVERCERT
|
||||
CUPS_SERVERKEYCHAIN
|
||||
LIBGCRYPTCONFIG
|
||||
LIBGNUTLSCONFIG
|
||||
PTHREAD_FLAGS
|
||||
@@ -2520,7 +2519,7 @@ esac
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION=2.0.1
|
||||
CUPS_VERSION=2.1b1
|
||||
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'`"
|
||||
@@ -4911,6 +4910,13 @@ if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "asl.h" "ac_cv_header_asl_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_asl_h" = xyes; then :
|
||||
$as_echo "#define HAVE_ASL_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_iconv_h" = xyes; then :
|
||||
@@ -4967,6 +4973,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
|
||||
@@ -6829,7 +6893,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
|
||||
|
||||
@@ -8007,8 +8077,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
|
||||
@@ -8021,7 +8090,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 :
|
||||
@@ -8088,6 +8157,11 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $uversion -ge 150; then
|
||||
$as_echo "#define HAVE_SSLSETENABLEDCIPHERS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -8307,8 +8381,7 @@ 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"
|
||||
@@ -8316,6 +8389,12 @@ fi
|
||||
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"
|
||||
@@ -8339,7 +8418,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
EXPORT_SSLLIBS="$SSLLIBS"
|
||||
|
||||
|
||||
@@ -9072,6 +9150,24 @@ $as_echo "yes" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd-journal" >&5
|
||||
$as_echo_n "checking for libsystemd-journal... " >&6; }
|
||||
if $PKGCONFIG --exists libsystemd-journal; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`"
|
||||
ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-journal.h" "ac_cv_header_systemd_sd_journal_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_systemd_sd_journal_h" = xyes; then :
|
||||
$as_echo "#define HAVE_SYSTEMD_SD_JOURNAL_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -9207,7 +9303,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
|
||||
|
||||
@@ -10101,7 +10197,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.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"
|
||||
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 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
|
||||
@@ -10813,7 +10909,6 @@ do
|
||||
"conf/pam.std") CONFIG_FILES="$CONFIG_FILES conf/pam.std" ;;
|
||||
"conf/snmp.conf") CONFIG_FILES="$CONFIG_FILES conf/snmp.conf" ;;
|
||||
"cups-config") CONFIG_FILES="$CONFIG_FILES cups-config" ;;
|
||||
"data/testprint") CONFIG_FILES="$CONFIG_FILES data/testprint" ;;
|
||||
"desktop/cups.desktop") CONFIG_FILES="$CONFIG_FILES desktop/cups.desktop" ;;
|
||||
"doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;;
|
||||
"man/client.conf.man") CONFIG_FILES="$CONFIG_FILES man/client.conf.man" ;;
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: configure.ac 12222 2014-10-21 11:55:01Z msweet $"
|
||||
dnl "$Id: configure.ac 12278 2014-12-01 13:53:56Z msweet $"
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
@@ -66,7 +66,6 @@ AC_OUTPUT(Makedefs
|
||||
conf/pam.std
|
||||
conf/snmp.conf
|
||||
cups-config
|
||||
data/testprint
|
||||
desktop/cups.desktop
|
||||
doc/index.html
|
||||
man/client.conf.man
|
||||
@@ -92,5 +91,5 @@ AC_OUTPUT(Makedefs
|
||||
chmod +x cups-config
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: configure.ac 12222 2014-10-21 11:55:01Z msweet $".
|
||||
dnl End of "$Id: configure.ac 12278 2014-12-01 13:53:56Z msweet $".
|
||||
dnl
|
||||
|
||||
+16
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 12032 2014-07-15 20:37:32Z msweet $"
|
||||
# "$Id: Makefile 12635 2015-05-19 02:12:22Z msweet $"
|
||||
#
|
||||
# API library Makefile for CUPS.
|
||||
#
|
||||
@@ -94,7 +94,8 @@ TESTOBJS = \
|
||||
testlang.o \
|
||||
testppd.o \
|
||||
testpwg.o \
|
||||
testsnmp.o
|
||||
testsnmp.o \
|
||||
tlscheck.o
|
||||
OBJS = \
|
||||
$(LIBOBJS) \
|
||||
$(TESTOBJS)
|
||||
@@ -161,7 +162,8 @@ UNITTARGETS = \
|
||||
testoptions \
|
||||
testppd \
|
||||
testpwg \
|
||||
testsnmp
|
||||
testsnmp \
|
||||
tlscheck
|
||||
|
||||
TARGETS = \
|
||||
$(LIBTARGETS)
|
||||
@@ -539,6 +541,16 @@ testsnmp: testsnmp.o $(LIBCUPSSTATIC)
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# tlscheck (dependency on static CUPS library is intentional)
|
||||
#
|
||||
|
||||
tlscheck: tlscheck.o $(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ tlscheck.o $(LIBCUPSSTATIC) \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# Automatic API help files...
|
||||
#
|
||||
@@ -665,5 +677,5 @@ tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 12032 2014-07-15 20:37:32Z msweet $".
|
||||
# End of "$Id: Makefile 12635 2015-05-19 02:12:22Z msweet $".
|
||||
#
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: auth.c 12230 2014-10-21 13:55:24Z msweet $"
|
||||
* "$Id: auth.c 12619 2015-05-06 21:00:19Z msweet $"
|
||||
*
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
@@ -311,7 +311,7 @@ _cupsSetNegotiateAuthString(
|
||||
* to use it...
|
||||
*/
|
||||
|
||||
if (gss_init_sec_context == NULL)
|
||||
if (&gss_init_sec_context == NULL)
|
||||
{
|
||||
DEBUG_puts("1_cupsSetNegotiateAuthString: Weak-linked GSSAPI/Kerberos "
|
||||
"framework is not present");
|
||||
@@ -876,5 +876,5 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: auth.c 12230 2014-10-21 13:55:24Z msweet $".
|
||||
* End of "$Id: auth.c 12619 2015-05-06 21:00:19Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: cups-private.h 11851 2014-05-07 23:55:35Z msweet $"
|
||||
* "$Id: cups-private.h 12441 2015-01-29 14:42:32Z msweet $"
|
||||
*
|
||||
* Private definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 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
|
||||
@@ -281,5 +281,5 @@ extern char *_cupsUserDefault(char *name, size_t namesize);
|
||||
#endif /* !_CUPS_CUPS_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups-private.h 11851 2014-05-07 23:55:35Z msweet $".
|
||||
* End of "$Id: cups-private.h 12441 2015-01-29 14:42:32Z msweet $".
|
||||
*/
|
||||
|
||||
+17
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: cups.h 12195 2014-10-02 18:45:59Z msweet $"
|
||||
* "$Id: cups.h 12722 2015-06-08 22:00:19Z msweet $"
|
||||
*
|
||||
* API definitions for CUPS.
|
||||
*
|
||||
@@ -35,6 +35,15 @@ typedef off_t ssize_t; /* @private@ */
|
||||
# include "language.h"
|
||||
# include "pwg.h"
|
||||
|
||||
/*
|
||||
* Define _PPD_DEPRECATED to silence the warnings about PPD functions being
|
||||
* deprecated...
|
||||
*/
|
||||
|
||||
# ifndef _PPD_DEPRECATED
|
||||
# define _PPD_DEPRECATED _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.")
|
||||
# endif /* !_PPD_DEPRECATED */
|
||||
|
||||
|
||||
/*
|
||||
* C++ magic...
|
||||
@@ -49,10 +58,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0001
|
||||
# define CUPS_VERSION 2.0100
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 0
|
||||
# define CUPS_VERSION_PATCH 1
|
||||
# define CUPS_VERSION_MINOR 1
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -354,8 +363,7 @@ extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG("Use cupsGetDes
|
||||
extern const char *cupsGetDefault(void);
|
||||
extern int cupsGetJobs(cups_job_t **jobs, const char *name,
|
||||
int myjobs, int whichjobs);
|
||||
extern const char *cupsGetPPD(const char *name)
|
||||
_CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead.");
|
||||
extern const char *cupsGetPPD(const char *name) _PPD_DEPRECATED;
|
||||
extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_MSG("Use cupsGetDests instead.");
|
||||
extern ipp_status_t cupsLastError(void);
|
||||
extern int cupsPrintFile(const char *name, const char *filename,
|
||||
@@ -413,8 +421,7 @@ extern int cupsGetDests2(http_t *http, cups_dest_t **dests)
|
||||
extern int cupsGetJobs2(http_t *http, cups_job_t **jobs,
|
||||
const char *name, int myjobs,
|
||||
int whichjobs) _CUPS_API_1_1_21;
|
||||
extern const char *cupsGetPPD2(http_t *http, const char *name)
|
||||
_CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo instead.");
|
||||
extern const char *cupsGetPPD2(http_t *http, const char *name) _PPD_DEPRECATED;
|
||||
extern int cupsPrintFile2(http_t *http, const char *name,
|
||||
const char *filename,
|
||||
const char *title, int num_options,
|
||||
@@ -479,7 +486,7 @@ extern const char *cupsGetPassword2(const char *prompt, http_t *http,
|
||||
const char *resource) _CUPS_API_1_4;
|
||||
extern http_status_t cupsGetPPD3(http_t *http, const char *name,
|
||||
time_t *modtime, char *buffer,
|
||||
size_t bufsize) _CUPS_API_1_4;
|
||||
size_t bufsize) _PPD_DEPRECATED;
|
||||
extern ipp_t *cupsGetResponse(http_t *http,
|
||||
const char *resource) _CUPS_API_1_4;
|
||||
extern ssize_t cupsReadResponseData(http_t *http, char *buffer,
|
||||
@@ -628,5 +635,5 @@ extern int cupsSetServerCredentials(const char *path, const char *common_name,
|
||||
#endif /* !_CUPS_CUPS_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups.h 12195 2014-10-02 18:45:59Z msweet $".
|
||||
* End of "$Id: cups.h 12722 2015-06-08 22:00:19Z msweet $".
|
||||
*/
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: debug.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: debug.c 12327 2014-12-09 20:38:39Z 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 12327 2014-12-09 20:38:39Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dest.c 12094 2014-08-19 12:15:11Z msweet $"
|
||||
* "$Id: dest.c 12722 2015-06-08 22:00:19Z 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...
|
||||
@@ -3942,5 +3943,5 @@ cups_make_string(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest.c 12094 2014-08-19 12:15:11Z msweet $".
|
||||
* End of "$Id: dest.c 12722 2015-06-08 22:00:19Z msweet $".
|
||||
*/
|
||||
|
||||
+7
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: encode.c 11733 2014-03-25 18:01:41Z msweet $"
|
||||
* "$Id: encode.c 12668 2015-05-27 19:30:32Z msweet $"
|
||||
*
|
||||
* Option encoding 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
|
||||
@@ -117,6 +117,9 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "copies", IPP_TAG_INTEGER, IPP_TAG_JOB,
|
||||
IPP_TAG_DOCUMENT },
|
||||
{ 0, "copies-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "date-time-at-completed",IPP_TAG_DATE, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "date-time-at-creation", IPP_TAG_DATE, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "date-time-at-processing",IPP_TAG_DATE, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "device-uri", IPP_TAG_URI, IPP_TAG_PRINTER },
|
||||
{ 1, "document-copies", IPP_TAG_RANGE, IPP_TAG_JOB,
|
||||
IPP_TAG_DOCUMENT,
|
||||
@@ -274,6 +277,7 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "print-quality-default", IPP_TAG_ENUM, IPP_TAG_PRINTER },
|
||||
{ 1, "printer-commands", IPP_TAG_KEYWORD, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-error-policy", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-geo-location", IPP_TAG_URI, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-info", IPP_TAG_TEXT, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-accepting-jobs", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "printer-is-shared", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
@@ -849,5 +853,5 @@ compare_ipp_options(_ipp_option_t *a, /* I - First option */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: encode.c 11733 2014-03-25 18:01:41Z msweet $".
|
||||
* End of "$Id: encode.c 12668 2015-05-27 19:30:32Z msweet $".
|
||||
*/
|
||||
|
||||
+115
-34
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.c 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: file.c 12641 2015-05-19 15:04:39Z 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 12641 2015-05-19 15:04:39Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: globals.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: globals.c 12480 2015-02-03 12:36:34Z 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
|
||||
/*
|
||||
@@ -394,5 +394,5 @@ cups_globals_init(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: globals.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: globals.c 12480 2015-02-03 12:36:34Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: http-private.h 12243 2014-11-12 12:12:59Z msweet $"
|
||||
* "$Id: http-private.h 12645 2015-05-20 01:20:52Z 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
|
||||
@@ -126,6 +126,7 @@ extern CFAbsoluteTime SecCertificateNotValidAfter(SecCertificateRef certificate)
|
||||
|
||||
# ifndef WIN32
|
||||
# include <net/if.h>
|
||||
# include <resolv.h>
|
||||
# ifdef HAVE_GETIFADDRS
|
||||
# include <ifaddrs.h>
|
||||
# else
|
||||
@@ -161,8 +162,11 @@ extern "C" {
|
||||
#define _HTTP_RESOLVE_FQDN 2 /* Resolve to a FQDN */
|
||||
#define _HTTP_RESOLVE_FAXOUT 4 /* Resolve FaxOut service? */
|
||||
|
||||
#define _HTTP_TLS_NONE 0 /* No TLS options */
|
||||
#define _HTTP_TLS_ALLOW_RC4 1 /* Allow RC4 cipher suites */
|
||||
#define _HTTP_TLS_ALLOW_SSL3 2 /* Allow SSL 3.0 */
|
||||
#define _HTTP_TLS_ALLOW_DH 4 /* Allow DH/DHE key negotiation */
|
||||
#define _HTTP_TLS_DENY_TLS10 16 /* Deny TLS 1.0 */
|
||||
|
||||
|
||||
/*
|
||||
@@ -186,10 +190,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,
|
||||
@@ -442,5 +442,5 @@ extern int _httpWait(http_t *http, int msec, int usessl);
|
||||
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http-private.h 12243 2014-11-12 12:12:59Z msweet $".
|
||||
* End of "$Id: http-private.h 12645 2015-05-20 01:20:52Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http.c 12230 2014-10-21 13:55:24Z msweet $"
|
||||
* "$Id: http.c 12333 2014-12-09 21:01:46Z msweet $"
|
||||
*
|
||||
* HTTP routines for CUPS.
|
||||
*
|
||||
@@ -4032,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)
|
||||
{
|
||||
@@ -4850,5 +4850,5 @@ http_write_chunk(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http.c 12230 2014-10-21 13:55:24Z msweet $".
|
||||
* End of "$Id: http.c 12333 2014-12-09 21:01:46Z msweet $".
|
||||
*/
|
||||
|
||||
+18
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp-support.c 12194 2014-10-02 18:44:36Z msweet $"
|
||||
* "$Id: ipp-support.c 12666 2015-05-25 19:38:09Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol support functions for CUPS.
|
||||
*
|
||||
@@ -195,7 +195,7 @@ static const char * const ipp_std_ops[] =
|
||||
"Suspend-Current-Job",
|
||||
"Resume-Job",
|
||||
|
||||
/* 0x0030 - 0x003e */
|
||||
/* 0x0030 - 0x003f */
|
||||
"Promote-Job",
|
||||
"Schedule-Job-After",
|
||||
"0x0032",
|
||||
@@ -210,7 +210,21 @@ static const char * const ipp_std_ops[] =
|
||||
"Close-Job",
|
||||
"Identify-Printer",
|
||||
"Validate-Document",
|
||||
"Send-Hardcopy-Document"
|
||||
"Send-Hardcopy-Document",
|
||||
"Acknowledge-Document",
|
||||
|
||||
/* 0x0040 - 0x004a */
|
||||
"Acknowledge-Identify-Printer",
|
||||
"Acknowledge-Job",
|
||||
"Fetch-Document",
|
||||
"Fetch-Job",
|
||||
"Get-Output-Device-Attributes",
|
||||
"Update-Active-Jobs",
|
||||
"Deregister-Output-Device",
|
||||
"Update-Document-Status",
|
||||
"Update-Job-Status",
|
||||
"Update-Output-Device-Attributes",
|
||||
"Get-Next-Document-Data"
|
||||
},
|
||||
* const ipp_cups_ops[] =
|
||||
{
|
||||
@@ -2271,5 +2285,5 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-support.c 12194 2014-10-02 18:44:36Z msweet $".
|
||||
* End of "$Id: ipp-support.c 12666 2015-05-25 19:38:09Z msweet $".
|
||||
*/
|
||||
|
||||
+21
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12093 2014-08-19 12:10:17Z msweet $"
|
||||
* "$Id: ipp.c 12468 2015-02-01 04:50:43Z 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
|
||||
@@ -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 12093 2014-08-19 12:10:17Z msweet $".
|
||||
* End of "$Id: ipp.c 12468 2015-02-01 04:50:43Z msweet $".
|
||||
*/
|
||||
|
||||
+40
-27
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.h 11806 2014-04-09 16:12:27Z msweet $"
|
||||
* "$Id: ipp.h 12666 2015-05-25 19:38:09Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol definitions for CUPS.
|
||||
*
|
||||
@@ -246,11 +246,11 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_CUPS_INVALID = -1, /* Invalid operation name for @link ippOpValue@ */
|
||||
IPP_OP_CUPS_NONE = 0, /* No operation @private@ */
|
||||
IPP_OP_PRINT_JOB = 0x0002, /* Print a single file */
|
||||
IPP_OP_PRINT_URI, /* Print a single URL @private@ */
|
||||
IPP_OP_PRINT_URI, /* Print a single URL */
|
||||
IPP_OP_VALIDATE_JOB, /* Validate job options */
|
||||
IPP_OP_CREATE_JOB, /* Create an empty print job */
|
||||
IPP_OP_SEND_DOCUMENT, /* Add a file to a job */
|
||||
IPP_OP_SEND_URI, /* Add a URL to a job @private@ */
|
||||
IPP_OP_SEND_URI, /* Add a URL to a job */
|
||||
IPP_OP_CANCEL_JOB, /* Cancel a job */
|
||||
IPP_OP_GET_JOB_ATTRIBUTES, /* Get job attributes */
|
||||
IPP_OP_GET_JOBS, /* Get a list of jobs */
|
||||
@@ -261,7 +261,7 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_PAUSE_PRINTER = 0x0010, /* Stop a printer */
|
||||
IPP_OP_RESUME_PRINTER, /* Start a printer */
|
||||
IPP_OP_PURGE_JOBS, /* Cancel all jobs */
|
||||
IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@ */
|
||||
IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes */
|
||||
IPP_OP_SET_JOB_ATTRIBUTES, /* Set job attributes */
|
||||
IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */
|
||||
IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS, /* Create one or more printer subscriptions @since CUPS 1.2/OS X 10.5@ */
|
||||
@@ -279,32 +279,45 @@ typedef enum ipp_op_e /**** IPP operations ****/
|
||||
IPP_OP_ENABLE_PRINTER, /* Start a printer */
|
||||
IPP_OP_DISABLE_PRINTER, /* Stop a printer */
|
||||
IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB,
|
||||
/* Stop printer after the current job @private@ */
|
||||
IPP_OP_HOLD_NEW_JOBS, /* Hold new jobs @private@ */
|
||||
IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release new jobs @private@ */
|
||||
IPP_OP_DEACTIVATE_PRINTER, /* Stop a printer @private@ */
|
||||
IPP_OP_ACTIVATE_PRINTER, /* Start a printer @private@ */
|
||||
IPP_OP_RESTART_PRINTER, /* Restart a printer @private@ */
|
||||
IPP_OP_SHUTDOWN_PRINTER, /* Turn a printer off @private@ */
|
||||
IPP_OP_STARTUP_PRINTER, /* Turn a printer on @private@ */
|
||||
IPP_OP_REPROCESS_JOB, /* Reprint a job @private@ */
|
||||
IPP_OP_CANCEL_CURRENT_JOB, /* Cancel the current job @private@ */
|
||||
IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend the current job @private@ */
|
||||
IPP_OP_RESUME_JOB, /* Resume the current job @private@ */
|
||||
IPP_OP_PROMOTE_JOB, /* Promote a job to print sooner @private@ */
|
||||
IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after another @private@ */
|
||||
IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document @private@ */
|
||||
IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes @private@ */
|
||||
IPP_OP_GET_DOCUMENTS, /* Get-Documents @private@ */
|
||||
IPP_OP_DELETE_DOCUMENT, /* Delete-Document @private@ */
|
||||
IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes @private@ */
|
||||
/* Stop printer after the current job */
|
||||
IPP_OP_HOLD_NEW_JOBS, /* Hold new jobs */
|
||||
IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release new jobs */
|
||||
IPP_OP_DEACTIVATE_PRINTER, /* Stop a printer */
|
||||
IPP_OP_ACTIVATE_PRINTER, /* Start a printer */
|
||||
IPP_OP_RESTART_PRINTER, /* Restart a printer */
|
||||
IPP_OP_SHUTDOWN_PRINTER, /* Turn a printer off */
|
||||
IPP_OP_STARTUP_PRINTER, /* Turn a printer on */
|
||||
IPP_OP_REPROCESS_JOB, /* Reprint a job */
|
||||
IPP_OP_CANCEL_CURRENT_JOB, /* Cancel the current job */
|
||||
IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend the current job */
|
||||
IPP_OP_RESUME_JOB, /* Resume the current job */
|
||||
IPP_OP_PROMOTE_JOB, /* Promote a job to print sooner */
|
||||
IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after another */
|
||||
IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document */
|
||||
IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes */
|
||||
IPP_OP_GET_DOCUMENTS, /* Get-Documents */
|
||||
IPP_OP_DELETE_DOCUMENT, /* Delete-Document */
|
||||
IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes */
|
||||
IPP_OP_CANCEL_JOBS, /* Cancel-Jobs */
|
||||
IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs */
|
||||
IPP_OP_RESUBMIT_JOB, /* Resubmit-Job */
|
||||
IPP_OP_CLOSE_JOB, /* Close-Job */
|
||||
IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer @private@ */
|
||||
IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document @private@ */
|
||||
IPP_OP_SEND_HARDCOPY_DOCUMENT, /* Send-Hardcopy-Document @private@ */
|
||||
IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer */
|
||||
IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document */
|
||||
IPP_OP_SEND_HARDCOPY_DOCUMENT, /* Send-Hardcopy-Document */
|
||||
IPP_OP_ACKNOWLEDGE_DOCUMENT, /* Acknowledge-Document */
|
||||
IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER, /* Acknowledge-Identify-Printer */
|
||||
IPP_OP_ACKNOWLEDGE_JOB, /* Acknowledge-Job */
|
||||
IPP_OP_FETCH_DOCUMENT, /* Fetch-Document */
|
||||
IPP_OP_FETCH_JOB, /* Fetch-Job */
|
||||
IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES, /* Get-Output-Device-Attributes */
|
||||
IPP_OP_UPDATE_ACTIVE_JOBS, /* Update-Active-Jobs */
|
||||
IPP_OP_DEREGISTER_OUTPUT_DEVICE, /* Deregister-Output-Device */
|
||||
IPP_OP_UPDATE_DOCUMENT_STATUS, /* Update-Document-Status */
|
||||
IPP_OP_UPDATE_JOB_STATUS, /* Update-Job-Status */
|
||||
IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES,
|
||||
/* Update-Output-Device-Attributes */
|
||||
IPP_OP_GET_NEXT_DOCUMENT_DATA, /* Get-Next-Document-Data */
|
||||
|
||||
IPP_OP_PRIVATE = 0x4000, /* Reserved @private@ */
|
||||
IPP_OP_CUPS_GET_DEFAULT, /* Get the default printer */
|
||||
@@ -1021,5 +1034,5 @@ extern const char *ippStateString(ipp_state_t state) _CUPS_API_2_0;
|
||||
#endif /* !_CUPS_IPP_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.h 11806 2014-04-09 16:12:27Z msweet $".
|
||||
* End of "$Id: ipp.h 12666 2015-05-25 19:38:09Z msweet $".
|
||||
*/
|
||||
|
||||
+34
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: language.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: language.c 12262 2014-11-19 15:18:33Z 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 12262 2014-11-19 15:18:33Z msweet $".
|
||||
*/
|
||||
|
||||
+9
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: mark.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: mark.c 12258 2014-11-19 12:38:44Z msweet $"
|
||||
*
|
||||
* Option marking routines for CUPS.
|
||||
*
|
||||
@@ -514,6 +514,12 @@ ppdMarkDefaults(ppd_file_t *ppd) /* I - PPD file record */
|
||||
|
||||
for (i = ppd->num_groups, g = ppd->groups; i > 0; i --, g ++)
|
||||
ppd_defaults(ppd, g);
|
||||
|
||||
/*
|
||||
* Finally, tag any conflicts (API compatibility) once at the end.
|
||||
*/
|
||||
|
||||
ppdConflicts(ppd);
|
||||
}
|
||||
|
||||
|
||||
@@ -710,7 +716,7 @@ ppd_defaults(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
for (i = g->num_options, o = g->options; i > 0; i --, o ++)
|
||||
if (_cups_strcasecmp(o->keyword, "PageRegion") != 0)
|
||||
ppdMarkOption(ppd, o->keyword, o->defchoice);
|
||||
ppd_mark_option(ppd, o->keyword, o->defchoice);
|
||||
|
||||
for (i = g->num_subgroups, sg = g->subgroups; i > 0; i --, sg ++)
|
||||
ppd_defaults(ppd, sg);
|
||||
@@ -1078,5 +1084,5 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: mark.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: mark.c 12258 2014-11-19 12:38:44Z msweet $".
|
||||
*/
|
||||
|
||||
+971
-3
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ppd-private.h 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: ppd-private.h 12722 2015-06-08 22:00:19Z msweet $"
|
||||
*
|
||||
* Private PPD 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
|
||||
@@ -49,7 +49,7 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define _PPD_CACHE_VERSION 6 /* Version number in cache file */
|
||||
# define _PPD_CACHE_VERSION 7 /* Version number in cache file */
|
||||
|
||||
|
||||
/*
|
||||
@@ -155,6 +155,7 @@ struct _ppd_cache_s /**** PPD cache and PWG conversion data ****/
|
||||
* Prototypes...
|
||||
*/
|
||||
|
||||
extern int _cupsConvertOptions(ipp_t *request, ppd_file_t *ppd, _ppd_cache_t *pc, ipp_attribute_t *media_col_sup, ipp_attribute_t *doc_handling_sup, ipp_attribute_t *print_color_mode_sup, const char *user, const char *format, int copies, int num_options, cups_option_t *options);
|
||||
extern _ppd_cache_t *_ppdCacheCreateWithFile(const char *filename,
|
||||
ipp_t **attrs);
|
||||
extern _ppd_cache_t *_ppdCacheCreateWithPPD(ppd_file_t *ppd);
|
||||
@@ -187,6 +188,7 @@ extern const char *_ppdCacheGetType(_ppd_cache_t *pc,
|
||||
const char *media_type);
|
||||
extern int _ppdCacheWriteFile(_ppd_cache_t *pc,
|
||||
const char *filename, ipp_t *attrs);
|
||||
extern char *_ppdCreateFromIPP(char *buffer, size_t bufsize, ipp_t *response);
|
||||
extern void _ppdFreeLanguages(cups_array_t *languages);
|
||||
extern cups_encoding_t _ppdGetEncoding(const char *name);
|
||||
extern cups_array_t *_ppdGetLanguages(ppd_file_t *ppd);
|
||||
@@ -221,5 +223,5 @@ extern const char *_pwgPageSizeForMedia(pwg_media_t *media,
|
||||
#endif /* !_CUPS_PPD_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-private.h 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: ppd-private.h 12722 2015-06-08 22:00:19Z msweet $".
|
||||
*/
|
||||
|
||||
+12
-3
@@ -14,7 +14,7 @@
|
||||
*%
|
||||
*% Copyright 2007-2010 by Apple Inc.
|
||||
*% Copyright 2002-2006 by Easy Software Products.
|
||||
*%
|
||||
*%
|
||||
*% These coded instructions, statements, and computer programs are the
|
||||
*% property of Apple Inc. and are protected by Federal copyright
|
||||
*% law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
@@ -22,7 +22,7 @@
|
||||
*% file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*FormatVersion: "4.3"
|
||||
*FileVersion: "1.3"
|
||||
*LanguageVersion: English
|
||||
*LanguageVersion: English
|
||||
*LanguageEncoding: ISOLatin1
|
||||
*PCFileName: "TEST.PPD"
|
||||
*Manufacturer: "ESP"
|
||||
@@ -104,7 +104,7 @@
|
||||
*fr_CA.PageRegion A4/French Canadian A4: ""
|
||||
*fr_CA.PageRegion Env10/French Canadian #10 Envelope: ""
|
||||
|
||||
*DefaultImageableArea: Letter
|
||||
*DefaultImageableArea: Letter
|
||||
*ImageableArea Letter: "18 36 594 756"
|
||||
*ImageableArea Letter.Banner: "18 0 594 792"
|
||||
*ImageableArea Letter.Fullbleed: "0 0 612 792"
|
||||
@@ -145,6 +145,15 @@
|
||||
*MediaType Transparency/Transparency Film: "MediaType=Transparency"
|
||||
*CloseUI: *MediaType
|
||||
|
||||
*OpenUI *OutputBin/Output Tray: PickOne
|
||||
*OrderDependency: 25 AnySetup *OutputBin
|
||||
*DefaultOutputBin: Tray1
|
||||
*OutputBin Auto/Automatic Tray: "OutputBin=Auto"
|
||||
*OutputBin Tray1/Tray 1: "OutputBin=Tray1"
|
||||
*OutputBin Tray2/Tray 2: "OutputBin=Tray2"
|
||||
*OutputBin MainTray/Main Tray: "OutputBin=MainTray"
|
||||
*CloseUI: *OutputBin
|
||||
|
||||
*OpenUI *Duplex/2-Sided Printing: PickOne
|
||||
*OrderDependency: 10 DocumentSetup *Duplex
|
||||
*DefaultDuplex: None
|
||||
|
||||
+22
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: testfile.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: testfile.c 12577 2015-03-30 19:07:17Z 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 12577 2015-03-30 19:07:17Z msweet $".
|
||||
*/
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testhttp.c 12028 2014-07-15 14:01:27Z msweet $"
|
||||
* "$Id: testhttp.c 12678 2015-05-28 19:09:48Z msweet $"
|
||||
*
|
||||
* HTTP test program for CUPS.
|
||||
*
|
||||
@@ -645,7 +645,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
if (lcreds && cupsArrayCount(creds) == cupsArrayCount(lcreds))
|
||||
{
|
||||
int i;
|
||||
http_credential_t *cred, *lcred;
|
||||
|
||||
for (i = 1, cred = (http_credential_t *)cupsArrayFirst(creds), lcred = (http_credential_t *)cupsArrayFirst(lcreds);
|
||||
@@ -890,5 +889,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testhttp.c 12028 2014-07-15 14:01:27Z msweet $".
|
||||
* End of "$Id: testhttp.c 12678 2015-05-28 19:09:48Z msweet $".
|
||||
*/
|
||||
|
||||
+67
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: testppd.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: testppd.c 12603 2015-05-06 01:42:51Z msweet $"
|
||||
*
|
||||
* PPD test program 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
|
||||
@@ -51,6 +51,11 @@ static const char *default_code =
|
||||
"%%EndFeature\n"
|
||||
"} stopped cleartomark\n"
|
||||
"[{\n"
|
||||
"%%BeginFeature: *OutputBin Tray1\n"
|
||||
"OutputBin=Tray1\n"
|
||||
"%%EndFeature\n"
|
||||
"} stopped cleartomark\n"
|
||||
"[{\n"
|
||||
"%%BeginFeature: *MediaType Plain\n"
|
||||
"MediaType=Plain\n"
|
||||
"%%EndFeature\n"
|
||||
@@ -80,6 +85,11 @@ static const char *custom_code =
|
||||
"%%EndFeature\n"
|
||||
"} stopped cleartomark\n"
|
||||
"[{\n"
|
||||
"%%BeginFeature: *OutputBin Tray1\n"
|
||||
"OutputBin=Tray1\n"
|
||||
"%%EndFeature\n"
|
||||
"} stopped cleartomark\n"
|
||||
"[{\n"
|
||||
"%%BeginFeature: *IntOption None\n"
|
||||
"%%EndFeature\n"
|
||||
"} stopped cleartomark\n"
|
||||
@@ -853,13 +863,66 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
status ++;
|
||||
}
|
||||
}
|
||||
else if (!strncmp(argv[1], "ipp://", 6) || !strncmp(argv[1], "ipps://", 7))
|
||||
{
|
||||
/*
|
||||
* ipp://... or ipps://...
|
||||
*/
|
||||
|
||||
http_t *http; /* Connection to printer */
|
||||
ipp_t *request, /* Get-Printer-Attributes request */
|
||||
*response; /* Get-Printer-Attributes response */
|
||||
char scheme[32], /* URI scheme */
|
||||
userpass[256], /* Username:password */
|
||||
host[256], /* Hostname */
|
||||
resource[256]; /* Resource path */
|
||||
int port; /* Port number */
|
||||
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, argv[1], scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK)
|
||||
{
|
||||
printf("Bad URI \"%s\".\n", argv[1]);
|
||||
return (1);
|
||||
}
|
||||
|
||||
http = httpConnect2(host, port, NULL, AF_UNSPEC, !strcmp(scheme, "ipps") ? HTTP_ENCRYPTION_ALWAYS : HTTP_ENCRYPTION_IF_REQUESTED, 1, 30000, NULL);
|
||||
if (!http)
|
||||
{
|
||||
printf("Unable to connect to \"%s:%d\": %s\n", host, port, cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, argv[1]);
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
if (_ppdCreateFromIPP(buffer, sizeof(buffer), response))
|
||||
printf("Created PPD: %s\n", buffer);
|
||||
else
|
||||
puts("Unable to create PPD.");
|
||||
|
||||
ippDelete(response);
|
||||
httpClose(http);
|
||||
return (0);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *filename; /* PPD filename */
|
||||
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 +1170,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 12603 2015-05-06 01:42:51Z msweet $".
|
||||
*/
|
||||
|
||||
+73
-17
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: tls-darwin.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: tls-darwin.c 12675 2015-05-28 01:14:32Z 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
|
||||
@@ -26,14 +26,6 @@
|
||||
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...
|
||||
*/
|
||||
@@ -49,8 +41,8 @@ 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 */
|
||||
static int tls_options = -1;/* Options for TLS connections */
|
||||
|
||||
|
||||
/*
|
||||
@@ -546,6 +538,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...
|
||||
*/
|
||||
@@ -1014,7 +1009,14 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
http_credential_t *credential; /* Credential data */
|
||||
|
||||
|
||||
DEBUG_printf(("7_httpTLSStart(http=%p)", http));
|
||||
DEBUG_printf(("3_httpTLSStart(http=%p)", http));
|
||||
|
||||
if (tls_options < 0)
|
||||
{
|
||||
DEBUG_puts("4_httpTLSStart: Setting defaults.");
|
||||
_cupsSetDefaults();
|
||||
DEBUG_printf(("4_httpTLSStart: tls_options=%x", tls_options));
|
||||
}
|
||||
|
||||
#ifdef HAVE_SECKEYCHAINOPEN
|
||||
if (http->mode == _HTTP_MODE_SERVER && !tls_keychain)
|
||||
@@ -1058,11 +1060,20 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
|
||||
if (!error)
|
||||
{
|
||||
error = SSLSetProtocolVersionMin(http->tls, (tls_options & _HTTP_TLS_ALLOW_SSL3) ? kSSLProtocol3 : kTLSProtocol1);
|
||||
DEBUG_printf(("4_httpTLSStart: SSLSetProtocolVersionMin, error=%d", (int)error));
|
||||
SSLProtocol minProtocol;
|
||||
|
||||
if (tls_options & _HTTP_TLS_DENY_TLS10)
|
||||
minProtocol = kTLSProtocol11;
|
||||
else if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
minProtocol = kSSLProtocol3;
|
||||
else
|
||||
minProtocol = kTLSProtocol1;
|
||||
|
||||
error = SSLSetProtocolVersionMin(http->tls, minProtocol);
|
||||
DEBUG_printf(("4_httpTLSStart: SSLSetProtocolVersionMin(%d), error=%d", minProtocol, (int)error));
|
||||
}
|
||||
|
||||
# if USE_SET_ENABLED_CIPHERS
|
||||
# if HAVE_SSLSETENABLEDCIPHERS
|
||||
if (!error)
|
||||
{
|
||||
SSLCipherSuite supported[100]; /* Supported cipher suites */
|
||||
@@ -1127,6 +1138,7 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA256 :
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA384 :
|
||||
case SSL_RSA_WITH_DES_CBC_MD5 :
|
||||
DEBUG_printf(("4_httpTLSStart: Excluding insecure cipher suite %d", supported[i]));
|
||||
break;
|
||||
|
||||
/* RC4 cipher suites that should only be used as a last resort */
|
||||
@@ -1141,8 +1153,52 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
case TLS_RSA_PSK_WITH_RC4_128_SHA :
|
||||
if (tls_options & _HTTP_TLS_ALLOW_RC4)
|
||||
enabled[num_enabled ++] = supported[i];
|
||||
else
|
||||
DEBUG_printf(("4_httpTLSStart: Excluding RC4 cipher suite %d", supported[i]));
|
||||
break;
|
||||
|
||||
/* DH/DHE cipher suites that are problematic with parameters < 1024 bits */
|
||||
case TLS_DH_DSS_WITH_AES_128_CBC_SHA :
|
||||
case TLS_DH_RSA_WITH_AES_128_CBC_SHA :
|
||||
case TLS_DHE_DSS_WITH_AES_128_CBC_SHA :
|
||||
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA :
|
||||
case TLS_DH_DSS_WITH_AES_256_CBC_SHA :
|
||||
case TLS_DH_RSA_WITH_AES_256_CBC_SHA :
|
||||
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA :
|
||||
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA :
|
||||
case TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA :
|
||||
case TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA :
|
||||
// case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA :
|
||||
case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA :
|
||||
case TLS_DH_DSS_WITH_AES_128_CBC_SHA256 :
|
||||
case TLS_DH_RSA_WITH_AES_128_CBC_SHA256 :
|
||||
case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 :
|
||||
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 :
|
||||
case TLS_DH_DSS_WITH_AES_256_CBC_SHA256 :
|
||||
case TLS_DH_RSA_WITH_AES_256_CBC_SHA256 :
|
||||
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 :
|
||||
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 :
|
||||
case TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA :
|
||||
case TLS_DHE_PSK_WITH_AES_128_CBC_SHA :
|
||||
case TLS_DHE_PSK_WITH_AES_256_CBC_SHA :
|
||||
// case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 :
|
||||
// case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 :
|
||||
case TLS_DH_RSA_WITH_AES_128_GCM_SHA256 :
|
||||
case TLS_DH_RSA_WITH_AES_256_GCM_SHA384 :
|
||||
// case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 :
|
||||
// case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 :
|
||||
case TLS_DH_DSS_WITH_AES_128_GCM_SHA256 :
|
||||
case TLS_DH_DSS_WITH_AES_256_GCM_SHA384 :
|
||||
case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 :
|
||||
case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 :
|
||||
case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 :
|
||||
case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 :
|
||||
if (tls_options & _HTTP_TLS_ALLOW_DH)
|
||||
enabled[num_enabled ++] = supported[i];
|
||||
else
|
||||
DEBUG_printf(("4_httpTLSStart: Excluding DH/DHE cipher suite %d", supported[i]));
|
||||
break;
|
||||
|
||||
/* Anything else we'll assume is secure */
|
||||
default :
|
||||
enabled[num_enabled ++] = supported[i];
|
||||
@@ -1154,7 +1210,7 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
error = SSLSetEnabledCiphers(http->tls, enabled, num_enabled);
|
||||
}
|
||||
}
|
||||
#endif /* USE_SET_ENABLED_CIPHERS */
|
||||
#endif /* HAVE_SSLSETENABLEDCIPHERS */
|
||||
|
||||
if (!error && http->mode == _HTTP_MODE_CLIENT)
|
||||
{
|
||||
@@ -1779,5 +1835,5 @@ http_cdsa_write(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-darwin.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* End of "$Id: tls-darwin.c 12675 2015-05-28 01:14:32Z msweet $".
|
||||
*/
|
||||
|
||||
+40
-12
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: tls-gnutls.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: tls-gnutls.c 12670 2015-05-27 19:48:05Z 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
|
||||
@@ -36,7 +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 */
|
||||
static int tls_options = -1;/* Options for TLS connections */
|
||||
|
||||
|
||||
/*
|
||||
@@ -407,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...
|
||||
*/
|
||||
@@ -1025,9 +1028,18 @@ _httpTLSStart(http_t *http) /* I - Connection to server */
|
||||
int status; /* Status of handshake */
|
||||
gnutls_certificate_credentials_t *credentials;
|
||||
/* TLS credentials */
|
||||
char priority_string[1024];
|
||||
/* Priority string */
|
||||
|
||||
|
||||
DEBUG_printf(("7_httpTLSStart(http=%p)", http));
|
||||
DEBUG_printf(("3_httpTLSStart(http=%p)", http));
|
||||
|
||||
if (tls_options < 0)
|
||||
{
|
||||
DEBUG_puts("4_httpTLSStart: Setting defaults.");
|
||||
_cupsSetDefaults();
|
||||
DEBUG_printf(("4_httpTLSStart: tls_options=%x", tls_options));
|
||||
}
|
||||
|
||||
if (http->mode == _HTTP_MODE_SERVER && !tls_keypath)
|
||||
{
|
||||
@@ -1107,7 +1119,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])
|
||||
{
|
||||
/*
|
||||
@@ -1197,14 +1208,31 @@ _httpTLSStart(http_t *http) /* I - Connection to server */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
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);
|
||||
strlcpy(priority_string, "NORMAL", sizeof(priority_string));
|
||||
|
||||
if (tls_options & _HTTP_TLS_DENY_TLS10)
|
||||
strlcat(priority_string, ":+VERS-TLS-ALL:-VERS-TLS1.0:-VERS-SSL3.0", sizeof(priority_string));
|
||||
else if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:VERS-TLS-ALL", NULL);
|
||||
strlcat(priority_string, ":+VERS-TLS-ALL", sizeof(priority_string));
|
||||
else
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
strlcat(priority_string, ":+VERS-TLS-ALL:-VERS-SSL3.0", sizeof(priority_string));
|
||||
|
||||
if (!(tls_options & _HTTP_TLS_ALLOW_RC4))
|
||||
strlcat(priority_string, ":-ARCFOUR-128", sizeof(priority_string));
|
||||
|
||||
if (!(tls_options & _HTTP_TLS_ALLOW_DH))
|
||||
strlcat(priority_string, ":!ANON-DH", sizeof(priority_string));
|
||||
|
||||
#ifdef HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
||||
gnutls_priority_set_direct(http->tls, priority_string, NULL);
|
||||
|
||||
#else
|
||||
gnutls_priority_t priority; /* Priority */
|
||||
|
||||
gnutls_priority_init(&priority, priority_string, 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);
|
||||
@@ -1313,5 +1341,5 @@ _httpTLSWrite(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-gnutls.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* End of "$Id: tls-gnutls.c 12670 2015-05-27 19:48:05Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-8
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* "$Id: tls-sspi.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: tls-sspi.c 12647 2015-05-20 18:37:52Z msweet $"
|
||||
*
|
||||
* 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
|
||||
@@ -54,7 +54,7 @@
|
||||
* Local globals...
|
||||
*/
|
||||
|
||||
static int tls_options = 0;/* Options for TLS connections */
|
||||
static int tls_options = -1;/* Options for TLS connections */
|
||||
|
||||
|
||||
/*
|
||||
@@ -262,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;
|
||||
|
||||
@@ -927,7 +930,14 @@ _httpTLSStart(http_t *http) /* I - HTTP connection */
|
||||
*hostptr; /* Pointer into hostname */
|
||||
|
||||
|
||||
DEBUG_printf(("7_httpTLSStart(http=%p)", http));
|
||||
DEBUG_printf(("3_httpTLSStart(http=%p)", http));
|
||||
|
||||
if (tls_options < 0)
|
||||
{
|
||||
DEBUG_puts("4_httpTLSStart: Setting defaults.");
|
||||
_cupsSetDefaults();
|
||||
DEBUG_printf(("4_httpTLSStart: tls_options=%x", tls_options));
|
||||
}
|
||||
|
||||
if ((http->tls = http_sspi_alloc()) == NULL)
|
||||
return (-1);
|
||||
@@ -1753,14 +1763,18 @@ http_sspi_find_credentials(
|
||||
#ifdef SP_PROT_TLS1_2_SERVER
|
||||
if (http->mode == _HTTP_MODE_SERVER)
|
||||
{
|
||||
if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
if (tls_options & _HTTP_TLS_DENY_TLS10)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_1_SERVER;
|
||||
else 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)
|
||||
if (tls_options & _HTTP_TLS_DENY_TLS10)
|
||||
SchannelCred.grbitEnabledProtocols = SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_1_CLIENT;
|
||||
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;
|
||||
@@ -1783,7 +1797,7 @@ http_sspi_find_credentials(
|
||||
}
|
||||
#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... */
|
||||
/* TODO: Support _HTTP_TLS_ALLOW_RC4 and _HTTP_TLS_ALLOW_DH options; right now we'll rely on Windows registry to enable/disable RC4/DH... */
|
||||
|
||||
/*
|
||||
* Create an SSPI credential.
|
||||
@@ -2413,5 +2427,5 @@ http_sspi_verify(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-sspi.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* End of "$Id: tls-sspi.c 12647 2015-05-20 18:37:52Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,739 @@
|
||||
/*
|
||||
* "$Id: tlscheck.c 12688 2015-06-03 17:31:30Z msweet $"
|
||||
*
|
||||
* TLS check program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
|
||||
* which should have been included with this file. If this file is
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
#include "cups-private.h"
|
||||
|
||||
|
||||
#ifndef HAVE_SSL
|
||||
int main(void) { puts("Sorry, no TLS support compiled in."); return (1); }
|
||||
#else
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void usage(void);
|
||||
|
||||
|
||||
/*
|
||||
* 'main()' - Main entry.
|
||||
*/
|
||||
|
||||
int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
http_t *http; /* HTTP connection */
|
||||
const char *server = NULL; /* Hostname from command-line */
|
||||
int port = 0; /* Port number */
|
||||
const char *cipherName = "UNKNOWN";/* Cipher suite name */
|
||||
int dhBits = 0; /* Diffie-Hellman bits */
|
||||
int tlsVersion = 0; /* TLS version number */
|
||||
char uri[1024], /* Printer URI */
|
||||
scheme[32], /* URI scheme */
|
||||
host[256], /* Hostname */
|
||||
userpass[256], /* Username/password */
|
||||
resource[256]; /* Resource path */
|
||||
int tls_options = _HTTP_TLS_NONE,
|
||||
/* TLS options */
|
||||
verbose = 0; /* Verbosity */
|
||||
ipp_t *request, /* IPP Get-Printer-Attributes request */
|
||||
*response; /* IPP Get-Printer-Attributes response */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
const char *name; /* Attribute name */
|
||||
char value[1024]; /* Attribute (string) value */
|
||||
static const char * const pattrs[] = /* Requested attributes */
|
||||
{
|
||||
"color-supported",
|
||||
"compression-supported",
|
||||
"document-format-supported",
|
||||
"pages-per-minute",
|
||||
"printer-location",
|
||||
"printer-make-and-model",
|
||||
"printer-state",
|
||||
"printer-state-reasons",
|
||||
"sides-supported",
|
||||
"uri-authentication-supported",
|
||||
"uri-security-supported"
|
||||
};
|
||||
|
||||
|
||||
for (i = 1; i < argc; i ++)
|
||||
{
|
||||
if (!strcmp(argv[i], "--dh"))
|
||||
{
|
||||
tls_options |= _HTTP_TLS_ALLOW_DH;
|
||||
}
|
||||
else if (!strcmp(argv[i], "--no-tls10"))
|
||||
{
|
||||
tls_options |= _HTTP_TLS_DENY_TLS10;
|
||||
}
|
||||
else if (!strcmp(argv[i], "--rc4"))
|
||||
{
|
||||
tls_options |= _HTTP_TLS_ALLOW_RC4;
|
||||
}
|
||||
else if (!strcmp(argv[i], "--verbose") || !strcmp(argv[i], "-v"))
|
||||
{
|
||||
verbose = 1;
|
||||
}
|
||||
else if (argv[i][0] == '-')
|
||||
{
|
||||
printf("tlscheck: Unknown option '%s'.\n", argv[i]);
|
||||
usage();
|
||||
}
|
||||
else if (!server)
|
||||
{
|
||||
if (!strncmp(argv[i], "ipps://", 7))
|
||||
{
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL, argv[i], scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource));
|
||||
server = host;
|
||||
}
|
||||
else
|
||||
{
|
||||
server = argv[i];
|
||||
strlcpy(resource, "/ipp/print", sizeof(resource));
|
||||
}
|
||||
}
|
||||
else if (!port && (argv[i][0] == '=' || isdigit(argv[i][0] & 255)))
|
||||
{
|
||||
if (argv[i][0] == '=')
|
||||
port = atoi(argv[i] + 1);
|
||||
else
|
||||
port = atoi(argv[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("tlscheck: Unexpected argument '%s'.\n", argv[i]);
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (!server)
|
||||
usage();
|
||||
|
||||
if (!port)
|
||||
port = 631;
|
||||
|
||||
_httpTLSSetOptions(tls_options);
|
||||
|
||||
http = httpConnect2(server, port, NULL, AF_UNSPEC, HTTP_ENCRYPTION_ALWAYS, 1, 30000, NULL);
|
||||
if (!http)
|
||||
{
|
||||
printf("%s: ERROR (%s)\n", server, cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
SSLProtocol protocol;
|
||||
SSLCipherSuite cipher;
|
||||
char unknownCipherName[256];
|
||||
int paramsNeeded = 0;
|
||||
const void *params;
|
||||
size_t paramsLen;
|
||||
OSStatus err;
|
||||
|
||||
if ((err = SSLGetNegotiatedProtocolVersion(http->tls, &protocol)) != noErr)
|
||||
{
|
||||
printf("%s: ERROR (No protocol version - %d)\n", server, (int)err);
|
||||
httpClose(http);
|
||||
return (1);
|
||||
}
|
||||
|
||||
switch (protocol)
|
||||
{
|
||||
default :
|
||||
tlsVersion = 0;
|
||||
break;
|
||||
case kSSLProtocol3 :
|
||||
tlsVersion = 30;
|
||||
break;
|
||||
case kTLSProtocol1 :
|
||||
tlsVersion = 10;
|
||||
break;
|
||||
case kTLSProtocol11 :
|
||||
tlsVersion = 11;
|
||||
break;
|
||||
case kTLSProtocol12 :
|
||||
tlsVersion = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((err = SSLGetNegotiatedCipher(http->tls, &cipher)) != noErr)
|
||||
{
|
||||
printf("%s: ERROR (No cipher suite - %d)\n", server, (int)err);
|
||||
httpClose(http);
|
||||
return (1);
|
||||
}
|
||||
|
||||
switch (cipher)
|
||||
{
|
||||
case TLS_NULL_WITH_NULL_NULL:
|
||||
cipherName = "TLS_NULL_WITH_NULL_NULL";
|
||||
break;
|
||||
case TLS_RSA_WITH_NULL_MD5:
|
||||
cipherName = "TLS_RSA_WITH_NULL_MD5";
|
||||
break;
|
||||
case TLS_RSA_WITH_NULL_SHA:
|
||||
cipherName = "TLS_RSA_WITH_NULL_SHA";
|
||||
break;
|
||||
case TLS_RSA_WITH_RC4_128_MD5:
|
||||
cipherName = "TLS_RSA_WITH_RC4_128_MD5";
|
||||
break;
|
||||
case TLS_RSA_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_RSA_WITH_RC4_128_SHA";
|
||||
break;
|
||||
case TLS_RSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
|
||||
break;
|
||||
case TLS_RSA_WITH_NULL_SHA256:
|
||||
cipherName = "TLS_RSA_WITH_NULL_SHA256";
|
||||
break;
|
||||
case TLS_RSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_RSA_WITH_AES_128_CBC_SHA256";
|
||||
break;
|
||||
case TLS_RSA_WITH_AES_256_CBC_SHA256:
|
||||
cipherName = "TLS_RSA_WITH_AES_256_CBC_SHA256";
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_DH_DSS_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_DH_RSA_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_AES_256_CBC_SHA256:
|
||||
cipherName = "TLS_DH_DSS_WITH_AES_256_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_AES_256_CBC_SHA256:
|
||||
cipherName = "TLS_DH_RSA_WITH_AES_256_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256:
|
||||
cipherName = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA256:
|
||||
cipherName = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_RC4_128_MD5:
|
||||
cipherName = "TLS_DH_anon_WITH_RC4_128_MD5";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_DH_anon_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_AES_256_CBC_SHA256:
|
||||
cipherName = "TLS_DH_anon_WITH_AES_256_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_PSK_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_PSK_WITH_RC4_128_SHA";
|
||||
break;
|
||||
case TLS_PSK_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_PSK_WITH_3DES_EDE_CBC_SHA";
|
||||
break;
|
||||
case TLS_PSK_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_PSK_WITH_AES_128_CBC_SHA";
|
||||
break;
|
||||
case TLS_PSK_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_PSK_WITH_AES_256_CBC_SHA";
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_DHE_PSK_WITH_RC4_128_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_DHE_PSK_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_DHE_PSK_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_RSA_PSK_WITH_RC4_128_SHA";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_RSA_PSK_WITH_AES_128_CBC_SHA";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_RSA_PSK_WITH_AES_256_CBC_SHA";
|
||||
break;
|
||||
case TLS_PSK_WITH_NULL_SHA:
|
||||
cipherName = "TLS_PSK_WITH_NULL_SHA";
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_NULL_SHA:
|
||||
cipherName = "TLS_DHE_PSK_WITH_NULL_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA:
|
||||
cipherName = "TLS_RSA_PSK_WITH_NULL_SHA";
|
||||
break;
|
||||
case TLS_RSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_RSA_WITH_AES_128_GCM_SHA256";
|
||||
break;
|
||||
case TLS_RSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_RSA_WITH_AES_256_GCM_SHA384";
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_DH_RSA_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_DH_RSA_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_DH_DSS_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_DH_DSS_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_DH_anon_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_DH_anon_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_PSK_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_PSK_WITH_AES_128_GCM_SHA256";
|
||||
break;
|
||||
case TLS_PSK_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_PSK_WITH_AES_256_GCM_SHA384";
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384";
|
||||
break;
|
||||
case TLS_PSK_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_PSK_WITH_AES_128_CBC_SHA256";
|
||||
break;
|
||||
case TLS_PSK_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_PSK_WITH_AES_256_CBC_SHA384";
|
||||
break;
|
||||
case TLS_PSK_WITH_NULL_SHA256:
|
||||
cipherName = "TLS_PSK_WITH_NULL_SHA256";
|
||||
break;
|
||||
case TLS_PSK_WITH_NULL_SHA384:
|
||||
cipherName = "TLS_PSK_WITH_NULL_SHA384";
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_NULL_SHA256:
|
||||
cipherName = "TLS_DHE_PSK_WITH_NULL_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_PSK_WITH_NULL_SHA384:
|
||||
cipherName = "TLS_DHE_PSK_WITH_NULL_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA256:
|
||||
cipherName = "TLS_RSA_PSK_WITH_NULL_SHA256";
|
||||
break;
|
||||
case TLS_RSA_PSK_WITH_NULL_SHA384:
|
||||
cipherName = "TLS_RSA_PSK_WITH_NULL_SHA384";
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_RSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_RSA_WITH_AES_128_CBC_SHA";
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_DH_anon_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_RSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_RSA_WITH_AES_256_CBC_SHA";
|
||||
break;
|
||||
case TLS_DH_DSS_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_RSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_DSS_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_DH_anon_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_DH_anon_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_NULL_SHA:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_NULL_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_RC4_128_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_NULL_SHA:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_NULL_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_NULL_SHA:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_NULL_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_RC4_128_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_RSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_NULL_SHA:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_NULL_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_RC4_128_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_anon_WITH_NULL_SHA:
|
||||
cipherName = "TLS_ECDH_anon_WITH_NULL_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_anon_WITH_RC4_128_SHA:
|
||||
cipherName = "TLS_ECDH_anon_WITH_RC4_128_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_anon_WITH_AES_128_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_anon_WITH_AES_128_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
case TLS_ECDH_anon_WITH_AES_256_CBC_SHA:
|
||||
cipherName = "TLS_ECDH_anon_WITH_AES_256_CBC_SHA";
|
||||
paramsNeeded = 1;
|
||||
break;
|
||||
default :
|
||||
snprintf(unknownCipherName, sizeof(unknownCipherName), "UNKNOWN_%04X", cipher);
|
||||
cipherName = unknownCipherName;
|
||||
break;
|
||||
}
|
||||
|
||||
if (cipher == TLS_RSA_WITH_RC4_128_MD5 ||
|
||||
cipher == TLS_RSA_WITH_RC4_128_SHA)
|
||||
{
|
||||
printf("%s: ERROR (Printers MUST NOT negotiate RC4 cipher suites.)\n", server);
|
||||
httpClose(http);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if ((err = SSLGetDiffieHellmanParams(http->tls, ¶ms, ¶msLen)) != noErr && paramsNeeded)
|
||||
{
|
||||
printf("%s: ERROR (Unable to get Diffie-Hellman parameters - %d)\n", server, (int)err);
|
||||
httpClose(http);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (paramsLen < 128 && paramsLen != 0)
|
||||
{
|
||||
printf("%s: ERROR (Diffie-Hellman parameters MUST be at least 2048 bits, but Printer uses only %d bits/%d bytes)\n", server, (int)paramsLen * 8, (int)paramsLen);
|
||||
httpClose(http);
|
||||
return (1);
|
||||
}
|
||||
|
||||
dhBits = (int)paramsLen * 8;
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
if (dhBits > 0)
|
||||
printf("%s: OK (TLS: %d.%d, %s, %d DH bits)\n", server, tlsVersion / 10, tlsVersion % 10, cipherName, dhBits);
|
||||
else
|
||||
printf("%s: OK (TLS: %d.%d, %s)\n", server, tlsVersion / 10, tlsVersion % 10, cipherName);
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipps", NULL, host, port, resource);
|
||||
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
|
||||
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
for (attr = ippFirstAttribute(response); attr; attr = ippNextAttribute(response))
|
||||
{
|
||||
if (ippGetGroupTag(attr) != IPP_TAG_PRINTER)
|
||||
continue;
|
||||
|
||||
if ((name = ippGetName(attr)) == NULL)
|
||||
continue;
|
||||
|
||||
ippAttributeString(attr, value, sizeof(value));
|
||||
printf(" %s=%s\n", name, value);
|
||||
}
|
||||
|
||||
ippDelete(response);
|
||||
}
|
||||
|
||||
httpClose(http);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'usage()' - Show program usage.
|
||||
*/
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
puts("Usage: ./tlscheck [options] server [port]");
|
||||
puts(" ./tlscheck [options] ipps://server[:port]/path");
|
||||
puts("");
|
||||
puts("Options:");
|
||||
puts(" --dh Allow DH/DHE key exchange");
|
||||
puts(" --no-tls10 Disable TLS/1.0");
|
||||
puts(" --rc4 Allow RC4 encryption");
|
||||
puts(" --verbose Be verbose");
|
||||
puts(" -v Be verbose");
|
||||
puts("");
|
||||
puts("The default port is 631.");
|
||||
|
||||
exit(1);
|
||||
}
|
||||
#endif /* !HAVE_SSL */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tlscheck.c 12688 2015-06-03 17:31:30Z msweet $".
|
||||
*/
|
||||
+14
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: transcode.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: transcode.c 12330 2014-12-09 20:57:28Z 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 12330 2014-12-09 20:57:28Z msweet $"
|
||||
*/
|
||||
|
||||
+402
-311
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: usersys.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: usersys.c 12647 2015-05-20 18:37:52Z 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,22 +38,45 @@
|
||||
#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_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,
|
||||
int ssl_options);
|
||||
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);
|
||||
|
||||
|
||||
/*
|
||||
@@ -826,266 +849,63 @@ 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)
|
||||
{
|
||||
/*
|
||||
* 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, 1);
|
||||
cups_read_client_conf(fp, &cc);
|
||||
cupsFileClose(fp);
|
||||
|
||||
/*
|
||||
* Then user defaults, if it is safe to do so...
|
||||
*/
|
||||
}
|
||||
|
||||
# ifdef HAVE_GETEUID
|
||||
if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
|
||||
if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
|
||||
# elif !defined(WIN32)
|
||||
if (getuid() && (home = getenv("HOME")) != NULL)
|
||||
if (getuid() && (home = getenv("HOME")) != NULL)
|
||||
# else
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
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)
|
||||
{
|
||||
/*
|
||||
* Look for ~/.cups/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
|
||||
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, 0);
|
||||
cups_read_client_conf(fp, &cc);
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_read_client_conf()' - Read a client.conf file.
|
||||
*/
|
||||
|
||||
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 */
|
||||
int ssl_options) /* I - Allow setting of SSLOptions? */
|
||||
{
|
||||
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 */
|
||||
#ifdef HAVE_GSSAPI
|
||||
char gss_service_name[32]; /* GSSServiceName value */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
|
||||
/*
|
||||
* Read from the file...
|
||||
* Finalize things so every client.conf value is 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;
|
||||
}
|
||||
#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;
|
||||
}
|
||||
#endif /* HAVE_GSSAPI */
|
||||
else if (ssl_options && !_cups_strcasecmp(line, "SSLOptions") && value)
|
||||
{
|
||||
/*
|
||||
* SSLOptions [AllowRC4] [AllowSSL3] [None]
|
||||
*/
|
||||
cups_finalize_client_conf(&cc);
|
||||
|
||||
int options = 0; /* SSL/TLS options */
|
||||
char *start, /* Start of option */
|
||||
*end; /* End of option */
|
||||
if (cg->encryption == (http_encryption_t)-1)
|
||||
cg->encryption = cc.encryption;
|
||||
|
||||
for (start = value; *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;
|
||||
}
|
||||
|
||||
_httpTLSSetOptions(options);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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])
|
||||
{
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
/*
|
||||
* If we are compiled with domain socket support, only use the
|
||||
* domain socket if it exists and has the right permissions...
|
||||
*/
|
||||
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
(sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
||||
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
cups_server = "localhost";
|
||||
|
||||
cupsSetServer(cups_server);
|
||||
}
|
||||
if (!cg->server[0] || !cg->ipp_port)
|
||||
cupsSetServer(cc.server_name);
|
||||
|
||||
if (!cg->ipp_port)
|
||||
{
|
||||
@@ -1101,83 +921,354 @@ cups_read_client_conf(
|
||||
}
|
||||
|
||||
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...
|
||||
*/
|
||||
|
||||
DWORD size; /* Size of string */
|
||||
|
||||
size = sizeof(cg->user);
|
||||
if (!GetUserName(cg->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)
|
||||
{
|
||||
/*
|
||||
* 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 = 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
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
/*
|
||||
* Use the default "unknown" user name...
|
||||
*/
|
||||
|
||||
strlcpy(cg->user, "unknown", sizeof(cg->user));
|
||||
}
|
||||
}
|
||||
}
|
||||
strlcpy(cg->user, cc.user, sizeof(cg->user));
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if (!cups_gssservicename)
|
||||
cups_gssservicename = CUPS_DEFAULT_GSSSERVICENAME;
|
||||
|
||||
strlcpy(cg->gss_service_name, cups_gssservicename,
|
||||
sizeof(cg->gss_service_name));
|
||||
if (!cg->gss_service_name[0])
|
||||
strlcpy(cg->gss_service_name, cc.gss_service_name, 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 (cg->any_root < 0)
|
||||
cg->any_root = cc.any_root;
|
||||
|
||||
if (cups_expiredcerts)
|
||||
cg->expired_certs = !_cups_strcasecmp(cups_expiredcerts, "yes") ||
|
||||
!_cups_strcasecmp(cups_expiredcerts, "on") ||
|
||||
!_cups_strcasecmp(cups_expiredcerts, "true");
|
||||
if (cg->expired_certs < 0)
|
||||
cg->expired_certs = cc.expired_certs;
|
||||
|
||||
if (cups_validatecerts)
|
||||
cg->validate_certs = !_cups_strcasecmp(cups_validatecerts, "yes") ||
|
||||
!_cups_strcasecmp(cups_validatecerts, "on") ||
|
||||
!_cups_strcasecmp(cups_validatecerts, "true");
|
||||
if (cg->validate_certs < 0)
|
||||
cg->validate_certs = cc.validate_certs;
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
_httpTLSSetOptions(cc.ssl_options);
|
||||
#endif /* HAVE_SSL */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usersys.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* '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_finalize_client_conf(
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
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
|
||||
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);
|
||||
|
||||
/*
|
||||
* Then apply defaults for those values that haven't been set...
|
||||
*/
|
||||
|
||||
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
|
||||
if (!cc->gss_service_name[0])
|
||||
cups_set_gss_service_name(cc, CUPS_DEFAULT_GSSSERVICENAME);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if (!cc->server_name[0])
|
||||
{
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
/*
|
||||
* If we are compiled with domain socket support, only use the
|
||||
* domain socket if it exists and has the right permissions...
|
||||
*/
|
||||
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
(sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
||||
cups_set_server_name(cc, CUPS_DEFAULT_DOMAINSOCKET);
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
cups_set_server_name(cc, "localhost");
|
||||
}
|
||||
|
||||
if (!cc->user[0])
|
||||
{
|
||||
#ifdef WIN32
|
||||
/*
|
||||
* Get the current user name from the OS...
|
||||
*/
|
||||
|
||||
DWORD size; /* Size of string */
|
||||
|
||||
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)
|
||||
{
|
||||
/*
|
||||
* 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 = getpwnam(envuser)) != NULL && pw->pw_uid != getuid())
|
||||
pw = NULL;
|
||||
}
|
||||
|
||||
if (!pw)
|
||||
pw = getpwuid(getuid());
|
||||
|
||||
if (pw)
|
||||
strlcpy(cc->user, pw->pw_name, sizeof(cc->user));
|
||||
else
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
/*
|
||||
* Use the default "unknown" user name...
|
||||
*/
|
||||
|
||||
strlcpy(cc->user, "unknown", sizeof(cc->user));
|
||||
}
|
||||
}
|
||||
|
||||
if (cc->validate_certs < 0)
|
||||
cc->validate_certs = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* '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_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] [AllowDH] [DenyTLS1.0] [None]
|
||||
*/
|
||||
|
||||
int options = _HTTP_TLS_NONE; /* 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, "AllowDH"))
|
||||
options |= _HTTP_TLS_ALLOW_DH;
|
||||
else if (!_cups_strcasecmp(start, "DenyTLS1.0"))
|
||||
options |= _HTTP_TLS_DENY_TLS10;
|
||||
else if (!_cups_strcasecmp(start, "None"))
|
||||
options = _HTTP_TLS_NONE;
|
||||
}
|
||||
|
||||
cc->ssl_options = options;
|
||||
|
||||
DEBUG_printf(("4cups_set_ssl_options(cc=%p, value=\"%s\") options=%x", cc, value, 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 12647 2015-05-20 18:37:52Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: util.c 12220 2014-10-20 22:03:01Z msweet $"
|
||||
* "$Id: util.c 12448 2015-01-29 20:32:07Z 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
|
||||
@@ -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 12220 2014-10-20 22:03:01Z msweet $".
|
||||
* End of "$Id: util.c 12448 2015-01-29 20:32:07Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: versioning.h 11232 2013-08-12 19:33:47Z msweet $"
|
||||
* "$Id: versioning.h 12418 2015-01-22 15:49:23Z 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 12418 2015-01-22 15:49:23Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-26
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
|
||||
# "$Id: Makefile 12278 2014-12-01 13:53:56Z msweet $"
|
||||
#
|
||||
# Datafile makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2011 by Apple Inc.
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 1993-2006 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -19,17 +19,6 @@ include ../Makedefs
|
||||
# Data files...
|
||||
#
|
||||
|
||||
BANNERS = \
|
||||
classified \
|
||||
confidential \
|
||||
secret \
|
||||
standard \
|
||||
topsecret \
|
||||
unclassified
|
||||
|
||||
DATAFILES = \
|
||||
testprint
|
||||
|
||||
PPDCFILES = \
|
||||
epson.h \
|
||||
font.defs \
|
||||
@@ -87,13 +76,7 @@ install: all install-data install-headers install-libs install-exec
|
||||
|
||||
install-data:
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/banners
|
||||
for file in $(BANNERS); do \
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/banners; \
|
||||
done
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/data
|
||||
for file in $(DATAFILES); do \
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/data; \
|
||||
done
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/model
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/ppdc
|
||||
for file in $(PPDCFILES); do \
|
||||
@@ -128,12 +111,6 @@ install-libs:
|
||||
#
|
||||
|
||||
uninstall:
|
||||
for file in $(BANNERS); do \
|
||||
$(RM) $(DATADIR)/banners/$$file; \
|
||||
done
|
||||
for file in $(DATAFILES); do \
|
||||
$(RM) $(DATADIR)/data/$$file; \
|
||||
done
|
||||
for file in $(PPDCFILES); do \
|
||||
$(RM) $(DATADIR)/ppdc/$$file; \
|
||||
done
|
||||
@@ -146,5 +123,5 @@ uninstall:
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
|
||||
# End of "$Id: Makefile 12278 2014-12-01 13:53:56Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Classified
|
||||
Footer Classified
|
||||
Image images/cups.png
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Confidential
|
||||
Footer Confidential
|
||||
Image images/cups.png
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Secret
|
||||
Footer Secret
|
||||
Image images/cups.png
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Cover Page
|
||||
Footer Cover Page
|
||||
Image images/cups.png
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show printer-name printer-info printer-location printer-make-and-model printer-driver-name printer-driver-version paper-size imageable-area
|
||||
Header Printer Test Page
|
||||
Footer Printer Test Page
|
||||
Notice CUPS @CUPS_VERSION@.
|
||||
Image images/cups.png
|
||||
Image images/color-wheel.png
|
||||
@@ -1,6 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Top Secret
|
||||
Footer Top Secret
|
||||
Image images/cups.png
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#CUPS-BANNER
|
||||
Show job-id job-name job-originating-user-name job-originating-host-name job-billing
|
||||
Header Unclassified
|
||||
Footer Unclassified
|
||||
Image images/cups.png
|
||||
|
||||
@@ -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>
|
||||
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2014 Apple Inc. Todos los derechos reservados.</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2015 Apple Inc. Todos los derechos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Array API </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>CGI API </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>CUPS API </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>File and Directory APIs </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Filter and Backend Programming </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>HTTP and IPP APIs </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
@@ -6331,6 +6331,18 @@ are server-oriented...</p>
|
||||
<p class="description">IPP operations</p>
|
||||
<h4 class="constants">Constants</h4>
|
||||
<dl>
|
||||
<dt>IPP_OP_ACKNOWLEDGE_DOCUMENT </dt>
|
||||
<dd class="description">Acknowledge-Document</dd>
|
||||
<dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER </dt>
|
||||
<dd class="description">Acknowledge-Identify-Printer</dd>
|
||||
<dt>IPP_OP_ACKNOWLEDGE_JOB </dt>
|
||||
<dd class="description">Acknowledge-Job</dd>
|
||||
<dt>IPP_OP_ACTIVATE_PRINTER </dt>
|
||||
<dd class="description">Start a printer</dd>
|
||||
<dt>IPP_OP_CANCEL_CURRENT_JOB </dt>
|
||||
<dd class="description">Cancel the current job</dd>
|
||||
<dt>IPP_OP_CANCEL_DOCUMENT </dt>
|
||||
<dd class="description">Cancel-Document</dd>
|
||||
<dt>IPP_OP_CANCEL_JOB </dt>
|
||||
<dd class="description">Cancel a job</dd>
|
||||
<dt>IPP_OP_CANCEL_JOBS </dt>
|
||||
@@ -6381,16 +6393,34 @@ are server-oriented...</p>
|
||||
<dd class="description">Reject new jobs on a printer</dd>
|
||||
<dt>IPP_OP_CUPS_SET_DEFAULT </dt>
|
||||
<dd class="description">Set the default printer</dd>
|
||||
<dt>IPP_OP_DEACTIVATE_PRINTER </dt>
|
||||
<dd class="description">Stop a printer</dd>
|
||||
<dt>IPP_OP_DELETE_DOCUMENT </dt>
|
||||
<dd class="description">Delete-Document</dd>
|
||||
<dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE </dt>
|
||||
<dd class="description">Deregister-Output-Device</dd>
|
||||
<dt>IPP_OP_DISABLE_PRINTER </dt>
|
||||
<dd class="description">Stop a printer</dd>
|
||||
<dt>IPP_OP_ENABLE_PRINTER </dt>
|
||||
<dd class="description">Start a printer</dd>
|
||||
<dt>IPP_OP_FETCH_DOCUMENT </dt>
|
||||
<dd class="description">Fetch-Document</dd>
|
||||
<dt>IPP_OP_FETCH_JOB </dt>
|
||||
<dd class="description">Fetch-Job</dd>
|
||||
<dt>IPP_OP_GET_DOCUMENTS </dt>
|
||||
<dd class="description">Get-Documents</dd>
|
||||
<dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES </dt>
|
||||
<dd class="description">Get-Document-Attributes</dd>
|
||||
<dt>IPP_OP_GET_JOBS </dt>
|
||||
<dd class="description">Get a list of jobs</dd>
|
||||
<dt>IPP_OP_GET_JOB_ATTRIBUTES </dt>
|
||||
<dd class="description">Get job attributes</dd>
|
||||
<dt>IPP_OP_GET_NEXT_DOCUMENT_DATA </dt>
|
||||
<dd class="description">Get-Next-Document-Data</dd>
|
||||
<dt>IPP_OP_GET_NOTIFICATIONS <span class="info"> CUPS 1.2/OS X 10.5 </span></dt>
|
||||
<dd class="description">Get notification events </dd>
|
||||
<dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES </dt>
|
||||
<dd class="description">Get-Output-Device-Attributes</dd>
|
||||
<dt>IPP_OP_GET_PRINTER_ATTRIBUTES </dt>
|
||||
<dd class="description">Get printer attributes</dd>
|
||||
<dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </dt>
|
||||
@@ -6401,26 +6431,70 @@ are server-oriented...</p>
|
||||
<dd class="description">Get subscription attributes </dd>
|
||||
<dt>IPP_OP_HOLD_JOB </dt>
|
||||
<dd class="description">Hold a job for printing</dd>
|
||||
<dt>IPP_OP_HOLD_NEW_JOBS </dt>
|
||||
<dd class="description">Hold new jobs</dd>
|
||||
<dt>IPP_OP_IDENTIFY_PRINTER </dt>
|
||||
<dd class="description">Identify-Printer</dd>
|
||||
<dt>IPP_OP_PAUSE_PRINTER </dt>
|
||||
<dd class="description">Stop a printer</dd>
|
||||
<dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB </dt>
|
||||
<dd class="description">Stop printer after the current job</dd>
|
||||
<dt>IPP_OP_PRINT_JOB </dt>
|
||||
<dd class="description">Print a single file</dd>
|
||||
<dt>IPP_OP_PRINT_URI </dt>
|
||||
<dd class="description">Print a single URL</dd>
|
||||
<dt>IPP_OP_PROMOTE_JOB </dt>
|
||||
<dd class="description">Promote a job to print sooner</dd>
|
||||
<dt>IPP_OP_PURGE_JOBS </dt>
|
||||
<dd class="description">Cancel all jobs</dd>
|
||||
<dt>IPP_OP_RELEASE_HELD_NEW_JOBS </dt>
|
||||
<dd class="description">Release new jobs</dd>
|
||||
<dt>IPP_OP_RELEASE_JOB </dt>
|
||||
<dd class="description">Release a job for printing</dd>
|
||||
<dt>IPP_OP_RENEW_SUBSCRIPTION <span class="info"> CUPS 1.2/OS X 10.5 </span></dt>
|
||||
<dd class="description">Renew a printer subscription </dd>
|
||||
<dt>IPP_OP_REPROCESS_JOB </dt>
|
||||
<dd class="description">Reprint a job</dd>
|
||||
<dt>IPP_OP_RESTART_JOB </dt>
|
||||
<dd class="description">Reprint a job</dd>
|
||||
<dt>IPP_OP_RESTART_PRINTER </dt>
|
||||
<dd class="description">Restart a printer</dd>
|
||||
<dt>IPP_OP_RESUBMIT_JOB </dt>
|
||||
<dd class="description">Resubmit-Job</dd>
|
||||
<dt>IPP_OP_RESUME_JOB </dt>
|
||||
<dd class="description">Resume the current job</dd>
|
||||
<dt>IPP_OP_RESUME_PRINTER </dt>
|
||||
<dd class="description">Start a printer</dd>
|
||||
<dt>IPP_OP_SCHEDULE_JOB_AFTER </dt>
|
||||
<dd class="description">Schedule a job to print after another</dd>
|
||||
<dt>IPP_OP_SEND_DOCUMENT </dt>
|
||||
<dd class="description">Add a file to a job</dd>
|
||||
<dt>IPP_OP_SEND_HARDCOPY_DOCUMENT </dt>
|
||||
<dd class="description">Send-Hardcopy-Document</dd>
|
||||
<dt>IPP_OP_SEND_URI </dt>
|
||||
<dd class="description">Add a URL to a job</dd>
|
||||
<dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES </dt>
|
||||
<dd class="description">Set-Document-Attributes</dd>
|
||||
<dt>IPP_OP_SET_JOB_ATTRIBUTES </dt>
|
||||
<dd class="description">Set job attributes</dd>
|
||||
<dt>IPP_OP_SET_PRINTER_ATTRIBUTES </dt>
|
||||
<dd class="description">Set printer attributes</dd>
|
||||
<dt>IPP_OP_SHUTDOWN_PRINTER </dt>
|
||||
<dd class="description">Turn a printer off</dd>
|
||||
<dt>IPP_OP_STARTUP_PRINTER </dt>
|
||||
<dd class="description">Turn a printer on</dd>
|
||||
<dt>IPP_OP_SUSPEND_CURRENT_JOB </dt>
|
||||
<dd class="description">Suspend the current job</dd>
|
||||
<dt>IPP_OP_UPDATE_ACTIVE_JOBS </dt>
|
||||
<dd class="description">Update-Active-Jobs</dd>
|
||||
<dt>IPP_OP_UPDATE_DOCUMENT_STATUS </dt>
|
||||
<dd class="description">Update-Document-Status</dd>
|
||||
<dt>IPP_OP_UPDATE_JOB_STATUS </dt>
|
||||
<dd class="description">Update-Job-Status</dd>
|
||||
<dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES </dt>
|
||||
<dd class="description">Update-Output-Device-Attributes</dd>
|
||||
<dt>IPP_OP_VALIDATE_DOCUMENT </dt>
|
||||
<dd class="description">Validate-Document</dd>
|
||||
<dt>IPP_OP_VALIDATE_JOB </dt>
|
||||
<dd class="description">Validate job options</dd>
|
||||
</dl>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>MIME API </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Introduction to CUPS Programming </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>PPD API (DEPRECATED) </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>PPD Compiler API </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Raster API </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -12,7 +12,7 @@ client.conf - client configuration file for cups (deprecated)
|
||||
<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
|
||||
The <b>client.conf</b> file configures the CUPS client and is normally located in the <i>/etc/cups</i> and/or <i>~/.cups</i> directories.
|
||||
Each line in the file can be a configuration directive, a blank line, or a comment. Comment lines start with the # character.
|
||||
<p><b>Note:</b> Starting with OS X 10.7, this file is only used by command-line and X11 applications.
|
||||
<p><b>Note:</b> Starting with OS X 10.7, this file is only used by command-line and X11 applications plus the IPP backend.
|
||||
The <b>ServerName</b> directive is not supported on OS X at all.
|
||||
<h3><a name="DIRECTIVES">Directives</a></h3>
|
||||
The following directives are understood by the client. Consult the online help for detailed descriptions:
|
||||
@@ -38,12 +38,14 @@ 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>]
|
||||
<dt><b>SSLOptions </b>[<i>AllowDH</i>] [<i>AllowRC4</i>] [<i>AllowSSL3</i>] [<i>DenyTLS1.0</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>AllowDH</i> option enables cipher suites using plain Diffie-Hellman key negotiation.
|
||||
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.
|
||||
The <i>DenyTLS1.0</i> option disables TLS v1.0 support - this sets the minimum protocol version to TLS v1.1.
|
||||
<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>
|
||||
@@ -57,7 +59,7 @@ The <b>client.conf</b> file is deprecated and will no longer be supported in a f
|
||||
<a href="man-cups.html?TOPIC=Man+Pages"><b>cups</b>(1),</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>
|
||||
|
||||
@@ -21,11 +21,13 @@ 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 stderr</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the access log filename.
|
||||
Specifying a blank filename disables access log generation.
|
||||
The value "stderr" causes log entries to be sent to the standard error file when the scheduler is running in the foreground, or to the system log daemon when run in the background.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
<pre class="man">
|
||||
@@ -34,7 +36,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,17 +44,19 @@ 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 stderr</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the error log filename.
|
||||
Specifying a blank filename disables error log generation.
|
||||
The value "stderr" causes log entries to be sent to the standard error file when the scheduler is running in the foreground, or to the system log daemon when run in the background.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
<pre class="man">
|
||||
@@ -61,7 +65,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,19 +88,21 @@ 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 stderr</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PageLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the page log filename.
|
||||
The value "stderr" causes log entries to be sent to the standard error file when the scheduler is running in the foreground, or to the system log daemon when run in the background.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
Specifying a blank filename disables page log generation.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
@@ -106,40 +112,40 @@ 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>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Sandboxing relaxed</b>
|
||||
<dt><a name="Sandboxing"></a><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 +160,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:
|
||||
@@ -241,45 +241,45 @@ The following percent sequences are recognized:
|
||||
|
||||
</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>]
|
||||
<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,28 +297,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>SSLOptions </b>[<i>AllowRC4</i>] [<i>AllowSSL3</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><b>SSLPort </b><i>port</i>
|
||||
<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".
|
||||
|
||||
@@ -215,7 +215,7 @@ IANA IPP Registry (<a href="http://www.iana.org/assignments/ipp\-registrations)"
|
||||
PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp">http://www.pwg.org/ipp</a>)
|
||||
RFC 2911 (<a href="http://tools.ietf.org/html/rfc2911)">http://tools.ietf.org/html/rfc2911)</a>,
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright © 2007-2014 by Apple Inc.
|
||||
Copyright © 2007-2015 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -131,6 +131,9 @@ test report.
|
||||
<dd style="margin-left: 5.0em"><dt><b>EXPECT ?</b><i>attribute-name predicate(s)</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>EXPECT !</b><i>attribute-name</i>
|
||||
<dd style="margin-left: 5.0em">Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the "EXPECT PREDICATES" section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example "media-col/media-size/x-dimension".
|
||||
<dt><b>EXPECT-ALL </b><i>attribute-name </i>[ <i>predicate(s) </i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>EXPECT-ALL ?</b><i>attribute-name predicate(s)</i>
|
||||
<dd style="margin-left: 5.0em">Specifies that the response must/may include the named attribute and that all occurrences of that attribute must match the given predicates.
|
||||
<dt><b>FILE filename</b>
|
||||
<dd style="margin-left: 5.0em">Specifies a file to include at the end of the request. This is typically used when sending a test print file.
|
||||
<dt><b>GROUP tag</b>
|
||||
@@ -247,6 +250,9 @@ Specifies the maximum number of times to repeat if the <b>REPEAT-MATCH</b> or <b
|
||||
<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the boolean value given.
|
||||
<dt><b>WITH-VALUE "/</b><i>regular expression</i><b>/"</b>
|
||||
<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
|
||||
<dt><b>WITH-VALUE-FROM </b><i>attribute-name</i>
|
||||
<dd style="margin-left: 5.0em">Requires that the value(s) of the <b>EXPECT</b> attribute matches the value(s) in the specified attribute.
|
||||
For example, "EXPECT job-sheets WITH-VALUE-FROM job-sheets-supported" requires that the "job-sheets" value is listed as a value of the "job-sheets-supported" attribute.
|
||||
</dl>
|
||||
<h3><a name="STATUS_PREDICATES">Status Predicates</a></h3>
|
||||
The following predicates are understood following the <b>STATUS</b> test directive:
|
||||
@@ -495,7 +501,7 @@ IANA IPP Registry (<a href="http://www.iana.org/assignments/ipp-registrations)">
|
||||
PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp)">http://www.pwg.org/ipp)</a>,
|
||||
RFC 2911 (<a href="http://tools.ietf.org/html/rfc3911">http://tools.ietf.org/html/rfc3911</a>)
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright © 2007-2014 by Apple Inc.
|
||||
Copyright © 2007-2015 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -79,6 +79,7 @@ This option cannot be specified with the <i>-P</i> option (PPD file) and is inte
|
||||
Use the <i>-m</i> option with the
|
||||
<a href="man-lpinfo.html?TOPIC=Man+Pages"><b>lpinfo</b>(8)</a>
|
||||
command to get a list of supported models.
|
||||
The model "raw" clears any existing interface script or PPD file and the model "everywhere" queries the printer referred to by the specified IPP <i>device-uri</i>.
|
||||
<dt><b>-o cupsIPPSupplies=true</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>-o cupsIPPSupplies=false</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether IPP supply level values should be reported.
|
||||
@@ -161,6 +162,13 @@ Finally, the CUPS version of <b>lpadmin</b> may ask the user for an access passw
|
||||
This differs from the System V version which requires the root user to execute this command.
|
||||
<h2 class="title"><a name="NOTES">Notes</a></h2>
|
||||
The CUPS version of <b>lpadmin</b> does not support all of the System V or Solaris printing system configuration options.
|
||||
<h2 class="title"><a name="EXAMPLE">Example</a></h2>
|
||||
Create an IPP Everywhere print queue:
|
||||
<pre class="man">
|
||||
|
||||
lpadmin -p myprinter -E -v ipp://myprinter.local/ipp/print -m everywhere
|
||||
|
||||
</pre>
|
||||
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
|
||||
<a href="man-cupsaccept.html?TOPIC=Man+Pages"><b>cupsaccept</b>(8),</a>
|
||||
<a href="man-cupsenable.html?TOPIC=Man+Pages"><b>cupsenable</b>(8),</a>
|
||||
@@ -168,7 +176,7 @@ The CUPS version of <b>lpadmin</b> does not support all of the System V or Solar
|
||||
<a href="man-lpoptions.html?TOPIC=Man+Pages"><b>lpoptions</b>(1),</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>
|
||||
|
||||
@@ -266,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>
|
||||
|
||||
@@ -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
|
||||
@@ -492,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>
|
||||
@@ -599,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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Developing PostScript Printer Drivers </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Introduction to the PPD Compiler </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Developing Raster Printer Drivers </title>
|
||||
<meta name="keywords" content="Programming">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>CUPS PPD Extensions </title>
|
||||
<meta name="keywords" content="Specifications">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<meta name="creator" content="Mini-XML v2.7">
|
||||
<meta name="creator" content="Mini-XML v2.8">
|
||||
<style type="text/css"><!--
|
||||
BODY {
|
||||
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
|
||||
|
||||
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>
|
||||
+8
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
|
||||
# "$Id: Makefile 12568 2015-03-25 13:49:23Z msweet $"
|
||||
#
|
||||
# Filter makefile for CUPS.
|
||||
#
|
||||
@@ -367,6 +367,12 @@ rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
|
||||
|
||||
rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \
|
||||
../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
|
||||
$(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
|
||||
|
||||
|
||||
#
|
||||
# testraster
|
||||
@@ -398,5 +404,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
|
||||
# End of "$Id: Makefile 12568 2015-03-25 13:49:23Z msweet $".
|
||||
#
|
||||
|
||||
+15
-7
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: gziptoany.c 12655 2015-05-22 17:26:40Z 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 12655 2015-05-22 17:26:40Z msweet $".
|
||||
*/
|
||||
|
||||
+9
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: pstops.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: pstops.c 12655 2015-05-22 17:26:40Z 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 12655 2015-05-22 17:26:40Z msweet $".
|
||||
*/
|
||||
|
||||
+23
-14
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: raster.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: raster.c 12678 2015-05-28 19:09:48Z 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.
|
||||
@@ -256,7 +256,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...
|
||||
@@ -285,7 +288,10 @@ cupsRasterReadHeader2(
|
||||
*/
|
||||
|
||||
if (!cups_raster_read_header(r))
|
||||
{
|
||||
memset(h, 0, sizeof(cups_page_header2_t));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the header to the user-supplied buffer...
|
||||
@@ -603,8 +609,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 +706,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));
|
||||
@@ -963,7 +966,7 @@ cups_raster_read_header(
|
||||
|
||||
cups_raster_update(r);
|
||||
|
||||
return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0);
|
||||
return (r->header.cupsBitsPerPixel != 0 && r->header.cupsBitsPerColor != 0 && r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1233,6 +1236,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...
|
||||
*/
|
||||
@@ -1284,6 +1290,9 @@ cups_raster_write(
|
||||
*/
|
||||
|
||||
count = r->header.cupsBytesPerLine * 2;
|
||||
if (count < 3)
|
||||
count = 3;
|
||||
|
||||
if ((size_t)count > r->bufsize)
|
||||
{
|
||||
if (r->buffer)
|
||||
@@ -1448,5 +1457,5 @@ cups_write_fd(void *ctx, /* I - File descriptor pointer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: raster.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: raster.c 12678 2015-05-28 19:09:48Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertoepson.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: rastertoepson.c 12617 2015-05-06 20:28:22Z 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
|
||||
@@ -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
|
||||
{
|
||||
@@ -873,6 +879,9 @@ OutputRows(
|
||||
putchar(0);
|
||||
}
|
||||
|
||||
if (dot_count & 1)
|
||||
putchar(*ptr);
|
||||
|
||||
/*
|
||||
* Move the head back and print the odd bytes...
|
||||
*/
|
||||
@@ -901,6 +910,9 @@ OutputRows(
|
||||
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 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: rastertoepson.c 12617 2015-05-06 20:28:22Z 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