Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 45a6252b81 |
@@ -3,6 +3,15 @@ CHANGES-1.5.txt
|
||||
|
||||
CHANGES IN CUPS V1.5.4
|
||||
|
||||
- Documentation updates (STR #4112, STR #4130, STR #4134)
|
||||
- Fixes for libusb-based USB backend (STR #4128)
|
||||
- The lpq command did not show the owner or title of jobs unless passed
|
||||
a username on the command-line (STR #4135)
|
||||
- Localized empty strings contained the message catalog metadata
|
||||
(STR #4119)
|
||||
- Fixed a crash in the libusb-based USB backend (STR #4099)
|
||||
- The cups-lpd mini-daemon no longer handled jobs with multiple copies
|
||||
(STR #4118)
|
||||
- Multiple libusb backend fixes (STR #4098, STR #4100)
|
||||
- The IPP backend no longer tries to get the job status for printers
|
||||
that do not implement the required operation (STR #4083)
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
CHANGES-IPPTOOL.txt - 2012-02-28
|
||||
--------------------------------
|
||||
|
||||
This file provides a list of changes to the ipptool binary distribution posted
|
||||
on cups.org.
|
||||
|
||||
|
||||
2012-02-28
|
||||
|
||||
- Changed behavior of WITH-VALUES "/regex/" to not require all values to
|
||||
match.
|
||||
- Added WITH-ALL-VALUES directive for EXPECT predicates that require all
|
||||
values to match.
|
||||
- Updated test files to use WITH-ALL-VALUES where necessary.
|
||||
- Updated test files to use new ABNF for media names from PWG Media
|
||||
Names 2.0.
|
||||
|
||||
|
||||
2012-02-06
|
||||
|
||||
- Fixed the packaging of ipptool on Windows (removed unnecessary DLLs)
|
||||
- Fixed an crash in ipptool when mixing DISPLAY with -I and a failed
|
||||
request.
|
||||
- Added a Print-Job test file.
|
||||
- Added a "setdebug" batch file for Windows
|
||||
- Added support for a CUPS_DISABLE_ASYNC_CONNECT environment variable.
|
||||
|
||||
|
||||
2012-01-10
|
||||
|
||||
- Fixed an issue with the IPP/1.1 test file where the "waiting for job
|
||||
completion" test did not work.
|
||||
- The attribute groups out of order error was not shown for the
|
||||
operation-attributes-tag group.
|
||||
|
||||
|
||||
2011-12-02
|
||||
|
||||
- Fixed a truncated XML output bug that would happen for certain errors.
|
||||
- Fixed the order-of-groups tests.
|
||||
- Fixed "WITH-VALUE >N" for rangeOfInteger attributes.
|
||||
- The Windows installer was missing the get-printer-attributes.test
|
||||
file.
|
||||
- The Linux binaries are now compiled for all LSB 4.x-compliant Linux
|
||||
distributions.
|
||||
- The Linux binaries no longer support SSL or TLS.
|
||||
|
||||
|
||||
2011-10-05
|
||||
|
||||
- Fixed a crasher bug that showed up on Windows.
|
||||
- The IPP/1.1 test would hang if the initial Print-Job test failed.
|
||||
- Fixed a typo in the IPP/2.0 test.
|
||||
|
||||
|
||||
2011-10-03
|
||||
|
||||
- Using OF-TYPE with the "no-value" or "unknown" out-of-band value tags
|
||||
now works without special WITH-VALUE strings.
|
||||
- ipptool now shows an error when an attribute appears more than once
|
||||
within the same attribute group.
|
||||
- ipptool did not display attributes as specified by the DISPLAY
|
||||
directive when a test error failed.
|
||||
- Fixed one spot where DEFINE-VALUE was still treated as an error when
|
||||
the EXPECT test failed.
|
||||
- uriScheme values were not displayed properly.
|
||||
- Updated the IPP/1.1 tests to properly validate support for
|
||||
job-hold-until-default and job-hold-until-supported when the Hold-Job
|
||||
operation is supported.
|
||||
- Updated the IPP/1.1 tests to properly check for the various standard
|
||||
media sizes for the printing tests.
|
||||
- Updated the IPP/1.1 tests to accept "no-value" for media-default an
|
||||
orientation-requested-default.
|
||||
- Updated the IPP/1.1 tests to accept "unknown" for job-state.
|
||||
- Updated the IPP/1.1 tests to not perform the bogus URI printing tests
|
||||
unless the "document-uri" variable is defined.
|
||||
- Updated the IPP/2.0 tests to properly validate media-col
|
||||
"media-xxx-supported" attributes.
|
||||
- Updated the IPP/2.2 tests to properly validate media-ready and
|
||||
media-col-ready.
|
||||
|
||||
|
||||
2011-09-28
|
||||
|
||||
- Test output now includes a summary and overall score at the end.
|
||||
- The MATCH-VALUE predicate now correctly deals with a failed EXPECT
|
||||
condition.
|
||||
- The IPP/1.1 test suite now looks for legacy media names and uses them
|
||||
if the corresponding PWG standard names are not present.
|
||||
- The IPP/1.1 test suite now tests the Print-Job+Release-Job when the
|
||||
printer supports the job-hold-until attribute, Hold-Job operation, and
|
||||
Release-Job operation.
|
||||
|
||||
|
||||
2011-09-21
|
||||
|
||||
- Fixes for HTTP chunking, timeout, and encryption issues reported by
|
||||
various users.
|
||||
- Greatly improved IPP tests with added IPP/2.2 tests.
|
||||
- New test documents - 1-page and 4-page mixed A4/Letter PDF/PS and a
|
||||
couple JPEGs.
|
||||
- New REPEAT directives to programmatically repeat tests as needed.
|
||||
|
||||
|
||||
2011-08-16
|
||||
|
||||
- The Windows version no longer requires Visual Studio to be installed.
|
||||
- The Windows version now supports SSL.
|
||||
- Added "ipps" URI support.
|
||||
- Added a new "-T" option.
|
||||
- Added support for fractional seconds for the -i option and DELAY
|
||||
directive.
|
||||
- Added support for authentication.
|
||||
- Added DEFINE-MATCH, DEFINE-NO-MATCH, DEFINE-VALUE, IF-NOT-DEFINED,
|
||||
IGNORE-ERRORS, SKIP-IF-DEFINED, SKIP-IF-NOT-DEFINED,
|
||||
SKIP-PREVIOUS-ERROR directives.
|
||||
- WITH-VALUE now supports variable expansion.
|
||||
- Updated the IPP/1.1 conformance test to skip the "my-jobs different
|
||||
user" test if the printer URI contains a username.
|
||||
- Updated the IPP conformance tests to validate media, media-default,
|
||||
and media-supported values.
|
||||
- No longer error out if a Printer returns a different version number in
|
||||
the response when the request contains the version 0.0.
|
||||
|
||||
|
||||
2010-10-16
|
||||
|
||||
- Initial release of standalone binary.
|
||||
+114
-1
@@ -1,6 +1,119 @@
|
||||
CHANGES.txt - 1.6b1 - 2012-05-24
|
||||
CHANGES.txt - 1.6.2 - 2013-03-18
|
||||
--------------------------------
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.6.2
|
||||
|
||||
- Documentation fixes (STR #4229, STR #4239, STR #4234, STR #4248,
|
||||
STR #4259)
|
||||
- Security: All file, directory, user, and group settings are now stored
|
||||
in a separate cups-files.conf configuration file that cannot be set
|
||||
through the CUPS web interface or APIs (STR #4223)
|
||||
- Added a Czech localization (STR #4201)
|
||||
- Added a French localization (STR #4247)
|
||||
- Added a Russian localization (STR #4228, STR #4285)
|
||||
- Updated the Catalan localization (STR #4202)
|
||||
- Local certificate authentication did not guard against an empty
|
||||
certification file (STR #4293)
|
||||
- The scheduler did not reject device URIs with spaces.
|
||||
- Added USB quirk rule for Epson Stylus Photo 750 (STR #4286)
|
||||
- The IPP backend could crash if the printer disconnects early
|
||||
(STR #4284)
|
||||
- cupsGetPPD did not work with statically-configured CUPS shared
|
||||
queues (STR #4178)
|
||||
- The scheduler did not support long MIME media types (STR #4270)
|
||||
- The cupsfilter command did not set the CHARSET environment variable
|
||||
for the text filters (STR #4273)
|
||||
- The lp command did not show errors for unknown "--foo" (STR #4261)
|
||||
- Bad IPP responses could crash ipptool (STR #4262)
|
||||
- Updated USB quirk rules for Canon and Xerox printers (STR #4217,
|
||||
STR #4263)
|
||||
- Added USB blacklisting for printers that require a custom backend
|
||||
(STR #4218)
|
||||
- The PPD compiler did not correctly JCL options (STR #4115, STR #4203)
|
||||
- The ipptool program now supports DEFINE-MATCH and DEFINE-NO-MATCH
|
||||
predicates for STATUS directives.
|
||||
- Fixed a problem with local Kerberos authentication (STR #4140)
|
||||
- Coverity scan: fixed some minor issues (STR #4242)
|
||||
- The scheduler did not remove color profiles after deleting a printer
|
||||
(STR #4232, STR #4276)
|
||||
- The CUPS library did not always detect a timed out connection to the
|
||||
server which could cause temporary loss of printing from applications
|
||||
(STR #4187)
|
||||
- The ipptool program now supports variable substitution in OPERATION
|
||||
and DELAY directives (STR #4175)
|
||||
- The IPP backend now stops queues when the server configuration
|
||||
prevents successful job submission (STR #4125)
|
||||
- The XML output of ipptool contained empty dictionaries (STR #4136)
|
||||
- The scheduler did not delete job control backup files (STR #4244)
|
||||
- cupsGetPPD3 could return a local PPD instead of the correct remote
|
||||
PPD.
|
||||
- The scheduler incorrectly advertised auth-info-required for local
|
||||
queues needing local authentication (STR #4205)
|
||||
- CUPS 1.6 clients using the ServerName directive in client.conf did not
|
||||
work with CUPS 1.3.x or older servers (STR #4231, STR #4291)
|
||||
- The SNMP backend now tries to work around broken printers that use a
|
||||
newline to separate key/value pairs.
|
||||
- The IPP backend did not send a cancel request to printers when a job
|
||||
was canceled and the printer did not support Create-Job.
|
||||
- Fixed EPM packaging files (STR #4199)
|
||||
- OpenBSD build fix (STR #4195, STR #4196, STR #4197)
|
||||
- The scheduler could crash when using Avahi (STR #4183, STR #4192,
|
||||
STR #4200, STR #4213)
|
||||
- The IPP backend could get stuck in an endless loop on certain network
|
||||
errors (STR #4194)
|
||||
- 32-bit builds failed on Debian (STR #4133)
|
||||
- The scheduler no longer accepts or sends job description attributes.
|
||||
- The IPP backend now works around some conformance issues for broken
|
||||
printers (STR #4190)
|
||||
- cupsBackendReport() now filters out all control characters from the
|
||||
reported 1284 device IDs (STR #4124)
|
||||
- The scheduler no longer allows job-name values that are not valid
|
||||
network Unicode strings (STR #4072)
|
||||
- The web interface did not preserve the order of classes, jobs, or
|
||||
printers (STR #4170)
|
||||
- The network backends now support disabling of SNMP supply level
|
||||
queries via the "snmp" URI option (STR #4106)
|
||||
- The IPP backend did not specify the compression used (STR #4181)
|
||||
- ipptool did not support octetString values.
|
||||
- The scheduler did not recognize dnssd: or ipps: URIs as Bonjour shared
|
||||
queues (STR #4158)
|
||||
- Applications could not get the PPD file for statically-configured
|
||||
Bonjour-shared print queues (STR #4159)
|
||||
- The cupsd.conf file included obsolete browsing directives (STR #4157)
|
||||
- Fixed a USB backend compatibility issue on systems using libusb
|
||||
(STR #4155, STR #4191)
|
||||
- Some Bonjour features were not available on systems with Avahi
|
||||
(STR #4156)
|
||||
- CUPS now includes the port number in the Host: header for HTTP
|
||||
requests.
|
||||
- Fixed REPEAT-MATCH for STATUS and EXPECT - was incorrectly erroring
|
||||
out.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.6.1
|
||||
|
||||
- Documentation fix (STR #4149)
|
||||
- RPM packaging fixes (STR #4129, #4145)
|
||||
- The Japanese and English web interface headers were swapped
|
||||
(STR #4148)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.6.0
|
||||
|
||||
- Document changes (STR #4131)
|
||||
- Added new Catalan (STR #4107) and Spanish (STR #4137) localizations.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.6rc1
|
||||
|
||||
- Added a new Japanese localization (STR #4122)
|
||||
- The SNMP backend no longer exits if it is unable to obtain an IPv6
|
||||
socket (STR #4109)
|
||||
- The LPD backend incorrectly used "localhost" in the control file
|
||||
instead of the current hostname.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.6b1
|
||||
|
||||
- Documentation updates (STR #3927, STR #3980, STR #4010, STR #4068)
|
||||
|
||||
+6
-4
@@ -1,4 +1,4 @@
|
||||
CREDITS.txt - 2010-03-13
|
||||
CREDITS.txt - 2012-07-16
|
||||
------------------------
|
||||
|
||||
Few projects are completed by one person, and CUPS is no exception. We'd
|
||||
@@ -17,7 +17,7 @@ like to thank the following individuals for their contributions:
|
||||
Wang Jian - CUPS RPM corrections.
|
||||
Roderick Johnstone - Beta tester of the millenium.
|
||||
Till Kamppeter - Bug fixes, beta testing, evangelism.
|
||||
I–aki Larra–aga - Basque localization.
|
||||
Iñaki Larrañaga - Basque localization.
|
||||
Kenshi Muto - Japanese localization, patches, and
|
||||
testing.
|
||||
Tomohiro Kato - Japanese localization.
|
||||
@@ -27,16 +27,18 @@ like to thank the following individuals for their contributions:
|
||||
Mark Lawrence - Microsoft interoperability testing.
|
||||
Jeff Licquia - Bug fixes, beta testing, evangelism.
|
||||
Jason McMullan - Original CUPS RPM distributions.
|
||||
Àngel Mompó - Catalan localization.
|
||||
Wes Morgan - *BSD fixes.
|
||||
Daniel Nylander - Swedish localization.
|
||||
Niklas 'Nille' �kerstršm - Swedish localization.
|
||||
Niklas 'Nille' Åkerström - Swedish localization.
|
||||
Naruiko Ogasawara - Japanese localization.
|
||||
Giulio Orsero - Bug fixes and testing.
|
||||
Michal Osowiecki - Polish localization.
|
||||
Citra Paska - Indonesian localization.
|
||||
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
|
||||
Vincenzo Reale - Italian localization.
|
||||
Petter Reinholdtsen - HP-UX compiler stuff.
|
||||
Juan Pablo Gonz‡lez Riopedre - Spanish localization.
|
||||
Juan Pablo González Riopedre - Spanish localization.
|
||||
Opher Shachar - Hebrew localization.
|
||||
Stuart Stevens - HP JetDirect IPP information.
|
||||
Andrea Suatoni - IRIX desktop integration and testing.
|
||||
|
||||
+11
-5
@@ -1,14 +1,20 @@
|
||||
INSTALL - CUPS v1.6b1 - 2012-05-24
|
||||
INSTALL - CUPS v1.6.2 - 2013-03-18
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
information on CUPS see the file called "README.txt". A complete change log can
|
||||
be found in "CHANGES.txt".
|
||||
|
||||
**** IF YOU HAVE A NON-POSTSCRIPT PRINTER AND ARE NOT ****
|
||||
**** RUNNING OS X, YOU WILL ALSO NEED TO INSTALL GPL ****
|
||||
**** GHOSTSCRIPT WITH THE "cups" DRIVER AFTER YOU INSTALL ****
|
||||
**** CUPS. ****
|
||||
*******************************************************************************
|
||||
*******************************************************************************
|
||||
**** ****
|
||||
**** USING CUPS REQUIRES ADDITIONAL THIRD-PARTY SUPPORT SOFTWARE AND ****
|
||||
**** PRINTER DRIVERS. THESE ARE TYPICALLY INCLUDED WITH YOUR OPERATING ****
|
||||
**** SYSTEM DISTRIBUTION. APPLE DOES NOT ENDORSE OR SUPPORT THIRD-PARTY ****
|
||||
**** SUPPORT SOFTWARE FOR CUPS. ****
|
||||
**** ****
|
||||
*******************************************************************************
|
||||
*******************************************************************************
|
||||
|
||||
|
||||
BEFORE YOU BEGIN
|
||||
|
||||
+5
-6
@@ -1,14 +1,13 @@
|
||||
README - CUPS v1.6b1 - 2012-05-24
|
||||
----------------------------------
|
||||
README - CUPS v1.6.2 - 2013-03-18
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt"
|
||||
instead...
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
CUPS is a standards-based, open source printing system developed by Apple
|
||||
Inc. for Mac OS® X and other UNIX®-like operating systems. CUPS uses the
|
||||
Inc. for OS® X and other UNIX®-like operating systems. CUPS uses the
|
||||
Internet Printing Protocol ("IPP") and provides System V and Berkeley
|
||||
command-line interfaces, a web interface, and a C API to manage printers and
|
||||
print jobs. It supports printing to both local (parallel, serial, USB) and
|
||||
@@ -150,7 +149,7 @@ PRINTING FILES
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2012 by Apple Inc. CUPS and the CUPS logo are
|
||||
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
+5
-3
@@ -128,7 +128,7 @@ install-exec: $(INSTALLXPC)
|
||||
$(RM) $(SERVERBIN)/backend/$$file; \
|
||||
$(LN) ipp $(SERVERBIN)/backend/$$file; \
|
||||
done
|
||||
if test "x$(DNSSD_BACKEND)" != x; then \
|
||||
if test "x$(DNSSD_BACKEND)" != x -a `uname` = Darwin; then \
|
||||
$(RM) $(SERVERBIN)/backend/mdns; \
|
||||
$(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
|
||||
fi
|
||||
@@ -232,8 +232,10 @@ libbackend.a: $(LIBOBJS)
|
||||
dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
|
||||
$(RM) mdns
|
||||
$(LN) dnssd mdns
|
||||
if test `uname` = Darwin; then \
|
||||
$(RM) mdns; \
|
||||
$(LN) dnssd mdns; \
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
|
||||
+117
-19
@@ -86,6 +86,7 @@ static int child_pid = 0; /* Child process ID */
|
||||
#endif /* HAVE_GSSAPI && HAVE_XPC */
|
||||
static const char * const jattrs[] = /* Job attributes we want */
|
||||
{
|
||||
"job-id",
|
||||
"job-impressions-completed",
|
||||
"job-media-sheets-completed",
|
||||
"job-name",
|
||||
@@ -169,7 +170,7 @@ static const char *password_cb(const char *);
|
||||
static void report_attr(ipp_attribute_t *attr);
|
||||
static void report_printer_state(ipp_t *ipp);
|
||||
#if defined(HAVE_GSSAPI) && defined(HAVE_XPC)
|
||||
static int run_as_user(int argc, char *argv[], uid_t uid,
|
||||
static int run_as_user(char *argv[], uid_t uid,
|
||||
const char *device_uri, int fd);
|
||||
#endif /* HAVE_GSSAPI && HAVE_XPC */
|
||||
static void sigterm_handler(int sig);
|
||||
@@ -203,6 +204,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*value, /* Value of option */
|
||||
sep; /* Separator character */
|
||||
http_addrlist_t *addrlist; /* Address of printer */
|
||||
int snmp_enabled = 1; /* Is SNMP enabled? */
|
||||
int snmp_fd, /* SNMP socket */
|
||||
start_count, /* Page count via SNMP at start */
|
||||
page_count, /* Page count via SNMP */
|
||||
@@ -348,7 +350,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (uid > 0)
|
||||
{
|
||||
if (argc == 6)
|
||||
return (run_as_user(argc, argv, uid, device_uri, 0));
|
||||
return (run_as_user(argv, uid, device_uri, 0));
|
||||
else
|
||||
{
|
||||
int status = 0; /* Exit status */
|
||||
@@ -357,7 +359,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
{
|
||||
if ((fd = open(argv[i], O_RDONLY)) >= 0)
|
||||
{
|
||||
status = run_as_user(argc, argv, uid, device_uri, fd);
|
||||
status = run_as_user(argv, uid, device_uri, fd);
|
||||
close(fd);
|
||||
}
|
||||
else
|
||||
@@ -508,6 +510,16 @@ main(int argc, /* I - Number of command-line args */
|
||||
value);
|
||||
}
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "snmp"))
|
||||
{
|
||||
/*
|
||||
* Enable/disable SNMP stuff...
|
||||
*/
|
||||
|
||||
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
_cups_strcasecmp(value, "yes") ||
|
||||
_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "version"))
|
||||
{
|
||||
if (!strcmp(value, "1.0"))
|
||||
@@ -659,11 +671,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
* See if the printer supports SNMP...
|
||||
*/
|
||||
|
||||
if ((snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family)) >= 0)
|
||||
{
|
||||
if (snmp_enabled)
|
||||
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
|
||||
else
|
||||
snmp_fd = -1;
|
||||
|
||||
if (snmp_fd >= 0)
|
||||
have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr),
|
||||
&start_count, NULL);
|
||||
}
|
||||
else
|
||||
have_supplies = start_count = 0;
|
||||
|
||||
@@ -932,6 +947,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
_("Unable to get printer status."));
|
||||
sleep(10);
|
||||
|
||||
httpReconnect(http);
|
||||
}
|
||||
|
||||
ippDelete(supported);
|
||||
@@ -959,9 +976,15 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
if ((printer_state = ippFindAttribute(supported,
|
||||
"printer-state-reasons",
|
||||
IPP_TAG_KEYWORD)) != NULL && !busy)
|
||||
IPP_TAG_KEYWORD)) == NULL)
|
||||
{
|
||||
update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
|
||||
"cups-ipp-missing-printer-state-reasons");
|
||||
}
|
||||
else if (!busy)
|
||||
{
|
||||
for (i = 0; i < printer_state->num_values; i ++)
|
||||
{
|
||||
if (!strcmp(printer_state->values[0].string.text,
|
||||
"spool-area-full") ||
|
||||
!strncmp(printer_state->values[0].string.text, "spool-area-full-",
|
||||
@@ -970,10 +993,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
busy = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
|
||||
"cups-ipp-missing-printer-state-reasons");
|
||||
|
||||
if (busy)
|
||||
{
|
||||
@@ -1036,6 +1057,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
if ((operations_sup = ippFindAttribute(supported, "operations-supported",
|
||||
IPP_TAG_ENUM)) != NULL)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: operations-supported (%d values)\n",
|
||||
operations_sup->num_values);
|
||||
for (i = 0; i < operations_sup->num_values; i ++)
|
||||
fprintf(stderr, "DEBUG: [%d] = %s\n", i,
|
||||
ippOpString(operations_sup->values[i].integer));
|
||||
|
||||
for (i = 0; i < operations_sup->num_values; i ++)
|
||||
if (operations_sup->values[i].integer == IPP_PRINT_JOB)
|
||||
break;
|
||||
@@ -1080,7 +1107,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
get_job_attrs = 1;
|
||||
}
|
||||
|
||||
if (!send_document)
|
||||
if (create_job && !send_document)
|
||||
{
|
||||
fputs("DEBUG: Printer supports Create-Job but not Send-Document.\n",
|
||||
stderr);
|
||||
@@ -1258,6 +1285,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
compatsize = fileinfo.st_size;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the printer only claims to support IPP/1.0, or if the user specifically
|
||||
* included version=1.0 in the URI, then do not try to use Create-Job or
|
||||
* Send-Document. This is another dreaded compatibility hack, but
|
||||
* unfortunately there are enough broken printers out there that we need
|
||||
* this for now...
|
||||
*/
|
||||
|
||||
if (version == 10)
|
||||
create_job = send_document = 0;
|
||||
|
||||
/*
|
||||
* Start monitoring the printer in the background...
|
||||
*/
|
||||
@@ -1474,10 +1512,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
else if (ipp_status == IPP_ERROR_JOB_CANCELED)
|
||||
else if (ipp_status == IPP_ERROR_JOB_CANCELED ||
|
||||
ipp_status == IPP_NOT_AUTHORIZED)
|
||||
goto cleanup;
|
||||
else if (ipp_status == IPP_NOT_AUTHORIZED)
|
||||
continue;
|
||||
else
|
||||
{
|
||||
/*
|
||||
@@ -1578,6 +1615,10 @@ main(int argc, /* I - Number of command-line args */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, document_format);
|
||||
|
||||
if (compression)
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"compression", NULL, compression);
|
||||
|
||||
fprintf(stderr, "DEBUG: Sending file %d using chunking...\n", i + 1);
|
||||
http_status = cupsSendRequest(http, request, resource, 0);
|
||||
if (http_status == HTTP_CONTINUE && request->state == IPP_DATA)
|
||||
@@ -1653,15 +1694,72 @@ main(int argc, /* I - Number of command-line args */
|
||||
else if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
|
||||
ipp_status == IPP_NOT_POSSIBLE ||
|
||||
ipp_status == IPP_PRINTER_BUSY)
|
||||
{
|
||||
if (argc == 6)
|
||||
{
|
||||
/*
|
||||
* Need to reprocess the entire job; if we have a job ID, cancel the
|
||||
* job first...
|
||||
*/
|
||||
|
||||
if (job_id > 0)
|
||||
cancel_job(http, uri, job_id, resource, argv[2], version);
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
continue;
|
||||
else if (ipp_status == IPP_REQUEST_VALUE)
|
||||
}
|
||||
else if (ipp_status == IPP_REQUEST_VALUE ||
|
||||
ipp_status == IPP_ERROR_JOB_CANCELED ||
|
||||
ipp_status == IPP_NOT_AUTHORIZED ||
|
||||
ipp_status == IPP_INTERNAL_ERROR)
|
||||
{
|
||||
/*
|
||||
* Print file is too large, abort this job...
|
||||
* Print file is too large, job was canceled, we need new
|
||||
* authentication data, or we had some sort of error...
|
||||
*/
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
else if (ipp_status == IPP_UPGRADE_REQUIRED)
|
||||
{
|
||||
/*
|
||||
* Server is configured incorrectly; the policy for Create-Job and
|
||||
* Send-Document has to be the same (auth or no auth, encryption or
|
||||
* no encryption). Force the queue to stop since printing will never
|
||||
* work.
|
||||
*/
|
||||
|
||||
fputs("DEBUG: The server or printer is configured incorrectly.\n",
|
||||
stderr);
|
||||
fputs("DEBUG: The policy for Create-Job and Send-Document must have the "
|
||||
"same authentication and encryption requirements.\n", stderr);
|
||||
|
||||
ipp_status = IPP_INTERNAL_ERROR;
|
||||
|
||||
if (job_id > 0)
|
||||
cancel_job(http, uri, job_id, resource, argv[2], version);
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
else if (ipp_status == IPP_NOT_FOUND)
|
||||
{
|
||||
/*
|
||||
* Printer does not actually implement support for Create-Job/
|
||||
* Send-Document, so log the conformance issue and stop the printer.
|
||||
*/
|
||||
|
||||
fputs("DEBUG: This printer claims to support Create-Job and "
|
||||
"Send-Document, but those operations failed.\n", stderr);
|
||||
fputs("DEBUG: Add '?version=1.0' to the device URI to use legacy "
|
||||
"compatibility mode.\n", stderr);
|
||||
update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
|
||||
"cups-ipp-missing-send-document");
|
||||
|
||||
ipp_status = IPP_INTERNAL_ERROR; /* Force queue to stop */
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
else
|
||||
copies_remaining --;
|
||||
|
||||
@@ -1826,7 +1924,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
if (have_supplies &&
|
||||
!backendSNMPSupplies(snmp_fd, http->hostaddr, &page_count, NULL) &&
|
||||
!backendSNMPSupplies(snmp_fd, &(http->addrlist->addr), &page_count,
|
||||
NULL) &&
|
||||
page_count > start_count)
|
||||
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
|
||||
|
||||
@@ -2839,8 +2938,7 @@ report_printer_state(ipp_t *ipp) /* I - IPP response */
|
||||
*/
|
||||
|
||||
static int /* O - Exit status */
|
||||
run_as_user(int argc, /* I - Number of command-line args */
|
||||
char *argv[], /* I - Command-line arguments */
|
||||
run_as_user(char *argv[], /* I - Command-line arguments */
|
||||
uid_t uid, /* I - User ID */
|
||||
const char *device_uri, /* I - Device URI */
|
||||
int fd) /* I - File to print */
|
||||
|
||||
+22
-5
@@ -126,6 +126,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
int port; /* Port number */
|
||||
char portname[256]; /* Port name (string) */
|
||||
http_addrlist_t *addrlist; /* List of addresses for printer */
|
||||
int snmp_enabled = 1; /* Is SNMP enabled? */
|
||||
int snmp_fd; /* SNMP socket */
|
||||
int fd; /* Print file */
|
||||
int status; /* Status of LPD job */
|
||||
@@ -356,7 +357,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*/
|
||||
|
||||
if (!value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true") ||
|
||||
!_cups_strcasecmp(value, "yes") ||
|
||||
!_cups_strcasecmp(value, "true") ||
|
||||
!_cups_strcasecmp(value, "rfc1179"))
|
||||
reserve = RESERVE_RFC1179;
|
||||
else if (!_cups_strcasecmp(value, "any"))
|
||||
@@ -371,7 +373,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*/
|
||||
|
||||
manual_copies = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
|
||||
!_cups_strcasecmp(value, "yes") ||
|
||||
!_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "sanitize_title"))
|
||||
{
|
||||
@@ -380,7 +383,18 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*/
|
||||
|
||||
sanitize_title = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
|
||||
!_cups_strcasecmp(value, "yes") ||
|
||||
!_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "snmp"))
|
||||
{
|
||||
/*
|
||||
* Enable/disable SNMP stuff...
|
||||
*/
|
||||
|
||||
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
_cups_strcasecmp(value, "yes") ||
|
||||
_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "timeout"))
|
||||
{
|
||||
@@ -428,7 +442,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
}
|
||||
}
|
||||
|
||||
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
|
||||
if (snmp_enabled)
|
||||
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
|
||||
else
|
||||
snmp_fd = -1;
|
||||
|
||||
/*
|
||||
* Wait for data from the filter...
|
||||
@@ -936,7 +953,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
}
|
||||
|
||||
if (orighost)
|
||||
if (orighost && _cups_strcasecmp(orighost, "localhost"))
|
||||
strlcpy(localhost, orighost, sizeof(localhost));
|
||||
else
|
||||
httpGetHostname(NULL, localhost, sizeof(localhost));
|
||||
|
||||
+10
-2
@@ -251,7 +251,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
#ifdef AF_INET6
|
||||
if ((ipv6 = _cupsSNMPOpen(AF_INET6)) < 0)
|
||||
return (1);
|
||||
perror("DEBUG: Unable to create IPv6 socket");
|
||||
#else
|
||||
ipv6 = -1;
|
||||
#endif /* AF_INET6 */
|
||||
@@ -1025,6 +1025,11 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
|
||||
* Description is the IEEE-1284 device ID...
|
||||
*/
|
||||
|
||||
char *ptr; /* Pointer into device ID */
|
||||
|
||||
for (ptr = (char *)packet.object_value.string.bytes; *ptr; ptr ++)
|
||||
if (*ptr == '\n')
|
||||
*ptr = ';'; /* A lot of bad printers put a newline */
|
||||
if (!device->id)
|
||||
device->id = strdup((char *)packet.object_value.string.bytes);
|
||||
|
||||
@@ -1066,8 +1071,11 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
|
||||
*/
|
||||
|
||||
char make_model[256]; /* Make and model */
|
||||
char *ptr; /* Pointer into device ID */
|
||||
|
||||
|
||||
for (ptr = (char *)packet.object_value.string.bytes; *ptr; ptr ++)
|
||||
if (*ptr == '\n')
|
||||
*ptr = ';'; /* A lot of bad printers put a newline */
|
||||
if (device->id)
|
||||
free(device->id);
|
||||
|
||||
|
||||
+17
-3
@@ -87,6 +87,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
http_addrlist_t *addrlist, /* Address list */
|
||||
*addr; /* Connected address */
|
||||
char addrname[256]; /* Address name */
|
||||
int snmp_enabled = 1; /* Is SNMP enabled? */
|
||||
int snmp_fd, /* SNMP socket */
|
||||
start_count, /* Page count via SNMP at start */
|
||||
page_count, /* Page count via SNMP */
|
||||
@@ -246,6 +247,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
waiteof = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "snmp"))
|
||||
{
|
||||
/*
|
||||
* Enable/disable SNMP stuff...
|
||||
*/
|
||||
|
||||
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
|
||||
_cups_strcasecmp(value, "yes") ||
|
||||
_cups_strcasecmp(value, "true");
|
||||
}
|
||||
else if (!_cups_strcasecmp(name, "contimeout"))
|
||||
{
|
||||
/*
|
||||
@@ -286,11 +297,14 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* See if the printer supports SNMP...
|
||||
*/
|
||||
|
||||
if ((snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family)) >= 0)
|
||||
{
|
||||
if (snmp_enabled)
|
||||
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
|
||||
else
|
||||
snmp_fd = -1;
|
||||
|
||||
if (snmp_fd >= 0)
|
||||
have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr),
|
||||
&start_count, NULL);
|
||||
}
|
||||
else
|
||||
have_supplies = start_count = 0;
|
||||
|
||||
|
||||
+421
-110
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -13,7 +13,7 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* list_devices() - List the available printers.
|
||||
* list_devices() - List the available printers.
|
||||
* print_device() - Print a file to a USB device.
|
||||
* close_device() - Close the connection to the USB printer.
|
||||
* find_device() - Find or enumerate USB printers.
|
||||
@@ -22,6 +22,9 @@
|
||||
* make_device_uri() - Create a device URI for a USB printer.
|
||||
* open_device() - Open a connection to the USB printer.
|
||||
* print_cb() - Find a USB printer for printing.
|
||||
* printer_class_soft_reset()' - Do the soft reset request specific to
|
||||
* printers
|
||||
* quirks() - Get the known quirks of a given printer model
|
||||
* read_thread() - Thread to read the backchannel data on.
|
||||
* sidechannel_thread() - Handle side-channel requests.
|
||||
* soft_reset() - Send a soft reset to the device.
|
||||
@@ -60,13 +63,15 @@ typedef struct usb_printer_s /**** USB Printer Data ****/
|
||||
{
|
||||
struct libusb_device *device; /* Device info */
|
||||
int conf, /* Configuration */
|
||||
origconf, /* Original configuration */
|
||||
iface, /* Interface */
|
||||
altset, /* Alternate setting */
|
||||
write_endp, /* Write endpoint */
|
||||
read_endp, /* Read endpoint */
|
||||
read_endp, /* Read endpoint */
|
||||
protocol, /* Protocol: 1 = Uni-di, 2 = Bi-di. */
|
||||
usblp_attached; /* Is the "usblp" kernel module
|
||||
attached? */
|
||||
usblp_attached, /* "usblp" kernel module attached? */
|
||||
reset_after_job; /* Set to 1 by print_device() */
|
||||
unsigned int quirks; /* Quirks flags */
|
||||
struct libusb_device_handle *handle; /* Open handle to device */
|
||||
} usb_printer_t;
|
||||
|
||||
@@ -99,6 +104,121 @@ typedef struct usb_globals_s
|
||||
int sidechannel_thread_done;
|
||||
} usb_globals_t;
|
||||
|
||||
/*
|
||||
* Quirks: various printer quirks are handled by this table & its flags.
|
||||
*
|
||||
* This is copied from the usblp kernel module. So we can easily copy and paste
|
||||
* new quirks from the module.
|
||||
*/
|
||||
|
||||
struct quirk_printer_struct {
|
||||
int vendorId;
|
||||
int productId;
|
||||
unsigned int quirks;
|
||||
};
|
||||
|
||||
#define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires
|
||||
unidirectional mode (no INs/reads) */
|
||||
#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
|
||||
#define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific
|
||||
Class or SubClass */
|
||||
#define USBLP_QUIRK_BLACKLIST 0x8 /* these printers do not conform to the USB print spec */
|
||||
#define USBLP_QUIRK_RESET 0x4000 /* After printing do a reset
|
||||
for clean-up */
|
||||
#define USBLP_QUIRK_NO_REATTACH 0x8000 /* After printing we cannot re-attach
|
||||
the usblp kernel module */
|
||||
|
||||
static const struct quirk_printer_struct quirk_printers[] = {
|
||||
{ 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
|
||||
{ 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */
|
||||
{ 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */
|
||||
{ 0x03f0, 0x0304, USBLP_QUIRK_BIDIR }, /* HP DeskJet 810C/812C */
|
||||
{ 0x03f0, 0x0404, USBLP_QUIRK_BIDIR }, /* HP DeskJet 830C */
|
||||
{ 0x03f0, 0x0504, USBLP_QUIRK_BIDIR }, /* HP DeskJet 885C */
|
||||
{ 0x03f0, 0x0604, USBLP_QUIRK_BIDIR }, /* HP DeskJet 840C */
|
||||
{ 0x03f0, 0x0804, USBLP_QUIRK_BIDIR }, /* HP DeskJet 816C */
|
||||
{ 0x03f0, 0x1104, USBLP_QUIRK_BIDIR }, /* HP Deskjet 959C */
|
||||
{ 0x0409, 0xefbe, USBLP_QUIRK_BIDIR }, /* NEC Picty900 (HP OEM) */
|
||||
{ 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
|
||||
{ 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
|
||||
{ 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
|
||||
{ 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820,
|
||||
by zut <kernel@zut.de> */
|
||||
{ 0x04a9, 0x10a2, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4200
|
||||
Printer, http://www.cups.org/str.php?L4155 */
|
||||
{ 0x04a9, 0x10b6, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4300
|
||||
Printer, https://bugs.launchpad.net/bugs/1032385 */
|
||||
{ 0x04a9, 0x1721, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP210
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=847923#c53 */
|
||||
{ 0x04a9, 0x170c, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP500
|
||||
Printer, https://bugs.launchpad.net/bugs/1032456 */
|
||||
{ 0x04a9, 0x1717, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP510
|
||||
Printer, https://bugs.launchpad.net/bugs/1050009 */
|
||||
{ 0x04a9, 0x173d, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP550
|
||||
Printer, http://www.cups.org/str.php?L4155 */
|
||||
{ 0x04a9, 0x173e, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP560
|
||||
Printer, http://www.cups.org/str.php?L4155 */
|
||||
{ 0x04f9, 0x001a, USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
|
||||
HL-1430 Laser Printer,
|
||||
https://bugs.launchpad.net/bugs/1038695 */
|
||||
{ 0x04f9, 0x000d, USBLP_QUIRK_BIDIR |
|
||||
USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
|
||||
HL-1440 Laser Printer,
|
||||
https://bugs.launchpad.net/bugs/1000253 */
|
||||
{ 0x06bc, 0x000b, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp.
|
||||
Okipage 14ex Printer,
|
||||
https://bugs.launchpad.net/bugs/872483 */
|
||||
{ 0x06bc, 0x01c7, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp. B410d,
|
||||
https://bugs.launchpad.net/bugs/872483 */
|
||||
{ 0x04b8, 0x0001, USBLP_QUIRK_BIDIR }, /* Seiko Epson Corp. Stylus Color 740 / Photo 750,
|
||||
http://bugs.debian.org/697970 */
|
||||
{ 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt
|
||||
Printer M129C */
|
||||
{ 0x067b, 0x2305, USBLP_QUIRK_BIDIR |
|
||||
USBLP_QUIRK_NO_REATTACH |
|
||||
USBLP_QUIRK_RESET },
|
||||
{ 0x0924, 0x3ce9, USBLP_QUIRK_NO_REATTACH }, /* Xerox Phaser 3124
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=867392 */
|
||||
{ 0x0924, 0x4293, USBLP_QUIRK_NO_REATTACH }, /* Xerox WorkCentre 3210
|
||||
https://bugs.launchpad.net/bugs/1102470 */
|
||||
/* Prolific Technology, Inc. PL2305 Parallel Port
|
||||
(USB -> Parallel adapter), https://bugs.launchpad.net/bugs/987485 */
|
||||
{ 0x04e8, 0x0000, USBLP_QUIRK_RESET }, /* All Samsung devices,
|
||||
https://bugs.launchpad.net/bugs/1032456 */
|
||||
{ 0x0a5f, 0x0000, USBLP_QUIRK_BIDIR }, /* All Zebra devices,
|
||||
https://bugs.launchpad.net/bugs/1001028 */
|
||||
/* Canon */
|
||||
{ 0x04a9, 0x304a, USBLP_QUIRK_BLACKLIST }, /* Canon CP-10 */
|
||||
{ 0x04a9, 0x3063, USBLP_QUIRK_BLACKLIST }, /* Canon CP-100 */
|
||||
{ 0x04a9, 0x307c, USBLP_QUIRK_BLACKLIST }, /* Canon CP-200 */
|
||||
{ 0x04a9, 0x307d, USBLP_QUIRK_BLACKLIST }, /* Canon CP-300 */
|
||||
{ 0x04a9, 0x30bd, USBLP_QUIRK_BLACKLIST }, /* Canon CP-220 */
|
||||
{ 0x04a9, 0x30be, USBLP_QUIRK_BLACKLIST }, /* Canon CP-330 */
|
||||
{ 0x04a9, 0x30f6, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP400 */
|
||||
{ 0x04a9, 0x310b, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP600 */
|
||||
{ 0x04a9, 0x3127, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP710 */
|
||||
{ 0x04a9, 0x3128, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP510 */
|
||||
{ 0x04a9, 0x3141, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES1 */
|
||||
{ 0x04a9, 0x3142, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP730 */
|
||||
{ 0x04a9, 0x3143, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP720 */
|
||||
{ 0x04a9, 0x3170, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP750 */
|
||||
{ 0x04a9, 0x3171, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP740 */
|
||||
{ 0x04a9, 0x3185, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES2 */
|
||||
{ 0x04a9, 0x3186, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES20 */
|
||||
{ 0x04a9, 0x31aa, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP770 */
|
||||
{ 0x04a9, 0x31ab, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP760 */
|
||||
{ 0x04a9, 0x31b0, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES30 */
|
||||
{ 0x04a9, 0x31dd, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
|
||||
{ 0x04a9, 0x31ee, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES40 */
|
||||
{ 0x04a9, 0x3214, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP800 */
|
||||
{ 0x04a9, 0x3255, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP900 */
|
||||
{ 0x04a9, 0x3256, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP810 */
|
||||
{ 0x04a9, 0x30F5, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP500 */
|
||||
{ 0x04a9, 0x31AF, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES3 */
|
||||
/* MISSING PIDs: CP520, CP530, CP790 */
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Globals...
|
||||
@@ -124,6 +244,8 @@ static char *make_device_uri(usb_printer_t *printer,
|
||||
static int open_device(usb_printer_t *printer, int verbose);
|
||||
static int print_cb(usb_printer_t *printer, const char *device_uri,
|
||||
const char *device_id, const void *data);
|
||||
static int printer_class_soft_reset(usb_printer_t *printer);
|
||||
static unsigned int quirks(int vendor, int product);
|
||||
static void *read_thread(void *reference);
|
||||
static void *sidechannel_thread(void *reference);
|
||||
static void soft_reset(void);
|
||||
@@ -163,7 +285,8 @@ print_device(const char *uri, /* I - Device URI */
|
||||
iostatus; /* Current IO status */
|
||||
pthread_t read_thread_id, /* Read thread */
|
||||
sidechannel_thread_id; /* Side-channel thread */
|
||||
int have_sidechannel = 0; /* Was the side-channel thread started? */
|
||||
int have_sidechannel = 0, /* Was the side-channel thread started? */
|
||||
have_backchannel = 0; /* Do we have a back channel? */
|
||||
struct stat sidechannel_info; /* Side-channel file descriptor info */
|
||||
unsigned char print_buffer[8192], /* Print data buffer */
|
||||
*print_ptr; /* Pointer into print data buffer */
|
||||
@@ -172,6 +295,9 @@ print_device(const char *uri, /* I - Device URI */
|
||||
struct timeval *timeout, /* Timeout pointer */
|
||||
tv; /* Time value */
|
||||
struct timespec cond_timeout; /* pthread condition timeout */
|
||||
int num_opts; /* Number of options */
|
||||
cups_option_t *opts; /* Options */
|
||||
const char *val; /* Option value */
|
||||
|
||||
|
||||
/*
|
||||
@@ -187,6 +313,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
* Connect to the printer...
|
||||
*/
|
||||
|
||||
fprintf(stderr, "DEBUG: Printing on printer with URI: %s\n", uri);
|
||||
while ((g.printer = find_device(print_cb, uri)) == NULL)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "INFO",
|
||||
@@ -196,6 +323,12 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
g.print_fd = print_fd;
|
||||
|
||||
/*
|
||||
* Some devices need a reset after finishing a job, these devices are
|
||||
* marked with the USBLP_QUIRK_RESET quirk.
|
||||
*/
|
||||
g.printer->reset_after_job = (g.printer->quirks & USBLP_QUIRK_RESET ? 1 : 0);
|
||||
|
||||
/*
|
||||
* If we are printing data from a print driver on stdin, ignore SIGTERM
|
||||
* so that the driver can finish out any page data, e.g. to eject the
|
||||
@@ -239,25 +372,62 @@ print_device(const char *uri, /* I - Device URI */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Debug mode: If option "usb-unidir" is given, always deactivate
|
||||
* backchannel
|
||||
*/
|
||||
|
||||
num_opts = cupsParseOptions(argv[5], 0, &opts);
|
||||
val = cupsGetOption("usb-unidir", num_opts, opts);
|
||||
if (val && strcasecmp(val, "no") && strcasecmp(val, "off") &&
|
||||
strcasecmp(val, "false"))
|
||||
{
|
||||
g.printer->read_endp = -1;
|
||||
fprintf(stderr, "DEBUG: Forced uni-directional communication "
|
||||
"via \"usb-unidir\" option.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Debug mode: If option "usb-no-reattach" is given, do not re-attach
|
||||
* the usblp kernel module after the job has completed.
|
||||
*/
|
||||
|
||||
val = cupsGetOption("usb-no-reattach", num_opts, opts);
|
||||
if (val && strcasecmp(val, "no") && strcasecmp(val, "off") &&
|
||||
strcasecmp(val, "false"))
|
||||
{
|
||||
g.printer->usblp_attached = 0;
|
||||
fprintf(stderr, "DEBUG: Forced not re-attaching the usblp kernel module "
|
||||
"after the job via \"usb-no-reattach\" option.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the read thread going...
|
||||
*/
|
||||
|
||||
g.read_thread_stop = 0;
|
||||
g.read_thread_done = 0;
|
||||
|
||||
pthread_cond_init(&g.read_thread_cond, NULL);
|
||||
pthread_mutex_init(&g.read_thread_mutex, NULL);
|
||||
|
||||
if (pthread_create(&read_thread_id, NULL, read_thread, NULL))
|
||||
if (g.printer->read_endp != -1)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Fatal USB error.\n");
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
_("There was an unrecoverable USB error."));
|
||||
fputs("DEBUG: Couldn't create read thread.\n", stderr);
|
||||
close_device(g.printer);
|
||||
return (CUPS_BACKEND_STOP);
|
||||
have_backchannel = 1;
|
||||
|
||||
g.read_thread_stop = 0;
|
||||
g.read_thread_done = 0;
|
||||
|
||||
pthread_cond_init(&g.read_thread_cond, NULL);
|
||||
pthread_mutex_init(&g.read_thread_mutex, NULL);
|
||||
|
||||
if (pthread_create(&read_thread_id, NULL, read_thread, NULL))
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Fatal USB error.\n");
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
_("There was an unrecoverable USB error."));
|
||||
fputs("DEBUG: Couldn't create read thread.\n", stderr);
|
||||
close_device(g.printer);
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "DEBUG: Uni-directional device/mode, back channel "
|
||||
"deactivated.\n");
|
||||
|
||||
/*
|
||||
* The main thread sends the print file...
|
||||
@@ -515,38 +685,18 @@ print_device(const char *uri, /* I - Device URI */
|
||||
* Signal the read thread to exit then wait 7 seconds for it to complete...
|
||||
*/
|
||||
|
||||
g.read_thread_stop = 1;
|
||||
|
||||
pthread_mutex_lock(&g.read_thread_mutex);
|
||||
|
||||
if (!g.read_thread_done)
|
||||
if (have_backchannel)
|
||||
{
|
||||
fputs("DEBUG: Waiting for read thread to exit...\n", stderr);
|
||||
g.read_thread_stop = 1;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
cond_timeout.tv_sec = tv.tv_sec + WAIT_EOF_DELAY;
|
||||
cond_timeout.tv_nsec = tv.tv_usec * 1000;
|
||||
|
||||
while (!g.read_thread_done)
|
||||
{
|
||||
if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
|
||||
&cond_timeout) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If it didn't exit abort the pending read and wait an additional second...
|
||||
*/
|
||||
pthread_mutex_lock(&g.read_thread_mutex);
|
||||
|
||||
if (!g.read_thread_done)
|
||||
{
|
||||
fputs("DEBUG: Read thread still active, aborting the pending read...\n",
|
||||
stderr);
|
||||
|
||||
g.wait_eof = 0;
|
||||
fputs("DEBUG: Waiting for read thread to exit...\n", stderr);
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
cond_timeout.tv_sec = tv.tv_sec + 1;
|
||||
cond_timeout.tv_sec = tv.tv_sec + WAIT_EOF_DELAY;
|
||||
cond_timeout.tv_nsec = tv.tv_usec * 1000;
|
||||
|
||||
while (!g.read_thread_done)
|
||||
@@ -555,14 +705,35 @@ print_device(const char *uri, /* I - Device URI */
|
||||
&cond_timeout) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If it didn't exit abort the pending read and wait an additional
|
||||
* second...
|
||||
*/
|
||||
|
||||
if (!g.read_thread_done)
|
||||
{
|
||||
fputs("DEBUG: Read thread still active, aborting the pending read...\n",
|
||||
stderr);
|
||||
|
||||
g.wait_eof = 0;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
cond_timeout.tv_sec = tv.tv_sec + 1;
|
||||
cond_timeout.tv_nsec = tv.tv_usec * 1000;
|
||||
|
||||
while (!g.read_thread_done)
|
||||
{
|
||||
if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
|
||||
&cond_timeout) != 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&g.read_thread_mutex);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&g.read_thread_mutex);
|
||||
|
||||
if (print_fd)
|
||||
close(print_fd);
|
||||
|
||||
/*
|
||||
* Close the connection and input file and general clean up...
|
||||
*/
|
||||
@@ -600,31 +771,86 @@ close_device(usb_printer_t *printer) /* I - Printer */
|
||||
* to the device...
|
||||
*/
|
||||
|
||||
int number; /* Interface number */
|
||||
int errcode; /* Return value of libusb function */
|
||||
int number1, /* Interface number */
|
||||
number2; /* Configuration number */
|
||||
|
||||
libusb_get_device_descriptor(printer->device, &devdesc);
|
||||
libusb_get_config_descriptor(printer->device, printer->conf, &confptr);
|
||||
number = confptr->interface[printer->iface].
|
||||
altsetting[printer->altset].bInterfaceNumber;
|
||||
libusb_release_interface(printer->handle, number);
|
||||
if (number != 0)
|
||||
libusb_release_interface(printer->handle, 0);
|
||||
errcode =
|
||||
libusb_get_config_descriptor(printer->device, printer->conf, &confptr);
|
||||
if (errcode >= 0)
|
||||
{
|
||||
number1 = confptr->interface[printer->iface].
|
||||
altsetting[printer->altset].bInterfaceNumber;
|
||||
libusb_release_interface(printer->handle, number1);
|
||||
|
||||
number2 = confptr->bConfigurationValue;
|
||||
|
||||
libusb_free_config_descriptor(confptr);
|
||||
|
||||
/*
|
||||
* If we have changed the configuration from one valid configuration
|
||||
* to another, restore the old one
|
||||
*/
|
||||
if (printer->origconf > 0 && printer->origconf != number2)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Restoring USB device configuration: %d -> %d\n",
|
||||
number2, printer->origconf);
|
||||
if ((errcode = libusb_set_configuration(printer->handle,
|
||||
printer->origconf)) < 0)
|
||||
{
|
||||
if (errcode != LIBUSB_ERROR_BUSY)
|
||||
{
|
||||
errcode =
|
||||
libusb_get_device_descriptor (printer->device, &devdesc);
|
||||
if (errcode < 0)
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to set configuration %d\n",
|
||||
printer->origconf);
|
||||
else
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to set configuration %d for %04x:%04x\n",
|
||||
printer->origconf, devdesc.idVendor, devdesc.idProduct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Re-attach "usblp" kernel module if it was attached before using this
|
||||
* device
|
||||
*/
|
||||
if (printer->usblp_attached == 1)
|
||||
if (libusb_attach_kernel_driver(printer->handle, number1) < 0)
|
||||
{
|
||||
errcode = libusb_get_device_descriptor (printer->device, &devdesc);
|
||||
if (errcode < 0)
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to re-attach \"usblp\" kernel module\n");
|
||||
else
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to re-attach \"usblp\" kernel module to "
|
||||
"%04x:%04x\n", devdesc.idVendor, devdesc.idProduct);
|
||||
}
|
||||
}
|
||||
else
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to get configuration descriptor %d\n",
|
||||
printer->conf);
|
||||
|
||||
/*
|
||||
* Re-attach "usblp" kernel module if it was attached before using this
|
||||
* device
|
||||
* Reset the device to clean up after the job
|
||||
*/
|
||||
|
||||
if (printer->usblp_attached == 1)
|
||||
if (printer->reset_after_job == 1)
|
||||
{
|
||||
if (libusb_attach_kernel_driver(printer->handle, printer->iface) < 0)
|
||||
if ((errcode = libusb_reset_device(printer->handle)) < 0)
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to re-attach \"usblp\" kernel module to "
|
||||
"%04x:%04x\n", devdesc.idVendor, devdesc.idProduct);
|
||||
"DEBUG: Device reset failed, error code: %d\n",
|
||||
errcode);
|
||||
else
|
||||
fprintf(stderr,
|
||||
"DEBUG: Resetting printer.\n");
|
||||
}
|
||||
|
||||
libusb_free_config_descriptor(confptr);
|
||||
|
||||
/*
|
||||
* Close the interface and return...
|
||||
*/
|
||||
@@ -694,12 +920,22 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
* a printer...
|
||||
*/
|
||||
|
||||
libusb_get_device_descriptor(device, &devdesc);
|
||||
if (libusb_get_device_descriptor(device, &devdesc) < 0)
|
||||
continue;
|
||||
|
||||
if (!devdesc.bNumConfigurations || !devdesc.idVendor ||
|
||||
!devdesc.idProduct)
|
||||
continue;
|
||||
|
||||
printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
|
||||
|
||||
/*
|
||||
* Ignore blacklisted printers...
|
||||
*/
|
||||
|
||||
if (printer.quirks & USBLP_QUIRK_BLACKLIST)
|
||||
continue;
|
||||
|
||||
for (conf = 0; conf < devdesc.bNumConfigurations; conf ++)
|
||||
{
|
||||
if (libusb_get_config_descriptor(device, conf, &confptr) < 0)
|
||||
@@ -724,13 +960,18 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
* 1284.4 (packet mode) protocol as well.
|
||||
*/
|
||||
|
||||
if (altptr->bInterfaceClass != LIBUSB_CLASS_PRINTER ||
|
||||
altptr->bInterfaceSubClass != 1 ||
|
||||
if (((altptr->bInterfaceClass != LIBUSB_CLASS_PRINTER ||
|
||||
altptr->bInterfaceSubClass != 1) &&
|
||||
((printer.quirks & USBLP_QUIRK_BAD_CLASS) == 0)) ||
|
||||
(altptr->bInterfaceProtocol != 1 && /* Unidirectional */
|
||||
altptr->bInterfaceProtocol != 2) || /* Bidirectional */
|
||||
altptr->bInterfaceProtocol < protocol)
|
||||
continue;
|
||||
|
||||
if (printer.quirks & USBLP_QUIRK_BAD_CLASS)
|
||||
fprintf(stderr, "DEBUG: Printer does not report class 7 and/or "
|
||||
"subclass 1 but works as a printer anyway\n");
|
||||
|
||||
read_endp = -1;
|
||||
write_endp = -1;
|
||||
|
||||
@@ -755,7 +996,10 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
protocol = altptr->bInterfaceProtocol;
|
||||
printer.altset = altset;
|
||||
printer.write_endp = write_endp;
|
||||
printer.read_endp = read_endp;
|
||||
if (protocol > 1)
|
||||
printer.read_endp = read_endp;
|
||||
else
|
||||
printer.read_endp = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -773,16 +1017,41 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
make_device_uri(&printer, device_id, device_uri,
|
||||
sizeof(device_uri));
|
||||
|
||||
fprintf(stderr, "DEBUG2: Printer found with device ID: %s "
|
||||
"Device URI: %s\n",
|
||||
device_id, device_uri);
|
||||
|
||||
if ((*cb)(&printer, device_uri, device_id, data))
|
||||
{
|
||||
printer.read_endp = confptr->interface[printer.iface].
|
||||
altsetting[printer.altset].
|
||||
endpoint[printer.read_endp].
|
||||
bEndpointAddress;
|
||||
fprintf(stderr, "DEBUG: Device protocol: %d\n",
|
||||
printer.protocol);
|
||||
if (printer.quirks & USBLP_QUIRK_BIDIR)
|
||||
{
|
||||
printer.read_endp = -1;
|
||||
fprintf(stderr, "DEBUG: Printer reports bi-di support "
|
||||
"but in reality works only uni-directionally\n");
|
||||
}
|
||||
if (printer.read_endp != -1)
|
||||
{
|
||||
printer.read_endp = confptr->interface[printer.iface].
|
||||
altsetting[printer.altset].
|
||||
endpoint[printer.read_endp].
|
||||
bEndpointAddress;
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "DEBUG: Uni-directional USB communication "
|
||||
"only!\n");
|
||||
printer.write_endp = confptr->interface[printer.iface].
|
||||
altsetting[printer.altset].
|
||||
endpoint[printer.write_endp].
|
||||
bEndpointAddress;
|
||||
if (printer.quirks & USBLP_QUIRK_NO_REATTACH)
|
||||
{
|
||||
printer.usblp_attached = 0;
|
||||
fprintf(stderr, "DEBUG: Printer does not like usblp "
|
||||
"kernel module to be re-attached after job\n");
|
||||
}
|
||||
libusb_free_config_descriptor(confptr);
|
||||
return (&printer);
|
||||
}
|
||||
|
||||
@@ -1086,15 +1355,20 @@ open_device(usb_printer_t *printer, /* I - Printer */
|
||||
* Try opening the printer...
|
||||
*/
|
||||
|
||||
if (libusb_open(printer->device, &printer->handle) < 0)
|
||||
if ((errcode = libusb_open(printer->device, &printer->handle)) < 0)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Failed to open device, code: %d\n",
|
||||
errcode);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
printer->usblp_attached = 0;
|
||||
printer->reset_after_job = 0;
|
||||
|
||||
if (verbose)
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
|
||||
if ((errcode = libusb_get_device_descriptor (printer->device, &devdesc)) < 0)
|
||||
if ((errcode = libusb_get_device_descriptor(printer->device, &devdesc)) < 0)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Failed to get device descriptor, code: %d\n",
|
||||
errcode);
|
||||
@@ -1142,12 +1416,22 @@ open_device(usb_printer_t *printer, /* I - Printer */
|
||||
0, 0, (unsigned char *)¤t, 1, 5000) < 0)
|
||||
current = 0; /* Assume not configured */
|
||||
|
||||
libusb_get_device_descriptor(printer->device, &devdesc);
|
||||
libusb_get_config_descriptor(printer->device, printer->conf, &confptr);
|
||||
printer->origconf = current;
|
||||
|
||||
if ((errcode =
|
||||
libusb_get_config_descriptor (printer->device, printer->conf, &confptr))
|
||||
< 0)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Failed to get config descriptor for %04x:%04x\n",
|
||||
devdesc.idVendor, devdesc.idProduct);
|
||||
goto error;
|
||||
}
|
||||
number1 = confptr->bConfigurationValue;
|
||||
|
||||
if (number1 != current)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Switching USB device configuration: %d -> %d\n",
|
||||
current, number1);
|
||||
if ((errcode = libusb_set_configuration(printer->handle, number1)) < 0)
|
||||
{
|
||||
/*
|
||||
@@ -1162,38 +1446,6 @@ open_device(usb_printer_t *printer, /* I - Printer */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the "usblp" kernel module out of the way. This backend only
|
||||
* works without the module attached.
|
||||
*/
|
||||
|
||||
errcode = libusb_kernel_driver_active(printer->handle, printer->iface);
|
||||
if (errcode == 0)
|
||||
printer->usblp_attached = 0;
|
||||
else if (errcode == 1)
|
||||
{
|
||||
printer->usblp_attached = 1;
|
||||
if ((errcode =
|
||||
libusb_detach_kernel_driver(printer->handle, printer->iface)) < 0)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Failed to detach \"usblp\" module from %04x:%04x\n",
|
||||
devdesc.idVendor, devdesc.idProduct);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printer->usblp_attached = 0;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Claim interfaces as needed...
|
||||
*/
|
||||
@@ -1358,6 +1610,65 @@ print_cb(usb_printer_t *printer, /* I - Printer */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'printer_class_soft_reset()' - Do the soft reset request specific to printers
|
||||
*
|
||||
* This soft reset is specific to the printer device class and is much less
|
||||
* invasive than the general USB reset libusb_reset_device(). Especially it
|
||||
* does never happen that the USB addressing and configuration changes. What
|
||||
* is actually done is that all buffers get flushed and the bulk IN and OUT
|
||||
* pipes get reset to their default states. This clears all stall conditions.
|
||||
* See http://cholla.mmto.org/computers/linux/usb/usbprint11.pdf
|
||||
*/
|
||||
|
||||
static int /* O - 0 on success, < 0 on error */
|
||||
printer_class_soft_reset(usb_printer_t *printer) /* I - Printer */
|
||||
{
|
||||
struct libusb_config_descriptor *confptr = NULL;
|
||||
/* Pointer to current configuration */
|
||||
int interface,
|
||||
errcode;
|
||||
|
||||
if (libusb_get_config_descriptor(printer->device, printer->conf, &confptr)
|
||||
< 0)
|
||||
interface = printer->iface;
|
||||
else
|
||||
interface = confptr->interface[printer->iface].
|
||||
altsetting[printer->altset].bInterfaceNumber;
|
||||
libusb_free_config_descriptor(confptr);
|
||||
if ((errcode = libusb_control_transfer(printer->handle,
|
||||
LIBUSB_REQUEST_TYPE_CLASS |
|
||||
LIBUSB_ENDPOINT_OUT |
|
||||
LIBUSB_RECIPIENT_OTHER,
|
||||
2, 0, interface, NULL, 0, 5000)) < 0)
|
||||
errcode = libusb_control_transfer(printer->handle,
|
||||
LIBUSB_REQUEST_TYPE_CLASS |
|
||||
LIBUSB_ENDPOINT_OUT |
|
||||
LIBUSB_RECIPIENT_INTERFACE,
|
||||
2, 0, interface, NULL, 0, 5000);
|
||||
return errcode;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'quirks()' - Get the known quirks of a given printer model
|
||||
*/
|
||||
|
||||
static unsigned int quirks(int vendor, int product)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; quirk_printers[i].vendorId; i++)
|
||||
{
|
||||
if (vendor == quirk_printers[i].vendorId &&
|
||||
(quirk_printers[i].productId == 0x0000 ||
|
||||
product == quirk_printers[i].productId))
|
||||
return quirk_printers[i].quirks;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'read_thread()' - Thread to read the backchannel data on.
|
||||
*/
|
||||
@@ -1632,7 +1943,7 @@ static void soft_reset(void)
|
||||
* Send the reset...
|
||||
*/
|
||||
|
||||
libusb_reset_device (g.printer->handle);
|
||||
printer_class_soft_reset(g.printer);
|
||||
|
||||
/*
|
||||
* Release the I/O lock...
|
||||
|
||||
+7
-3
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* "lpq" command for CUPS.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -371,6 +371,7 @@ show_jobs(const char *command, /* I - Command name */
|
||||
* attributes-natural-language
|
||||
* job-uri or printer-uri
|
||||
* requested-attributes
|
||||
* requesting-user-name
|
||||
*/
|
||||
|
||||
request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS);
|
||||
@@ -399,6 +400,9 @@ show_jobs(const char *command, /* I - Command name */
|
||||
"requesting-user-name", NULL, user);
|
||||
ippAddBoolean(request, IPP_TAG_OPERATION, "my-jobs", 1);
|
||||
}
|
||||
else
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
|
||||
"requesting-user-name", NULL, cupsUser());
|
||||
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"requested-attributes",
|
||||
@@ -447,8 +451,8 @@ show_jobs(const char *command, /* I - Command name */
|
||||
jobpriority = 50;
|
||||
#endif /* __osf__ */
|
||||
jobstate = IPP_JOB_PENDING;
|
||||
jobname = "untitled";
|
||||
jobuser = NULL;
|
||||
jobname = "unknown";
|
||||
jobuser = "unknown";
|
||||
jobdest = NULL;
|
||||
jobcopies = 1;
|
||||
|
||||
|
||||
+1
-1
@@ -380,7 +380,7 @@ show_all_classes(http_t *http, /* I - Connection to server */
|
||||
sprintf(val, "%d", count);
|
||||
cgiSetVariable("TOTAL", val);
|
||||
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL)
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
|
||||
ascending = !_cups_strcasecmp(var, "asc");
|
||||
else
|
||||
ascending = 1;
|
||||
|
||||
+4
-3
@@ -1432,7 +1432,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
|
||||
"ipp://localhost/");
|
||||
|
||||
if ((which_jobs = cgiGetVariable("which_jobs")) != NULL)
|
||||
if ((which_jobs = cgiGetVariable("which_jobs")) != NULL && *which_jobs)
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "which-jobs",
|
||||
NULL, which_jobs);
|
||||
|
||||
@@ -1480,10 +1480,11 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
if (first < 0)
|
||||
first = 0;
|
||||
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL)
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
|
||||
ascending = !_cups_strcasecmp(var, "asc");
|
||||
else
|
||||
ascending = !which_jobs || !_cups_strcasecmp(which_jobs, "not-completed");
|
||||
ascending = !which_jobs || !*which_jobs ||
|
||||
!_cups_strcasecmp(which_jobs, "not-completed");
|
||||
|
||||
section = cgiGetVariable("SECTION");
|
||||
|
||||
|
||||
@@ -397,7 +397,7 @@ show_all_printers(http_t *http, /* I - Connection to server */
|
||||
sprintf(val, "%d", count);
|
||||
cgiSetVariable("TOTAL", val);
|
||||
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL)
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL && *var)
|
||||
ascending = !_cups_strcasecmp(var, "asc");
|
||||
else
|
||||
ascending = 1;
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ include ../Makedefs
|
||||
# Config files...
|
||||
#
|
||||
|
||||
KEEP = cupsd.conf snmp.conf
|
||||
KEEP = cups-files.conf cupsd.conf snmp.conf
|
||||
REPLACE = mime.convs mime.types
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Sample file/directory/user/group configuration file for the CUPS scheduler.
|
||||
# See "man cups-files.conf" for a complete description of this file.
|
||||
#
|
||||
|
||||
# List of events that are considered fatal errors for the scheduler...
|
||||
#FatalErrors @CUPS_FATAL_ERRORS@
|
||||
|
||||
# Default user and group for filters/backends/helper programs; this cannot be
|
||||
# any user or group that resolves to ID 0 for security reasons...
|
||||
#User @CUPS_USER@
|
||||
#Group @CUPS_GROUP@
|
||||
|
||||
# Administrator user group, used to match @SYSTEM in cupsd.conf policy rules...
|
||||
SystemGroup @CUPS_SYSTEM_GROUPS@
|
||||
@CUPS_SYSTEM_AUTHKEY@
|
||||
|
||||
# User that is substituted for unauthenticated (remote) root accesses...
|
||||
#RemoteRoot remroot
|
||||
|
||||
# Do we allow file: device URIs other than to /dev/null?
|
||||
#FileDevice No
|
||||
|
||||
# Permissions for configuration and log files...
|
||||
#ConfigFilePerm 0@CUPS_CONFIG_FILE_PERM@
|
||||
#LogFilePerm 0@CUPS_LOG_FILE_PERM@
|
||||
|
||||
# Location of the file logging all access to the scheduler; may be the name
|
||||
# "syslog". If not an absolute path, the value of ServerRoot is used as the
|
||||
# root directory. Also see the "AccessLogLevel" directive in cupsd.conf.
|
||||
AccessLog @CUPS_LOGDIR@/access_log
|
||||
|
||||
# Location of cache files used by the scheduler...
|
||||
#CacheDir @CUPS_CACHEDIR@
|
||||
|
||||
# Location of data files used by the scheduler...
|
||||
#DataDir @CUPS_DATADIR@
|
||||
|
||||
# Location of the static web content served by the scheduler...
|
||||
#DocumentRoot @CUPS_DOCROOT@
|
||||
|
||||
# Location of the file logging all messages produced by the scheduler and any
|
||||
# helper programs; may be the name "syslog". If not an absolute path, the value
|
||||
# of ServerRoot is used as the root directory. Also see the "LogLevel"
|
||||
# directive in cupsd.conf.
|
||||
ErrorLog @CUPS_LOGDIR@/error_log
|
||||
|
||||
# Location of fonts used by older print filters...
|
||||
#FontPath @CUPS_FONTPATH@
|
||||
|
||||
# Location of LPD configuration
|
||||
#LPDConfigFile @CUPS_DEFAULT_LPD_CONFIG_FILE@
|
||||
|
||||
# Location of the file logging all pages printed by the scheduler and any
|
||||
# helper programs; may be the name "syslog". If not an absolute path, the value
|
||||
# of ServerRoot is used as the root directory. Also see the "PageLogFormat"
|
||||
# directive in cupsd.conf.
|
||||
PageLog @CUPS_LOGDIR@/page_log
|
||||
|
||||
# Location of the file listing all of the local printers...
|
||||
#Printcap @CUPS_DEFAULT_PRINTCAP@
|
||||
|
||||
# Format of the Printcap file...
|
||||
#PrintcapFormat bsd
|
||||
#PrintcapFormat plist
|
||||
#PrintcapFormat solaris
|
||||
|
||||
# Location of all spool files...
|
||||
#RequestRoot @CUPS_REQUESTS@
|
||||
|
||||
# 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@
|
||||
|
||||
# Location of other configuration files...
|
||||
#ServerRoot @CUPS_SERVERROOT@
|
||||
|
||||
# Location of Samba configuration file...
|
||||
#SMBConfigFile @CUPS_DEFAULT_SMB_CONFIG_FILE@
|
||||
|
||||
# Location of scheduler state files...
|
||||
#StateDir @CUPS_STATEDIR@
|
||||
|
||||
# Location of scheduler/helper temporary files. This directory is emptied on
|
||||
# scheduler startup and cannot be one of the standard (public) temporary
|
||||
# directory locations for security reasons...
|
||||
#TempDir @CUPS_REQUESTS@/tmp
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
#
|
||||
@@ -9,18 +9,12 @@
|
||||
# for troubleshooting...
|
||||
LogLevel @CUPS_LOG_LEVEL@
|
||||
|
||||
# Administrator user group...
|
||||
SystemGroup @CUPS_SYSTEM_GROUPS@
|
||||
@CUPS_SYSTEM_AUTHKEY@
|
||||
|
||||
# Only listen for connections from the local machine.
|
||||
Listen localhost:@DEFAULT_IPP_PORT@
|
||||
@CUPS_LISTEN_DOMAINSOCKET@
|
||||
|
||||
# Show shared printers on the local network.
|
||||
Browsing On
|
||||
BrowseOrder allow,deny
|
||||
BrowseAllow all
|
||||
BrowseLocalProtocols @CUPS_BROWSE_LOCAL_PROTOCOLS@
|
||||
|
||||
# Default authentication type, when authentication is required...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 10512 2012-05-25 02:19:37Z mike $"
|
||||
dnl "$Id: cups-common.m4 10785 2013-01-08 16:29:26Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
@@ -20,11 +20,11 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION="1.6b1"
|
||||
CUPS_VERSION="1.6.2"
|
||||
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'`"
|
||||
fi
|
||||
#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'`"
|
||||
#fi
|
||||
CUPS_BUILD="cups-$CUPS_VERSION"
|
||||
|
||||
AC_ARG_WITH(cups_build, [ --with-cups-build set "cups-config --build" string ],
|
||||
@@ -130,6 +130,7 @@ AC_CHECK_HEADER(crypt.h,AC_DEFINE(HAVE_CRYPT_H))
|
||||
AC_CHECK_HEADER(langinfo.h,AC_DEFINE(HAVE_LANGINFO_H))
|
||||
AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H))
|
||||
AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H))
|
||||
AC_CHECK_HEADER(stdint.h,AC_DEFINE(HAVE_STDINT_H))
|
||||
AC_CHECK_HEADER(string.h,AC_DEFINE(HAVE_STRING_H))
|
||||
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
|
||||
AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
|
||||
@@ -402,8 +403,8 @@ case $uname in
|
||||
if test $uversion -ge 100; then
|
||||
AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
|
||||
fi
|
||||
if test $uversion -ge 110; then
|
||||
# Broken public headers in 10.7...
|
||||
if test $uversion -ge 110 -a $uversion -lt 120; then
|
||||
# Broken public headers in 10.7.x...
|
||||
AC_MSG_CHECKING(for sandbox/private.h presence)
|
||||
if test -f /usr/local/include/sandbox/private.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -452,5 +453,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 10512 2012-05-25 02:19:37Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 10785 2013-01-08 16:29:26Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 10424 2012-04-23 17:26:57Z mike $"
|
||||
dnl "$Id: cups-defaults.m4 10710 2012-11-26 18:26:01Z mike $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for CUPS.
|
||||
dnl
|
||||
@@ -305,6 +305,7 @@ else
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG_FILE, "$CUPS_DEFAULT_LPD_CONFIG_FILE")
|
||||
AC_SUBST(CUPS_DEFAULT_LPD_CONFIG_FILE)
|
||||
|
||||
dnl Default SMB config file...
|
||||
AC_ARG_WITH(smbconfigfile, [ --with-smbconfigfile set default SMBConfigFile URI],
|
||||
@@ -326,6 +327,7 @@ else
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE")
|
||||
AC_SUBST(CUPS_DEFAULT_SMB_CONFIG_FILE)
|
||||
|
||||
dnl Default MaxCopies value...
|
||||
AC_ARG_WITH(max-copies, [ --with-max-copies set default max copies value, default=9999 ],
|
||||
@@ -398,5 +400,5 @@ AC_SUBST(CUPS_WEBIF)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 10424 2012-04-23 17:26:57Z mike $".
|
||||
dnl End of "$Id: cups-defaults.m4 10710 2012-11-26 18:26:01Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-directories.m4 10424 2012-04-23 17:26:57Z mike $"
|
||||
dnl "$Id: cups-directories.m4 10622 2012-10-01 01:55:23Z mike $"
|
||||
dnl
|
||||
dnl Directory stuff for CUPS.
|
||||
dnl
|
||||
@@ -106,7 +106,7 @@ if test "$libdir" = "\${exec_prefix}/lib"; then
|
||||
libdir="$exec_prefix/lib32"
|
||||
;;
|
||||
Linux*)
|
||||
if test -d /usr/lib64; then
|
||||
if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
|
||||
libdir="$exec_prefix/lib64"
|
||||
fi
|
||||
;;
|
||||
@@ -436,5 +436,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
||||
AC_SUBST(CUPS_STATEDIR)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-directories.m4 10424 2012-04-23 17:26:57Z mike $".
|
||||
dnl End of "$Id: cups-directories.m4 10622 2012-10-01 01:55:23Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-gssapi.m4 10424 2012-04-23 17:26:57Z mike $"
|
||||
dnl "$Id: cups-gssapi.m4 10785 2013-01-08 16:29:26Z mike $"
|
||||
dnl
|
||||
dnl GSSAPI/Kerberos library detection for CUPS.
|
||||
dnl
|
||||
@@ -86,13 +86,6 @@ if test x$enable_gssapi != xno; then
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_CHECKING(for GSS/gssapi_krb5.h presence)
|
||||
if test -f $gssdir/Headers/gssapi_krb5.h; then
|
||||
AC_DEFINE(HAVE_GSSAPI_KRB5_H)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_CHECKING(for GSS/gssapi_spi.h presence)
|
||||
if test -f $gssdir/PrivateHeaders/gssapi_spi.h; then
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -105,16 +98,14 @@ if test x$enable_gssapi != xno; then
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test $uversion -ge 110; then
|
||||
# Broken public headers in 10.7...
|
||||
if test $uversion -ge 110 -a $uversion -lt 120; then
|
||||
# Broken public headers in 10.7.x...
|
||||
AC_MSG_ERROR(Run 'sudo mkdir -p $gssdir/PrivateHeaders' and 'sudo touch $gssdir/PrivateHeaders/gssapi_spi.h' to build CUPS.)
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
|
||||
AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
|
||||
AC_CHECK_HEADER(gssapi/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GENERIC_H))
|
||||
AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_KRB5_H))
|
||||
fi
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
@@ -167,5 +158,5 @@ AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-gssapi.m4 10424 2012-04-23 17:26:57Z mike $".
|
||||
dnl End of "$Id: cups-gssapi.m4 10785 2013-01-08 16:29:26Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 10478 2012-05-18 17:59:14Z mike $"
|
||||
dnl "$Id: cups-ssl.m4 10710 2012-11-26 18:26:01Z mike $"
|
||||
dnl
|
||||
dnl OpenSSL/GNUTLS stuff for CUPS.
|
||||
dnl
|
||||
@@ -27,6 +27,8 @@ AC_ARG_WITH(openssl-includes, [ --with-openssl-includes set directory for OpenS
|
||||
SSLFLAGS=""
|
||||
SSLLIBS=""
|
||||
have_ssl=0
|
||||
CUPS_SERVERCERT=""
|
||||
CUPS_SERVERKEY=""
|
||||
|
||||
if test x$enable_ssl != xno; then
|
||||
dnl Look for CDSA...
|
||||
@@ -36,6 +38,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"
|
||||
|
||||
dnl Check for the various security headers...
|
||||
AC_CHECK_HEADER(Security/SecureTransportPriv.h,
|
||||
@@ -56,12 +59,6 @@ if test x$enable_ssl != xno; then
|
||||
AC_CHECK_HEADER(Security/SecIdentitySearchPriv.h,
|
||||
AC_DEFINE(HAVE_SECIDENTITYSEARCHPRIV_H))
|
||||
|
||||
dnl Check for SSLSetProtocolVersionMax...
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS -framework Security"
|
||||
AC_CHECK_FUNC(SSLSetProtocolVersionMax)
|
||||
LIBS="$SAVELIBS"
|
||||
|
||||
dnl Check for SecCertificateCopyData..
|
||||
AC_MSG_CHECKING(for SecCertificateCopyData)
|
||||
if test $uversion -ge 100; then
|
||||
@@ -112,6 +109,9 @@ if test x$enable_ssl != xno; then
|
||||
fi
|
||||
|
||||
if test $have_ssl = 1; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
|
||||
if $PKGCONFIG --exists gcrypt; then
|
||||
SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
|
||||
SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
|
||||
@@ -154,6 +154,9 @@ if test x$enable_ssl != xno; then
|
||||
done
|
||||
|
||||
if test "x${SSLLIBS}" != "x"; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
|
||||
LIBS="$SAVELIBS $SSLLIBS"
|
||||
AC_CHECK_FUNCS(SSL_set_tlsext_host_name)
|
||||
fi
|
||||
@@ -171,6 +174,8 @@ elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = x
|
||||
AC_MSG_ERROR([Unable to enable SSL support.])
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_SERVERCERT)
|
||||
AC_SUBST(CUPS_SERVERKEY)
|
||||
AC_SUBST(IPPALIASES)
|
||||
AC_SUBST(SSLFLAGS)
|
||||
AC_SUBST(SSLLIBS)
|
||||
@@ -179,5 +184,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 10478 2012-05-18 17:59:14Z mike $".
|
||||
dnl End of "$Id: cups-ssl.m4 10710 2012-11-26 18:26:01Z mike $".
|
||||
dnl
|
||||
|
||||
+7
-29
@@ -174,6 +174,13 @@
|
||||
#undef HAVE_SCSI_SG_H
|
||||
|
||||
|
||||
/*
|
||||
* Use <stdint.h>?
|
||||
*/
|
||||
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
|
||||
/*
|
||||
* Use <string.h>, <strings.h>, and/or <bstring.h>?
|
||||
*/
|
||||
@@ -345,13 +352,6 @@
|
||||
#undef HAVE_SECPOLICYCREATESSL
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the SSLSetProtocolVersionMax function?
|
||||
*/
|
||||
|
||||
#undef HAVE_SSLSETPROTOCOLVERSIONMAX
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the cssmErrorString function?
|
||||
*/
|
||||
@@ -359,25 +359,6 @@
|
||||
#undef HAVE_CSSMERRORSTRING
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the SLP library?
|
||||
*/
|
||||
|
||||
#undef HAVE_LIBSLP
|
||||
|
||||
|
||||
/*
|
||||
* Do we have an LDAP library?
|
||||
*/
|
||||
|
||||
#undef HAVE_LDAP
|
||||
#undef HAVE_OPENLDAP
|
||||
#undef HAVE_MOZILLA_LDAP
|
||||
#undef HAVE_LDAP_SSL_H
|
||||
#undef HAVE_LDAP_SSL
|
||||
#undef HAVE_LDAP_REBIND_PROC
|
||||
|
||||
|
||||
/*
|
||||
* Do we have libpaper?
|
||||
*/
|
||||
@@ -601,11 +582,8 @@
|
||||
#undef HAVE_GSS_GSSAPI_H
|
||||
#undef HAVE_GSS_GSSAPI_SPI_H
|
||||
#undef HAVE_GSSAPI
|
||||
#undef HAVE_GSSAPI_GENERIC_H
|
||||
#undef HAVE_GSSAPI_GSSAPI_H
|
||||
#undef HAVE_GSSAPI_H
|
||||
#undef HAVE_GSSAPI_KRB5_H
|
||||
#undef HAVE_KRB5_H
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+4
-1
@@ -3,7 +3,7 @@ dnl "$Id$"
|
||||
dnl
|
||||
dnl Configuration script for CUPS.
|
||||
dnl
|
||||
dnl Copyright 2007-2012 by Apple Inc.
|
||||
dnl Copyright 2007-2013 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
|
||||
@@ -60,6 +60,7 @@ AC_SUBST(INSTALL_LANGUAGES)
|
||||
AC_SUBST(UNINSTALL_LANGUAGES)
|
||||
|
||||
AC_OUTPUT(Makedefs
|
||||
conf/cups-files.conf
|
||||
conf/cupsd.conf
|
||||
conf/mime.convs
|
||||
conf/pam.std
|
||||
@@ -67,12 +68,14 @@ AC_OUTPUT(Makedefs
|
||||
cups-config
|
||||
data/testprint
|
||||
desktop/cups.desktop
|
||||
doc/help/ref-cups-files-conf.html
|
||||
doc/help/ref-cupsd-conf.html
|
||||
doc/help/standard.html
|
||||
doc/index.html
|
||||
man/client.conf.man
|
||||
man/cups-deviced.man
|
||||
man/cups-driverd.man
|
||||
man/cups-files.conf.man
|
||||
man/cups-lpd.man
|
||||
man/cups-snmp.man
|
||||
man/cupsaddsmb.man
|
||||
|
||||
+4
-4
@@ -304,7 +304,7 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER)
|
||||
echo Linking $@...
|
||||
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
|
||||
-install_name $(libdir)/$@ \
|
||||
-current_version 2.9.0 \
|
||||
-current_version 2.10.0 \
|
||||
-compatibility_version 2.0.0 \
|
||||
-exported_symbols_list t.exp \
|
||||
$(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
@@ -333,7 +333,7 @@ libcups_s.a: $(LIBOBJS) libcups_s.exp
|
||||
libcups.la: $(LIBOBJS)
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \
|
||||
-rpath $(LIBDIR) -version-info 2:9 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
-rpath $(LIBDIR) -version-info 2:10 $(LIBGSSAPI) $(SSLLIBS) \
|
||||
$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ apihelp:
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-cups.header --intro api-cups.shtml \
|
||||
api-cups.xml \
|
||||
cups.h adminutil.c dest.c language.c notify.c \
|
||||
cups.h adminutil.c dest*.c language.c notify.c \
|
||||
options.c tempfile.c usersys.c \
|
||||
util.c >../doc/help/api-cups.html
|
||||
mxmldoc --tokens help/api-cups.html api-cups.xml >../doc/help/api-cups.tokens
|
||||
@@ -573,7 +573,7 @@ framedhelp:
|
||||
--section "Programming" --title "CUPS API" \
|
||||
--css ../doc/cups-printable.css \
|
||||
--header api-cups.header --intro api-cups.shtml \
|
||||
cups.h adminutil.c dest.c language.c notify.c \
|
||||
cups.h adminutil.c dest*.c language.c notify.c \
|
||||
options.c tempfile.c usersys.c \
|
||||
util.c
|
||||
mxmldoc --framed api-filedir \
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ static void write_option(cups_file_t *dstfp, int order,
|
||||
/*
|
||||
* 'cupsAdminCreateWindowsPPD()' - Create the Windows PPD file for a printer.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @deprecated@
|
||||
*/
|
||||
|
||||
char * /* O - PPD file or NULL */
|
||||
@@ -393,7 +393,7 @@ cupsAdminCreateWindowsPPD(
|
||||
/*
|
||||
* 'cupsAdminExportSamba()' - Export a printer to Samba.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
* @deprecated@
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
|
||||
+8
-5
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Administration utility API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2001-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -55,16 +55,19 @@ extern int cupsAdminExportSamba(const char *dest, const char *ppd,
|
||||
const char *samba_server,
|
||||
const char *samba_user,
|
||||
const char *samba_password,
|
||||
FILE *logfile) _CUPS_API_1_2;
|
||||
FILE *logfile) _CUPS_DEPRECATED;
|
||||
extern char *cupsAdminCreateWindowsPPD(http_t *http, const char *dest,
|
||||
char *buffer, int bufsize) _CUPS_API_1_2;
|
||||
char *buffer, int bufsize)
|
||||
_CUPS_DEPRECATED;
|
||||
|
||||
extern int cupsAdminGetServerSettings(http_t *http,
|
||||
int *num_settings,
|
||||
cups_option_t **settings) _CUPS_API_1_3;
|
||||
cups_option_t **settings)
|
||||
_CUPS_API_1_3;
|
||||
extern int cupsAdminSetServerSettings(http_t *http,
|
||||
int num_settings,
|
||||
cups_option_t *settings) _CUPS_API_1_3;
|
||||
cups_option_t *settings)
|
||||
_CUPS_API_1_3;
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
|
||||
+16
-11
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Authentication functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -660,8 +660,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
int pid; /* Current process ID */
|
||||
FILE *fp; /* Certificate file */
|
||||
char trc[16], /* Try Root Certificate parameter */
|
||||
filename[1024], /* Certificate filename */
|
||||
certificate[33];/* Certificate string */
|
||||
filename[1024]; /* Certificate filename */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Global data */
|
||||
# if defined(HAVE_AUTHORIZATION_H)
|
||||
OSStatus status; /* Status */
|
||||
@@ -855,19 +854,25 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
|
||||
* Read the certificate from the file...
|
||||
*/
|
||||
|
||||
fgets(certificate, sizeof(certificate), fp);
|
||||
char certificate[33], /* Certificate string */
|
||||
*certptr; /* Pointer to certificate string */
|
||||
|
||||
certptr = fgets(certificate, sizeof(certificate), fp);
|
||||
fclose(fp);
|
||||
|
||||
/*
|
||||
* Set the authorization string and return...
|
||||
*/
|
||||
if (certptr)
|
||||
{
|
||||
/*
|
||||
* Set the authorization string and return...
|
||||
*/
|
||||
|
||||
httpSetAuthString(http, "Local", certificate);
|
||||
httpSetAuthString(http, "Local", certificate);
|
||||
|
||||
DEBUG_printf(("8cups_local_auth: Returning authstring=\"%s\"",
|
||||
http->authstring));
|
||||
DEBUG_printf(("8cups_local_auth: Returning authstring=\"%s\"",
|
||||
http->authstring));
|
||||
|
||||
return (0);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
return (1);
|
||||
|
||||
+1
-1
@@ -136,7 +136,7 @@ quote_string(const char *s) /* I - String to write */
|
||||
if (*s == '\\' || *s == '\"')
|
||||
putchar('\\');
|
||||
|
||||
if (*s == '\n')
|
||||
if (((*s & 255) < ' ' && *s != '\t') || *s == 0x7f)
|
||||
putchar(' ');
|
||||
else
|
||||
putchar(*s);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Private definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -158,7 +158,8 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
cups_server_cert_cb_t server_cert_cb; /* Server certificate callback */
|
||||
void *server_cert_data;
|
||||
/* Server certificate user data */
|
||||
int any_root, /* Allow any root */
|
||||
int server_version, /* Server IPP version */
|
||||
any_root, /* Allow any root */
|
||||
expired_certs, /* Allow expired certs */
|
||||
expired_root; /* Allow expired root */
|
||||
|
||||
|
||||
+2
-2
@@ -52,10 +52,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0600
|
||||
# define CUPS_VERSION 1.0602
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 6
|
||||
# define CUPS_VERSION_PATCH 0
|
||||
# define CUPS_VERSION_PATCH 2
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
|
||||
+17
-19
@@ -269,13 +269,13 @@ cupsCheckDestSupported(
|
||||
* Returns 1 if there is a conflict, 0 if there are no conflicts, and -1 if
|
||||
* there was an unrecoverable error such as a resolver loop.
|
||||
*
|
||||
* If "num_conflicts" and "conflicts" are not NULL, they are set to contain the
|
||||
* list of conflicting option/value pairs. Similarly, if "num_resolved" and
|
||||
* "resolved" are not NULL they will be set to the list of changes needed to
|
||||
* resolve the conflict.
|
||||
* If "num_conflicts" and "conflicts" are not @code NULL@, they are set to
|
||||
* contain the list of conflicting option/value pairs. Similarly, if
|
||||
* "num_resolved" and "resolved" are not @code NULL@ they will be set to the
|
||||
* list of changes needed to resolve the conflict.
|
||||
*
|
||||
* If cupsCopyDestConflicts returns 1 but "num_resolved" and "resolved" are set
|
||||
* to 0 and NULL, respectively, then the conflict cannot be resolved.
|
||||
* to 0 and @code NULL@, respectively, then the conflict cannot be resolved.
|
||||
*
|
||||
* @since CUPS 1.6/OS X 10.8@
|
||||
*/
|
||||
@@ -485,7 +485,7 @@ cupsCopyDestConflicts(
|
||||
active = NULL;
|
||||
}
|
||||
|
||||
if (tries >= 0)
|
||||
if (tries >= 100)
|
||||
{
|
||||
DEBUG_puts("1cupsCopyDestConflicts: Unable to resolve after 100 tries.");
|
||||
have_conflicts = -1;
|
||||
@@ -716,14 +716,13 @@ cupsFreeDestInfo(cups_dinfo_t *dinfo) /* I - Destination information */
|
||||
/*
|
||||
* 'cupsGetDestMediaByName()' - Get media names, dimensions, and margins.
|
||||
*
|
||||
* The "media" string is a PWG media name, while "width" and "length" are the
|
||||
* dimensions in hundredths of millimeters. "flags" provides some matching
|
||||
* The "media" string is a PWG media name. "Flags" provides some matching
|
||||
* guidance (multiple flags can be combined):
|
||||
*
|
||||
* CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer
|
||||
* CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size
|
||||
* CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing
|
||||
* CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size
|
||||
* CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
|
||||
* CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
|
||||
* CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing,
|
||||
* CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
|
||||
* CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
|
||||
* size amongst the "ready" media.
|
||||
*
|
||||
@@ -782,14 +781,13 @@ cupsGetDestMediaByName(
|
||||
/*
|
||||
* 'cupsGetDestMediaBySize()' - Get media names, dimensions, and margins.
|
||||
*
|
||||
* The "media" string is a PWG media name, while "width" and "length" are the
|
||||
* dimensions in hundredths of millimeters. "flags" provides some matching
|
||||
* guidance (multiple flags can be combined):
|
||||
* "Width" and "length" are the dimensions in hundredths of millimeters.
|
||||
* "Flags" provides some matching guidance (multiple flags can be combined):
|
||||
*
|
||||
* CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer
|
||||
* CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size
|
||||
* CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing
|
||||
* CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size
|
||||
* CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
|
||||
* CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
|
||||
* CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing,
|
||||
* CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
|
||||
* CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
|
||||
* size amongst the "ready" media.
|
||||
*
|
||||
|
||||
+6
-2
@@ -1788,7 +1788,7 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
* need to set a default if one exists...
|
||||
*/
|
||||
|
||||
if (dest == NULL && defprinter != NULL)
|
||||
if (!dest && *dests && defprinter)
|
||||
{
|
||||
for (i = 0; i < num_dests; i ++)
|
||||
(*dests)[i].is_default = 0;
|
||||
@@ -2449,7 +2449,7 @@ appleCopyNetwork(void)
|
||||
* 'appleGetPaperSize()' - Get the default paper size.
|
||||
*/
|
||||
|
||||
char * /* O - Default paper size */
|
||||
static char * /* O - Default paper size */
|
||||
appleGetPaperSize(char *name, /* I - Paper size name buffer */
|
||||
int namesize) /* I - Size of buffer */
|
||||
{
|
||||
@@ -2679,8 +2679,10 @@ cups_dnssd_browse_cb(
|
||||
AvahiLookupResultFlags flags, /* I - Flags */
|
||||
void *context) /* I - Devices array */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
AvahiClient *client = avahi_service_browser_get_client(browser);
|
||||
/* Client information */
|
||||
#endif /* DEBUG */
|
||||
_cups_dnssd_data_t *data = (_cups_dnssd_data_t *)context;
|
||||
/* Enumeration data */
|
||||
|
||||
@@ -3064,8 +3066,10 @@ cups_dnssd_query_cb(
|
||||
AvahiLookupResultFlags flags, /* I - Flags */
|
||||
void *context) /* I - Enumeration data */
|
||||
{
|
||||
# ifdef DEBUG
|
||||
AvahiClient *client = avahi_record_browser_get_client(browser);
|
||||
/* Client information */
|
||||
# endif /* DEBUG */
|
||||
# endif /* HAVE_DNSSD */
|
||||
_cups_dnssd_data_t *data = (_cups_dnssd_data_t *)context;
|
||||
/* Enumeration data */
|
||||
|
||||
+13
-1
@@ -71,13 +71,22 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "hue", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "hue-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 1, "include-schemes", IPP_TAG_NAME, IPP_TAG_OPERATION },
|
||||
{ 0, "job-impressions", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "job-id", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-impressions", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-impressions-completed", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "job-k-octets", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-k-octets-completed",IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-media-sheets", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-media-sheets-completed", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 0, "job-priority", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
{ 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
{ 1, "job-sheets", IPP_TAG_NAME, IPP_TAG_JOB },
|
||||
{ 1, "job-sheets-default", IPP_TAG_NAME, IPP_TAG_PRINTER },
|
||||
{ 0, "job-state", IPP_TAG_ENUM, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-state-message", IPP_TAG_TEXT, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-state-reasons", IPP_TAG_KEYWORD, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "job-uuid", IPP_TAG_URI, IPP_TAG_JOB },
|
||||
{ 0, "landscape", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
|
||||
{ 1, "marker-change-time", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
|
||||
@@ -179,6 +188,9 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ 0, "sides", IPP_TAG_KEYWORD, IPP_TAG_JOB,
|
||||
IPP_TAG_DOCUMENT },
|
||||
{ 0, "sides-default", IPP_TAG_KEYWORD, IPP_TAG_PRINTER },
|
||||
{ 0, "time-at-completed", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "time-at-creation", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "time-at-processing", IPP_TAG_INTEGER, IPP_TAG_ZERO }, /* never send as option */
|
||||
{ 0, "wrap", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
|
||||
{ 0, "wrap-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
|
||||
{ 0, "x-dimension", IPP_TAG_INTEGER, IPP_TAG_JOB,
|
||||
|
||||
+7
-6
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Global variable access routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -210,11 +210,12 @@ 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->expired_root = 1;
|
||||
cg->encryption = (http_encryption_t)-1;
|
||||
cg->password_cb = (cups_password_cb2_t)_cupsGetPassword;
|
||||
cg->any_root = 1;
|
||||
cg->expired_certs = 1;
|
||||
cg->expired_root = 1;
|
||||
cg->server_version = 20;
|
||||
|
||||
/*
|
||||
* Then set directories as appropriate...
|
||||
|
||||
@@ -44,29 +44,14 @@
|
||||
# ifdef HAVE_GSSAPI
|
||||
# ifdef HAVE_GSS_GSSAPI_H
|
||||
# include <GSS/gssapi.h>
|
||||
# ifdef HAVE_GSSAPI_GENERIC_H
|
||||
# include <GSS/gssapi_generic.h>
|
||||
# endif /* HAVE_GSSAPI_GENERIC_H */
|
||||
# ifdef HAVE_GSSAPI_KRB5_H
|
||||
# include <GSS/gssapi_krb5.h>
|
||||
# endif /* HAVE_GSSAPI_KRB5_H */
|
||||
# elif defined(HAVE_GSSAPI_GSSAPI_H)
|
||||
# include <gssapi/gssapi.h>
|
||||
# ifdef HAVE_GSSAPI_GENERIC_H
|
||||
# include <gssapi/gssapi_generic.h>
|
||||
# endif /* HAVE_GSSAPI_GENERIC_H */
|
||||
# ifdef HAVE_GSSAPI_KRB5_H
|
||||
# include <gssapi/gssapi_krb5.h>
|
||||
# endif /* HAVE_GSSAPI_KRB5_H */
|
||||
# elif defined(HAVE_GSSAPI_H)
|
||||
# include <gssapi.h>
|
||||
# endif /* HAVE_GSS_GSSAPI_H */
|
||||
# ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
|
||||
# define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
|
||||
# endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
|
||||
# ifdef HAVE_KRB5_H
|
||||
# include <krb5.h>
|
||||
# endif /* HAVE_KRB5_H */
|
||||
# endif /* HAVE_GSSAPI */
|
||||
|
||||
# ifdef HAVE_AUTHORIZATION_H
|
||||
|
||||
+20
-4
@@ -82,6 +82,7 @@ typedef struct _http_uribuf_s /* URI buffer */
|
||||
char *buffer; /* Pointer to buffer */
|
||||
size_t bufsize; /* Size of buffer */
|
||||
int options; /* Options passed to _httpResolveURI */
|
||||
const char *resource; /* Resource from URI */
|
||||
} _http_uribuf_t;
|
||||
|
||||
|
||||
@@ -326,8 +327,7 @@ httpAssembleURI(
|
||||
/*
|
||||
* Otherwise, just copy the host string...
|
||||
*/
|
||||
|
||||
ptr = http_copy_encode(ptr, host, end, ":/?#[]@\\\"", NULL,
|
||||
ptr = http_copy_encode(ptr, host, end, "<>{}|^:/?#[]@\\\"", NULL,
|
||||
encoding & HTTP_URI_CODING_HOSTNAME);
|
||||
|
||||
if (!ptr)
|
||||
@@ -1523,6 +1523,7 @@ _httpResolveURI(
|
||||
uribuf.buffer = resolved_uri;
|
||||
uribuf.bufsize = resolved_size;
|
||||
uribuf.options = options;
|
||||
uribuf.resource = resource;
|
||||
|
||||
resolved_uri[0] = '\0';
|
||||
|
||||
@@ -1850,6 +1851,11 @@ http_copy_decode(char *dst, /* O - Destination buffer */
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
else if ((*src & 255) <= 0x20 || (*src & 255) >= 0x7f)
|
||||
{
|
||||
*ptr = '\0';
|
||||
return (NULL);
|
||||
}
|
||||
else
|
||||
*ptr++ = *src;
|
||||
}
|
||||
@@ -2057,6 +2063,8 @@ http_resolve_cb(
|
||||
error));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
httpAddrFreeList(addrlist);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2064,8 +2072,14 @@ http_resolve_cb(
|
||||
* Assemble the final device URI...
|
||||
*/
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme,
|
||||
NULL, hostTarget, ntohs(port), resource);
|
||||
if ((!strcmp(scheme, "ipp") || !strcmp(scheme, "ipps")) &&
|
||||
!strcmp(uribuf->resource, "/cups"))
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize,
|
||||
scheme, NULL, hostTarget, ntohs(port), "%s?snmp=false",
|
||||
resource);
|
||||
else
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize,
|
||||
scheme, NULL, hostTarget, ntohs(port), resource);
|
||||
|
||||
DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer));
|
||||
}
|
||||
@@ -2266,6 +2280,8 @@ http_resolve_cb(
|
||||
error));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
httpAddrFreeList(addrlist);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+50
-64
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* HTTP routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -133,6 +133,7 @@
|
||||
# include <signal.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif /* WIN32 */
|
||||
#ifdef HAVE_POLL
|
||||
# include <poll.h>
|
||||
@@ -3643,7 +3644,39 @@ http_send(http_t *http, /* I - Connection to server */
|
||||
*/
|
||||
|
||||
if (!http->fields[HTTP_FIELD_USER_AGENT][0])
|
||||
httpSetField(http, HTTP_FIELD_USER_AGENT, CUPS_MINIMAL);
|
||||
{
|
||||
#ifdef WIN32
|
||||
SYSTEM_INFO sysinfo; /* System information */
|
||||
OSVERSIONEX version; /* OS version info */
|
||||
|
||||
version.dwOSVersionInfoSize = sizeof(OSVERSIONEX);
|
||||
GetVersionInfoEx(&version);
|
||||
GetNativeSystemInfo(&sysinfo);
|
||||
|
||||
snprintf(buf, sizeof(buf), CUPS_MINIMAL " (Windows %d.%d; %s) IPP/2.0",
|
||||
version.major, version.minor,
|
||||
sysinfo.wProcessorArchitecture
|
||||
== PROCESSOR_ARCHITECTURE_AMD64 ? "amd64" :
|
||||
sysinfo.wProcessorArchitecture
|
||||
== PROCESSOR_ARCHITECTURE_ARM ? "arm" :
|
||||
sysinfo.wProcessorArchitecture
|
||||
== PROCESSOR_ARCHITECTURE_IA64 ? "ia64" :
|
||||
sysinfo.wProcessorArchitecture
|
||||
== PROCESSOR_ARCHITECTURE_INTEL ? "intel" :
|
||||
"unknown");
|
||||
|
||||
#else
|
||||
struct utsname name; /* uname info */
|
||||
|
||||
uname(&name);
|
||||
|
||||
snprintf(buf, sizeof(buf), CUPS_MINIMAL " (%s %s; %s) IPP/2.0",
|
||||
name.sysname, name.release, name.machine);
|
||||
#endif /* WIN32 */
|
||||
|
||||
DEBUG_printf(("8http_send: Default User-Agent: %s", buf));
|
||||
httpSetField(http, HTTP_FIELD_USER_AGENT, buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode the URI as needed...
|
||||
@@ -3702,8 +3735,17 @@ http_send(http_t *http, /* I - Connection to server */
|
||||
DEBUG_printf(("9http_send: %s: %s", http_fields[i],
|
||||
httpGetField(http, i)));
|
||||
|
||||
if (httpPrintf(http, "%s: %s\r\n", http_fields[i],
|
||||
httpGetField(http, i)) < 1)
|
||||
if (i == HTTP_FIELD_HOST)
|
||||
{
|
||||
if (httpPrintf(http, "Host: %s:%d\r\n", httpGetField(http, i),
|
||||
_httpAddrPort(http->hostaddr)) < 1)
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
else if (httpPrintf(http, "%s: %s\r\n", http_fields[i],
|
||||
httpGetField(http, i)) < 1)
|
||||
{
|
||||
http->status = HTTP_ERROR;
|
||||
return (-1);
|
||||
@@ -3781,63 +3823,6 @@ http_set_credentials(http_t *http) /* I - Connection to server */
|
||||
if ((credentials = http->tls_credentials) == NULL)
|
||||
credentials = cg->tls_credentials;
|
||||
|
||||
# if HAVE_SECPOLICYCREATESSL
|
||||
/*
|
||||
* Otherwise root around in the user's keychain to see if one can be found...
|
||||
*/
|
||||
|
||||
if (!credentials)
|
||||
{
|
||||
CFDictionaryRef query; /* Query dictionary */
|
||||
CFTypeRef matches = NULL; /* Matching credentials */
|
||||
CFArrayRef dn_array = NULL;/* Distinguished names array */
|
||||
CFTypeRef keys[] = { kSecClass,
|
||||
kSecMatchLimit,
|
||||
kSecReturnRef };
|
||||
/* Keys for dictionary */
|
||||
CFTypeRef values[] = { kSecClassCertificate,
|
||||
kSecMatchLimitOne,
|
||||
kCFBooleanTrue };
|
||||
/* Values for dictionary */
|
||||
|
||||
/*
|
||||
* Get the names associated with the server.
|
||||
*/
|
||||
|
||||
if ((error = SSLCopyDistinguishedNames(http->tls, &dn_array)) != noErr)
|
||||
{
|
||||
DEBUG_printf(("4http_set_credentials: SSLCopyDistinguishedNames, error=%d",
|
||||
(int)error));
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a query which will return all identities that can sign and match
|
||||
* the passed in policy.
|
||||
*/
|
||||
|
||||
query = CFDictionaryCreate(NULL,
|
||||
(const void**)(&keys[0]),
|
||||
(const void**)(&values[0]),
|
||||
sizeof(keys) / sizeof(keys[0]),
|
||||
&kCFTypeDictionaryKeyCallBacks,
|
||||
&kCFTypeDictionaryValueCallBacks);
|
||||
if (query)
|
||||
{
|
||||
error = SecItemCopyMatching(query, &matches);
|
||||
DEBUG_printf(("4http_set_credentials: SecItemCopyMatching, error=%d",
|
||||
(int)error));
|
||||
CFRelease(query);
|
||||
}
|
||||
|
||||
if (matches)
|
||||
CFRelease(matches);
|
||||
|
||||
if (dn_array)
|
||||
CFRelease(dn_array);
|
||||
}
|
||||
# endif /* HAVE_SECPOLICYCREATESSL */
|
||||
|
||||
if (credentials)
|
||||
{
|
||||
error = SSLSetCertificate(http->tls, credentials);
|
||||
@@ -3907,12 +3892,11 @@ http_set_wait(http_t *http) /* I - Connection to server */
|
||||
static int /* O - 0 on success, -1 on failure */
|
||||
http_setup_ssl(http_t *http) /* I - Connection to server */
|
||||
{
|
||||
_cups_globals_t *cg = _cupsGlobals();
|
||||
/* Pointer to library globals */
|
||||
int any_root; /* Allow any root */
|
||||
char hostname[256], /* Hostname */
|
||||
*hostptr; /* Pointer into hostname */
|
||||
|
||||
_cups_globals_t *cg = _cupsGlobals();
|
||||
/* Pointer to library globals */
|
||||
# ifdef HAVE_LIBSSL
|
||||
SSL_CTX *context; /* Context for encryption */
|
||||
BIO *bio; /* BIO data */
|
||||
@@ -4222,6 +4206,8 @@ http_setup_ssl(http_t *http) /* I - Connection to server */
|
||||
credential->datalen);
|
||||
cupsArrayAdd(names, credential);
|
||||
}
|
||||
else
|
||||
free(credential);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,8 +645,8 @@ ippEnumString(const char *attrname, /* I - Attribute name */
|
||||
|
||||
if (!strcmp(attrname, "document-state") &&
|
||||
enumvalue >= 3 &&
|
||||
enumvalue <= (3 + (int)(sizeof(ipp_document_states) /
|
||||
sizeof(ipp_document_states[0]))))
|
||||
enumvalue < (3 + (int)(sizeof(ipp_document_states) /
|
||||
sizeof(ipp_document_states[0]))))
|
||||
return (ipp_document_states[enumvalue - 3]);
|
||||
else if ((!strcmp(attrname, "finishings") ||
|
||||
!strcmp(attrname, "finishings-actual") ||
|
||||
@@ -654,13 +654,13 @@ ippEnumString(const char *attrname, /* I - Attribute name */
|
||||
!strcmp(attrname, "finishings-ready") ||
|
||||
!strcmp(attrname, "finishings-supported")) &&
|
||||
enumvalue >= 3 &&
|
||||
enumvalue <= (3 + (int)(sizeof(ipp_finishings) / sizeof(ipp_finishings[0]))))
|
||||
enumvalue < (3 + (int)(sizeof(ipp_finishings) / sizeof(ipp_finishings[0]))))
|
||||
return (ipp_finishings[enumvalue - 3]);
|
||||
else if ((!strcmp(attrname, "job-collation-type") ||
|
||||
!strcmp(attrname, "job-collation-type-actual")) &&
|
||||
enumvalue >= 3 &&
|
||||
enumvalue <= (3 + (int)(sizeof(ipp_job_collation_types) /
|
||||
sizeof(ipp_job_collation_types[0]))))
|
||||
enumvalue < (3 + (int)(sizeof(ipp_job_collation_types) /
|
||||
sizeof(ipp_job_collation_types[0]))))
|
||||
return (ipp_job_collation_types[enumvalue - 3]);
|
||||
else if (!strcmp(attrname, "job-state") &&
|
||||
enumvalue >= IPP_JOB_PENDING && enumvalue <= IPP_JOB_COMPLETED)
|
||||
@@ -672,16 +672,16 @@ ippEnumString(const char *attrname, /* I - Attribute name */
|
||||
!strcmp(attrname, "orientation-requested-default") ||
|
||||
!strcmp(attrname, "orientation-requested-supported")) &&
|
||||
enumvalue >= 3 &&
|
||||
enumvalue <= (3 + (int)(sizeof(ipp_orientation_requesteds) /
|
||||
sizeof(ipp_orientation_requesteds[0]))))
|
||||
enumvalue < (3 + (int)(sizeof(ipp_orientation_requesteds) /
|
||||
sizeof(ipp_orientation_requesteds[0]))))
|
||||
return (ipp_orientation_requesteds[enumvalue - 3]);
|
||||
else if ((!strcmp(attrname, "print-quality") ||
|
||||
!strcmp(attrname, "print-quality-actual") ||
|
||||
!strcmp(attrname, "print-quality-default") ||
|
||||
!strcmp(attrname, "print-quality-supported")) &&
|
||||
enumvalue >= 3 &&
|
||||
enumvalue <= (3 + (int)(sizeof(ipp_print_qualities) /
|
||||
sizeof(ipp_print_qualities[0]))))
|
||||
enumvalue < (3 + (int)(sizeof(ipp_print_qualities) /
|
||||
sizeof(ipp_print_qualities[0]))))
|
||||
return (ipp_print_qualities[enumvalue - 3]);
|
||||
else if (!strcmp(attrname, "printer-state") &&
|
||||
enumvalue >= IPP_PRINTER_IDLE && enumvalue <= IPP_PRINTER_STOPPED)
|
||||
|
||||
+42
-8
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Internet Printing Protocol functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -2327,7 +2327,9 @@ ippNextAttribute(ipp_t *ipp) /* I - IPP message */
|
||||
ipp_t * /* O - New IPP message */
|
||||
ippNew(void)
|
||||
{
|
||||
ipp_t *temp; /* New IPP message */
|
||||
ipp_t *temp; /* New IPP message */
|
||||
_cups_globals_t *cg = _cupsGlobals();
|
||||
/* Global data */
|
||||
|
||||
|
||||
DEBUG_puts("ippNew()");
|
||||
@@ -2335,11 +2337,11 @@ ippNew(void)
|
||||
if ((temp = (ipp_t *)calloc(1, sizeof(ipp_t))) != NULL)
|
||||
{
|
||||
/*
|
||||
* Default to IPP 2.0...
|
||||
* Set default version - usually 2.0...
|
||||
*/
|
||||
|
||||
temp->request.any.version[0] = 2;
|
||||
temp->request.any.version[1] = 0;
|
||||
temp->request.any.version[0] = cg->server_version / 10;
|
||||
temp->request.any.version[1] = cg->server_version % 10;
|
||||
temp->use = 1;
|
||||
}
|
||||
|
||||
@@ -2771,6 +2773,13 @@ ippReadIO(void *src, /* I - Data source */
|
||||
ipp->prev = ipp->current;
|
||||
|
||||
attr = ipp->current = ipp_add_attr(ipp, NULL, ipp->curtag, IPP_TAG_ZERO, 1);
|
||||
if (!attr)
|
||||
{
|
||||
_cupsSetHTTPError(HTTP_ERROR);
|
||||
DEBUG_puts("1ippReadIO: unable to allocate attribute.");
|
||||
_cupsBufferRelease((char *)buffer);
|
||||
return (IPP_ERROR);
|
||||
}
|
||||
|
||||
DEBUG_printf(("2ippReadIO: membername, ipp->current=%p, ipp->prev=%p",
|
||||
ipp->current, ipp->prev));
|
||||
@@ -3116,7 +3125,15 @@ ippReadIO(void *src, /* I - Data source */
|
||||
* we need to carry over...
|
||||
*/
|
||||
|
||||
if (n == 0)
|
||||
if (!attr)
|
||||
{
|
||||
_cupsSetError(IPP_INTERNAL_ERROR,
|
||||
_("IPP memberName with no attribute."), 1);
|
||||
DEBUG_puts("1ippReadIO: Member name without attribute.");
|
||||
_cupsBufferRelease((char *)buffer);
|
||||
return (IPP_ERROR);
|
||||
}
|
||||
else if (n == 0)
|
||||
{
|
||||
_cupsSetError(IPP_INTERNAL_ERROR,
|
||||
_("IPP memberName value is empty."), 1);
|
||||
@@ -4996,7 +5013,8 @@ ipp_free_values(ipp_attribute_t *attr, /* I - Attribute to free values from */
|
||||
_ipp_value_t *value; /* Current value */
|
||||
|
||||
|
||||
DEBUG_printf(("4ipp_free_values(attr=%p, element=%d, count=%d)", attr, element, count));
|
||||
DEBUG_printf(("4ipp_free_values(attr=%p, element=%d, count=%d)", attr,
|
||||
element, count));
|
||||
|
||||
if (!(attr->value_tag & IPP_TAG_COPY))
|
||||
{
|
||||
@@ -5008,8 +5026,13 @@ ipp_free_values(ipp_attribute_t *attr, /* I - Attribute to free values from */
|
||||
{
|
||||
case IPP_TAG_TEXTLANG :
|
||||
case IPP_TAG_NAMELANG :
|
||||
if (element == 0 && count == attr->num_values && attr->values[0].string.language)
|
||||
if (element == 0 && count == attr->num_values &&
|
||||
attr->values[0].string.language)
|
||||
{
|
||||
_cupsStrFree(attr->values[0].string.language);
|
||||
attr->values[0].string.language = NULL;
|
||||
}
|
||||
/* Fall through to other string values */
|
||||
|
||||
case IPP_TAG_TEXT :
|
||||
case IPP_TAG_NAME :
|
||||
@@ -5023,7 +5046,10 @@ ipp_free_values(ipp_attribute_t *attr, /* I - Attribute to free values from */
|
||||
for (i = count, value = attr->values + element;
|
||||
i > 0;
|
||||
i --, value ++)
|
||||
{
|
||||
_cupsStrFree(value->string.text);
|
||||
value->string.text = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case IPP_TAG_DEFAULT :
|
||||
@@ -5044,7 +5070,10 @@ ipp_free_values(ipp_attribute_t *attr, /* I - Attribute to free values from */
|
||||
for (i = count, value = attr->values + element;
|
||||
i > 0;
|
||||
i --, value ++)
|
||||
{
|
||||
ippDelete(value->collection);
|
||||
value->collection = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case IPP_TAG_STRING :
|
||||
@@ -5052,8 +5081,13 @@ ipp_free_values(ipp_attribute_t *attr, /* I - Attribute to free values from */
|
||||
for (i = count, value = attr->values + element;
|
||||
i > 0;
|
||||
i --, value ++)
|
||||
{
|
||||
if (value->unknown.data)
|
||||
{
|
||||
free(value->unknown.data);
|
||||
value->unknown.data = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -788,7 +788,7 @@ _cupsLangString(cups_lang_t *lang, /* I - Language */
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
if (!lang || !message)
|
||||
if (!lang || !message || !*message)
|
||||
return (message);
|
||||
|
||||
_cupsMutexLock(&lang_mutex);
|
||||
|
||||
+138
-132
@@ -69,7 +69,8 @@ static int pwg_compare_finishings(_pwg_finishings_t *a,
|
||||
_pwg_finishings_t *b);
|
||||
static void pwg_free_finishings(_pwg_finishings_t *f);
|
||||
static void pwg_ppdize_name(const char *ipp, char *name, size_t namesize);
|
||||
static void pwg_unppdize_name(const char *ppd, char *name, size_t namesize);
|
||||
static void pwg_unppdize_name(const char *ppd, char *name, size_t namesize,
|
||||
const char *dashchars);
|
||||
|
||||
|
||||
/*
|
||||
@@ -329,7 +330,7 @@ _ppdCacheCreateWithFile(
|
||||
goto create_error;
|
||||
}
|
||||
|
||||
if ((num_sizes = atoi(value)) <= 0 || num_sizes > 65536)
|
||||
if ((num_sizes = atoi(value)) < 0 || num_sizes > 65536)
|
||||
{
|
||||
DEBUG_printf(("_ppdCacheCreateWithFile: Bad NumSizes value %d on line "
|
||||
"%d.", num_sizes, linenum));
|
||||
@@ -337,12 +338,15 @@ _ppdCacheCreateWithFile(
|
||||
goto create_error;
|
||||
}
|
||||
|
||||
if ((pc->sizes = calloc(num_sizes, sizeof(_pwg_size_t))) == NULL)
|
||||
if (num_sizes > 0)
|
||||
{
|
||||
DEBUG_printf(("_ppdCacheCreateWithFile: Unable to allocate %d sizes.",
|
||||
num_sizes));
|
||||
_cupsSetError(IPP_INTERNAL_ERROR, strerror(errno), 0);
|
||||
goto create_error;
|
||||
if ((pc->sizes = calloc(num_sizes, sizeof(_pwg_size_t))) == NULL)
|
||||
{
|
||||
DEBUG_printf(("_ppdCacheCreateWithFile: Unable to allocate %d sizes.",
|
||||
num_sizes));
|
||||
_cupsSetError(IPP_INTERNAL_ERROR, strerror(errno), 0);
|
||||
goto create_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Size"))
|
||||
@@ -684,148 +688,145 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
* Copy and convert size data...
|
||||
*/
|
||||
|
||||
if (ppd->num_sizes == 0)
|
||||
if (ppd->num_sizes > 0)
|
||||
{
|
||||
DEBUG_puts("_ppdCacheCreateWithPPD: No page sizes in PPD.");
|
||||
goto create_error;
|
||||
}
|
||||
|
||||
if ((pc->sizes = calloc(ppd->num_sizes, sizeof(_pwg_size_t))) == NULL)
|
||||
{
|
||||
DEBUG_printf(("_ppdCacheCreateWithPPD: Unable to allocate %d "
|
||||
"_pwg_size_t's.", ppd->num_sizes));
|
||||
goto create_error;
|
||||
}
|
||||
|
||||
for (i = ppd->num_sizes, pwg_size = pc->sizes, ppd_size = ppd->sizes;
|
||||
i > 0;
|
||||
i --, ppd_size ++)
|
||||
{
|
||||
/*
|
||||
* Don't copy over custom size...
|
||||
*/
|
||||
|
||||
if (!_cups_strcasecmp(ppd_size->name, "Custom"))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Convert the PPD size name to the corresponding PWG keyword name.
|
||||
*/
|
||||
|
||||
if ((pwg_media = _pwgMediaForPPD(ppd_size->name)) != NULL)
|
||||
if ((pc->sizes = calloc(ppd->num_sizes, sizeof(_pwg_size_t))) == NULL)
|
||||
{
|
||||
/*
|
||||
* Standard name, do we have conflicts?
|
||||
*/
|
||||
|
||||
for (j = 0; j < pc->num_sizes; j ++)
|
||||
if (!strcmp(pc->sizes[j].map.pwg, pwg_media->pwg))
|
||||
{
|
||||
pwg_media = NULL;
|
||||
break;
|
||||
}
|
||||
DEBUG_printf(("_ppdCacheCreateWithPPD: Unable to allocate %d "
|
||||
"_pwg_size_t's.", ppd->num_sizes));
|
||||
goto create_error;
|
||||
}
|
||||
|
||||
if (pwg_media)
|
||||
for (i = ppd->num_sizes, pwg_size = pc->sizes, ppd_size = ppd->sizes;
|
||||
i > 0;
|
||||
i --, ppd_size ++)
|
||||
{
|
||||
/*
|
||||
* Standard name and no conflicts, use it!
|
||||
* Don't copy over custom size...
|
||||
*/
|
||||
|
||||
pwg_name = pwg_media->pwg;
|
||||
new_known_pwg = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_cups_strcasecmp(ppd_size->name, "Custom"))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Not a standard name; convert it to a PWG vendor name of the form:
|
||||
*
|
||||
* pp_lowerppd_WIDTHxHEIGHTuu
|
||||
* Convert the PPD size name to the corresponding PWG keyword name.
|
||||
*/
|
||||
|
||||
pwg_name = pwg_keyword;
|
||||
new_known_pwg = 0;
|
||||
|
||||
pwg_unppdize_name(ppd_size->name, ppd_name, sizeof(ppd_name));
|
||||
_pwgGenerateSize(pwg_keyword, sizeof(pwg_keyword), NULL, ppd_name,
|
||||
_PWG_FROMPTS(ppd_size->width),
|
||||
_PWG_FROMPTS(ppd_size->length));
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have a similar paper with non-zero margins then we only want to
|
||||
* keep it if it has a larger imageable area length. The NULL check is for
|
||||
* dimensions that are <= 0...
|
||||
*/
|
||||
|
||||
if ((pwg_media = _pwgMediaForSize(_PWG_FROMPTS(ppd_size->width),
|
||||
_PWG_FROMPTS(ppd_size->length))) == NULL)
|
||||
continue;
|
||||
|
||||
new_width = pwg_media->width;
|
||||
new_length = pwg_media->length;
|
||||
new_left = _PWG_FROMPTS(ppd_size->left);
|
||||
new_bottom = _PWG_FROMPTS(ppd_size->bottom);
|
||||
new_right = _PWG_FROMPTS(ppd_size->width - ppd_size->right);
|
||||
new_top = _PWG_FROMPTS(ppd_size->length - ppd_size->top);
|
||||
new_imageable = new_length - new_top - new_bottom;
|
||||
new_borderless = new_bottom == 0 && new_top == 0 &&
|
||||
new_left == 0 && new_right == 0;
|
||||
|
||||
for (k = pc->num_sizes, similar = 0, old_size = pc->sizes, new_size = NULL;
|
||||
k > 0 && !similar;
|
||||
k --, old_size ++)
|
||||
{
|
||||
old_imageable = old_size->length - old_size->top - old_size->bottom;
|
||||
old_borderless = old_size->left == 0 && old_size->bottom == 0 &&
|
||||
old_size->right == 0 && old_size->top == 0;
|
||||
old_known_pwg = strncmp(old_size->map.pwg, "oe_", 3) &&
|
||||
strncmp(old_size->map.pwg, "om_", 3);
|
||||
|
||||
similar = old_borderless == new_borderless &&
|
||||
_PWG_EQUIVALENT(old_size->width, new_width) &&
|
||||
_PWG_EQUIVALENT(old_size->length, new_length);
|
||||
|
||||
if (similar &&
|
||||
(new_known_pwg || (!old_known_pwg && new_imageable > old_imageable)))
|
||||
if ((pwg_media = _pwgMediaForPPD(ppd_size->name)) != NULL)
|
||||
{
|
||||
/*
|
||||
* The new paper has a larger imageable area so it could replace
|
||||
* the older paper. Regardless of the imageable area, we always
|
||||
* prefer the size with a well-known PWG name.
|
||||
* Standard name, do we have conflicts?
|
||||
*/
|
||||
|
||||
new_size = old_size;
|
||||
_cupsStrFree(old_size->map.ppd);
|
||||
_cupsStrFree(old_size->map.pwg);
|
||||
for (j = 0; j < pc->num_sizes; j ++)
|
||||
if (!strcmp(pc->sizes[j].map.pwg, pwg_media->pwg))
|
||||
{
|
||||
pwg_media = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pwg_media)
|
||||
{
|
||||
/*
|
||||
* Standard name and no conflicts, use it!
|
||||
*/
|
||||
|
||||
pwg_name = pwg_media->pwg;
|
||||
new_known_pwg = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Not a standard name; convert it to a PWG vendor name of the form:
|
||||
*
|
||||
* pp_lowerppd_WIDTHxHEIGHTuu
|
||||
*/
|
||||
|
||||
pwg_name = pwg_keyword;
|
||||
new_known_pwg = 0;
|
||||
|
||||
pwg_unppdize_name(ppd_size->name, ppd_name, sizeof(ppd_name), "_.");
|
||||
_pwgGenerateSize(pwg_keyword, sizeof(pwg_keyword), NULL, ppd_name,
|
||||
_PWG_FROMPTS(ppd_size->width),
|
||||
_PWG_FROMPTS(ppd_size->length));
|
||||
}
|
||||
}
|
||||
|
||||
if (!similar)
|
||||
{
|
||||
/*
|
||||
* The paper was unique enough to deserve its own entry so add it to the
|
||||
* end.
|
||||
* If we have a similar paper with non-zero margins then we only want to
|
||||
* keep it if it has a larger imageable area length. The NULL check is for
|
||||
* dimensions that are <= 0...
|
||||
*/
|
||||
|
||||
new_size = pwg_size ++;
|
||||
pc->num_sizes ++;
|
||||
}
|
||||
if ((pwg_media = _pwgMediaForSize(_PWG_FROMPTS(ppd_size->width),
|
||||
_PWG_FROMPTS(ppd_size->length))) == NULL)
|
||||
continue;
|
||||
|
||||
if (new_size)
|
||||
{
|
||||
/*
|
||||
* Save this size...
|
||||
*/
|
||||
new_width = pwg_media->width;
|
||||
new_length = pwg_media->length;
|
||||
new_left = _PWG_FROMPTS(ppd_size->left);
|
||||
new_bottom = _PWG_FROMPTS(ppd_size->bottom);
|
||||
new_right = _PWG_FROMPTS(ppd_size->width - ppd_size->right);
|
||||
new_top = _PWG_FROMPTS(ppd_size->length - ppd_size->top);
|
||||
new_imageable = new_length - new_top - new_bottom;
|
||||
new_borderless = new_bottom == 0 && new_top == 0 &&
|
||||
new_left == 0 && new_right == 0;
|
||||
|
||||
new_size->map.ppd = _cupsStrAlloc(ppd_size->name);
|
||||
new_size->map.pwg = _cupsStrAlloc(pwg_name);
|
||||
new_size->width = new_width;
|
||||
new_size->length = new_length;
|
||||
new_size->left = new_left;
|
||||
new_size->bottom = new_bottom;
|
||||
new_size->right = new_right;
|
||||
new_size->top = new_top;
|
||||
for (k = pc->num_sizes, similar = 0, old_size = pc->sizes, new_size = NULL;
|
||||
k > 0 && !similar;
|
||||
k --, old_size ++)
|
||||
{
|
||||
old_imageable = old_size->length - old_size->top - old_size->bottom;
|
||||
old_borderless = old_size->left == 0 && old_size->bottom == 0 &&
|
||||
old_size->right == 0 && old_size->top == 0;
|
||||
old_known_pwg = strncmp(old_size->map.pwg, "oe_", 3) &&
|
||||
strncmp(old_size->map.pwg, "om_", 3);
|
||||
|
||||
similar = old_borderless == new_borderless &&
|
||||
_PWG_EQUIVALENT(old_size->width, new_width) &&
|
||||
_PWG_EQUIVALENT(old_size->length, new_length);
|
||||
|
||||
if (similar &&
|
||||
(new_known_pwg || (!old_known_pwg && new_imageable > old_imageable)))
|
||||
{
|
||||
/*
|
||||
* The new paper has a larger imageable area so it could replace
|
||||
* the older paper. Regardless of the imageable area, we always
|
||||
* prefer the size with a well-known PWG name.
|
||||
*/
|
||||
|
||||
new_size = old_size;
|
||||
_cupsStrFree(old_size->map.ppd);
|
||||
_cupsStrFree(old_size->map.pwg);
|
||||
}
|
||||
}
|
||||
|
||||
if (!similar)
|
||||
{
|
||||
/*
|
||||
* The paper was unique enough to deserve its own entry so add it to the
|
||||
* end.
|
||||
*/
|
||||
|
||||
new_size = pwg_size ++;
|
||||
pc->num_sizes ++;
|
||||
}
|
||||
|
||||
if (new_size)
|
||||
{
|
||||
/*
|
||||
* Save this size...
|
||||
*/
|
||||
|
||||
new_size->map.ppd = _cupsStrAlloc(ppd_size->name);
|
||||
new_size->map.pwg = _cupsStrAlloc(pwg_name);
|
||||
new_size->width = new_width;
|
||||
new_size->length = new_length;
|
||||
new_size->left = new_left;
|
||||
new_size->bottom = new_bottom;
|
||||
new_size->right = new_right;
|
||||
new_size->top = new_top;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -913,7 +914,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
*/
|
||||
|
||||
pwg_name = pwg_keyword;
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword));
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword),
|
||||
"_");
|
||||
}
|
||||
|
||||
map->pwg = _cupsStrAlloc(pwg_name);
|
||||
@@ -977,7 +979,8 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
*/
|
||||
|
||||
pwg_name = pwg_keyword;
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword));
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword),
|
||||
"_");
|
||||
}
|
||||
|
||||
map->pwg = _cupsStrAlloc(pwg_name);
|
||||
@@ -1006,7 +1009,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
|
||||
i > 0;
|
||||
i --, choice ++, map ++)
|
||||
{
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword));
|
||||
pwg_unppdize_name(choice->choice, pwg_keyword, sizeof(pwg_keyword), "_");
|
||||
|
||||
map->pwg = _cupsStrAlloc(pwg_keyword);
|
||||
map->ppd = _cupsStrAlloc(choice->choice);
|
||||
@@ -2602,7 +2605,8 @@ pwg_ppdize_name(const char *ipp, /* I - IPP keyword */
|
||||
static void
|
||||
pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
char *name, /* I - Name buffer */
|
||||
size_t namesize) /* I - Size of name buffer */
|
||||
size_t namesize, /* I - Size of name buffer */
|
||||
const char *dashchars)/* I - Characters to be replaced by dashes */
|
||||
{
|
||||
char *ptr, /* Pointer into name buffer */
|
||||
*end; /* End of name buffer */
|
||||
@@ -2612,8 +2616,10 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
{
|
||||
if (_cups_isalnum(*ppd) || *ppd == '-')
|
||||
*ptr++ = tolower(*ppd & 255);
|
||||
else if (*ppd == '_' || *ppd == '.')
|
||||
else if (strchr(dashchars, *ppd))
|
||||
*ptr++ = '-';
|
||||
else
|
||||
*ptr++ = *ppd;
|
||||
|
||||
if (!_cups_isupper(*ppd) && _cups_isalnum(*ppd) &&
|
||||
_cups_isupper(ppd[1]) && ptr < end)
|
||||
|
||||
+48
-23
@@ -51,9 +51,9 @@
|
||||
/*
|
||||
* 'cupsDoFileRequest()' - Do an IPP request with a file.
|
||||
*
|
||||
* This function sends the IPP request to the specified server, retrying
|
||||
* and authenticating as necessary. The request is freed with @link ippDelete@
|
||||
* after receiving a valid IPP response.
|
||||
* This function sends the IPP request and attached file to the specified
|
||||
* server, retrying and authenticating as necessary. The request is freed with
|
||||
* @link ippDelete@.
|
||||
*/
|
||||
|
||||
ipp_t * /* O - Response data */
|
||||
@@ -102,14 +102,14 @@ cupsDoFileRequest(http_t *http, /* I - Connection to server or @code CUPS_HT
|
||||
/*
|
||||
* 'cupsDoIORequest()' - Do an IPP request with file descriptors.
|
||||
*
|
||||
* This function sends the IPP request to the specified server, retrying
|
||||
* and authenticating as necessary. The request is freed with ippDelete()
|
||||
* after receiving a valid IPP response.
|
||||
* This function sends the IPP request with the optional input file "infile" to
|
||||
* the specified server, retrying and authenticating as necessary. The request
|
||||
* is freed with @link ippDelete@.
|
||||
*
|
||||
* If "infile" is a valid file descriptor, cupsDoIORequest() copies
|
||||
* If "infile" is a valid file descriptor, @code cupsDoIORequest@ copies
|
||||
* all of the data from the file after the IPP request message.
|
||||
*
|
||||
* If "outfile" is a valid file descriptor, cupsDoIORequest() copies
|
||||
* If "outfile" is a valid file descriptor, @code cupsDoIORequest@ copies
|
||||
* all of the data after the IPP response message to the file.
|
||||
*
|
||||
* @since CUPS 1.3/OS X 10.5@
|
||||
@@ -309,8 +309,7 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
* 'cupsDoRequest()' - Do an IPP request.
|
||||
*
|
||||
* This function sends the IPP request to the specified server, retrying
|
||||
* and authenticating as necessary. The request is freed with ippDelete()
|
||||
* after receiving a valid IPP response.
|
||||
* and authenticating as necessary. The request is freed with @link ippDelete@.
|
||||
*/
|
||||
|
||||
ipp_t * /* O - Response data */
|
||||
@@ -331,9 +330,9 @@ cupsDoRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
|
||||
* 'cupsGetResponse()' - Get a response to an IPP request.
|
||||
*
|
||||
* Use this function to get the response for an IPP request sent using
|
||||
* cupsSendDocument() or cupsSendRequest(). For requests that return
|
||||
* additional data, use httpRead() after getting a successful response,
|
||||
* otherwise call httpFlush() to complete the response processing.
|
||||
* @link cupsSendRequest@. For requests that return additional data, use
|
||||
* @link cupsReadResponseData@ after getting a successful response,
|
||||
* otherwise call @link httpFlush@ to complete the response processing.
|
||||
*
|
||||
* @since CUPS 1.4/OS X 10.6@
|
||||
*/
|
||||
@@ -481,7 +480,8 @@ cupsGetResponse(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsLastError()' - Return the last IPP status code.
|
||||
* 'cupsLastError()' - Return the last IPP status code received on the current
|
||||
* thread.
|
||||
*/
|
||||
|
||||
ipp_status_t /* O - IPP status code from last request */
|
||||
@@ -492,7 +492,8 @@ cupsLastError(void)
|
||||
|
||||
|
||||
/*
|
||||
* 'cupsLastErrorString()' - Return the last IPP status-message.
|
||||
* 'cupsLastErrorString()' - Return the last IPP status-message received on the
|
||||
* current thread.
|
||||
*
|
||||
* @since CUPS 1.2/OS X 10.5@
|
||||
*/
|
||||
@@ -537,8 +538,9 @@ _cupsNextDelay(int current, /* I - Current delay value or 0 */
|
||||
/*
|
||||
* 'cupsReadResponseData()' - Read additional data after the IPP response.
|
||||
*
|
||||
* This function is used after cupsGetResponse() to read the PPD or document
|
||||
* files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
|
||||
* This function is used after @link cupsGetResponse@ to read the PPD or document
|
||||
* files from @code CUPS_GET_PPD@ and @code CUPS_GET_DOCUMENT@ requests,
|
||||
* respectively.
|
||||
*
|
||||
* @since CUPS 1.4/OS X 10.6@
|
||||
*/
|
||||
@@ -579,13 +581,17 @@ cupsReadResponseData(
|
||||
/*
|
||||
* 'cupsSendRequest()' - Send an IPP request.
|
||||
*
|
||||
* Use httpWrite() to write any additional data (document, PPD file, etc.)
|
||||
* for the request, cupsGetResponse() to get the IPP response, and httpRead()
|
||||
* to read any additional data following the response. Only one request can be
|
||||
* sent/queued at a time.
|
||||
* Use @link cupsWriteRequestData@ to write any additional data (document, PPD
|
||||
* file, etc.) for the request, @link cupsGetResponse@ to get the IPP response,
|
||||
* and @link cupsReadResponseData@ to read any additional data following the
|
||||
* response. Only one request can be sent/queued at a time per @code http_t@
|
||||
* connection.
|
||||
*
|
||||
* Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
|
||||
* request is not freed.
|
||||
* Returns the initial HTTP status code, which will be @code HTTP_CONTINUE@
|
||||
* on a successful send of the request.
|
||||
*
|
||||
* Note: Unlike @link cupsDoFileRequest@, @link cupsDoIORequest@, and
|
||||
* @link cupsDoRequest@, the request is NOT freed with @link ippDelete@.
|
||||
*
|
||||
* @since CUPS 1.4/OS X 10.6@
|
||||
*/
|
||||
@@ -998,6 +1004,25 @@ _cupsConnect(void)
|
||||
httpClose(cg->http);
|
||||
cg->http = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Same server, see if the connection is still established...
|
||||
*/
|
||||
|
||||
char ch; /* Connection check byte */
|
||||
|
||||
if (recv(cg->http->fd, &ch, 1, MSG_PEEK | MSG_DONTWAIT) < 0 &&
|
||||
errno != EWOULDBLOCK)
|
||||
{
|
||||
/*
|
||||
* Nope, close the connection...
|
||||
*/
|
||||
|
||||
httpClose(cg->http);
|
||||
cg->http = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+5
-1
@@ -131,6 +131,8 @@ static uri_test_t uri_tests[] = /* URI test data */
|
||||
"http", "", "", "", 80, 0 },
|
||||
{ HTTP_URI_BAD_HOSTNAME, "http://serve%7/index.html",
|
||||
"http", "", "", "", 80, 0 },
|
||||
{ HTTP_URI_BAD_HOSTNAME, "http://server with spaces/index.html",
|
||||
"http", "", "", "", 80, 0 },
|
||||
|
||||
/* Bad port number */
|
||||
{ HTTP_URI_BAD_PORT, "http://127.0.0.1:9999a/index.html",
|
||||
@@ -138,7 +140,9 @@ static uri_test_t uri_tests[] = /* URI test data */
|
||||
|
||||
/* Bad resource */
|
||||
{ HTTP_URI_BAD_RESOURCE, "http://server/index.html%",
|
||||
"http", "", "server", "", 80, 0 }
|
||||
"http", "", "server", "", 80, 0 },
|
||||
{ HTTP_URI_BAD_RESOURCE, "http://server/index with spaces.html",
|
||||
"http", "", "server", "", 80, 0 }
|
||||
};
|
||||
static const char * const base64_tests[][2] =
|
||||
{
|
||||
|
||||
+23
-34
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* User, system, and password routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2012 by Apple Inc.
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -341,7 +341,8 @@ cupsSetPasswordCB2(
|
||||
void
|
||||
cupsSetServer(const char *server) /* I - Server name */
|
||||
{
|
||||
char *port; /* Pointer to port */
|
||||
char *options, /* Options */
|
||||
*port; /* Pointer to port */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
|
||||
|
||||
|
||||
@@ -349,6 +350,22 @@ cupsSetServer(const char *server) /* I - Server name */
|
||||
{
|
||||
strlcpy(cg->server, server, sizeof(cg->server));
|
||||
|
||||
if (cg->server[0] != '/' && (options = strrchr(cg->server, '/')) != NULL)
|
||||
{
|
||||
*options++ = '\0';
|
||||
|
||||
if (!strcmp(options, "version=1.0"))
|
||||
cg->server_version = 10;
|
||||
else if (!strcmp(options, "version=1.1"))
|
||||
cg->server_version = 11;
|
||||
else if (!strcmp(options, "version=2.0"))
|
||||
cg->server_version = 20;
|
||||
else if (!strcmp(options, "version=2.1"))
|
||||
cg->server_version = 21;
|
||||
else if (!strcmp(options, "version=2.2"))
|
||||
cg->server_version = 22;
|
||||
}
|
||||
|
||||
if (cg->server[0] != '/' && (port = strrchr(cg->server, ':')) != NULL &&
|
||||
!strchr(port, ']') && isdigit(port[1] & 255))
|
||||
{
|
||||
@@ -364,8 +381,9 @@ cupsSetServer(const char *server) /* I - Server name */
|
||||
}
|
||||
else
|
||||
{
|
||||
cg->server[0] = '\0';
|
||||
cg->servername[0] = '\0';
|
||||
cg->server[0] = '\0';
|
||||
cg->servername[0] = '\0';
|
||||
cg->server_version = 20;
|
||||
}
|
||||
|
||||
if (cg->http)
|
||||
@@ -933,36 +951,7 @@ cups_read_client_conf(
|
||||
}
|
||||
|
||||
if ((!cg->server[0] || !cg->ipp_port) && cups_server)
|
||||
{
|
||||
if (!cg->server[0])
|
||||
{
|
||||
/*
|
||||
* Copy server name...
|
||||
*/
|
||||
|
||||
strlcpy(cg->server, cups_server, sizeof(cg->server));
|
||||
|
||||
if (cg->server[0] != '/' && (value = strrchr(cg->server, ':')) != NULL &&
|
||||
!strchr(value, ']') && isdigit(value[1] & 255))
|
||||
*value++ = '\0';
|
||||
else
|
||||
value = NULL;
|
||||
|
||||
if (cg->server[0] == '/')
|
||||
strcpy(cg->servername, "localhost");
|
||||
else
|
||||
strlcpy(cg->servername, cg->server, sizeof(cg->servername));
|
||||
}
|
||||
else if (cups_server[0] != '/' &&
|
||||
(value = strrchr(cups_server, ':')) != NULL &&
|
||||
!strchr(value, ']') && isdigit(value[1] & 255))
|
||||
value ++;
|
||||
else
|
||||
value = NULL;
|
||||
|
||||
if (!cg->ipp_port && value)
|
||||
cg->ipp_port = atoi(value);
|
||||
}
|
||||
cupsSetServer(cups_server);
|
||||
|
||||
if (!cg->server[0])
|
||||
{
|
||||
|
||||
+41
-5
@@ -935,10 +935,16 @@ cupsGetPPD3(http_t *http, /* I - HTTP connection or @code CUPS_HTTP_DEFAUL
|
||||
* See if the PPD file is available locally...
|
||||
*/
|
||||
|
||||
if (!cg->servername[0])
|
||||
cupsServer();
|
||||
if (http)
|
||||
httpGetHostname(http, hostname, sizeof(hostname));
|
||||
else
|
||||
{
|
||||
strlcpy(hostname, cupsServer(), sizeof(hostname));
|
||||
if (hostname[0] == '/')
|
||||
strlcpy(hostname, "localhost", sizeof(hostname));
|
||||
}
|
||||
|
||||
if (!_cups_strcasecmp(cg->servername, "localhost"))
|
||||
if (!_cups_strcasecmp(hostname, "localhost"))
|
||||
{
|
||||
char ppdname[1024]; /* PPD filename */
|
||||
struct stat ppdinfo; /* PPD file information */
|
||||
@@ -1636,6 +1642,7 @@ cups_get_printer_uri(
|
||||
/* Hostname associated with connection */
|
||||
static const char * const requested_attrs[] =
|
||||
{ /* Requested attributes */
|
||||
"device-uri",
|
||||
"member-uris",
|
||||
"printer-uri-supported",
|
||||
"printer-type"
|
||||
@@ -1694,9 +1701,38 @@ cups_get_printer_uri(
|
||||
* Do the request and get back a response...
|
||||
*/
|
||||
|
||||
if ((response = cupsDoRequest(http, request, "/")) != NULL)
|
||||
snprintf(resource, resourcesize, "/printers/%s", name);
|
||||
|
||||
if ((response = cupsDoRequest(http, request, resource)) != NULL)
|
||||
{
|
||||
if ((attr = ippFindAttribute(response, "member-uris", IPP_TAG_URI)) != NULL)
|
||||
const char *device_uri = NULL; /* device-uri value */
|
||||
|
||||
if ((attr = ippFindAttribute(response, "device-uri",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
device_uri = attr->values[0].string.text;
|
||||
|
||||
if (device_uri &&
|
||||
(!strncmp(device_uri, "ipp://", 6) ||
|
||||
!strncmp(device_uri, "ipps://", 7) ||
|
||||
((strstr(device_uri, "._ipp.") != NULL ||
|
||||
strstr(device_uri, "._ipps.") != NULL) &&
|
||||
!strcmp(device_uri + strlen(device_uri) - 5, "/cups"))))
|
||||
{
|
||||
/*
|
||||
* Statically-configured shared printer.
|
||||
*/
|
||||
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL,
|
||||
_httpResolveURI(device_uri, uri, sizeof(uri),
|
||||
_HTTP_RESOLVE_DEFAULT, NULL, NULL),
|
||||
scheme, sizeof(scheme), username, sizeof(username),
|
||||
host, hostsize, port, resource, resourcesize);
|
||||
ippDelete(response);
|
||||
|
||||
return (1);
|
||||
}
|
||||
else if ((attr = ippFindAttribute(response, "member-uris",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Get the first actual printer name in the class...
|
||||
|
||||
@@ -7,6 +7,10 @@ Terminal=false
|
||||
Type=Application
|
||||
Name=Manage Printing
|
||||
Comment=CUPS Web Interface
|
||||
Name[ca]=Gestor d'impressió
|
||||
Comment[ca]=Interfície web de CUPS
|
||||
Name[cs]=Správa tisku CUPS
|
||||
Comment[cs]=Webové rozhraní CUPS
|
||||
Name[de]=Druckerverwaltung
|
||||
Comment[de]=CUPS Webinterface
|
||||
Name[en_US]=Manage Printing
|
||||
|
||||
+2
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Documentation makefile for CUPS.
|
||||
#
|
||||
# Copyright 2007-2011 by Apple Inc.
|
||||
# Copyright 2007-2012 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -105,6 +105,7 @@ HELPFILES = \
|
||||
help/ref-classes-conf.html \
|
||||
help/ref-client-conf.html \
|
||||
help/ref-cupsd-conf.html \
|
||||
help/ref-cups-files-conf.html \
|
||||
help/ref-error_log.html \
|
||||
help/ref-mailto-conf.html \
|
||||
help/ref-page_log.html \
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Inici - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Inici </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Administració </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Classes </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Ajuda en línia </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Tasques </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Impressores </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS és el sistema d'impressió de codi obert i basat en estandards desenvolupat per
|
||||
<A HREF="http://www.apple.com/">Apple Inc.</A> per OS<SUP>®</SUP> X and
|
||||
altres sistemes operatius basats en UNIX<SUP>®</SUP></P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS per usuaris</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Descripció general del CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Impresió i opcions en linia de comandes</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Novetats del CUPS 1.4</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Fòrum d'usuaris</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS per Administradors</H2>
|
||||
|
||||
<P><A HREF="admin">Afegir impressores i classes</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Gestió de les polítiques de treball</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Bàsic de comptes d'impressió</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Seguritat del servidor</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Ús d'autenticació amb el Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Ús d'impressores en xarxa</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Referència del cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Cerca de controladors d'impressora</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>CUPS per desenvolupadors</H2>
|
||||
|
||||
<P><A HREF="help/api-overview.html">Introducció a la programació amb CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-cups.html">La API de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-filter.html">Programació de filtres i rerefons</A></P>
|
||||
|
||||
<P><A HREF="help/api-httpipp.html">APIs per HTTP i IPP</A></P>
|
||||
|
||||
<P><A HREF="help/api-ppd.html">API per PPD</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">API per Raster</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">Referència del fitxer d'inf. del compilador del controlador per PPD</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Fòrum de desenvolupadors</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS i el seu logotip són marques registrades de
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS té copyright 2007-2013 d'Apple
|
||||
Inc. Tots els drets reservats.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Hlavní strana - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Hlavní strana </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Administrace </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Třídy tiskáren </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Nápověda </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Úlohy </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Tiskárny </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Hledat"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS je na bázi standardů otevřený zdrojový kód tiskového systému vyvinutý
|
||||
společností <A HREF="http://www.apple.com/">Apple Inc.</A> pro Mac OS<SUP>®</SUP>
|
||||
X a jiné UNIX<SUP>®</SUP>ové operační systémy.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS pro uživatele</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Popis CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Příkazová řádka tisku a Možnosti</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Co je nového v CUPS 1.6</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Uživatelské fórum</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS pro administrátory</H2>
|
||||
|
||||
<P><A HREF="admin">Přidání tiskáren a tříd</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Správa politik</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Základní účtování tiskáren</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Zabezpečení serveru</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Použití ověřování pomocí protokolu Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Použití síťových tiskáren</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Konfigurační soubor cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Hedat ovladače tiskárny</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>CUPS pro vývojáře</H2>
|
||||
|
||||
<P><A HREF="help/api-overview.html">Úvod do CUPS programování</A></P>
|
||||
|
||||
<P><A HREF="help/api-cups.html">CUPS API knihovny</A></P>
|
||||
|
||||
<P><A HREF="help/api-filter.html">Programování filtrů a backendů</A></P>
|
||||
|
||||
<P><A HREF="help/api-httpipp.html">HTTP a IPP API knihovny</A></P>
|
||||
|
||||
<P><A HREF="help/api-ppd.html">PPD API knihovny</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">Raster API knihovny</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">PPD kompilátor Driver Information File Reference</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Vývojářské fórum</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS a logo CUPS jsou ochranné známky společnosti
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS je chráněn autorskými
|
||||
právy 2007-2013 Apple Inc. Všechna práva vyhrazena.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Inicio - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Inicio </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Administración </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Clases </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Ayuda en línea </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Trabajos </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Impresoras </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS es el sistema de impresión de código abierto basado en
|
||||
estándares desarrollado por <A HREF="http://www.apple.com/">Apple Inc.</A> para
|
||||
OS<SUP>®</SUP> X y otros sistemas operativos tipo UNIX<SUP>®</SUP>.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS para usuarios</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Descripción de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Impresión desde la línea de comandos y opciones</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Qué hay de nuevo en CUPS 1.6</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Foro de usuarios</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS para administradores</H2>
|
||||
|
||||
<P><A HREF="admin">Añadiendo impresoras y clases</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Gestionando políticas de funcionamiento</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Contabilidad básica de impresora</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Seguridad del servidor</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Usando autentificación Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Usando impresoras de red</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Referencia de cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Encontrar controladores de impresora</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>CUPS para desarrolladores</H2>
|
||||
|
||||
<P><A HREF="help/api-overview.html">Introducción a la programación de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-cups.html">La API de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-filter.html">Programación de filtros y programas de conexión</A></P>
|
||||
|
||||
<P><A HREF="help/api-httpipp.html">Las APIs HTTP e IPP</A></P>
|
||||
|
||||
<P><A HREF="help/api-ppd.html">La API PPD</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">La API Raster</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">Referencia del archivo de información del compilador de controladores PPD</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Foro de desarrollo</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS y el logo de CUPS son
|
||||
marcas registradas de <A HREF="http://www.apple.com">Apple Inc.</A> Los derechos
|
||||
de copia de CUPS 2007-2013 son de Apple Inc. Todos los derechos reservados.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Accueil - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Accueil </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Administration </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Classes </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Aide En Ligne </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Tâches </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Imprimantes </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS est le système d'impression Open Source, basé sur des standards, développé par
|
||||
<A HREF="http://www.apple.com/">Apple Inc.</A> pour Mac OS<SUP>®</SUP> X et
|
||||
les autres OS UNIX<SUP>®</SUP>-like.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS pour les utilisateurs</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Présentation de CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Impression en ligne de commande et options</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Quoi de neuf dans CUPS 1.6</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Forum utilisateur</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS pour les administrateurs</H2>
|
||||
|
||||
<P><A HREF="admin">Ajout d'imprimantes et de classes</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Gérer les politiques</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Printer Accounting Basics</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Sécurité du serveur</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Utiliser l'authentification Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Utiliser des imprimantes réseaux</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Références sur cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Trouver des pilotes d'imprimantes</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>CUPS pour les développeurs</H2>
|
||||
|
||||
<P><A HREF="help/api-overview.html">Introduction à la programmation CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-cups.html">L'API CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/api-filter.html">Programmation de filtres et de backends</A></P>
|
||||
|
||||
<P><A HREF="help/api-httpipp.html">Les API HTTP et IPP</A></P>
|
||||
|
||||
<P><A HREF="help/api-ppd.html">L'API PPD</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">L'API Raster</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">PPD Compiler Driver Information File Reference</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Forum développeurs</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS et le logo CUPS sont des marques déposées de
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS est sous copyright 2007-2013 Apple
|
||||
Inc. Tous droits réservés.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
+456
-19
@@ -341,7 +341,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-cups.html 10507 2012-05-23 22:39:50Z mike $"
|
||||
"$Id: api-cups.html 10584 2012-08-29 19:52:16Z mike $"
|
||||
|
||||
CUPS API header for CUPS.
|
||||
|
||||
@@ -391,23 +391,34 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#PASSWORDS_AND_AUTHENTICATION">Passwords and Authentication</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
|
||||
<li><a href="#appleGetPaperSize" title="Get the default paper size.">appleGetPaperSize</a></li>
|
||||
<li><a href="#cupsAddDest" title="Add a destination to the list of destinations.">cupsAddDest</a></li>
|
||||
<li><a href="#cupsAddOption" title="Add an option to an option array.">cupsAddOption</a></li>
|
||||
<li><a href="#cupsAdminCreateWindowsPPD" title="Create the Windows PPD file for a printer.">cupsAdminCreateWindowsPPD</a></li>
|
||||
<li><a href="#cupsAdminExportSamba" title="Export a printer to Samba.">cupsAdminExportSamba</a></li>
|
||||
<li><a href="#cupsAdminGetServerSettings" title="Get settings from the server.">cupsAdminGetServerSettings</a></li>
|
||||
<li><a href="#cupsAdminSetServerSettings" title="Set settings on the server.">cupsAdminSetServerSettings</a></li>
|
||||
<li><a href="#cupsCancelDestJob" title="Include necessary headers...">cupsCancelDestJob</a></li>
|
||||
<li><a href="#cupsCancelJob" title="Cancel a print job on the default server.">cupsCancelJob</a></li>
|
||||
<li><a href="#cupsCancelJob2" title="Cancel or purge a print job.">cupsCancelJob2</a></li>
|
||||
<li><a href="#cupsCheckDestSupported" title="Check that the option and value are supported
|
||||
by the destination.">cupsCheckDestSupported</a></li>
|
||||
<li><a href="#cupsCloseDestJob" title="Close a job and start printing.">cupsCloseDestJob</a></li>
|
||||
<li><a href="#cupsConnectDest" title="Connect to the server for a destination.">cupsConnectDest</a></li>
|
||||
<li><a href="#cupsConnectDestBlock" title="Connect to the server for a destination.">cupsConnectDestBlock</a></li>
|
||||
<li><a href="#cupsCopyDest" title="Callback block">cupsCopyDest</a></li>
|
||||
<li><a href="#cupsCopyDestConflicts" title="Get conflicts and resolutions for a new
|
||||
option/value pair.">cupsCopyDestConflicts</a></li>
|
||||
<li><a href="#cupsCopyDestInfo" title="Get the supported values/capabilities for the
|
||||
destination.">cupsCopyDestInfo</a></li>
|
||||
<li><a href="#cupsCreateDestJob" title="Create a job on a destination.">cupsCreateDestJob</a></li>
|
||||
<li><a href="#cupsCreateJob" title="Create an empty job for streaming.">cupsCreateJob</a></li>
|
||||
<li><a href="#cupsEncryption" title="Get the current encryption settings.">cupsEncryption</a></li>
|
||||
<li><a href="#cupsEnumDests" title="Enumerate available destinations with a callback function.">cupsEnumDests</a></li>
|
||||
<li><a href="#cupsEnumDestsBlock" title="Enumerate available destinations with a block.">cupsEnumDestsBlock</a></li>
|
||||
<li><a href="#cupsFinishDestDocument" title="Finish the current document.">cupsFinishDestDocument</a></li>
|
||||
<li><a href="#cupsFinishDocument" title="Finish sending a document.">cupsFinishDocument</a></li>
|
||||
<li><a href="#cupsFreeDestInfo" title="Free destination information obtained using
|
||||
cupsCopyDestInfo.">cupsFreeDestInfo</a></li>
|
||||
<li><a href="#cupsFreeDests" title="Free the memory used by the list of destinations.">cupsFreeDests</a></li>
|
||||
<li><a href="#cupsFreeJobs" title="Free memory used by job data.">cupsFreeJobs</a></li>
|
||||
<li><a href="#cupsFreeOptions" title="Free all memory used by options.">cupsFreeOptions</a></li>
|
||||
@@ -415,6 +426,8 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#cupsGetDefault" title="Get the default printer or class for the default server.">cupsGetDefault</a></li>
|
||||
<li><a href="#cupsGetDefault2" title="Get the default printer or class for the specified server.">cupsGetDefault2</a></li>
|
||||
<li><a href="#cupsGetDest" title="Get the named destination from the list.">cupsGetDest</a></li>
|
||||
<li><a href="#cupsGetDestMediaByName" title="Get media names, dimensions, and margins.">cupsGetDestMediaByName</a></li>
|
||||
<li><a href="#cupsGetDestMediaBySize" title="Get media names, dimensions, and margins.">cupsGetDestMediaBySize</a></li>
|
||||
<li><a href="#cupsGetDests" title="Get the list of destinations from the default server.">cupsGetDests</a></li>
|
||||
<li><a href="#cupsGetDests2" title="Get the list of destinations from the specified server.">cupsGetDests2</a></li>
|
||||
<li><a href="#cupsGetJobs" title="Get the jobs from the default server.">cupsGetJobs</a></li>
|
||||
@@ -436,6 +449,10 @@ for the given language.">cupsLangEncoding</a></li>
|
||||
<li><a href="#cupsLangFlush" title="Flush all language data out of the cache.">cupsLangFlush</a></li>
|
||||
<li><a href="#cupsLangFree" title="Free language data.">cupsLangFree</a></li>
|
||||
<li><a href="#cupsLangGet" title="Get a language.">cupsLangGet</a></li>
|
||||
<li><a href="#cupsLocalizeDestOption" title="Get the localized string for a destination
|
||||
option.">cupsLocalizeDestOption</a></li>
|
||||
<li><a href="#cupsLocalizeDestValue" title="Get the localized string for a destination
|
||||
option+value pair.">cupsLocalizeDestValue</a></li>
|
||||
<li><a href="#cupsNotifySubject" title="Return the subject for the given notification message.">cupsNotifySubject</a></li>
|
||||
<li><a href="#cupsNotifyText" title="Return the text for the given notification message.">cupsNotifyText</a></li>
|
||||
<li><a href="#cupsParseOptions" title="Parse options from a command-line argument.">cupsParseOptions</a></li>
|
||||
@@ -461,6 +478,7 @@ connections.">cupsSetCredentials</a></li>
|
||||
<li><a href="#cupsSetServer" title="Set the default server name and port.">cupsSetServer</a></li>
|
||||
<li><a href="#cupsSetServerCertCB" title="Set the server certificate callback.">cupsSetServerCertCB</a></li>
|
||||
<li><a href="#cupsSetUser" title="Set the default user name.">cupsSetUser</a></li>
|
||||
<li><a href="#cupsStartDestDocument" title="Start a new document.">cupsStartDestDocument</a></li>
|
||||
<li><a href="#cupsStartDocument" title="Add a document to a job created with cupsCreateJob().">cupsStartDocument</a></li>
|
||||
<li><a href="#cupsTempFd" title="Creates a temporary file.">cupsTempFd</a></li>
|
||||
<li><a href="#cupsTempFile" title="Generates a temporary filename.">cupsTempFile</a></li>
|
||||
@@ -506,7 +524,7 @@ constants">cups_ptype_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-cups.html 10507 2012-05-23 22:39:50Z mike $"
|
||||
"$Id: api-cups.html 10584 2012-08-29 19:52:16Z mike $"
|
||||
|
||||
API introduction for CUPS.
|
||||
|
||||
@@ -949,22 +967,6 @@ fields for the username and password. The username should default to the
|
||||
string returned by the <a href="#cupsUser"><code>cupsUser</code></a>
|
||||
function.</p>
|
||||
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
|
||||
<h3 class="function"><a name="appleGetPaperSize">appleGetPaperSize</a></h3>
|
||||
<p class="description">Get the default paper size.</p>
|
||||
<p class="code">
|
||||
char *appleGetPaperSize (<br>
|
||||
char *name,<br>
|
||||
int namesize<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>name</dt>
|
||||
<dd class="description">Paper size name buffer</dd>
|
||||
<dt>namesize</dt>
|
||||
<dd class="description">Size of buffer</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Default paper size</p>
|
||||
<h3 class="function"><a name="cupsAddDest">cupsAddDest</a></h3>
|
||||
<p class="description">Add a destination to the list of destinations.</p>
|
||||
<p class="code">
|
||||
@@ -1116,6 +1118,31 @@ int cupsAdminSetServerSettings (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on success, 0 on failure</p>
|
||||
<h3 class="function"><a name="cupsCancelDestJob">cupsCancelDestJob</a></h3>
|
||||
<p class="description">Include necessary headers...</p>
|
||||
<p class="code">
|
||||
ipp_status_t cupsCancelDestJob (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
int job_id<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>job_id</dt>
|
||||
<dd class="description">Job ID</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Cancel a job on a destination.</p>
|
||||
<p class="discussion">The "job_id" is the number returned by cupsCreateDestJob.<br>
|
||||
<br>
|
||||
Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on
|
||||
failure.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><a name="cupsCancelJob">cupsCancelJob</a></h3>
|
||||
<p class="description">Cancel a print job on the default server.</p>
|
||||
<p class="code">
|
||||
@@ -1170,6 +1197,64 @@ to cancel the current job on the named destination.<br>
|
||||
Use the <a href="#cupsLastError"><code>cupsLastError</code></a> and <a href="#cupsLastErrorString"><code>cupsLastErrorString</code></a> functions to get
|
||||
the cause of any failure.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsCheckDestSupported">cupsCheckDestSupported</a></h3>
|
||||
<p class="description">Check that the option and value are supported
|
||||
by the destination.</p>
|
||||
<p class="code">
|
||||
int cupsCheckDestSupported (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
|
||||
const char *option,<br>
|
||||
const char *value<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>option</dt>
|
||||
<dd class="description">Option</dd>
|
||||
<dt>value</dt>
|
||||
<dd class="description">Value</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if supported, 0 otherwise</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Returns 1 if supported, 0 otherwise.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsCloseDestJob">cupsCloseDestJob</a></h3>
|
||||
<p class="description">Close a job and start printing.</p>
|
||||
<p class="code">
|
||||
ipp_status_t cupsCloseDestJob (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *info,<br>
|
||||
int job_id<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>info</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>job_id</dt>
|
||||
<dd class="description">Job ID</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">IPP status code</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Use when the last call to cupsStartDocument passed 0 for "last_document".
|
||||
"job_id" is the job ID returned by cupsCreateDestJob. Returns <code>IPP_OK</code>
|
||||
on success.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsConnectDest">cupsConnectDest</a></h3>
|
||||
<p class="description">Connect to the server for a destination.</p>
|
||||
@@ -1272,6 +1357,125 @@ int cupsCopyDest (<br>
|
||||
copy) - for use with the cupsEnumDests* functions. The caller is responsible
|
||||
for calling cupsFreeDests() on the returned object(s).
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsCopyDestConflicts">cupsCopyDestConflicts</a></h3>
|
||||
<p class="description">Get conflicts and resolutions for a new
|
||||
option/value pair.</p>
|
||||
<p class="code">
|
||||
int cupsCopyDestConflicts (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
|
||||
int num_options,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> *options,<br>
|
||||
const char *new_option,<br>
|
||||
const char *new_value,<br>
|
||||
int *num_conflicts,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> **conflicts,<br>
|
||||
int *num_resolved,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> **resolved<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>num_options</dt>
|
||||
<dd class="description">Number of current options</dd>
|
||||
<dt>options</dt>
|
||||
<dd class="description">Current options</dd>
|
||||
<dt>new_option</dt>
|
||||
<dd class="description">New option</dd>
|
||||
<dt>new_value</dt>
|
||||
<dd class="description">New value</dd>
|
||||
<dt>num_conflicts</dt>
|
||||
<dd class="description">Number of conflicting options</dd>
|
||||
<dt>conflicts</dt>
|
||||
<dd class="description">Conflicting options</dd>
|
||||
<dt>num_resolved</dt>
|
||||
<dd class="description">Number of options to resolve</dd>
|
||||
<dt>resolved</dt>
|
||||
<dd class="description">Resolved options</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 if there is a conflict, 0 if none, -1 on error</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">"num_options" and "options" represent the currently selected options by the
|
||||
user. "new_option" and "new_value" are the setting the user has just
|
||||
changed.<br>
|
||||
<br>
|
||||
Returns 1 if there is a conflict, 0 if there are no conflicts, and -1 if
|
||||
there was an unrecoverable error such as a resolver loop.<br>
|
||||
<br>
|
||||
If "num_conflicts" and "conflicts" are not <code>NULL</code>, they are set to
|
||||
contain the list of conflicting option/value pairs. Similarly, if
|
||||
"num_resolved" and "resolved" are not <code>NULL</code> they will be set to the
|
||||
list of changes needed to resolve the conflict.<br>
|
||||
<br>
|
||||
If cupsCopyDestConflicts returns 1 but "num_resolved" and "resolved" are set
|
||||
to 0 and <code>NULL</code>, respectively, then the conflict cannot be resolved.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsCopyDestInfo">cupsCopyDestInfo</a></h3>
|
||||
<p class="description">Get the supported values/capabilities for the
|
||||
destination.</p>
|
||||
<p class="code">
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *cupsCopyDestInfo (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Destination information</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The caller is responsible for calling <a href="#cupsFreeDestInfo"><code>cupsFreeDestInfo</code></a> on the return
|
||||
value. <code>NULL</code> is returned on error.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsCreateDestJob">cupsCreateDestJob</a></h3>
|
||||
<p class="description">Create a job on a destination.</p>
|
||||
<p class="code">
|
||||
ipp_status_t cupsCreateDestJob (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *info,<br>
|
||||
int *job_id,<br>
|
||||
const char *title,<br>
|
||||
int num_options,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> *options<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>info</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>job_id</dt>
|
||||
<dd class="description">Job ID or 0 on error</dd>
|
||||
<dt>title</dt>
|
||||
<dd class="description">Job name</dd>
|
||||
<dt>num_options</dt>
|
||||
<dd class="description">Number of job options</dd>
|
||||
<dt>options</dt>
|
||||
<dd class="description">Job options</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">IPP status code</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Returns <code>IPP_OK</code> or <code>IPP_OK_SUBST</code> on success, saving the job ID
|
||||
in the variable pointed to by "job_id".
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsCreateJob">cupsCreateJob</a></h3>
|
||||
<p class="description">Create an empty job for streaming.</p>
|
||||
@@ -1401,6 +1605,29 @@ continue enumeration or 0 to stop.<br>
|
||||
Enumeration happens on the current thread and does not return until all
|
||||
destinations have been enumerated or the block returns 0.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsFinishDestDocument">cupsFinishDestDocument</a></h3>
|
||||
<p class="description">Finish the current document.</p>
|
||||
<p class="code">
|
||||
ipp_status_t cupsFinishDestDocument (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *info<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>info</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status of document submission</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Returns <code>IPP_OK</code> or <code>IPP_OK_SUBST</code> on success.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsFinishDocument">cupsFinishDocument</a></h3>
|
||||
<p class="description">Finish sending a document.</p>
|
||||
@@ -1422,6 +1649,18 @@ ipp_status_t cupsFinishDocument (<br>
|
||||
<p class="discussion">The document must have been started using <a href="#cupsStartDocument"><code>cupsStartDocument</code></a>.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><a name="cupsFreeDestInfo">cupsFreeDestInfo</a></h3>
|
||||
<p class="description">Free destination information obtained using
|
||||
<a href="#cupsCopyDestInfo"><code>cupsCopyDestInfo</code></a>.</p>
|
||||
<p class="code">
|
||||
void cupsFreeDestInfo (<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
</dl>
|
||||
<h3 class="function"><a name="cupsFreeDests">cupsFreeDests</a></h3>
|
||||
<p class="description">Free the memory used by the list of destinations.</p>
|
||||
<p class="code">
|
||||
@@ -1541,6 +1780,99 @@ not support the lpoptions-defined default printer.
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Use the <a href="#cupsGetDests"><code>cupsGetDests</code></a> or <a href="#cupsGetDests2"><code>cupsGetDests2</code></a> functions to get a
|
||||
list of supported destinations for the current user.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsGetDestMediaByName">cupsGetDestMediaByName</a></h3>
|
||||
<p class="description">Get media names, dimensions, and margins.</p>
|
||||
<p class="code">
|
||||
int cupsGetDestMediaByName (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
|
||||
const char *media,<br>
|
||||
unsigned flags,<br>
|
||||
<a href="#cups_size_t">cups_size_t</a> *size<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>media</dt>
|
||||
<dd class="description">Media name</dd>
|
||||
<dt>flags</dt>
|
||||
<dd class="description">Media matching flags</dd>
|
||||
<dt>size</dt>
|
||||
<dd class="description">Media size information</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on match, 0 on failure</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The "media" string is a PWG media name. "Flags" provides some matching
|
||||
guidance (multiple flags can be combined):<br>
|
||||
<br>
|
||||
CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
|
||||
CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
|
||||
CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing,
|
||||
CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
|
||||
CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
|
||||
size amongst the "ready" media.<br>
|
||||
<br>
|
||||
The matching result (if any) is returned in the "cups_size_t" structure.<br>
|
||||
<br>
|
||||
Returns 1 when there is a match and 0 if there is not a match.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsGetDestMediaBySize">cupsGetDestMediaBySize</a></h3>
|
||||
<p class="description">Get media names, dimensions, and margins.</p>
|
||||
<p class="code">
|
||||
int cupsGetDestMediaBySize (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
|
||||
int width,<br>
|
||||
int length,<br>
|
||||
unsigned flags,<br>
|
||||
<a href="#cups_size_t">cups_size_t</a> *size<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>width</dt>
|
||||
<dd class="description">Media width in hundredths of
|
||||
of millimeters</dd>
|
||||
<dt>length</dt>
|
||||
<dd class="description">Media length in hundredths of
|
||||
of millimeters</dd>
|
||||
<dt>flags</dt>
|
||||
<dd class="description">Media matching flags</dd>
|
||||
<dt>size</dt>
|
||||
<dd class="description">Media size information</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">1 on match, 0 on failure</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">"Width" and "length" are the dimensions in hundredths of millimeters.
|
||||
"Flags" provides some matching guidance (multiple flags can be combined):<br>
|
||||
<br>
|
||||
CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer,
|
||||
CUPS_MEDIA_FLAGS_BORDERLESS = find a borderless size,
|
||||
CUPS_MEDIA_FLAGS_DUPLEX = find a size compatible with 2-sided printing,
|
||||
CUPS_MEDIA_FLAGS_EXACT = find an exact match for the size, and
|
||||
CUPS_MEDIA_FLAGS_READY = if the printer supports media sensing, find the
|
||||
size amongst the "ready" media.<br>
|
||||
<br>
|
||||
The matching result (if any) is returned in the "cups_size_t" structure.<br>
|
||||
<br>
|
||||
Returns 1 when there is a match and 0 if there is not a match.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><a name="cupsGetDests">cupsGetDests</a></h3>
|
||||
<p class="description">Get the list of destinations from the default server.</p>
|
||||
<p class="code">
|
||||
@@ -1945,6 +2277,65 @@ cups_lang_t *cupsLangGet (<br>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Language data</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsLocalizeDestOption">cupsLocalizeDestOption</a></h3>
|
||||
<p class="description">Get the localized string for a destination
|
||||
option.</p>
|
||||
<p class="code">
|
||||
const char *cupsLocalizeDestOption (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
|
||||
const char *option<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>option</dt>
|
||||
<dd class="description">Option to localize</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Localized string</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The returned string is stored in the destination information and will become
|
||||
invalid if the destination information is deleted.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsLocalizeDestValue">cupsLocalizeDestValue</a></h3>
|
||||
<p class="description">Get the localized string for a destination
|
||||
option+value pair.</p>
|
||||
<p class="code">
|
||||
const char *cupsLocalizeDestValue (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *dinfo,<br>
|
||||
const char *option,<br>
|
||||
const char *value<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>dinfo</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>option</dt>
|
||||
<dd class="description">Option to localize</dd>
|
||||
<dt>value</dt>
|
||||
<dd class="description">Value to localize</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Localized string</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">The returned string is stored in the destination information and will become
|
||||
invalid if the destination information is deleted.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="cupsNotifySubject">cupsNotifySubject</a></h3>
|
||||
<p class="description">Return the subject for the given notification message.</p>
|
||||
<p class="code">
|
||||
@@ -2420,6 +2811,52 @@ void cupsSetUser (<br>
|
||||
Note: The current user name is tracked separately for each thread in a
|
||||
program. Multi-threaded programs that override the user name need to do so
|
||||
in each thread for the same user name to be used.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.6/OS X 10.8 </span><a name="cupsStartDestDocument">cupsStartDestDocument</a></h3>
|
||||
<p class="description">Start a new document.</p>
|
||||
<p class="code">
|
||||
http_status_t cupsStartDestDocument (<br>
|
||||
http_t *http,<br>
|
||||
<a href="#cups_dest_t">cups_dest_t</a> *dest,<br>
|
||||
<a href="#cups_dinfo_t">cups_dinfo_t</a> *info,<br>
|
||||
int job_id,<br>
|
||||
const char *docname,<br>
|
||||
const char *format,<br>
|
||||
int num_options,<br>
|
||||
<a href="#cups_option_t">cups_option_t</a> *options,<br>
|
||||
int last_document<br>
|
||||
);</p>
|
||||
<h4 class="parameters">Parameters</h4>
|
||||
<dl>
|
||||
<dt>http</dt>
|
||||
<dd class="description">Connection to destination</dd>
|
||||
<dt>dest</dt>
|
||||
<dd class="description">Destination</dd>
|
||||
<dt>info</dt>
|
||||
<dd class="description">Destination information</dd>
|
||||
<dt>job_id</dt>
|
||||
<dd class="description">Job ID</dd>
|
||||
<dt>docname</dt>
|
||||
<dd class="description">Document name</dd>
|
||||
<dt>format</dt>
|
||||
<dd class="description">Document format</dd>
|
||||
<dt>num_options</dt>
|
||||
<dd class="description">Number of document options</dd>
|
||||
<dt>options</dt>
|
||||
<dd class="description">Document options</dd>
|
||||
<dt>last_document</dt>
|
||||
<dd class="description">1 if this is the last document</dd>
|
||||
</dl>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Status of document creation</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">"job_id" is the job ID returned by cupsCreateDestJob. "docname" is the name
|
||||
of the document/file being printed, "format" is the MIME media type for the
|
||||
document (see CUPS_FORMAT_xxx constants), and "num_options" and "options"
|
||||
are the options do be applied to the document. "last_document" should be 1
|
||||
if this is the last document to be submitted in the job. Returns
|
||||
<code>HTTP_CONTINUE</code> on success.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsStartDocument">cupsStartDocument</a></h3>
|
||||
<p class="description">Add a document to a job created with cupsCreateJob().</p>
|
||||
<p class="code">
|
||||
|
||||
+35
-27
@@ -341,7 +341,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-httpipp.html 10424 2012-04-23 17:26:57Z mike $"
|
||||
"$Id: api-httpipp.html 10589 2012-08-30 23:01:44Z mike $"
|
||||
|
||||
HTTP and IPP API header for CUPS.
|
||||
|
||||
@@ -395,8 +395,10 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li>
|
||||
<li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li>
|
||||
<li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li>
|
||||
<li><a href="#cupsLastError" title="Return the last IPP status code.">cupsLastError</a></li>
|
||||
<li><a href="#cupsLastErrorString" title="Return the last IPP status-message.">cupsLastErrorString</a></li>
|
||||
<li><a href="#cupsLastError" title="Return the last IPP status code received on the current
|
||||
thread.">cupsLastError</a></li>
|
||||
<li><a href="#cupsLastErrorString" title="Return the last IPP status-message received on the
|
||||
current thread.">cupsLastErrorString</a></li>
|
||||
<li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li>
|
||||
<li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li>
|
||||
<li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li>
|
||||
@@ -646,7 +648,7 @@ are server-oriented...">http_state_e</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<!--
|
||||
"$Id: api-httpipp.html 10424 2012-04-23 17:26:57Z mike $"
|
||||
"$Id: api-httpipp.html 10589 2012-08-30 23:01:44Z mike $"
|
||||
|
||||
HTTP and IPP API introduction for CUPS.
|
||||
|
||||
@@ -1010,9 +1012,9 @@ status, prior to resubmitting your request.
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Response data</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function sends the IPP request to the specified server, retrying
|
||||
and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>
|
||||
after receiving a valid IPP response.</p>
|
||||
<p class="discussion">This function sends the IPP request and attached file to the specified
|
||||
server, retrying and authenticating as necessary. The request is freed with
|
||||
<a href="#ippDelete"><code>ippDelete</code></a>.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.3/OS X 10.5 </span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
|
||||
<p class="description">Do an IPP request with file descriptors.</p>
|
||||
<p class="code">
|
||||
@@ -1039,14 +1041,14 @@ after receiving a valid IPP response.</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Response data</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function sends the IPP request to the specified server, retrying
|
||||
and authenticating as necessary. The request is freed with ippDelete()
|
||||
after receiving a valid IPP response.<br>
|
||||
<p class="discussion">This function sends the IPP request with the optional input file "infile" to
|
||||
the specified server, retrying and authenticating as necessary. The request
|
||||
is freed with <a href="#ippDelete"><code>ippDelete</code></a>.<br>
|
||||
<br>
|
||||
If "infile" is a valid file descriptor, cupsDoIORequest() copies
|
||||
If "infile" is a valid file descriptor, <code>cupsDoIORequest</code> copies
|
||||
all of the data from the file after the IPP request message.<br>
|
||||
<br>
|
||||
If "outfile" is a valid file descriptor, cupsDoIORequest() copies
|
||||
If "outfile" is a valid file descriptor, <code>cupsDoIORequest</code> copies
|
||||
all of the data after the IPP response message to the file.
|
||||
|
||||
</p>
|
||||
@@ -1071,8 +1073,7 @@ all of the data after the IPP response message to the file.
|
||||
<p class="description">Response data</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function sends the IPP request to the specified server, retrying
|
||||
and authenticating as necessary. The request is freed with ippDelete()
|
||||
after receiving a valid IPP response.</p>
|
||||
and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>.</p>
|
||||
<h3 class="function"><a name="cupsEncodeOptions">cupsEncodeOptions</a></h3>
|
||||
<p class="description">Encode printer options into IPP attributes.</p>
|
||||
<p class="code">
|
||||
@@ -1220,19 +1221,21 @@ the request respectively.
|
||||
<p class="description">Response or <code>NULL</code> on HTTP error</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Use this function to get the response for an IPP request sent using
|
||||
cupsSendDocument() or cupsSendRequest(). For requests that return
|
||||
additional data, use httpRead() after getting a successful response,
|
||||
otherwise call httpFlush() to complete the response processing.
|
||||
<a href="#cupsSendRequest"><code>cupsSendRequest</code></a>. For requests that return additional data, use
|
||||
<a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> after getting a successful response,
|
||||
otherwise call <a href="#httpFlush"><code>httpFlush</code></a> to complete the response processing.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><a name="cupsLastError">cupsLastError</a></h3>
|
||||
<p class="description">Return the last IPP status code.</p>
|
||||
<p class="description">Return the last IPP status code received on the current
|
||||
thread.</p>
|
||||
<p class="code">
|
||||
ipp_status_t cupsLastError (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">IPP status code from last request</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.2/OS X 10.5 </span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
|
||||
<p class="description">Return the last IPP status-message.</p>
|
||||
<p class="description">Return the last IPP status-message received on the
|
||||
current thread.</p>
|
||||
<p class="code">
|
||||
const char *cupsLastErrorString (void);</p>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
@@ -1305,8 +1308,9 @@ ssize_t cupsReadResponseData (<br>
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Bytes read, 0 on EOF, -1 on error</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">This function is used after cupsGetResponse() to read the PPD or document
|
||||
files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
|
||||
<p class="discussion">This function is used after <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to read the PPD or document
|
||||
files from <code>CUPS_GET_PPD</code> and <code>CUPS_GET_DOCUMENT</code> requests,
|
||||
respectively.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsSendRequest">cupsSendRequest</a></h3>
|
||||
@@ -1332,13 +1336,17 @@ files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
|
||||
<h4 class="returnvalue">Return Value</h4>
|
||||
<p class="description">Initial HTTP status</p>
|
||||
<h4 class="discussion">Discussion</h4>
|
||||
<p class="discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
|
||||
for the request, cupsGetResponse() to get the IPP response, and httpRead()
|
||||
to read any additional data following the response. Only one request can be
|
||||
sent/queued at a time.<br>
|
||||
<p class="discussion">Use <a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a> to write any additional data (document, PPD
|
||||
file, etc.) for the request, <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to get the IPP response,
|
||||
and <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> to read any additional data following the
|
||||
response. Only one request can be sent/queued at a time per <code>http_t</code>
|
||||
connection.<br>
|
||||
<br>
|
||||
Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
|
||||
request is not freed.
|
||||
Returns the initial HTTP status code, which will be <code>HTTP_CONTINUE</code>
|
||||
on a successful send of the request.<br>
|
||||
<br>
|
||||
Note: Unlike <a href="#cupsDoFileRequest"><code>cupsDoFileRequest</code></a>, <a href="#cupsDoIORequest"><code>cupsDoIORequest</code></a>, and
|
||||
<a href="#cupsDoRequest"><code>cupsDoRequest</code></a>, the request is NOT freed with <a href="#ippDelete"><code>ippDelete</code></a>.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4/OS X 10.6 </span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
|
||||
|
||||
@@ -151,7 +151,7 @@ The following standard files are available:
|
||||
<br>
|
||||
<a href='http://localhost:631/help'>http://localhost:631/help</a>
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
ipptoolfile - ipptool file format
|
||||
|
||||
<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
|
||||
The <a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a> program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curley braces, for example:
|
||||
The <a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a> program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curly braces, for example:
|
||||
<pre>
|
||||
|
||||
# This is a comment
|
||||
@@ -402,6 +402,14 @@ parallel attribute.
|
||||
<h2 class="title"><a name="STATUS_PREDICATES">Status Predicates</a></h2>
|
||||
The following predicates are understood following the STATUS test directive:
|
||||
<dl>
|
||||
<dt>DEFINE-MATCH variable-name
|
||||
</dt>
|
||||
<dd>Defines the variable to "1" when the STATUS matches. A side-effect of this predicate is that this STATUS will never fail a test.
|
||||
</dd>
|
||||
<dt>DEFINE-NO-MATCH variable-name
|
||||
</dt>
|
||||
<dd>Defines the variable to "1" when the STATUS does not match. A side-effect of this predicate is that this STATUS will never fail a test.
|
||||
</dd>
|
||||
<dt>IF-DEFINED variable-name
|
||||
</dt>
|
||||
<dd>Makes the STATUS apply only if the specified variable is defined.
|
||||
@@ -631,7 +639,7 @@ no job-uri has been seen.
|
||||
</dd>
|
||||
<dt>$notify-subscription-id
|
||||
</dt>
|
||||
<dd>Inserts the last notify-subscription-id value returnd in a test response or 0 if
|
||||
<dd>Inserts the last notify-subscription-id value returned in a test response or 0 if
|
||||
no notify-subscription-id has been seen.
|
||||
</dd>
|
||||
<dt>$port
|
||||
@@ -662,7 +670,7 @@ no notify-subscription-id has been seen.
|
||||
<a href='http://localhost:631/help'>http://localhost:631/help</a>
|
||||
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+28
-8
@@ -93,16 +93,22 @@ page on the device.</P>
|
||||
|
||||
<PRE>
|
||||
socket://<i>ip-address-or-hostname</i>
|
||||
socket://<i>ip-address-or-hostname</i>/?waiteof=false
|
||||
socket://<i>ip-address-or-hostname</i>/?option=value
|
||||
socket://<i>ip-address-or-hostname</i>/?option=value&option=value
|
||||
socket://<i>ip-address-or-hostname</i>:<i>port-number</i>
|
||||
socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?waiteof=false
|
||||
socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?option=value
|
||||
socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?option=value&option=value
|
||||
</PRE>
|
||||
|
||||
<P>The "contimeout" option controls the number of seconds that the backend will wait to obtain a connection to the printer. The default is 1 week.</P>
|
||||
|
||||
<P>The "snmp" option controls whether the <tt>socket</tt> backend queries for supply and page count information via SNMP.</P>
|
||||
|
||||
<P>The "waiteof" option controls whether the <tt>socket</tt> backend waits for the printer to complete the printing of the job. The default is to wait.</P>
|
||||
|
||||
<H3><A NAME="IPP">Internet Printing Protocol (IPP)</A></H3>
|
||||
|
||||
<P>IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the <tt>http</tt> and <tt>ipp</tt> URI schemes:</P>
|
||||
<P>IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the <tt>http</tt>, <tt>ipp</tt>, and <tt>ipps</tt> URI schemes:</P>
|
||||
|
||||
<PRE>
|
||||
http://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
|
||||
@@ -114,6 +120,12 @@ ipp://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value&option=value
|
||||
ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
|
||||
ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
|
||||
ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&option=value</i>
|
||||
ipps://<i>ip-address-or-hostname</i>/<i>resource</i>
|
||||
ipps://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value</i>
|
||||
ipps://<i>ip-address-or-hostname</i>/<i>resource</i>?<i>option=value&option=value</i>
|
||||
ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>
|
||||
ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value</i>
|
||||
ipps://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option=value&option=value</i>
|
||||
</PRE>
|
||||
|
||||
<P>The <tt>ipp</tt> backend supports many options, which are summarized in <A HREF="#TABLE2">Table 2</A>.</P>
|
||||
@@ -148,16 +160,20 @@ ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option
|
||||
<TD>Specifies that the connection to the IPP server should be encrypted using TLS.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>version=1.0</TT></TD>
|
||||
<TD>Specifies that version 1.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
|
||||
<TD><TT>snmp=false</TT></TD>
|
||||
<TD>Specifies that SNMP supply and page count queries should not be performed.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>version=2.0</TT></TD>
|
||||
<TD>Specifies that version 2.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
|
||||
<TD><TT>version=1.0</TT></TD>
|
||||
<TD>Specifies that version 1.0 of the IPP protocol should be used instead of the default version 2.0.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>version=1.1</TT></TD>
|
||||
<TD>Specifies that version 1.1 of the IPP protocol should be used instead of the default version 2.0.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>version=2.1</TT></TD>
|
||||
<TD>Specifies that version 2.1 of the IPP protocol should be used instead of the default version 1.1.</TD>
|
||||
<TD>Specifies that version 2.1 of the IPP protocol should be used instead of the default version 2.0.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>waitjob=false</TT></TD>
|
||||
@@ -266,6 +282,10 @@ lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option
|
||||
<TD><TT>sanitize_title=yes</TT></TD>
|
||||
<TD>Specifies that the job title string should be restricted to ASCII characters.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>snmp=false</TT></TD>
|
||||
<TD>Specifies that SNMP supply and page count queries should not be performed.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>timeout=<I>seconds</I></TT></TD>
|
||||
<TD>Specifies the number of seconds to wait for LPD commands to complete.</TD>
|
||||
|
||||
@@ -609,18 +609,6 @@ lpr -o lpi=8 filename
|
||||
|
||||
<P>The default lines per inch is 6.</P>
|
||||
|
||||
<H3><A NAME="COLUMNS">Setting the Number of Columns</A></H3>
|
||||
|
||||
<P>The <CODE>-o columns=value</CODE> option sets the number of
|
||||
text columns:</P>
|
||||
|
||||
<PRE CLASS="command">
|
||||
lp -o columns=2 filename
|
||||
lpr -o columns=3 filename
|
||||
</PRE>
|
||||
|
||||
<P>The default number of columns is 1.</P>
|
||||
|
||||
<H3><A NAME="MARGINS">Setting the Page Margins</A></H3>
|
||||
|
||||
<P>Normally the page margins are set to the hard limits of the
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
<HTML>
|
||||
<!-- SECTION: References -->
|
||||
<HEAD>
|
||||
<TITLE>cups-files.conf</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<H1 CLASS="title">cups-files.conf</H1>
|
||||
|
||||
<P>The <VAR>/etc/cups/cups-files.conf</VAR> file contains configuration <I>directives</I> that control the files, directories. users. and groups that are used by the CUPS scheduler, <CODE>cupsd(8)</CODE>. Each directive is listed on a line by itself followed by its value. Comments are introduced using the number sign ("#") character at the beginning of a line.</P>
|
||||
|
||||
<H2 CLASS="title"><A NAME="AccessLog">AccessLog</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
AccessLog /var/log/cups/access_log
|
||||
AccessLog /var/log/cups/access_log-%s
|
||||
AccessLog syslog
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>AccessLog</CODE> directive sets the name of the
|
||||
access log file. If the filename is not absolute then it is
|
||||
assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
access log file is stored in "common log format" and can be used
|
||||
by any web access reporting tool to generate a report on CUPS
|
||||
server activity.</P>
|
||||
|
||||
<P>The server name can be included in the filename by using
|
||||
<CODE>%s</CODE> in the name.</P>
|
||||
|
||||
<P>The special name "syslog" can be used to send the access
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
<P>The default access log file is
|
||||
<VAR>@CUPS_LOGDIR@/access_log</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.15</SPAN><A NAME="ConfigFilePerm">ConfigFilePerm</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ConfigFilePerm 0644
|
||||
ConfigFilePerm 0640
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ConfigFilePerm</CODE> directive specifies the permissions to use when the scheduler writes configuration and cache files, typically in response to IPP or HTTP requests. The default is @CUPS_CONFIG_FILE_PERM@.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>The permissions for the <VAR>printers.conf</VAR> file are always masked to only allow access from the scheduler user (typically root). This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="DataDir">DataDir</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
DataDir /usr/share/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>DataDir</CODE> directive sets the directory to use
|
||||
for data files.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="DocumentRoot">DocumentRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
DocumentRoot /usr/share/doc/cups
|
||||
DocumentRoot /foo/bar/doc/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>DocumentRoot</CODE> directive specifies the location
|
||||
of web content for the HTTP server in CUPS. If an absolute path
|
||||
is not specified then it is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default directory is <VAR>@CUPS_DOCROOT@</VAR>.</P>
|
||||
|
||||
<P>Documents are first looked up in a sub-directory for the
|
||||
primary language requested by the client (e.g.
|
||||
<VAR>@CUPS_DOCROOT@/fr/...</VAR>) and then directly under
|
||||
the <CODE>DocumentRoot</CODE> directory (e.g.
|
||||
<VAR>@CUPS_DOCROOT@/...</VAR>), so it is possible to
|
||||
localize the web content by providing subdirectories for each
|
||||
language needed.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ErrorLog">ErrorLog</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ErrorLog /var/log/cups/error_log
|
||||
ErrorLog /var/log/cups/error_log-%s
|
||||
ErrorLog syslog
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ErrorLog</CODE> directive sets the name of the error
|
||||
log file. If the filename is not absolute then it is assumed to
|
||||
be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default error log file is <VAR>@CUPS_LOGDIR@/error_log</VAR>.</P>
|
||||
|
||||
<P>The server name can be included in the filename by using
|
||||
<CODE>%s</CODE> in the name.</P>
|
||||
|
||||
<P>The special name "syslog" can be used to send the error
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/OS X 10.6</SPAN><A NAME="FatalErrors">FatalErrors</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
FatalErrors none
|
||||
FatalErrors all
|
||||
FatalErrors browse
|
||||
FatalErrors config
|
||||
FatalErrors listen
|
||||
FatalErrors log
|
||||
FatalErrors permissions
|
||||
FatalErrors all -permissions
|
||||
FatalErrors config permissions log
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>FatalErrors</CODE> directive determines whether certain kinds of
|
||||
errors are fatal. The following kinds of errors are currently recognized:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><CODE>none</CODE> - No errors are fatal</LI>
|
||||
|
||||
<LI><CODE>all</CODE> - All of the errors below are fatal</LI>
|
||||
|
||||
<LI><CODE>browse</CODE> - Browsing initialization errors are fatal,
|
||||
for example failed binding to the CUPS browse port or failed connections
|
||||
to LDAP servers</LI>
|
||||
|
||||
<LI><CODE>config</CODE> - Configuration file syntax errors are
|
||||
fatal</LI>
|
||||
|
||||
<LI><CODE>listen</CODE> - Listen or Port errors are fatal, except for
|
||||
IPv6 failures on the loopback or "any" addresses</LI>
|
||||
|
||||
<LI><CODE>log</CODE> - Log file creation or write errors are fatal</LI>
|
||||
|
||||
<LI><CODE>permissions</CODE> - Bad startup file permissions are
|
||||
fatal, for example shared SSL certificate and key files with world-
|
||||
read permissions</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<P>Multiple errors can be listed, and the form "-kind" can be used with
|
||||
<CODE>all</CODE> to remove specific kinds of errors. The default setting is
|
||||
<CODE>@CUPS_FATAL_ERRORS@</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.18</SPAN><A NAME="FileDevice">FileDevice</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
FileDevice Yes
|
||||
FileDevice No
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>FileDevice</CODE> directive determines whether the
|
||||
scheduler allows new printers to be added using device URIs of
|
||||
the form <CODE>file:/filename</CODE>. File devices are most often
|
||||
used to test new printer drivers and do not support raw file
|
||||
printing.</P>
|
||||
|
||||
<P>The default setting is <CODE>No</CODE>.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>File devices are managed by the scheduler. Since the
|
||||
scheduler normally runs as the root user, file devices
|
||||
can be used to overwrite system files and potentially
|
||||
gain unauthorized access to the system. If you must
|
||||
create printers using file devices, we recommend that
|
||||
you set the <CODE>FileDevice</CODE> directive to
|
||||
<CODE>Yes</CODE> for only as long as you need to add the
|
||||
printers to the system, and then reset the directive to
|
||||
<CODE>No</CODE>.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.3</SPAN><A NAME="FontPath">FontPath</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
FontPath /foo/bar/fonts
|
||||
FontPath /usr/share/cups/fonts:/foo/bar/fonts
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>FontPath</CODE> directive specifies the font path to
|
||||
use when searching for fonts. The default font path is
|
||||
<CODE>/usr/share/cups/fonts</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Group">Group</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
Group lp
|
||||
Group nobody
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>Group</CODE> directive specifies the UNIX group that
|
||||
filter and CGI programs run as. The default group is
|
||||
system-specific but is usually <CODE>lp</CODE> or
|
||||
<CODE>nobody</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.15</SPAN><A NAME="LogFilePerm">LogFilePerm</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
LogFilePerm 0644
|
||||
LogFilePerm 0600
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>LogFilePerm</CODE> directive specifies the
|
||||
permissions to use when writing log files. The default
|
||||
is @CUPS_LOG_FILE_PERM@.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="PageLog">PageLog</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
PageLog /var/log/cups/page_log
|
||||
PageLog /var/log/cups/page_log-%s
|
||||
PageLog syslog
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>PageLog</CODE> directive sets the name of the page
|
||||
log file. If the filename is not absolute then it is assumed to
|
||||
be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default page log file is <VAR>@CUPS_LOGDIR@/page_log</VAR>.</P>
|
||||
|
||||
<P>The server name can be included in the filename by using
|
||||
<CODE>%s</CODE> in the name.</P>
|
||||
|
||||
<P>The special name "syslog" can be used to send the page
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Printcap">Printcap</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
Printcap
|
||||
Printcap /etc/printcap
|
||||
Printcap /etc/printers.conf
|
||||
Printcap /Library/Preferences/org.cups.printers.plist
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>Printcap</CODE> directive controls whether or not a
|
||||
printcap file is automatically generated and updated with a list
|
||||
of available printers. If specified with no value, then no
|
||||
printcap file will be generated. The default is to generate a
|
||||
file named <VAR>@CUPS_DEFAULT_PRINTCAP@</VAR>.</P>
|
||||
|
||||
<P>When a filename is specified (e.g. <VAR>@CUPS_DEFAULT_PRINTCAP@</VAR>),
|
||||
the printcap file is written whenever a printer is added or
|
||||
removed. The printcap file can then be used by applications that
|
||||
are hardcoded to look at the printcap file for the available
|
||||
printers.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="PrintcapFormat">PrintcapFormat</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
PrintcapFormat BSD
|
||||
PrintcapFormat Solaris
|
||||
PrintcapFormat plist
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>PrintcapFormat</CODE> directive controls the output format of the
|
||||
printcap file. The default is to generate the plist format on OS X, the
|
||||
Solaris format on Solaris, and the BSD format on other operating systems.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.3</SPAN><A NAME="RemoteRoot">RemoteRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
RemoteRoot remroot
|
||||
RemoteRoot root
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>RemoteRoot</CODE> directive sets the username for
|
||||
unauthenticated root requests from remote hosts. The default
|
||||
username is <VAR>remroot</VAR>. Setting <CODE>RemoteRoot</CODE>
|
||||
to <VAR>root</VAR> effectively disables this security
|
||||
mechanism.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="RequestRoot">RequestRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
RequestRoot /var/spool/cups
|
||||
RequestRoot /foo/bar/spool/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>RequestRoot</CODE> directive sets the directory for
|
||||
incoming IPP requests and HTML forms. If an absolute path is not
|
||||
provided then it is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default request directory is <VAR>@CUPS_REQUESTS@</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerBin">ServerBin</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerBin /usr/lib/cups
|
||||
ServerBin /foo/bar/lib/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerBin</CODE> directive sets the directory for
|
||||
server-run executables. If an absolute path is not provided then
|
||||
it is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default executable directory is <VAR>/usr/lib/cups</VAR>,
|
||||
<VAR>/usr/lib32/cups</VAR>, or <VAR>/usr/libexec/cups</VAR>
|
||||
depending on the operating system.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerCertificate">ServerCertificate</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerCertificate /etc/cups/ssl/server.crt
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerCertificate</CODE> directive specifies the
|
||||
location of the SSL certificate file used by the server when
|
||||
negotiating encrypted connections. The certificate must not be
|
||||
encrypted (password protected) since the scheduler normally runs
|
||||
in the background and will be unable to ask for a password.</P>
|
||||
|
||||
<P>The default certificate file is
|
||||
<VAR>/etc/cups/ssl/server.crt</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerKey">ServerKey</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerKey /etc/cups/ssl/server.key
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerKey</CODE> directive specifies the location of
|
||||
the SSL private key file used by the server when negotiating
|
||||
encrypted connections.</P>
|
||||
|
||||
<P>The default key file is
|
||||
<VAR>/etc/cups/ssl/server.crt</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerRoot">ServerRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerRoot /etc/cups
|
||||
ServerRoot /foo/bar/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerRoot</CODE> directive specifies the absolute
|
||||
path to the server configuration and state files. It is also used
|
||||
to resolve relative paths in the <VAR>cupsd.conf</VAR> file. The
|
||||
default server directory is <VAR>/etc/cups</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="SystemGroup">SystemGroup</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
SystemGroup lpadmin
|
||||
SystemGroup sys
|
||||
SystemGroup system
|
||||
SystemGroup root
|
||||
SystemGroup root lpadmin
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>SystemGroup</CODE> directive specifies the system
|
||||
administration group for <CODE>System</CODE> authentication.
|
||||
Multiple groups can be listed, separated with spaces. The default
|
||||
group list is <CODE>@CUPS_SYSTEM_GROUPS@</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="TempDir">TempDir</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
TempDir /var/tmp
|
||||
TempDir /foo/bar/tmp
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>TempDir</CODE> directive specifies an absolute path
|
||||
for the directory to use for temporary files. The default
|
||||
directory is <VAR>@CUPS_REQUESTS@/tmp</VAR>.</P>
|
||||
|
||||
<P>Temporary directories must be world-writable and should have
|
||||
the "sticky" permission bit enabled so that other users cannot
|
||||
delete filter temporary files. The following commands will create
|
||||
an appropriate temporary directory called
|
||||
<VAR>/foo/bar/tmp</VAR>:</P>
|
||||
|
||||
<PRE CLASS="command">
|
||||
<KBD>mkdir /foo/bar/tmp</KBD>
|
||||
<KBD>chmod a+rwxt /foo/bar/tmp</KBD>
|
||||
</PRE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="User">User</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
User lp
|
||||
User guest
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>User</CODE> directive specifies the UNIX user that
|
||||
filter and CGI programs run as. The default user is
|
||||
<CODE>@CUPS_USER@</CODE>.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>You may not use user <CODE>root</CODE>, as that would expose
|
||||
the system to unacceptable security risks. The scheduler will
|
||||
automatically choose user <CODE>nobody</CODE> if you specify a
|
||||
user whose ID is 0.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -49,36 +49,6 @@ automatically handles restarting the scheduler.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="AccessLog">AccessLog</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
AccessLog /var/log/cups/access_log
|
||||
AccessLog /var/log/cups/access_log-%s
|
||||
AccessLog syslog
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>AccessLog</CODE> directive sets the name of the
|
||||
access log file. If the filename is not absolute then it is
|
||||
assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
access log file is stored in "common log format" and can be used
|
||||
by any web access reporting tool to generate a report on CUPS
|
||||
server activity.</P>
|
||||
|
||||
<P>The server name can be included in the filename by using
|
||||
<CODE>%s</CODE> in the name.</P>
|
||||
|
||||
<P>The special name "syslog" can be used to send the access
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
<P>The default access log file is
|
||||
<VAR>@CUPS_LOGDIR@/access_log</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="AccessLogLevel">AccessLogLevel</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -197,82 +167,6 @@ HREF="#Location"><CODE>Location</CODE></A> or <A
|
||||
HREF="#Limit"><CODE>Limit</CODE></A> section.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">Deprecated</SPAN><A NAME="AuthClass">AuthClass</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
<Location /path>
|
||||
...
|
||||
AuthClass Anonymous
|
||||
AuthClass User
|
||||
AuthClass System
|
||||
AuthClass Group
|
||||
</Location>
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>AuthClass</CODE> directive defines what level of
|
||||
authentication is required:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><CODE>Anonymous</CODE> - No authentication should be
|
||||
performed (default)</LI>
|
||||
|
||||
<LI><CODE>User</CODE> - A valid username and password is
|
||||
required</LI>
|
||||
|
||||
<LI><CODE>System</CODE> - A valid username and password
|
||||
is required, and the username must belong to the "sys"
|
||||
group; this can be changed using the <A
|
||||
HREF="#SystemGroup"><CODE>SystemGroup</CODE></A>
|
||||
directive</LI>
|
||||
|
||||
<LI><CODE>Group</CODE> - A valid username and password is
|
||||
required, and the username must belong to the group named
|
||||
by the <A
|
||||
HREF="#AuthGroupName"><CODE>AuthGroupName</CODE></A>
|
||||
directive</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<P>The <CODE>AuthClass</CODE> directive must appear inside a <A
|
||||
HREF="#Location"><CODE>Location</CODE></A> or <A
|
||||
HREF="#Limit"><CODE>Limit</CODE></A> section.</P>
|
||||
|
||||
<P><B>This directive is deprecated and will be removed from a
|
||||
future release of CUPS.</B> Consider using the more flexible <A
|
||||
HREF="#Require"><CODE>Require</CODE></A> directive instead.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">Deprecated</SPAN><A NAME="AuthGroupName">AuthGroupName</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
<Location /path>
|
||||
...
|
||||
AuthGroupName mygroup
|
||||
AuthGroupName lp
|
||||
</Location>
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>AuthGroupName</CODE> directive sets the group to use
|
||||
for <CODE>Group</CODE> authentication.</P>
|
||||
|
||||
<P>The <CODE>AuthGroupName</CODE> directive must appear inside a
|
||||
<A HREF="#Location"><CODE>Location</CODE></A> or <A
|
||||
HREF="#Limit"><CODE>Limit</CODE></A> section.</P>
|
||||
|
||||
<P><B>This directive is deprecated and will be removed from a
|
||||
future release of CUPS.</B> Consider using the more flexible <A
|
||||
HREF="#Require"><CODE>Require</CODE></A> directive instead.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="AuthType">AuthType</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -436,40 +330,6 @@ used.</P>
|
||||
<P>The default is to not allow classification overrides.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.15</SPAN><A NAME="ConfigFilePerm">ConfigFilePerm</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ConfigFilePerm 0644
|
||||
ConfigFilePerm 0640
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ConfigFilePerm</CODE> directive specifies the permissions to use when the scheduler writes configuration and cache files, typically in response to IPP or HTTP requests. The default is @CUPS_CONFIG_FILE_PERM@.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>The permissions for the <VAR>printers.conf</VAR> file are always masked to only allow access from the scheduler user (typically root). This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="DataDir">DataDir</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
DataDir /usr/share/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>DataDir</CODE> directive sets the directory to use
|
||||
for data files.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/OS X 10.5</SPAN><A NAME="DefaultAuthType">DefaultAuthType</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -653,32 +513,6 @@ DirtyCleanInterval 0
|
||||
<P>The default value is <CODE>30</CODE> (30 seconds).</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="DocumentRoot">DocumentRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
DocumentRoot /usr/share/doc/cups
|
||||
DocumentRoot /foo/bar/doc/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>DocumentRoot</CODE> directive specifies the location
|
||||
of web content for the HTTP server in CUPS. If an absolute path
|
||||
is not specified then it is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default directory is <VAR>@CUPS_DOCROOT@</VAR>.</P>
|
||||
|
||||
<P>Documents are first looked up in a sub-directory for the
|
||||
primary language requested by the client (e.g.
|
||||
<VAR>@CUPS_DOCROOT@/fr/...</VAR>) and then directly under
|
||||
the <CODE>DocumentRoot</CODE> directory (e.g.
|
||||
<VAR>@CUPS_DOCROOT@/...</VAR>), so it is possible to
|
||||
localize the web content by providing subdirectories for each
|
||||
language needed.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Encryption">Encryption</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -701,31 +535,6 @@ encryption settings for that location. The default setting is
|
||||
<CODE>IfRequested</CODE> for all locations.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ErrorLog">ErrorLog</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ErrorLog /var/log/cups/error_log
|
||||
ErrorLog /var/log/cups/error_log-%s
|
||||
ErrorLog syslog
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ErrorLog</CODE> directive sets the name of the error
|
||||
log file. If the filename is not absolute then it is assumed to
|
||||
be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default error log file is <VAR>@CUPS_LOGDIR@/error_log</VAR>.</P>
|
||||
|
||||
<P>The server name can be included in the filename by using
|
||||
<CODE>%s</CODE> in the name.</P>
|
||||
|
||||
<P>The special name "syslog" can be used to send the error
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3/OS X 10.5</SPAN><A NAME="ErrorPolicy">ErrorPolicy</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -764,91 +573,6 @@ printer.</P>
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/OS X 10.6</SPAN><A NAME="FatalErrors">FatalErrors</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
FatalErrors none
|
||||
FatalErrors all
|
||||
FatalErrors browse
|
||||
FatalErrors config
|
||||
FatalErrors listen
|
||||
FatalErrors log
|
||||
FatalErrors permissions
|
||||
FatalErrors all -permissions
|
||||
FatalErrors config permissions log
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>FatalErrors</CODE> directive determines whether certain kinds of
|
||||
errors are fatal. The following kinds of errors are currently recognized:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><CODE>none</CODE> - No errors are fatal</LI>
|
||||
|
||||
<LI><CODE>all</CODE> - All of the errors below are fatal</LI>
|
||||
|
||||
<LI><CODE>browse</CODE> - Browsing initialization errors are fatal,
|
||||
for example failed binding to the CUPS browse port or failed connections
|
||||
to LDAP servers</LI>
|
||||
|
||||
<LI><CODE>config</CODE> - Configuration file syntax errors are
|
||||
fatal</LI>
|
||||
|
||||
<LI><CODE>listen</CODE> - Listen or Port errors are fatal, except for
|
||||
IPv6 failures on the loopback or "any" addresses</LI>
|
||||
|
||||
<LI><CODE>log</CODE> - Log file creation or write errors are fatal</LI>
|
||||
|
||||
<LI><CODE>permissions</CODE> - Bad startup file permissions are
|
||||
fatal, for example shared SSL certificate and key files with world-
|
||||
read permissions</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<P>Multiple errors can be listed, and the form "-kind" can be used with
|
||||
<CODE>all</CODE> to remove specific kinds of errors. The default setting is
|
||||
<CODE>@CUPS_FATAL_ERRORS@</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.18</SPAN><A NAME="FileDevice">FileDevice</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
FileDevice Yes
|
||||
FileDevice No
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>FileDevice</CODE> directive determines whether the
|
||||
scheduler allows new printers to be added using device URIs of
|
||||
the form <CODE>file:/filename</CODE>. File devices are most often
|
||||
used to test new printer drivers and do not support raw file
|
||||
printing.</P>
|
||||
|
||||
<P>The default setting is <CODE>No</CODE>.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>File devices are managed by the scheduler. Since the
|
||||
scheduler normally runs as the root user, file devices
|
||||
can be used to overwrite system files and potentially
|
||||
gain unauthorized access to the system. If you must
|
||||
create printers using file devices, we recommend that
|
||||
you set the <CODE>FileDevice</CODE> directive to
|
||||
<CODE>Yes</CODE> for only as long as you need to add the
|
||||
printers to the system, and then reset the directive to
|
||||
<CODE>No</CODE>.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.3</SPAN><A NAME="FilterLimit">FilterLimit</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -893,39 +617,6 @@ value to assign to filter processes. The nice value ranges from
|
||||
is 0.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.3</SPAN><A NAME="FontPath">FontPath</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
FontPath /foo/bar/fonts
|
||||
FontPath /usr/share/cups/fonts:/foo/bar/fonts
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>FontPath</CODE> directive specifies the font path to
|
||||
use when searching for fonts. The default font path is
|
||||
<CODE>/usr/share/cups/fonts</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Group">Group</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
Group lp
|
||||
Group nobody
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>Group</CODE> directive specifies the UNIX group that
|
||||
filter and CGI programs run as. The default group is
|
||||
system-specific but is usually <CODE>lp</CODE> or
|
||||
<CODE>nobody</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.6/OS X 10.8</SPAN><A NAME="GSSServiceName">GSSServiceName</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -980,7 +671,7 @@ Include /foo/bar/filename
|
||||
<P>The <CODE>Include</CODE> directive includes the named file in
|
||||
the <CODE>cupsd.conf</CODE> file. If no leading path is provided,
|
||||
the file is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory.</P>
|
||||
HREF="ref-cups-files-conf.html#ServerRoot"><CODE>ServerRoot</CODE></A> directory.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.5</SPAN><A NAME="JobPrivateAccess">JobPrivateAccess</A></H2>
|
||||
@@ -1533,22 +1224,6 @@ error occurs during printing. The default is 200 messages. A value of 0
|
||||
disables debugging history entirely and is not recommended.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.15</SPAN><A NAME="LogFilePerm">LogFilePerm</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
LogFilePerm 0644
|
||||
LogFilePerm 0600
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>LogFilePerm</CODE> directive specifies the
|
||||
permissions to use when writing log files. The default
|
||||
is @CUPS_LOG_FILE_PERM@.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="LogLevel">LogLevel</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -1569,7 +1244,7 @@ LogLevel debug2
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>LogLevel</CODE> directive specifies the level of
|
||||
logging for the <A HREF="#ErrorLog"><CODE>ErrorLog</CODE></A>
|
||||
logging for the <A HREF="ref-cups-files-conf.html#ErrorLog"><CODE>ErrorLog</CODE></A>
|
||||
file. The following values are recognized (each level logs
|
||||
everything under the preceding levels):</P>
|
||||
|
||||
@@ -1893,31 +1568,6 @@ HREF="#Location"><CODE>Location</CODE></A> or <A
|
||||
HREF="#Limit"><CODE>Limit</CODE></A> section.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="PageLog">PageLog</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
PageLog /var/log/cups/page_log
|
||||
PageLog /var/log/cups/page_log-%s
|
||||
PageLog syslog
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>PageLog</CODE> directive sets the name of the page
|
||||
log file. If the filename is not absolute then it is assumed to
|
||||
be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default page log file is <VAR>@CUPS_LOGDIR@/page_log</VAR>.</P>
|
||||
|
||||
<P>The server name can be included in the filename by using
|
||||
<CODE>%s</CODE> in the name.</P>
|
||||
|
||||
<P>The special name "syslog" can be used to send the page
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="PageLogFormat">PageLogFormat</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -2096,65 +1746,6 @@ PreserveJobFiles 604800
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Printcap">Printcap</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
Printcap
|
||||
Printcap /etc/printcap
|
||||
Printcap /etc/printers.conf
|
||||
Printcap /Library/Preferences/org.cups.printers.plist
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>Printcap</CODE> directive controls whether or not a
|
||||
printcap file is automatically generated and updated with a list
|
||||
of available printers. If specified with no value, then no
|
||||
printcap file will be generated. The default is to generate a
|
||||
file named <VAR>@CUPS_DEFAUL_PRINTCAP@</VAR>.</P>
|
||||
|
||||
<P>When a filename is specified (e.g. <VAR>@CUPS_DEFAULT_PRINTCAP@</VAR>),
|
||||
the printcap file is written whenever a printer is added or
|
||||
removed. The printcap file can then be used by applications that
|
||||
are hardcoded to look at the printcap file for the available
|
||||
printers.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="PrintcapFormat">PrintcapFormat</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
PrintcapFormat BSD
|
||||
PrintcapFormat Solaris
|
||||
PrintcapFormat plist
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>PrintcapFormat</CODE> directive controls the output format of the
|
||||
printcap file. The default is to generate the plist format on OS X, the
|
||||
Solaris format on Solaris, and the BSD format on other operating systems.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.13</SPAN><A NAME="PrintcapGUI">PrintcapGUI</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
PrintGUI /usr/bin/glpoptions
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>PrintcapGUI</CODE> directive sets the program to
|
||||
associate with the IRIX printer GUI interface script which is
|
||||
used by IRIX applications to display printer-specific options.
|
||||
There is no default program.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.21</SPAN><A NAME="ReloadTimeout">ReloadTimeout</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -2171,42 +1762,6 @@ of seconds the scheduler will wait for active jobs to complete
|
||||
before doing a restart. The default is 30 seconds.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.3</SPAN><A NAME="RemoteRoot">RemoteRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
RemoteRoot remroot
|
||||
RemoteRoot root
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>RemoteRoot</CODE> directive sets the username for
|
||||
unauthenticated root requests from remote hosts. The default
|
||||
username is <VAR>remroot</VAR>. Setting <CODE>RemoteRoot</CODE>
|
||||
to <VAR>root</VAR> effectively disables this security
|
||||
mechanism.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="RequestRoot">RequestRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
RequestRoot /var/spool/cups
|
||||
RequestRoot /foo/bar/spool/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>RequestRoot</CODE> directive sets the directory for
|
||||
incoming IPP requests and HTML forms. If an absolute path is not
|
||||
provided then it is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default request directory is <VAR>@CUPS_REQUESTS@</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.7</SPAN><A NAME="Require">Require</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -2359,64 +1914,6 @@ alternate name with a ServerAlias directive instead of using "*".</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerBin">ServerBin</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerBin /usr/lib/cups
|
||||
ServerBin /foo/bar/lib/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerBin</CODE> directive sets the directory for
|
||||
server-run executables. If an absolute path is not provided then
|
||||
it is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory. The
|
||||
default executable directory is <VAR>/usr/lib/cups</VAR>,
|
||||
<VAR>/usr/lib32/cups</VAR>, or <VAR>/usr/libexec/cups</VAR>
|
||||
depending on the operating system.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerCertificate">ServerCertificate</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerCertificate /etc/cups/ssl/server.crt
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerCertificate</CODE> directive specifies the
|
||||
location of the SSL certificate file used by the server when
|
||||
negotiating encrypted connections. The certificate must not be
|
||||
encrypted (password protected) since the scheduler normally runs
|
||||
in the background and will be unable to ask for a password.</P>
|
||||
|
||||
<P>The default certificate file is
|
||||
<VAR>/etc/cups/ssl/server.crt</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerKey">ServerKey</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerKey /etc/cups/ssl/server.key
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerKey</CODE> directive specifies the location of
|
||||
the SSL private key file used by the server when negotiating
|
||||
encrypted connections.</P>
|
||||
|
||||
<P>The default key file is
|
||||
<VAR>/etc/cups/ssl/server.crt</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerName">ServerName</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -2433,23 +1930,6 @@ that is reported to clients. By default the server name is the
|
||||
hostname.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="ServerRoot">ServerRoot</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
ServerRoot /etc/cups
|
||||
ServerRoot /foo/bar/cups
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>ServerRoot</CODE> directive specifies the absolute
|
||||
path to the server configuration and state files. It is also used
|
||||
to resolve relative paths in the <VAR>cupsd.conf</VAR> file. The
|
||||
default server directory is <VAR>/etc/cups</VAR>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.21</SPAN><A NAME="ServerTokens">ServerTokens</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -2645,53 +2125,6 @@ subscription values to make private. The "default" values are "notify-events",
|
||||
HREF="#Policy"><CODE>Policy</CODE></A> section.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="SystemGroup">SystemGroup</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
SystemGroup lpadmin
|
||||
SystemGroup sys
|
||||
SystemGroup system
|
||||
SystemGroup root
|
||||
SystemGroup root lpadmin
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>SystemGroup</CODE> directive specifies the system
|
||||
administration group for <CODE>System</CODE> authentication.
|
||||
Multiple groups can be listed, separated with spaces. The default
|
||||
group list is <CODE>@CUPS_SYSTEM_GROUPS@</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="TempDir">TempDir</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
TempDir /var/tmp
|
||||
TempDir /foo/bar/tmp
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>TempDir</CODE> directive specifies an absolute path
|
||||
for the directory to use for temporary files. The default
|
||||
directory is <VAR>@CUPS_REQUESTS@/tmp</VAR>.</P>
|
||||
|
||||
<P>Temporary directories must be world-writable and should have
|
||||
the "sticky" permission bit enabled so that other users cannot
|
||||
delete filter temporary files. The following commands will create
|
||||
an appropriate temporary directory called
|
||||
<VAR>/foo/bar/tmp</VAR>:</P>
|
||||
|
||||
<PRE CLASS="command">
|
||||
<KBD>mkdir /foo/bar/tmp</KBD>
|
||||
<KBD>chmod a+rwxt /foo/bar/tmp</KBD>
|
||||
</PRE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Timeout">Timeout</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
@@ -2712,53 +2145,6 @@ to wait before an active HTTP or IPP request times out in seconds (no suffix), m
|
||||
<P>The default timeout is <CODE>5m</CODE> (five minutes).</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/OS X 10.5</SPAN><A NAME="UseNetworkDefault">UseNetworkDefault</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
UseNetworkDefault yes
|
||||
UseNetworkDefault no
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>UseNetworkDefault</CODE> directive controls whether
|
||||
the client will use a network/remote printer as a default
|
||||
printer. If enabled, the default printer of a server is used as
|
||||
the default printer on a client. When multiple servers are
|
||||
advertising a default printer, the client's default printer is
|
||||
set to the first discovered printer, or to the implicit class for
|
||||
the same printer available from multiple servers.</P>
|
||||
|
||||
<P>The default is <CODE>@CUPS_USE_NETWORK_DEFAULT@</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="User">User</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
<PRE CLASS="command">
|
||||
User lp
|
||||
User guest
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
|
||||
<P>The <CODE>User</CODE> directive specifies the UNIX user that
|
||||
filter and CGI programs run as. The default user is
|
||||
<CODE>@CUPS_USER@</CODE>.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>You may not use user <CODE>root</CODE>, as that would expose
|
||||
the system to unacceptable security risks. The scheduler will
|
||||
automatically choose user <CODE>nobody</CODE> if you specify a
|
||||
user whose ID is 0.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="INFO">CUPS 1.5</SPAN><A NAME="WebInterface">WebInterface</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
"$Id: spec-browsing.html 9727 2011-04-28 21:20:12Z mike $"
|
||||
"$Id: spec-browsing.html 10762 2012-12-13 20:28:30Z mike $"
|
||||
|
||||
CUPS Browse Protocol specification for CUPS.
|
||||
|
||||
Copyright 2008-2011 by Apple Inc.
|
||||
Copyright 2008-2012 by Apple Inc.
|
||||
Copyright 1997-2005 by Easy Software Products.
|
||||
|
||||
These coded instructions, statements, and computer programs are the
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
<P>The CUPS Browse Protocol is deprecated and will no longer be used in a future release of CUPS.</P>
|
||||
<P>The CUPS Browse Protocol was deprecated in CUPS 1.4 and is no longer supported.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
@@ -32,37 +32,37 @@
|
||||
|
||||
<h2><a name='INTRO'>Introduction</a></h2>
|
||||
|
||||
<p>This specification describes the CUPS browsing protocol which is used for
|
||||
printer sharing. The protocol is a UDP/IP-based broadcast service that
|
||||
operates on IP service port 631 by default. Each broadcast packet describes
|
||||
<p>This specification describes the CUPS browsing protocol which was used for
|
||||
printer sharing. The protocol was a UDP/IP-based broadcast service that
|
||||
operated on IP service port 631 by default. Each broadcast packet described
|
||||
a single printer or class being shared.</p>
|
||||
|
||||
<p>For simple networks with a single subnet, a CUPS system sharing a printer
|
||||
(the <em>server</em>) will periodically broadcast that printer's availability
|
||||
(the <em>server</em>) would periodically broadcast that printer's availability
|
||||
and status information to the subnet. Every other CUPS system on the subnet
|
||||
(the <em>clients</em>) will receive the broadcast and make that printer
|
||||
available to local users. If a client stops receiving broadcasts from the
|
||||
server, or if the server sends a special "deleted" broadcast message, the
|
||||
client will remove its copy of the printer.</p>
|
||||
(the <em>clients</em>) would receive the broadcast and make that printer
|
||||
available to local users. If a client stopped receiving broadcasts from the
|
||||
server, or if the server sent a special "deleted" broadcast message, the
|
||||
client would remove its copy of the printer.</p>
|
||||
|
||||
<p>For larger networks with multiple subnets, a relay configuration can be used
|
||||
where one or more client systems poll the server and then broadcast the
|
||||
<p>For larger networks with multiple subnets, a relay configuration could be used
|
||||
where one or more client systems polled the server and then broadcast the
|
||||
availability and status information for the server's shared printers to the
|
||||
clients' local subnets.</p>
|
||||
|
||||
<p>A key feature of CUPS printer sharing is support for <em>implicit
|
||||
<p>A key feature of CUPS printer sharing was support for <em>implicit
|
||||
classes</em>, which are automatically-created classes for printers that are
|
||||
shared by multiple servers. These implicit classes provide automatic load
|
||||
shared by multiple servers. These implicit classes provided automatic load
|
||||
balancing and fail-safe printing functionality transparently to the user.</p>
|
||||
|
||||
|
||||
<h2><a name='SECURITY'>Security Considerations</a></h2>
|
||||
|
||||
<p>Like most discovery protocols, CUPS browse packets are not encrypted or
|
||||
signed, so it is possible for malicious systems on a network to advertise
|
||||
<p>Like most discovery protocols, CUPS browse packets were not encrypted or
|
||||
signed, so it was possible for malicious systems on a network to advertise
|
||||
or remove printers on that network to cause denial of service or information
|
||||
disclosure. In order to combat this, CUPS logs incoming browse packets and
|
||||
provides access controls to limit browse packet reception to known hosts.</p>
|
||||
disclosure. In order to combat this, CUPS logged incoming browse packets and
|
||||
provided access controls to limit browse packet reception to known hosts.</p>
|
||||
|
||||
|
||||
<h2><a name='FORMAT'>Browse Packet Format</a></h2>
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS is the standards-based, open source printing system developed by
|
||||
<A HREF="http://www.apple.com/">Apple Inc.</A> for Mac OS<SUP>®</SUP> X and
|
||||
<A HREF="http://www.apple.com/">Apple Inc.</A> for OS<SUP>®</SUP> X and
|
||||
other UNIX<SUP>®</SUP>-like operating systems.</P>
|
||||
|
||||
</TD>
|
||||
@@ -100,7 +100,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS and the CUPS logo are trademarks of
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2012 Apple
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> Copyright 2007-2013 Apple
|
||||
Inc. All rights reserved.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>ホーム - CUPS 1.6</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> ホーム </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> 管理 </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> クラス </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> ヘルプ </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> ジョブ </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> プリンター </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS は、OS<SUP>®</SUP> X およびその他の UNIX <SUP>®</SUP> 系 OS のために、
|
||||
<A HREF="http://www.apple.com/">Apple Inc.</A>
|
||||
によって開発された標準ベースのオープンソース印刷システムです。</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>ユーザー向け</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">CUPS の概要</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">コマンドラインからの印刷とオプション</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">CUPS 1.6 の新機能</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">ユーザーフォーラム</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>管理者向け</H2>
|
||||
|
||||
<P><A HREF="admin">プリンターとクラスの追加</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">操作ポリシーの管理について</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">プリンターアカウンティングの基本</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">サーバーのセキュリティー</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Kerberos 認証の使い方</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">ネットワークプリンターの使い方</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">cupsd.conf リファレンス</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">プリンタードライバーの検索</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>開発者向け</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="help/api-ppd.html">PPD API</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">ラスター API</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">PPD コンパイラー用ドライバー情報ファイル リファレンス</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">開発者フォーラム</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS and the CUPS logo are trademarks of
|
||||
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2013 Apple
|
||||
Inc. All rights reserved.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,206 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Начало - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Начало </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Администрирование </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Группы </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Справка </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Задания </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Принтеры </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS — поддерживающая большинство стандартов, свободная подсистема печати, разрабатываемая компанией <A HREF="http://www.apple.com/">Apple Inc.</A> для операционной системы Mac OS<SUP>®</SUP> X и других UNIX<SUP>®</SUP>-подобных операционных систем.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS для пользователей</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Введение в CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Печать из командной строки</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Что нового в CUPS 1.6</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Форум пользователей</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS для администраторов</H2>
|
||||
|
||||
<P><A HREF="admin">Добавление принтеров и групп</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Управление доступом</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Использование ресурсов</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Безопасность системы</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Использование аутентификации Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Использование сетевых принтеров</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Справочник по cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Поиск драйверов принтера</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<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="help/api-ppd.html">PPD API</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">Raster API</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">Справочник по компилятору PPD</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Форум разработчиков</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2013) компании Apple Inc. Все права защищены.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Начало - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Начало </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Администрирование </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Группы </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Справка </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Задания </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Принтеры </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P>CUPS — поддерживающая большинство стандартов, свободная подсистема печати, разрабатываемая компанией <A HREF="http://www.apple.com/">Apple Inc.</A> для операционной системы Mac OS<SUP>®</SUP> X и других UNIX<SUP>®</SUP>-подобных операционных систем.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS для пользователей</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">Введение в CUPS</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Печать из командной строки</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">Что нового в CUPS 1.6</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Форум пользователей</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS для администраторов</H2>
|
||||
|
||||
<P><A HREF="admin">Добавление принтеров и групп</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Управление доступом</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Использование ресурсов</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Безопасность системы</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Использование аутентификации Kerberos</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Использование сетевых принтеров</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">Справочник по cupsd.conf</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Поиск драйверов принтера</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<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="help/api-ppd.html">PPD API</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">Raster API</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">Справочник по компилятору PPD</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Форум разработчиков</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2013) компании Apple Inc. Все права защищены.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -46,6 +46,9 @@
|
||||
*/
|
||||
|
||||
#include <cups/raster-private.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+366
-315
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+13
-1
@@ -579,6 +579,7 @@
|
||||
"B7" = "B7";
|
||||
"B8" = "B8";
|
||||
"B9" = "B9";
|
||||
"Bad 'document-format' value \"%s\"." = "Bad 'document-format' value \"%s\".";
|
||||
"Bad NULL dests pointer" = "Bad NULL dests pointer";
|
||||
"Bad OpenGroup" = "Bad OpenGroup";
|
||||
"Bad OpenUI/JCLOpenUI" = "Bad OpenUI/JCLOpenUI";
|
||||
@@ -594,6 +595,9 @@
|
||||
"Bad document-format \"%s\"." = "Bad document-format \"%s\".";
|
||||
"Bad document-format-default \"%s\"." = "Bad document-format-default \"%s\".";
|
||||
"Bad filename buffer" = "Bad filename buffer";
|
||||
"Bad job-name value: Bad UTF-8 sequence." = "Bad job-name value: Bad UTF-8 sequence.";
|
||||
"Bad job-name value: Name too long." = "Bad job-name value: Name too long.";
|
||||
"Bad job-name value: Wrong type or count." = "Bad job-name value: Wrong type or count.";
|
||||
"Bad job-priority value." = "Bad job-priority value.";
|
||||
"Bad job-sheets value \"%s\"." = "Bad job-sheets value \"%s\".";
|
||||
"Bad job-sheets value type." = "Bad job-sheets value type.";
|
||||
@@ -751,7 +755,7 @@
|
||||
"File \"%s\" not available: %s" = "File \"%s\" not available: %s";
|
||||
"File \"%s\" permissions OK (0%o/uid=%d/gid=%d)." = "File \"%s\" permissions OK (0%o/uid=%d/gid=%d).";
|
||||
"File Folder " = "File Folder ";
|
||||
"File device URIs have been disabled. To enable, see the FileDevice directive in \"%s/cupsd.conf\"." = "File device URIs have been disabled. To enable, see the FileDevice directive in \"%s/cupsd.conf\".";
|
||||
"File device URIs have been disabled. To enable, see the FileDevice directive in \"%s/cups-files.conf\"." = "File device URIs have been disabled. To enable, see the FileDevice directive in \"%s/cups-files.conf\".";
|
||||
"Finished page %d." = "Finished page %d.";
|
||||
"Folio" = "Folio";
|
||||
"Forbidden" = "Forbidden";
|
||||
@@ -777,6 +781,7 @@
|
||||
"IPP language length overflows value." = "IPP language length overflows value.";
|
||||
"IPP member name is not empty." = "IPP member name is not empty.";
|
||||
"IPP memberName value is empty." = "IPP memberName value is empty.";
|
||||
"IPP memberName with no attribute." = "IPP memberName with no attribute.";
|
||||
"IPP name larger than 32767 bytes." = "IPP name larger than 32767 bytes.";
|
||||
"IPP nameWithLanguage value less than minimum 4 bytes." = "IPP nameWithLanguage value less than minimum 4 bytes.";
|
||||
"IPP rangeOfInteger value not 8 bytes." = "IPP rangeOfInteger value not 8 bytes.";
|
||||
@@ -1046,6 +1051,7 @@
|
||||
"Tear-Off" = "Tear-Off";
|
||||
"Tear-Off Adjust Position" = "Tear-Off Adjust Position";
|
||||
"The %s attribute cannot be provided with job-ids." = "The %s attribute cannot be provided with job-ids.";
|
||||
"The '%s' Job Description attribute cannot be supplied in a job creation request." = "The '%s' Job Description attribute cannot be supplied in a job creation request.";
|
||||
"The '%s' operation attribute cannot be supplied in a Create-Job request." = "The '%s' operation attribute cannot be supplied in a Create-Job request.";
|
||||
"The PPD file \"%s\" could not be found." = "The PPD file \"%s\" could not be found.";
|
||||
"The PPD file \"%s\" could not be opened: %s" = "The PPD file \"%s\" could not be opened: %s";
|
||||
@@ -1217,6 +1223,9 @@
|
||||
"Unknown printer-op-policy \"%s\"." = "Unknown printer-op-policy \"%s\".";
|
||||
"Unknown service name." = "Unknown service name.";
|
||||
"Unknown version option value: \"%s\"." = "Unknown version option value: \"%s\".";
|
||||
"Unsupported 'compression' value \"%s\"." = "Unsupported 'compression' value \"%s\".";
|
||||
"Unsupported 'document-format' value \"%s\"." = "Unsupported 'document-format' value \"%s\".";
|
||||
"Unsupported 'job-name' value." = "Unsupported 'job-name' value.";
|
||||
"Unsupported character set \"%s\"." = "Unsupported character set \"%s\".";
|
||||
"Unsupported compression \"%s\"." = "Unsupported compression \"%s\".";
|
||||
"Unsupported document-format \"%s\"." = "Unsupported document-format \"%s\".";
|
||||
@@ -1274,7 +1283,10 @@
|
||||
"cupsctl: Unknown option \"%s\"" = "cupsctl: Unknown option \"%s\"";
|
||||
"cupsctl: Unknown option \"-%c\"" = "cupsctl: Unknown option \"-%c\"";
|
||||
"cupsd: Expected config filename after \"-c\" option." = "cupsd: Expected config filename after \"-c\" option.";
|
||||
"cupsd: Expected cups-files.conf filename after \"-s\" option." = "cupsd: Expected cups-files.conf filename after \"-s\" option.";
|
||||
"cupsd: Relative cups-files.conf filename not allowed." = "cupsd: Relative cups-files.conf filename not allowed.";
|
||||
"cupsd: Unable to get current directory." = "cupsd: Unable to get current directory.";
|
||||
"cupsd: Unable to get path to cups-files.conf file." = "cupsd: Unable to get path to cups-files.conf file.";
|
||||
"cupsd: Unknown argument \"%s\" - aborting." = "cupsd: Unknown argument \"%s\" - aborting.";
|
||||
"cupsd: Unknown option \"%c\" - aborting." = "cupsd: Unknown option \"%c\" - aborting.";
|
||||
"cupsd: launchd(8) support not compiled in, running in normal mode." = "cupsd: launchd(8) support not compiled in, running in normal mode.";
|
||||
|
||||
+5692
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+6721
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+5515
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+5196
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+5507
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+8677
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -39,6 +39,7 @@ MAN1 = cancel.$(MAN1EXT) \
|
||||
ppdpo.$(MAN1EXT)
|
||||
MAN5 = classes.conf.$(MAN5EXT) \
|
||||
client.conf.$(MAN5EXT) \
|
||||
cups-files.conf.$(MAN5EXT) \
|
||||
cups-snmp.conf.$(MAN5EXT) \
|
||||
cupsd.conf.$(MAN5EXT) \
|
||||
ipptoolfile.$(MAN5EXT) \
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: backend.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: backend.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" Backend man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -166,7 +166,7 @@ All other exit code values are reserved.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: backend.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: backend.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cancel.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cancel.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" cancel man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -69,7 +69,7 @@ Cancel-Jobs operations in \fIcupsd.conf(5)\fR.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cancel.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cancel.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: classes.conf.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: classes.conf.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" classes.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -104,7 +104,7 @@ Specifies the date/time associated with the state.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: classes.conf.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: classes.conf.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" client.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -53,7 +53,7 @@ Specifies the default user name to use for requests.
|
||||
.SH SEE ALSO
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cups-config.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cups-config.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" cups-config man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -111,7 +111,7 @@ Displays the full version number of the CUPS installation
|
||||
.SH SEE ALSO
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cups-config.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cups-config.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" cups-deviced man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -38,7 +38,7 @@ backend(7), cupsd(8), cupsd.conf(5),
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" cups-driverd man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -116,7 +116,7 @@ cupsd(8), cupsd.conf(5), cupstestppd(1), lpinfo(8),
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
.\"
|
||||
.\" "$Id$"
|
||||
.\"
|
||||
.\" cupsd.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2013 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/".
|
||||
.\"
|
||||
.TH cups-files.conf 5 "CUPS" "19 November 2012" "Apple Inc."
|
||||
.SH NAME
|
||||
cups-files.conf \- file and directory configuration file for cups
|
||||
.SH DESCRIPTION
|
||||
The \fIcups-files.conf\fR file configures the files and directories used by the
|
||||
CUPS scheduler, \fIcupsd(8)\fR. It is normally located in the
|
||||
\fI@CUPS_SERVERROOT@\fR directory.
|
||||
.LP
|
||||
Each line in the file can be a configuration directive, a blank line,
|
||||
or a comment. Comment lines start with the # character.
|
||||
.SH DIRECTIVES
|
||||
The following directives are understood by \fIcupsd(8)\fR. Consult the
|
||||
on-line help for detailed descriptions:
|
||||
.TP 5
|
||||
AccessLog filename
|
||||
.TP 5
|
||||
AccessLog syslog
|
||||
.br
|
||||
Defines the access log filename.
|
||||
.TP 5
|
||||
ConfigFilePerm mode
|
||||
.br
|
||||
Specifies the permissions for all configuration files that the scheduler
|
||||
writes.
|
||||
.TP 5
|
||||
DataDir path
|
||||
.br
|
||||
Specified the directory where data files can be found.
|
||||
.TP 5
|
||||
DocumentRoot directory
|
||||
.br
|
||||
Specifies the root directory for the internal web server documents.
|
||||
.TP 5
|
||||
ErrorLog filename
|
||||
.TP 5
|
||||
ErrorLog syslog
|
||||
.br
|
||||
Specifies the error log filename.
|
||||
.TP 5
|
||||
FatalErrors none
|
||||
.TP 5
|
||||
FatalErrors all -kind [... -kind]
|
||||
.TP 5
|
||||
FatalErrors kind [... kind]
|
||||
.br
|
||||
Specifies which errors are fatal, causing the scheduler to exit. "Kind" is
|
||||
"browse", "config", "listen", "log", or "permissions".
|
||||
.TP 5
|
||||
FileDevice Yes
|
||||
.TP 5
|
||||
FileDevice No
|
||||
.br
|
||||
Specifies whether the file pseudo-device can be used for new
|
||||
printer queues.
|
||||
.TP 5
|
||||
FontPath directory[:directory:...]
|
||||
.br
|
||||
Specifies the search path for fonts.
|
||||
.TP 5
|
||||
Group group-name-or-number
|
||||
.br
|
||||
Specifies the group name or ID that will be used when executing
|
||||
external programs.
|
||||
.TP 5
|
||||
LogFilePerm mode
|
||||
.br
|
||||
Specifies the permissions for all log files that the scheduler writes.
|
||||
.TP 5
|
||||
PageLog filename
|
||||
.TP 5
|
||||
PageLog syslog
|
||||
.br
|
||||
Specifies the page log filename.
|
||||
.TP 5
|
||||
Printcap
|
||||
.TP 5
|
||||
Printcap filename
|
||||
.br
|
||||
Specifies the filename for a printcap file that is updated
|
||||
automatically with a list of available printers (needed for
|
||||
legacy applications); specifying Printcap with no filename
|
||||
disables printcap generation.
|
||||
.TP 5
|
||||
RemoteRoot user-name
|
||||
.br
|
||||
Specifies the username that is associated with unauthenticated root
|
||||
accesses.
|
||||
.TP 5
|
||||
RequestRoot directory
|
||||
.br
|
||||
Specifies the directory to store print jobs and other HTTP request
|
||||
data.
|
||||
.TP 5
|
||||
ServerBin directory
|
||||
.br
|
||||
Specifies the directory where backends, CGIs, daemons, and filters may
|
||||
be found.
|
||||
.TP 5
|
||||
ServerCertificate filename
|
||||
.br
|
||||
Specifies the encryption certificate to use.
|
||||
.TP 5
|
||||
ServerKey filename
|
||||
.br
|
||||
Specifies the encryption key to use.
|
||||
.TP 5
|
||||
ServerRoot directory
|
||||
.br
|
||||
Specifies the directory where the server configuration files can be found.
|
||||
.TP 5
|
||||
SystemGroup group-name [group-name ...]
|
||||
.br
|
||||
Specifies the group(s) to use for System class authentication.
|
||||
.TP 5
|
||||
TempDir directory
|
||||
.br
|
||||
Specifies the directory where temporary files are stored.
|
||||
.TP 5
|
||||
User user-name
|
||||
.br
|
||||
Specifies the user name or ID that is used when running external programs.
|
||||
.SH SEE ALSO
|
||||
\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fImime.convs(5)\fR,
|
||||
\fImime.types(5)\fR, \fIprinters.conf(5)\fR,
|
||||
\fIsubscriptions.conf(5)\fR,
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" cups-lpd man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -118,7 +118,7 @@ clients may be unreliable.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cups-snmp.conf.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cups-snmp.conf.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" snmp.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -72,7 +72,7 @@ cups-snmp(8),
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cups-snmp.conf.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cups-snmp.conf.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" SNMP backend man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2012 by Apple Inc.
|
||||
.\" Copyright 2012-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -53,7 +53,7 @@ environment variable.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupsaccept.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cupsaccept.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" accept/reject man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -73,7 +73,7 @@ require the root user to execute these commands.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupsaccept.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cupsaccept.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" cupsaddsmb man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -208,7 +208,7 @@ http://localhost:631/help
|
||||
http://www.cups.org/windows/
|
||||
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
+7
-17
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupsctl.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cupsctl.man 10807 2013-01-11 21:50:12Z mike $"
|
||||
.\"
|
||||
.\" cupsctl man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 2007 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH cupsctl 8 "CUPS" "10 January 2011" "Apple Inc."
|
||||
.TH cupsctl 8 "CUPS" "11 January 2013" "Apple Inc."
|
||||
.SH NAME
|
||||
cupsctl \- configure cupsd.conf options
|
||||
.SH SYNOPSIS
|
||||
@@ -22,7 +22,7 @@ cupsctl \- configure cupsd.conf options
|
||||
] [ -h
|
||||
.I server[:port]
|
||||
] [ --[no-]debug-logging ] [ --[no-]remote-admin ] [ --[no-]remote-any ]
|
||||
[ --[no-]remote-printers ] [ --[no-]share-printers ] [ --[no-]user-cancel-any ]
|
||||
[ --[no-]share-printers ] [ --[no-]user-cancel-any ]
|
||||
[
|
||||
.I name=value
|
||||
]
|
||||
@@ -57,11 +57,6 @@ Enables or disables remote administration.
|
||||
.br
|
||||
Enables or disables printing from any address, e.g. the Internet.
|
||||
.TP 5
|
||||
--[no-]remote-printers
|
||||
.br
|
||||
Enables or disables the display of remote printers shared via the CUPS, LDAP,
|
||||
or SLP protocols.
|
||||
.TP 5
|
||||
--[no-]share-printers
|
||||
.br
|
||||
Enables or disables sharing of local printers with other computers.
|
||||
@@ -87,12 +82,7 @@ Get the current debug logging state:
|
||||
.LP
|
||||
Disable printer sharing:
|
||||
.nf
|
||||
cupsctl --no-shared-printers
|
||||
.fi
|
||||
.LP
|
||||
Enable printing using the file: pseudo-device:
|
||||
.nf
|
||||
cupsctl FileDevice=Yes
|
||||
cupsctl --no-share-printers
|
||||
.fi
|
||||
.SH KNOWN ISSUES
|
||||
You cannot set the Listen or Port directives using \fIcupsctl\fR.
|
||||
@@ -101,7 +91,7 @@ You cannot set the Listen or Port directives using \fIcupsctl\fR.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupsctl.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cupsctl.man 10807 2013-01-11 21:50:12Z mike $".
|
||||
.\"
|
||||
|
||||
+10
-137
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" cupsd.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -12,12 +12,15 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH cupsd.conf 5 "CUPS" "18 May 2012" "Apple Inc."
|
||||
.TH cupsd.conf 5 "CUPS" "19 November 2012" "Apple Inc."
|
||||
.SH NAME
|
||||
cupsd.conf \- server configuration file for cups
|
||||
.SH DESCRIPTION
|
||||
The \fIcupsd.conf\fR file configures the CUPS scheduler, \fIcupsd(8)\fR. It
|
||||
is normally located in the \fI@CUPS_SERVERROOT@\fR directory.
|
||||
is normally located in the \fI@CUPS_SERVERROOT@\fR directory. \fBNote:\fR
|
||||
File, directory, and user configuration directives that used to be allowed in
|
||||
the \fIcupsd.conf\fR file are now stored in the \fIcups-files.conf(5)\fR instead
|
||||
in order to prevent certain types of privilege escalation attacks.
|
||||
.LP
|
||||
Each line in the file can be a configuration directive, a blank line,
|
||||
or a comment. Comment lines start with the # character. The
|
||||
@@ -27,12 +30,6 @@ popular Apache web server software and are described below.
|
||||
The following directives are understood by \fIcupsd(8)\fR. Consult the
|
||||
on-line help for detailed descriptions:
|
||||
.TP 5
|
||||
AccessLog filename
|
||||
.TP 5
|
||||
AccessLog syslog
|
||||
.br
|
||||
Defines the access log filename.
|
||||
.TP 5
|
||||
AccessLogLevel config
|
||||
.TP 5
|
||||
AccessLogLevel actions
|
||||
@@ -61,20 +58,6 @@ Allow @LOCAL
|
||||
.br
|
||||
Allows access from the named hosts or addresses.
|
||||
.TP 5
|
||||
AuthClass User
|
||||
.TP 5
|
||||
AuthClass Group
|
||||
.TP 5
|
||||
AuthClass System
|
||||
.br
|
||||
Specifies the authentication class (User, Group, System) -
|
||||
\fBthis directive is deprecated\fR.
|
||||
.TP 5
|
||||
AuthGroupName group-name
|
||||
.br
|
||||
Specifies the authentication group - \fBthis directive is
|
||||
deprecated\fR.
|
||||
.TP 5
|
||||
AuthType None
|
||||
.TP 5
|
||||
AuthType Basic
|
||||
@@ -108,7 +91,7 @@ Browsing Yes
|
||||
.TP 5
|
||||
Browsing No
|
||||
.br
|
||||
Specifies whether or not remote printer browsing should be enabled.
|
||||
Specifies whether or not shared printers should be advertised.
|
||||
.TP 5
|
||||
Classification banner
|
||||
.br
|
||||
@@ -121,15 +104,6 @@ ClassifyOverride No
|
||||
Specifies whether to allow users to override the classification
|
||||
of individual print jobs.
|
||||
.TP 5
|
||||
ConfigFilePerm mode
|
||||
.br
|
||||
Specifies the permissions for all configuration files that the scheduler
|
||||
writes.
|
||||
.TP 5
|
||||
DataDir path
|
||||
.br
|
||||
Specified the directory where data files can be found.
|
||||
.TP 5
|
||||
DefaultAuthType Basic
|
||||
.TP 5
|
||||
DefaultAuthType BasicDigest
|
||||
@@ -197,10 +171,6 @@ 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.
|
||||
.TP 5
|
||||
DocumentRoot directory
|
||||
.br
|
||||
Specifies the root directory for the internal web server documents.
|
||||
.TP 5
|
||||
Encryption IfRequested
|
||||
.TP 5
|
||||
Encryption Never
|
||||
@@ -210,28 +180,6 @@ Encryption Required
|
||||
Specifies the level of encryption that is required for a particular
|
||||
location.
|
||||
.TP 5
|
||||
ErrorLog filename
|
||||
.TP 5
|
||||
ErrorLog syslog
|
||||
.br
|
||||
Specifies the error log filename.
|
||||
.TP 5
|
||||
FatalErrors none
|
||||
.TP 5
|
||||
FatalErrors all -kind [... -kind]
|
||||
.TP 5
|
||||
FatalErrors kind [... kind]
|
||||
.br
|
||||
Specifies which errors are fatal, causing the scheduler to exit. "Kind" is
|
||||
"browse", "config", "listen", "log", or "permissions".
|
||||
.TP 5
|
||||
FileDevice Yes
|
||||
.TP 5
|
||||
FileDevice No
|
||||
.br
|
||||
Specifies whether the file pseudo-device can be used for new
|
||||
printer queues.
|
||||
.TP 5
|
||||
FilterLimit limit
|
||||
.br
|
||||
Specifies the maximum cost of filters that are run concurrently.
|
||||
@@ -241,15 +189,6 @@ FilterNice nice-value
|
||||
Specifies the scheduling priority ("nice" value) of filters that
|
||||
are run to print a job.
|
||||
.TP 5
|
||||
FontPath directory[:directory:...]
|
||||
.br
|
||||
Specifies the search path for fonts.
|
||||
.TP 5
|
||||
Group group-name-or-number
|
||||
.br
|
||||
Specifies the group name or ID that will be used when executing
|
||||
external programs.
|
||||
.TP 5
|
||||
GSSServiceName name
|
||||
.br
|
||||
Specifies the service name when using Kerberos authentication. The default
|
||||
@@ -341,10 +280,6 @@ LogDebugHistory #-messages
|
||||
Specifies the number of debugging messages that are logged when an error
|
||||
occurs in a print job.
|
||||
.TP 5
|
||||
LogFilePerm mode
|
||||
.br
|
||||
Specifies the permissions for all log files that the scheduler writes.
|
||||
.TP 5
|
||||
LogLevel alert
|
||||
.TP 5
|
||||
LogLevel crit
|
||||
@@ -429,12 +364,6 @@ Order deny,allow
|
||||
.br
|
||||
Specifies the order of HTTP access control (allow,deny or deny,allow)
|
||||
.TP 5
|
||||
PageLog filename
|
||||
.TP 5
|
||||
PageLog syslog
|
||||
.br
|
||||
Specifies the page log filename.
|
||||
.TP 5
|
||||
PageLogFormat format string
|
||||
.br
|
||||
Specifies the format of page log lines.
|
||||
@@ -464,15 +393,6 @@ PreserveJobHistory No
|
||||
Specifies whether or not to preserve the job history after they are
|
||||
printed.
|
||||
.TP 5
|
||||
Printcap
|
||||
.TP 5
|
||||
Printcap filename
|
||||
.br
|
||||
Specifies the filename for a printcap file that is updated
|
||||
automatically with a list of available printers (needed for
|
||||
legacy applications); specifying Printcap with no filename
|
||||
disables printcap generation.
|
||||
.TP 5
|
||||
PrintcapFormat bsd
|
||||
.TP 5
|
||||
PrintcapFormat plist
|
||||
@@ -481,29 +401,11 @@ PrintcapFormat solaris
|
||||
.br
|
||||
Specifies the format of the printcap file.
|
||||
.TP 5
|
||||
PrintcapGUI
|
||||
.TP 5
|
||||
PrintcapGUI gui-program-filename
|
||||
.br
|
||||
Specifies whether to generate option panel definition files on
|
||||
some operating systems. When provided with no program filename,
|
||||
disables option panel definition files.
|
||||
.TP 5
|
||||
ReloadTimeout seconds
|
||||
.br
|
||||
Specifies the amount of time to wait for job completion before
|
||||
restarting the scheduler.
|
||||
.TP 5
|
||||
RemoteRoot user-name
|
||||
.br
|
||||
Specifies the username that is associated with unauthenticated root
|
||||
accesses.
|
||||
.TP 5
|
||||
RequestRoot directory
|
||||
.br
|
||||
Specifies the directory to store print jobs and other HTTP request
|
||||
data.
|
||||
.TP 5
|
||||
Require group group-name-list
|
||||
.TP 5
|
||||
Require user user-name-list
|
||||
@@ -535,27 +437,10 @@ ServerAlias *
|
||||
Specifies an alternate name that the server is known by. The special name "*"
|
||||
allows any name to be used.
|
||||
.TP 5
|
||||
ServerBin directory
|
||||
.br
|
||||
Specifies the directory where backends, CGIs, daemons, and filters may
|
||||
be found.
|
||||
.TP 5
|
||||
ServerCertificate filename
|
||||
.br
|
||||
Specifies the encryption certificate to use.
|
||||
.TP 5
|
||||
ServerKey filename
|
||||
.br
|
||||
Specifies the encryption key to use.
|
||||
.TP 5
|
||||
ServerName hostname-or-ip-address
|
||||
.br
|
||||
Specifies the fully-qualified hostname of the server.
|
||||
.TP 5
|
||||
ServerRoot directory
|
||||
.br
|
||||
Specifies the directory where the server configuration files can be found.
|
||||
.TP 5
|
||||
ServerTokens Full
|
||||
.TP 5
|
||||
ServerTokens Major
|
||||
@@ -619,34 +504,22 @@ Specifies the list of job values to make private. The "default" values are
|
||||
"notify-events", "notify-pull-method", "notify-recipient-uri",
|
||||
"notify-subscriber-user-name", and "notify-user-data".
|
||||
.TP 5
|
||||
SystemGroup group-name [group-name ...]
|
||||
.br
|
||||
Specifies the group(s) to use for System class authentication.
|
||||
.TP 5
|
||||
TempDir directory
|
||||
.br
|
||||
Specifies the directory where temporary files are stored.
|
||||
.TP 5
|
||||
Timeout seconds
|
||||
.br
|
||||
Specifies the HTTP request timeout in seconds.
|
||||
.TP 5
|
||||
User user-name
|
||||
.br
|
||||
Specifies the user name or ID that is used when running external programs.
|
||||
.TP 5
|
||||
WebInterface yes
|
||||
.TP 5
|
||||
WebInterface no
|
||||
Specifies whether the web interface is enabled.
|
||||
.SH SEE ALSO
|
||||
\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fImime.convs(5)\fR,
|
||||
\fImime.types(5)\fR, \fIprinters.conf(5)\fR,
|
||||
\fIclasses.conf(5)\fR, \fIcups-files.conf(5)\fR, \fIcupsd(8)\fR,
|
||||
\fImime.convs(5)\fR, \fImime.types(5)\fR, \fIprinters.conf(5)\fR,
|
||||
\fIsubscriptions.conf(5)\fR,
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" cupsd man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -66,7 +66,7 @@ operations.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id$".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupsenable.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cupsenable.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" cupsenable/cupsdisable man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -86,8 +86,8 @@ require the root user to execute these commands.
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
|
||||
.\"
|
||||
.\" End of "$Id: cupsenable.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cupsenable.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
+30
-12
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupsfilter.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cupsfilter.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" cupsfilter man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -11,18 +11,22 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH cupsfilter 8 "CUPS" "4 March 2010" "Apple Inc."
|
||||
.TH cupsfilter 8 "CUPS" "20 June 2012" "Apple Inc."
|
||||
.SH NAME
|
||||
cupsfilter \- convert a file to another format using cups filters
|
||||
.SH SYNOPSIS
|
||||
.B cupsfilter
|
||||
[ -c
|
||||
[ -D ] [ -U
|
||||
.I user
|
||||
] [ -c
|
||||
.I config-file
|
||||
] [ -d
|
||||
.I printer
|
||||
] [ -e ] -j
|
||||
] [ -e ] [ -i
|
||||
.I mime/type
|
||||
] [ -j
|
||||
.I job-id[,N]
|
||||
[ -m
|
||||
] [ -m
|
||||
.I mime/type
|
||||
] [ -n
|
||||
.I copies
|
||||
@@ -32,7 +36,7 @@ cupsfilter \- convert a file to another format using cups filters
|
||||
.I filename.ppd
|
||||
] [ -t
|
||||
.I title
|
||||
]
|
||||
] [ -u ]
|
||||
.I filename
|
||||
.SH DESCRIPTION
|
||||
\fIcupsfilter\fR is a front-end to the CUPS filter subsystem which allows you
|
||||
@@ -40,6 +44,14 @@ to convert a file to a specific format, just as if you had printed the file
|
||||
through CUPS. By default, \fIcupsfilter\fR generates a PDF file.
|
||||
.SH OPTIONS
|
||||
.TP 5
|
||||
-D
|
||||
.br
|
||||
Delete the input file after conversion.
|
||||
.TP 5
|
||||
-U user
|
||||
.br
|
||||
Specifies the username passed to the filters. The default is the name of the current user.
|
||||
.TP 5
|
||||
-c config-file
|
||||
.br
|
||||
Uses the named cupsd.conf configuration file.
|
||||
@@ -51,6 +63,11 @@ Uses information from the named printer.
|
||||
.br
|
||||
Use every filter from the PPD file.
|
||||
.TP 5
|
||||
-i mime/type
|
||||
.br
|
||||
Specifies the source file type. The default file type is guessed using the
|
||||
filename and contents of the file.
|
||||
.TP 5
|
||||
-j job-id[,N]
|
||||
.br
|
||||
Converts document N from the specified job. If N is omitted, document 1 is
|
||||
@@ -77,15 +94,16 @@ Specifies the PPD file to use.
|
||||
-t title
|
||||
.br
|
||||
Specifies the document title.
|
||||
.SH KNOWN ISSUES
|
||||
\fIcupsfilter\fR currently does not use the filters defined in the PPD file.
|
||||
This will be addressed in a future CUPS release.
|
||||
.TP 5
|
||||
-u
|
||||
.br
|
||||
Delete the PPD file after conversion.
|
||||
.SH SEE ALSO
|
||||
\fIcupsd.conf(5)\fR
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupsfilter.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cupsfilter.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupstestdsc.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cupstestdsc.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" cupstestdsc man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -44,7 +44,7 @@ http://localhost:631/help
|
||||
Adobe PostScript Language Document Structuring Conventions
|
||||
Specification, Version 3.0.
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupstestdsc.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cupstestdsc.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cupstestppd.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: cupstestppd.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" cupstestppd man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -159,7 +159,7 @@ http://localhost:631/help
|
||||
.br
|
||||
Adobe PostScript Printer Description File Format Specification, Version 4.3.
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupstestppd.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: cupstestppd.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: filter.man 10485 2012-05-18 20:17:41Z mike $"
|
||||
.\" "$Id: filter.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" filter man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2007 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -232,7 +232,7 @@ only filter. Typically the interface script will be provided via the
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: filter.man 10485 2012-05-18 20:17:41Z mike $".
|
||||
.\" End of "$Id: filter.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: ipptool.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: ipptool.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" ipptool man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2010-2012 by Apple Inc.
|
||||
.\" Copyright 2010-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -137,7 +137,7 @@ The following standard files are available:
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: ipptool.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: ipptool.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
+13
-7
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: ipptoolfile.man 10461 2012-05-11 23:01:21Z mike $"
|
||||
.\" "$Id: ipptoolfile.man 10789 2013-01-10 16:51:10Z mike $"
|
||||
.\"
|
||||
.\" ipptoolfile man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2010-2012 by Apple Inc.
|
||||
.\" Copyright 2010-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
.\" property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -11,12 +11,12 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH ipptoolfile 5 "CUPS" "11 May 2012" "Apple Inc."
|
||||
.TH ipptoolfile 5 "CUPS" "10 January 2013" "Apple Inc."
|
||||
.SH NAME
|
||||
ipptoolfile \- ipptool file format
|
||||
|
||||
.SH DESCRIPTION
|
||||
The \fIipptool(1)\fR program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curley braces, for example:
|
||||
The \fIipptool(1)\fR program accepts free-form plain text files that describe one or more IPP requests. Comments start with the "#" character and continue to the end of the line. Each request is enclosed by curly braces, for example:
|
||||
.nf
|
||||
|
||||
# This is a comment
|
||||
@@ -323,6 +323,12 @@ Requires that at least one value of the EXPECT attribute matches the regular exp
|
||||
.SH STATUS PREDICATES
|
||||
The following predicates are understood following the STATUS test directive:
|
||||
.TP 5
|
||||
DEFINE-MATCH variable-name
|
||||
Defines the variable to "1" when the STATUS matches. A side-effect of this predicate is that this STATUS will never fail a test.
|
||||
.TP 5
|
||||
DEFINE-NO-MATCH variable-name
|
||||
Defines the variable to "1" when the STATUS does not match. A side-effect of this predicate is that this STATUS will never fail a test.
|
||||
.TP 5
|
||||
IF-DEFINED variable-name
|
||||
Makes the STATUS apply only if the specified variable is defined.
|
||||
.TP 5
|
||||
@@ -538,7 +544,7 @@ $scheme
|
||||
Inserts the scheme from the URI provided to \fIipptool\fR.
|
||||
.TP 5
|
||||
$notify-subscription-id
|
||||
Inserts the last notify-subscription-id value returnd in a test response or 0 if
|
||||
Inserts the last notify-subscription-id value returned in a test response or 0 if
|
||||
no notify-subscription-id has been seen.
|
||||
.TP 5
|
||||
$port
|
||||
@@ -562,7 +568,7 @@ Inserts the username from the URI provided to \fIipptool\fR, if any.
|
||||
http://localhost:631/help
|
||||
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: ipptoolfile.man 10461 2012-05-11 23:01:21Z mike $".
|
||||
.\" End of "$Id: ipptoolfile.man 10789 2013-01-10 16:51:10Z mike $".
|
||||
.\"
|
||||
|
||||
+6
-12
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: lp.man 10424 2012-04-23 17:26:57Z mike $"
|
||||
.\" "$Id: lp.man 10791 2013-01-10 16:58:21Z mike $"
|
||||
.\"
|
||||
.\" lp man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2012 by Apple Inc.
|
||||
.\" Copyright 2007-2013 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH lp 1 "CUPS" "3 October 2011" "Apple Inc."
|
||||
.TH lp 1 "CUPS" "16 July 2012" "Apple Inc."
|
||||
.SH NAME
|
||||
lp - print files
|
||||
.SH SYNOPSIS
|
||||
@@ -179,7 +179,7 @@ Prints on one or two sides of the paper. The value
|
||||
(unrotated) pages, while "two-sided-short-edge" is used for
|
||||
landscape pages.
|
||||
.TP 5
|
||||
-o fitplot
|
||||
-o fit-to-page
|
||||
.br
|
||||
Scales the print file to fit on the page.
|
||||
.TP 5
|
||||
@@ -195,12 +195,6 @@ Scales the print file to fit on the page.
|
||||
.br
|
||||
Prints multiple document pages on each output page.
|
||||
.TP 5
|
||||
-o scaling=number
|
||||
.br
|
||||
Scales image files to use up to \fInumber\fR percent of the page.
|
||||
Values greater than 100 cause the image file to be printed across
|
||||
multiple pages.
|
||||
.TP 5
|
||||
-o cpi=N
|
||||
.br
|
||||
Sets the number of characters per inch to use when printing a
|
||||
@@ -252,7 +246,7 @@ is highest priority).
|
||||
.br
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2012 by Apple Inc.
|
||||
Copyright 2007-2013 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: lp.man 10424 2012-04-23 17:26:57Z mike $".
|
||||
.\" End of "$Id: lp.man 10791 2013-01-10 16:58:21Z mike $".
|
||||
.\"
|
||||
|
||||
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