Comparar commits
2 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| a215cf8413 | |||
| 4ef75dec45 |
+80
-1
@@ -1,6 +1,85 @@
|
||||
CHANGES.txt - 2.0.1 - 2014-11-14
|
||||
CHANGES.txt - 2.0.3 - 2015-06-08
|
||||
--------------------------------
|
||||
|
||||
CHANGES IN CUPS V2.0.3
|
||||
|
||||
- Security: Fixed CERT VU #810572 exploiting the dynamic linker
|
||||
(STR #4609)
|
||||
- Security: The scheduler could hang with malformed gzip data
|
||||
(STR #4602)
|
||||
- Restored missing generic printer icon file (STR #4587)
|
||||
- Fixed logging of configuration errors to show up as errors (STR #4582)
|
||||
- Fixed potential buffer overflows in raster code and filters
|
||||
(STR #4598, STR #4599, STR #4600, STR #4601)
|
||||
- Fixed a gzip processing bug (#4602)
|
||||
- Fixed <Limit> inside <Location> (STR #4575)
|
||||
- Fixed lpadmin when both -m and -o are used (STR #4578)
|
||||
- The web interface always showed support for 2-sided printing
|
||||
(STR #4595)
|
||||
- cupsRasterReadHeader did not fully validate the raster header
|
||||
(STR #4596)
|
||||
- The rastertopwg filter did not check for truncated input (STR #4597)
|
||||
- The cups-lpd mini-daemon did not check for request parameters
|
||||
(STR #4603)
|
||||
- The scheduler could get caught in a busy loop (STR #4605)
|
||||
- The sample Epson driver could crash (STR #4616)
|
||||
- The IPP backend now correctly monitors jobs
|
||||
(<rdar://problem/20495955>)
|
||||
- The ppdhtml and ppdpo utilities crashed when the -D option was used
|
||||
before a driver information file (STR #4627)
|
||||
- ippfind incorrectly substituted "=port" for service_port.
|
||||
- The IPP/1.1 test file did not handle the initial print job
|
||||
completing early (STR #4576)
|
||||
- Fixed a memory leak in cupsConnectDest (STR #4634)
|
||||
- PWG Raster Format output contained invalid ImageBox values
|
||||
(<rdar://problem/21144309>)
|
||||
- Added Russian translation (STR #4577)
|
||||
- Added German translation (STR #4635)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.2
|
||||
|
||||
- Security: cupsRasterReadPixels buffer overflow with invalid page
|
||||
header and compressed raster data (STR #4551)
|
||||
- Command-line programs were not localized on Mac OS X
|
||||
(<rdar://problem/14546232>)
|
||||
- The scheduler incorrectly cleared the MakeModel string in the
|
||||
printers.conf file after a restart (<rdar://problem/16827518>)
|
||||
- CUPS did not compile with older versions of GNU TLS (STR #4527)
|
||||
- CUPS did not compile without Avahi or mDNSResponder (STR #4523)
|
||||
- ippLength() did not return the correct length for IPP_TAG_CONST
|
||||
string values.
|
||||
- The scheduler incorrectly aborted jobs after a job was restarted
|
||||
(<rdar://problem/19129387>)
|
||||
- The cups-files.conf file contained the old ServerCertificate/Key
|
||||
directives instead of ServerKeychain.
|
||||
- Fixed builds when no SSL/TLS library is available, or when explicitly
|
||||
disabled (STR #4531)
|
||||
- Fixed an OpenBSD charset transcoding issue.
|
||||
- Fixed USB printing on OpenBSD (STR #4525)
|
||||
- The --without-xinetd configure option did not work (STR #4542)
|
||||
- Backends needing to load OS X kernel extensions did not work
|
||||
(<rdar://problem/19015679>)
|
||||
- Mapping of PPD keywords to IPP keywords did not work if the PPD
|
||||
keyword was already an IPP keyword (<rdar://problem/19121005>)
|
||||
- cupsGetPPD* sent bad requests (STR #4567)
|
||||
- ippserver used the wrong temporary directory on Windows (STR #4547)
|
||||
- ippserver did not handle Bonjour registrations properly (STR #4548)
|
||||
- The scheduler could crash during shutdown if Avahi was shutdown
|
||||
first (STR #4550)
|
||||
- Added a USB quirk rule for Intermec printers (STR #4553)
|
||||
- The scheduler did not always log which configuration file had the
|
||||
error (STR #4559)
|
||||
- The ippfind and ipptool programs now correctly match hostnames with
|
||||
trailing dots (STR #4563)
|
||||
- The ipptool timeout option did not work (STR #4515)
|
||||
- Fixed several issues with client.conf, CUPS_SERVER, and the "-h"
|
||||
option of most commands (STR #4528)
|
||||
- Another change for OpenBSD (STR #4526)
|
||||
- Added Japanese localization (STR #4524)
|
||||
- Documentation changes (STR #4569)
|
||||
|
||||
|
||||
CHANGES IN CUPS V2.0.1
|
||||
|
||||
- Security: SSLv3 is now disabled by default to protect against the
|
||||
|
||||
+5
-1
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v2.0.1 - 2014-11-14
|
||||
INSTALL - CUPS v2.0.3 - 2015-06-08
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
@@ -141,6 +141,10 @@ INSTALLING THE SOFTWARE
|
||||
|
||||
gmake install ENTER
|
||||
|
||||
Use the BUILDROOT variable to install to an alternate root directory:
|
||||
|
||||
make BUILDROOT=/some/other/root/directory install ENTER
|
||||
|
||||
You can also build binary packages that can be installed on other machines
|
||||
using the RPM spec file ("packaging/cups.spec") or EPM list file
|
||||
("packaging/cups.list"). The latter also supports building of binary RPMs,
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 12145 2014-09-02 15:00:50Z msweet $"
|
||||
# "$Id: Makefile 12415 2015-01-21 00:03:08Z msweet $"
|
||||
#
|
||||
# Top-level Makefile for CUPS.
|
||||
#
|
||||
@@ -105,7 +105,7 @@ distclean: clean
|
||||
$(RM) doc/index.html
|
||||
$(RM) man/client.conf.man man/cups-files.conf.man man/cups-lpd.man man/cups-snmp.man man/cupsaddsmb.man man/cupsd.conf.man man/cupsd.man man/lpoptions.man
|
||||
$(RM) packaging/cups.list
|
||||
$(RM) scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket
|
||||
$(RM) scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/org.cups.cups-lpdAT.service scheduler/org.cups.cupsd.path scheduler/org.cups.cupsd.service scheduler/org.cups.cupsd.socket
|
||||
$(RM) templates/header.tmpl
|
||||
-$(RM) doc/*/index.html
|
||||
-$(RM) templates/*/header.tmpl
|
||||
@@ -348,5 +348,5 @@ dist: all
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 12145 2014-09-02 15:00:50Z msweet $".
|
||||
# End of "$Id: Makefile 12415 2015-01-21 00:03:08Z msweet $".
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
README - CUPS v2.0.1 - 2014-11-14
|
||||
README - CUPS v2.0.3 - 2015-06-08
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt" instead...
|
||||
@@ -140,7 +140,7 @@ PRINTING FILES
|
||||
|
||||
LEGAL STUFF
|
||||
|
||||
CUPS is Copyright 2007-2014 by Apple Inc. CUPS and the CUPS logo are
|
||||
CUPS is Copyright 2007-2015 by Apple Inc. CUPS and the CUPS logo are
|
||||
trademarks of Apple Inc.
|
||||
|
||||
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $"
|
||||
* "$Id: dnssd.c 12660 2015-05-22 19:09:57Z msweet $"
|
||||
*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
* Copyright 2008-2014 by Apple Inc.
|
||||
* Copyright 2008-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -318,7 +318,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if ((simple_poll = avahi_simple_poll_new()) == NULL)
|
||||
{
|
||||
fputs("DEBUG: Unable to create Avahi simple poll object.\n", stderr);
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
avahi_simple_poll_set_func(simple_poll, poll_callback, NULL);
|
||||
@@ -328,7 +328,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (!client)
|
||||
{
|
||||
fputs("DEBUG: Unable to create Avahi client.\n", stderr);
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
browsers = 6;
|
||||
@@ -1330,5 +1330,5 @@ unquote(char *dst, /* I - Destination buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dnssd.c 11969 2014-06-30 14:27:01Z msweet $".
|
||||
* End of "$Id: dnssd.c 12660 2015-05-22 19:09:57Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $"
|
||||
* "$Id: ipp.c 12624 2015-05-06 23:50:20Z msweet $"
|
||||
*
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
@@ -64,6 +64,7 @@ typedef struct _cups_monitor_s /**** Monitoring data ****/
|
||||
version, /* IPP version */
|
||||
job_id, /* Job ID for submitted job */
|
||||
job_reasons, /* Job state reasons bits */
|
||||
create_job, /* Support Create-Job? */
|
||||
get_job_attrs; /* Support Get-Job-Attributes? */
|
||||
const char *job_name; /* Job name for submitted job */
|
||||
http_encryption_t encryption; /* Use encryption? */
|
||||
@@ -1396,6 +1397,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
monitor.port = port;
|
||||
monitor.version = version;
|
||||
monitor.job_id = 0;
|
||||
monitor.create_job = create_job;
|
||||
monitor.get_job_attrs = get_job_attrs;
|
||||
monitor.encryption = cupsEncryption();
|
||||
monitor.job_state = IPP_JOB_PENDING;
|
||||
@@ -2336,6 +2338,15 @@ monitor_printer(
|
||||
if (cupsLastError() <= IPP_OK_CONFLICT)
|
||||
password_tries = 0;
|
||||
|
||||
if (monitor->job_id == 0 && monitor->create_job)
|
||||
{
|
||||
/*
|
||||
* No job-id yet, so continue...
|
||||
*/
|
||||
|
||||
goto monitor_disconnect;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the status of the job itself...
|
||||
*/
|
||||
@@ -2485,6 +2496,8 @@ monitor_printer(
|
||||
* Disconnect from the printer - we'll reconnect on the next poll...
|
||||
*/
|
||||
|
||||
monitor_disconnect:
|
||||
|
||||
_httpDisconnect(http);
|
||||
}
|
||||
|
||||
@@ -3756,5 +3769,5 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
|
||||
}
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12048 2014-07-18 14:26:14Z msweet $".
|
||||
* End of "$Id: ipp.c 12624 2015-05-06 23:50:20Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -224,3 +224,6 @@
|
||||
|
||||
# Canon MX320 (STR #4482)
|
||||
0x04A9 0x1736 unidir
|
||||
|
||||
# All Intermec devices (STR #4553)
|
||||
0x067e no-reattach
|
||||
|
||||
+552
-403
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+11
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usb-libusb.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: usb-libusb.c 12349 2014-12-09 22:10:52Z msweet $"
|
||||
*
|
||||
* LIBUSB interface code for CUPS.
|
||||
*
|
||||
@@ -915,7 +915,7 @@ find_device(usb_cb_t cb, /* I - Callback function */
|
||||
write_endp = endp;
|
||||
}
|
||||
|
||||
if (write_endp >= 0)
|
||||
if (write_endp != 0xff)
|
||||
{
|
||||
/*
|
||||
* Save the best match so far...
|
||||
@@ -1451,9 +1451,14 @@ open_device(usb_printer_t *printer, /* I - Printer */
|
||||
else
|
||||
{
|
||||
printer->usblp_attached = 0;
|
||||
fprintf(stderr, "DEBUG: Failed to check whether %04x:%04x has the \"usblp\" kernel module attached\n",
|
||||
devdesc.idVendor, devdesc.idProduct);
|
||||
goto error;
|
||||
|
||||
if (errcode != LIBUSB_ERROR_NOT_SUPPORTED)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"DEBUG: Failed to check whether %04x:%04x has the \"usblp\" "
|
||||
"kernel module attached\n", devdesc.idVendor, devdesc.idProduct);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1999,6 +2004,6 @@ soft_reset_printer(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usb-libusb.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: usb-libusb.c 12349 2014-12-09 22:10:52Z msweet $".
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: help-index.c 12344 2014-12-09 21:36:11Z msweet $"
|
||||
*
|
||||
* Online help index routines for CUPS.
|
||||
*
|
||||
@@ -884,7 +884,7 @@ help_load_file(
|
||||
|
||||
|
||||
DEBUG_printf(("2help_load_file(hi=%p, filename=\"%s\", relative=\"%s\", "
|
||||
"mtime=%ld)", hi, filename, relative, mtime));
|
||||
"mtime=%ld)", hi, filename, relative, (long)mtime));
|
||||
|
||||
if ((fp = cupsFileOpen(filename, "r")) == NULL)
|
||||
return (-1);
|
||||
@@ -1306,5 +1306,5 @@ help_sort_words(help_word_t *w1, /* I - Second word */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: help-index.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: help-index.c 12344 2014-12-09 21:36:11Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-18
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $"
|
||||
* "$Id: ipp-var.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* CGI <-> IPP variable routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1202,21 +1202,7 @@ cgiSetIPPObjectVars(
|
||||
* Rewrite URIs...
|
||||
*/
|
||||
|
||||
if (!strcmp(name, "member_uris"))
|
||||
{
|
||||
char url[1024]; /* URL for class member... */
|
||||
|
||||
|
||||
cgiRewriteURL(attr->values[i].string.text, url,
|
||||
sizeof(url), NULL);
|
||||
|
||||
snprintf(valptr, sizeof(value) - (size_t)(valptr - value),
|
||||
"<A HREF=\"%s\">%s</A>", url,
|
||||
strrchr(attr->values[i].string.text, '/') + 1);
|
||||
}
|
||||
else
|
||||
cgiRewriteURL(attr->values[i].string.text, valptr,
|
||||
(int)(sizeof(value) - (size_t)(valptr - value)), NULL);
|
||||
cgiRewriteURL(attr->values[i].string.text, valptr, (int)(sizeof(value) - (size_t)(valptr - value)), NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1561,5 +1547,5 @@ cgiText(const char *message) /* I - Message */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp-var.c 11889 2014-05-22 13:54:15Z msweet $".
|
||||
* End of "$Id: ipp-var.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-36
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $"
|
||||
* "$Id: template.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* CGI template function.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -648,39 +648,7 @@ cgi_puts(const char *s, /* I - String to output */
|
||||
while (*s)
|
||||
{
|
||||
if (*s == '<')
|
||||
{
|
||||
/*
|
||||
* Pass <A HREF="url"> and </A>, otherwise quote it...
|
||||
*/
|
||||
|
||||
if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
|
||||
{
|
||||
fputs("<A HREF=\"", out);
|
||||
s += 9;
|
||||
|
||||
while (*s && *s != '\"')
|
||||
{
|
||||
if (*s == '&')
|
||||
fputs("&", out);
|
||||
else
|
||||
putc(*s, out);
|
||||
|
||||
s ++;
|
||||
}
|
||||
|
||||
if (*s)
|
||||
s ++;
|
||||
|
||||
fputs("\">", out);
|
||||
}
|
||||
else if (!_cups_strncasecmp(s, "</A>", 4))
|
||||
{
|
||||
fputs("</A>", out);
|
||||
s += 3;
|
||||
}
|
||||
else
|
||||
fputs("<", out);
|
||||
}
|
||||
fputs("<", out);
|
||||
else if (*s == '>')
|
||||
fputs(">", out);
|
||||
else if (*s == '\"')
|
||||
@@ -718,5 +686,5 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: template.c 11685 2014-03-05 20:03:29Z msweet $".
|
||||
* End of "$Id: template.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -75,11 +75,8 @@ PageLog @CUPS_LOGDIR@/page_log
|
||||
# Location of helper programs...
|
||||
#ServerBin @CUPS_SERVERBIN@
|
||||
|
||||
# SSL/TLS certificate for the scheduler...
|
||||
#ServerCertificate @CUPS_SERVERCERT@
|
||||
|
||||
# SSL/TLS private key for the scheduler...
|
||||
#ServerKey @CUPS_SERVERKEY@
|
||||
# SSL/TLS keychain for the scheduler...
|
||||
#ServerKeychain @CUPS_SERVERKEYCHAIN@
|
||||
|
||||
# Location of other configuration files...
|
||||
#ServerRoot @CUPS_SERVERROOT@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 12195 2014-10-02 18:45:59Z msweet $"
|
||||
dnl "$Id: cups-common.m4 12336 2014-12-09 21:19:52Z msweet $"
|
||||
dnl
|
||||
dnl Common configuration stuff for CUPS.
|
||||
dnl
|
||||
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION=2.0.1
|
||||
CUPS_VERSION=2.0.3
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -145,6 +145,9 @@ AC_CHECK_HEADER(iconv.h,
|
||||
AC_SEARCH_LIBS(iconv_open,iconv,
|
||||
AC_DEFINE(HAVE_ICONV_H)
|
||||
SAVELIBS="$SAVELIBS $LIBS")
|
||||
AC_SEARCH_LIBS(libiconv_open,iconv,
|
||||
AC_DEFINE(HAVE_ICONV_H)
|
||||
SAVELIBS="$SAVELIBS $LIBS")
|
||||
LIBS="$SAVELIBS")
|
||||
|
||||
dnl Checks for Mini-XML (www.minixml.org)...
|
||||
@@ -462,5 +465,5 @@ esac
|
||||
AC_SUBST(BUILDDIRS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 12195 2014-10-02 18:45:59Z msweet $".
|
||||
dnl End of "$Id: cups-common.m4 12336 2014-12-09 21:19:52Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-network.m4 11719 2014-03-21 18:07:23Z msweet $"
|
||||
dnl "$Id: cups-network.m4 12325 2014-12-09 20:28:51Z msweet $"
|
||||
dnl
|
||||
dnl Networking stuff for CUPS.
|
||||
dnl
|
||||
@@ -13,7 +13,12 @@ dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H))
|
||||
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H),,[
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>])
|
||||
AC_SEARCH_LIBS(socket, socket)
|
||||
AC_SEARCH_LIBS(gethostbyaddr, nsl)
|
||||
AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
|
||||
@@ -67,5 +72,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
|
||||
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-network.m4 11719 2014-03-21 18:07:23Z msweet $".
|
||||
dnl End of "$Id: cups-network.m4 12325 2014-12-09 20:28:51Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-ssl.m4 12122 2014-08-28 12:55:52Z msweet $"
|
||||
dnl "$Id: cups-ssl.m4 12290 2014-12-05 17:25:55Z msweet $"
|
||||
dnl
|
||||
dnl TLS stuff for CUPS.
|
||||
dnl
|
||||
@@ -20,8 +20,7 @@ AC_ARG_ENABLE(gnutls, [ --enable-gnutls use GNU TLS for SSL/TLS support
|
||||
SSLFLAGS=""
|
||||
SSLLIBS=""
|
||||
have_ssl=0
|
||||
CUPS_SERVERCERT=""
|
||||
CUPS_SERVERKEY=""
|
||||
CUPS_SERVERKEYCHAIN=""
|
||||
|
||||
if test x$enable_ssl != xno; then
|
||||
dnl Look for CDSA...
|
||||
@@ -31,7 +30,7 @@ if test x$enable_ssl != xno; then
|
||||
have_ssl=1
|
||||
AC_DEFINE(HAVE_SSL)
|
||||
AC_DEFINE(HAVE_CDSASSL)
|
||||
CUPS_SERVERCERT="/Library/Keychains/System.keychain"
|
||||
CUPS_SERVERKEYCHAIN="/Library/Keychains/System.keychain"
|
||||
|
||||
dnl Check for the various security headers...
|
||||
AC_CHECK_HEADER(Security/SecureTransportPriv.h,
|
||||
@@ -76,12 +75,12 @@ if test x$enable_ssl != xno; then
|
||||
fi
|
||||
|
||||
if test $have_ssl = 1; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
CUPS_SERVERKEYCHAIN="ssl"
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS $SSLLIBS"
|
||||
AC_CHECK_FUNC(gnutls_transport_set_pull_timeout_function, AC_DEFINE(HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION))
|
||||
AC_CHECK_FUNC(gnutls_priority_set_direct, AC_DEFINE(HAVE_GNUTLS_PRIORITY_SET_DIRECT))
|
||||
LIBS="$SAVELIBS"
|
||||
fi
|
||||
fi
|
||||
@@ -96,8 +95,7 @@ elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes; then
|
||||
AC_MSG_ERROR([Unable to enable SSL support.])
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_SERVERCERT)
|
||||
AC_SUBST(CUPS_SERVERKEY)
|
||||
AC_SUBST(CUPS_SERVERKEYCHAIN)
|
||||
AC_SUBST(IPPALIASES)
|
||||
AC_SUBST(SSLFLAGS)
|
||||
AC_SUBST(SSLLIBS)
|
||||
@@ -106,5 +104,5 @@ EXPORT_SSLLIBS="$SSLLIBS"
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-ssl.m4 12122 2014-08-28 12:55:52Z msweet $".
|
||||
dnl End of "$Id: cups-ssl.m4 12290 2014-12-05 17:25:55Z msweet $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-startup.m4 11747 2014-03-27 01:15:48Z msweet $"
|
||||
dnl "$Id: cups-startup.m4 12351 2014-12-09 22:18:45Z msweet $"
|
||||
dnl
|
||||
dnl Launch-on-demand/startup stuff for CUPS.
|
||||
dnl
|
||||
@@ -166,11 +166,11 @@ if test "x$xinetd" = x; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
elif test "x$xinet" != xno; then
|
||||
elif test "x$xinetd" != xno; then
|
||||
XINETD="$xinetd"
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-startup.m4 11747 2014-03-27 01:15:48Z msweet $".
|
||||
dnl End of "$Id: cups-startup.m4 12351 2014-12-09 22:18:45Z msweet $".
|
||||
dnl
|
||||
|
||||
+10
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: config.h.in 12140 2014-08-30 01:51:22Z msweet $"
|
||||
* "$Id: config.h.in 12329 2014-12-09 20:50:51Z msweet $"
|
||||
*
|
||||
* Configuration file for CUPS.
|
||||
*
|
||||
@@ -305,6 +305,13 @@
|
||||
#undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION
|
||||
|
||||
|
||||
/*
|
||||
* Do we have the gnutls_priority_set_direct function?
|
||||
*/
|
||||
|
||||
#undef HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
||||
|
||||
|
||||
/*
|
||||
* What Security framework headers do we have?
|
||||
*/
|
||||
@@ -624,7 +631,7 @@
|
||||
|
||||
#ifdef HAVE_ARC4RANDOM
|
||||
# define CUPS_RAND() arc4random()
|
||||
# define CUPS_SRAND(v) arc4random_stir()
|
||||
# define CUPS_SRAND(v)
|
||||
#elif defined(HAVE_RANDOM)
|
||||
# define CUPS_RAND() random()
|
||||
# define CUPS_SRAND(v) srandom(v)
|
||||
@@ -712,5 +719,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
|
||||
#endif /* !_CUPS_CONFIG_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: config.h.in 12140 2014-08-30 01:51:22Z msweet $".
|
||||
* End of "$Id: config.h.in 12329 2014-12-09 20:50:51Z msweet $".
|
||||
*/
|
||||
|
||||
externo
+77
-11
@@ -659,8 +659,7 @@ EXPORT_SSLLIBS
|
||||
SSLLIBS
|
||||
SSLFLAGS
|
||||
IPPALIASES
|
||||
CUPS_SERVERKEY
|
||||
CUPS_SERVERCERT
|
||||
CUPS_SERVERKEYCHAIN
|
||||
LIBGCRYPTCONFIG
|
||||
LIBGNUTLSCONFIG
|
||||
PTHREAD_FLAGS
|
||||
@@ -2520,7 +2519,7 @@ esac
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION=2.0.1
|
||||
CUPS_VERSION=2.0.3
|
||||
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'`"
|
||||
@@ -4967,6 +4966,64 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv_open" >&5
|
||||
$as_echo "$ac_cv_search_iconv_open" >&6; }
|
||||
ac_res=$ac_cv_search_iconv_open
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
|
||||
|
||||
SAVELIBS="$SAVELIBS $LIBS"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libiconv_open" >&5
|
||||
$as_echo_n "checking for library containing libiconv_open... " >&6; }
|
||||
if ${ac_cv_search_libiconv_open+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_func_search_save_LIBS=$LIBS
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char libiconv_open ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return libiconv_open ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
for ac_lib in '' iconv; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
ac_res=-l$ac_lib
|
||||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
fi
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_search_libiconv_open=$ac_res
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext
|
||||
if ${ac_cv_search_libiconv_open+:} false; then :
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ${ac_cv_search_libiconv_open+:} false; then :
|
||||
|
||||
else
|
||||
ac_cv_search_libiconv_open=no
|
||||
fi
|
||||
rm conftest.$ac_ext
|
||||
LIBS=$ac_func_search_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libiconv_open" >&5
|
||||
$as_echo "$ac_cv_search_libiconv_open" >&6; }
|
||||
ac_res=$ac_cv_search_libiconv_open
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
$as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
|
||||
@@ -6829,7 +6886,13 @@ esac
|
||||
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default"
|
||||
ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
"
|
||||
if test "x$ac_cv_header_resolv_h" = xyes; then :
|
||||
$as_echo "#define HAVE_RESOLV_H 1" >>confdefs.h
|
||||
|
||||
@@ -8007,8 +8070,7 @@ fi
|
||||
SSLFLAGS=""
|
||||
SSLLIBS=""
|
||||
have_ssl=0
|
||||
CUPS_SERVERCERT=""
|
||||
CUPS_SERVERKEY=""
|
||||
CUPS_SERVERKEYCHAIN=""
|
||||
|
||||
if test x$enable_ssl != xno; then
|
||||
if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
|
||||
@@ -8021,7 +8083,7 @@ if test "x$ac_cv_header_Security_SecureTransport_h" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_CDSASSL 1" >>confdefs.h
|
||||
|
||||
CUPS_SERVERCERT="/Library/Keychains/System.keychain"
|
||||
CUPS_SERVERKEYCHAIN="/Library/Keychains/System.keychain"
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "Security/SecureTransportPriv.h" "ac_cv_header_Security_SecureTransportPriv_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_Security_SecureTransportPriv_h" = xyes; then :
|
||||
@@ -8307,8 +8369,7 @@ fi
|
||||
fi
|
||||
|
||||
if test $have_ssl = 1; then
|
||||
CUPS_SERVERCERT="ssl/server.crt"
|
||||
CUPS_SERVERKEY="ssl/server.key"
|
||||
CUPS_SERVERKEYCHAIN="ssl"
|
||||
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS $SSLLIBS"
|
||||
@@ -8316,6 +8377,12 @@ fi
|
||||
if test "x$ac_cv_func_gnutls_transport_set_pull_timeout_function" = xyes; then :
|
||||
$as_echo "#define HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct"
|
||||
if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes; then :
|
||||
$as_echo "#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
LIBS="$SAVELIBS"
|
||||
@@ -8339,7 +8406,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
EXPORT_SSLLIBS="$SSLLIBS"
|
||||
|
||||
|
||||
@@ -9207,7 +9273,7 @@ if test "x$xinetd" = x; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
elif test "x$xinet" != xno; then
|
||||
elif test "x$xinetd" != xno; then
|
||||
XINETD="$xinetd"
|
||||
fi
|
||||
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: cups.h 12195 2014-10-02 18:45:59Z msweet $"
|
||||
* "$Id: cups.h 12704 2015-06-08 19:08:01Z msweet $"
|
||||
*
|
||||
* API definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -49,10 +49,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 2.0001
|
||||
# define CUPS_VERSION 2.0003
|
||||
# define CUPS_VERSION_MAJOR 2
|
||||
# define CUPS_VERSION_MINOR 0
|
||||
# define CUPS_VERSION_PATCH 1
|
||||
# define CUPS_VERSION_PATCH 3
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -628,5 +628,5 @@ extern int cupsSetServerCredentials(const char *path, const char *common_name,
|
||||
#endif /* !_CUPS_CUPS_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: cups.h 12195 2014-10-02 18:45:59Z msweet $".
|
||||
* End of "$Id: cups.h 12704 2015-06-08 19:08:01Z msweet $".
|
||||
*/
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: debug.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: debug.c 12328 2014-12-09 20:38:47Z msweet $"
|
||||
*
|
||||
* Debugging functions for CUPS.
|
||||
*
|
||||
@@ -97,7 +97,7 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
type; /* Format type character */
|
||||
int width, /* Width of field */
|
||||
prec; /* Number of characters of precision */
|
||||
char tformat[100], /* Temporary format string for sprintf() */
|
||||
char tformat[100], /* Temporary format string for snprintf() */
|
||||
*tptr, /* Pointer into temporary format */
|
||||
temp[1024]; /* Buffer for formatted numbers */
|
||||
char *s; /* Pointer to string */
|
||||
@@ -232,7 +232,7 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
if ((size_t)(width + 2) > sizeof(temp))
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, double));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, double));
|
||||
|
||||
bytes += (int)strlen(temp);
|
||||
|
||||
@@ -256,13 +256,13 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
|
||||
# ifdef HAVE_LONG_LONG
|
||||
if (size == 'L')
|
||||
sprintf(temp, tformat, va_arg(ap, long long));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, long long));
|
||||
else
|
||||
# endif /* HAVE_LONG_LONG */
|
||||
if (size == 'l')
|
||||
sprintf(temp, tformat, va_arg(ap, long));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, long));
|
||||
else
|
||||
sprintf(temp, tformat, va_arg(ap, int));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, int));
|
||||
|
||||
bytes += (int)strlen(temp);
|
||||
|
||||
@@ -277,7 +277,7 @@ debug_vsnprintf(char *buffer, /* O - Output buffer */
|
||||
if ((size_t)(width + 2) > sizeof(temp))
|
||||
break;
|
||||
|
||||
sprintf(temp, tformat, va_arg(ap, void *));
|
||||
snprintf(temp, sizeof(temp), tformat, va_arg(ap, void *));
|
||||
|
||||
bytes += (int)strlen(temp);
|
||||
|
||||
@@ -643,5 +643,5 @@ _cups_debug_set(const char *logfile, /* I - Log file or NULL */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: debug.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: debug.c 12328 2014-12-09 20:38:47Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dest.c 12094 2014-08-19 12:15:11Z msweet $"
|
||||
* "$Id: dest.c 12665 2015-05-25 15:08:55Z msweet $"
|
||||
*
|
||||
* User-defined destination (and option) support for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -657,6 +657,7 @@ cupsConnectDest(
|
||||
|
||||
http = httpConnect2(hostname, port, addrlist, AF_UNSPEC, encryption, 1, 0,
|
||||
NULL);
|
||||
httpAddrFreeList(addrlist);
|
||||
|
||||
/*
|
||||
* Connect if requested...
|
||||
@@ -3942,5 +3943,5 @@ cups_make_string(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dest.c 12094 2014-08-19 12:15:11Z msweet $".
|
||||
* End of "$Id: dest.c 12665 2015-05-25 15:08:55Z msweet $".
|
||||
*/
|
||||
|
||||
+115
-34
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: file.c 11627 2014-02-20 16:15:09Z msweet $"
|
||||
* "$Id: file.c 12642 2015-05-19 15:04:47Z msweet $"
|
||||
*
|
||||
* File functions for CUPS.
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
* our own file functions allows us to provide transparent support of
|
||||
* gzip'd print files, PPD files, etc.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -288,6 +288,7 @@ _cupsFileCheckFilter(
|
||||
|
||||
switch (result)
|
||||
{
|
||||
default :
|
||||
case _CUPS_FILE_CHECK_OK :
|
||||
prefix = "DEBUG2";
|
||||
break;
|
||||
@@ -638,6 +639,8 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
|
||||
* Range check input...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("4cupsFileGetChar(fp=%p)", fp));
|
||||
|
||||
if (!fp || (fp->mode != 'r' && fp->mode != 's'))
|
||||
{
|
||||
DEBUG_puts("5cupsFileGetChar: Bad arguments!");
|
||||
@@ -648,8 +651,10 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
|
||||
* If the input buffer is empty, try to read more data...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("5cupsFileGetChar: fp->eof=%d, fp->ptr=%p, fp->end=%p", fp->eof, fp->ptr, fp->end));
|
||||
|
||||
if (fp->ptr >= fp->end)
|
||||
if (cups_fill(fp) < 0)
|
||||
if (cups_fill(fp) <= 0)
|
||||
{
|
||||
DEBUG_puts("5cupsFileGetChar: Unable to fill buffer!");
|
||||
return (-1);
|
||||
@@ -1283,7 +1288,7 @@ cupsFilePeekChar(cups_file_t *fp) /* I - CUPS file */
|
||||
*/
|
||||
|
||||
if (fp->ptr >= fp->end)
|
||||
if (cups_fill(fp) < 0)
|
||||
if (cups_fill(fp) <= 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
@@ -1778,7 +1783,7 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
|
||||
* Preload a buffer to determine whether the file is compressed...
|
||||
*/
|
||||
|
||||
if (cups_fill(fp) < 0)
|
||||
if (cups_fill(fp) <= 0)
|
||||
return (-1);
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
||||
@@ -2194,6 +2199,8 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
DEBUG_printf(("9cups_fill: cups_read() returned " CUPS_LLFMT,
|
||||
CUPS_LLCAST bytes));
|
||||
|
||||
fp->eof = 1;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -2233,6 +2240,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Extra gzip header data missing, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -2245,6 +2257,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Extra gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2266,6 +2283,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Original filename in gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2287,6 +2309,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Comment in gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2305,6 +2332,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
* Can't read from file!
|
||||
*/
|
||||
|
||||
DEBUG_puts("9cups_fill: Header CRC in gzip header data does not fit in initial buffer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@@ -2329,8 +2361,15 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
fp->stream.avail_out = 0;
|
||||
fp->crc = crc32(0L, Z_NULL, 0);
|
||||
|
||||
if (inflateInit2(&(fp->stream), -15) != Z_OK)
|
||||
if ((status = inflateInit2(&(fp->stream), -15)) != Z_OK)
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: inflateInit2 returned %d, returning -1.", status));
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
fp->compressed = 1;
|
||||
}
|
||||
@@ -2342,7 +2381,11 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
*/
|
||||
|
||||
if (fp->eof)
|
||||
return (-1);
|
||||
{
|
||||
DEBUG_puts("9cups_fill: EOF, returning 0.");
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fill the decompression buffer as needed...
|
||||
@@ -2351,7 +2394,13 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
if (fp->stream.avail_in == 0)
|
||||
{
|
||||
if ((bytes = cups_read(fp, (char *)fp->cbuf, sizeof(fp->cbuf))) <= 0)
|
||||
return (-1);
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: cups_read error, returning %d.", (int)bytes));
|
||||
|
||||
fp->eof = 1;
|
||||
|
||||
return (bytes);
|
||||
}
|
||||
|
||||
fp->stream.next_in = fp->cbuf;
|
||||
fp->stream.avail_in = (uInt)bytes;
|
||||
@@ -2378,42 +2427,69 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
|
||||
unsigned char trailer[8]; /* Trailer bytes */
|
||||
uLong tcrc; /* Trailer CRC */
|
||||
ssize_t tbytes = 0; /* Number of bytes */
|
||||
|
||||
|
||||
if (read(fp->fd, trailer, sizeof(trailer)) < (ssize_t)sizeof(trailer))
|
||||
if (fp->stream.avail_in > 0)
|
||||
{
|
||||
/*
|
||||
* Can't get it, so mark end-of-file...
|
||||
*/
|
||||
if (fp->stream.avail_in > sizeof(trailer))
|
||||
tbytes = (ssize_t)sizeof(trailer);
|
||||
else
|
||||
tbytes = (ssize_t)fp->stream.avail_in;
|
||||
|
||||
fp->eof = 1;
|
||||
memcpy(trailer, fp->stream.next_in, (size_t)tbytes);
|
||||
fp->stream.next_in += tbytes;
|
||||
fp->stream.avail_in -= (size_t)tbytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
tcrc = ((((((uLong)trailer[3] << 8) | (uLong)trailer[2]) << 8) |
|
||||
(uLong)trailer[1]) << 8) | (uLong)trailer[0];
|
||||
|
||||
if (tcrc != fp->crc)
|
||||
if (tbytes < (ssize_t)sizeof(trailer))
|
||||
{
|
||||
if (read(fp->fd, trailer + tbytes, sizeof(trailer) - (size_t)tbytes) < ((ssize_t)sizeof(trailer) - tbytes))
|
||||
{
|
||||
/*
|
||||
* Bad CRC, mark end-of-file...
|
||||
* Can't get it, so mark end-of-file...
|
||||
*/
|
||||
|
||||
DEBUG_printf(("9cups_fill: tcrc=%08x != fp->crc=%08x",
|
||||
(unsigned int)tcrc, (unsigned int)fp->crc));
|
||||
DEBUG_puts("9cups_fill: Unable to read gzip CRC trailer, returning -1.");
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
tcrc = ((((((uLong)trailer[3] << 8) | (uLong)trailer[2]) << 8) |
|
||||
(uLong)trailer[1]) << 8) | (uLong)trailer[0];
|
||||
|
||||
if (tcrc != fp->crc)
|
||||
{
|
||||
/*
|
||||
* Otherwise, reset the compressed flag so that we re-read the
|
||||
* file header...
|
||||
* Bad CRC, mark end-of-file...
|
||||
*/
|
||||
|
||||
fp->compressed = 0;
|
||||
DEBUG_printf(("9cups_fill: tcrc=%08x != fp->crc=%08x, returning -1.", (unsigned int)tcrc, (unsigned int)fp->crc));
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, reset the compressed flag so that we re-read the
|
||||
* file header...
|
||||
*/
|
||||
|
||||
fp->compressed = 0;
|
||||
}
|
||||
else if (status < Z_OK)
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: inflate returned %d, returning -1.", status));
|
||||
|
||||
fp->eof = 1;
|
||||
errno = EIO;
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
bytes = (ssize_t)sizeof(fp->buf) - (ssize_t)fp->stream.avail_out;
|
||||
@@ -2426,7 +2502,10 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
fp->end = fp->buf + bytes;
|
||||
|
||||
if (bytes)
|
||||
{
|
||||
DEBUG_printf(("9cups_fill: Returning %d.", (int)bytes));
|
||||
return (bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
||||
@@ -2444,17 +2523,19 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
|
||||
fp->eof = 1;
|
||||
fp->ptr = fp->buf;
|
||||
fp->end = fp->buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Return the bytes we read...
|
||||
*/
|
||||
|
||||
return (-1);
|
||||
fp->eof = 0;
|
||||
fp->ptr = fp->buf;
|
||||
fp->end = fp->buf + bytes;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the bytes we read...
|
||||
*/
|
||||
|
||||
fp->eof = 0;
|
||||
fp->ptr = fp->buf;
|
||||
fp->end = fp->buf + bytes;
|
||||
DEBUG_printf(("9cups_fill: Not gzip, returning %d.", (int)bytes));
|
||||
|
||||
return (bytes);
|
||||
}
|
||||
@@ -2671,5 +2752,5 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: file.c 11627 2014-02-20 16:15:09Z msweet $".
|
||||
* End of "$Id: file.c 12642 2015-05-19 15:04:47Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: globals.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: globals.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* Global variable access routines for CUPS.
|
||||
*
|
||||
@@ -216,9 +216,9 @@ cups_globals_alloc(void)
|
||||
memset(cg, 0, sizeof(_cups_globals_t));
|
||||
cg->encryption = (http_encryption_t)-1;
|
||||
cg->password_cb = (cups_password_cb2_t)_cupsGetPassword;
|
||||
cg->any_root = 1;
|
||||
cg->expired_certs = 1;
|
||||
cg->validate_certs = 0;
|
||||
cg->any_root = -1;
|
||||
cg->expired_certs = -1;
|
||||
cg->validate_certs = -1;
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
@@ -394,5 +394,5 @@ cups_globals_init(void)
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: globals.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: globals.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: http-private.h 12243 2014-11-12 12:12:59Z msweet $"
|
||||
* "$Id: http-private.h 12419 2015-01-22 15:51:20Z msweet $"
|
||||
*
|
||||
* Private HTTP definitions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -186,10 +186,6 @@ typedef gnutls_certificate_credentials_t *http_tls_credentials_t;
|
||||
# if !defined(HAVE_SECBASEPRIV_H) && defined(HAVE_CSSMERRORSTRING) /* Declare prototype for function in that header... */
|
||||
extern const char *cssmErrorString(int error);
|
||||
# endif /* !HAVE_SECBASEPRIV_H && HAVE_CSSMERRORSTRING */
|
||||
# ifndef HAVE_SECITEMPRIV_H /* Declare constants from that header... */
|
||||
extern const CFTypeRef kSecClassCertificate;
|
||||
extern const CFTypeRef kSecClassIdentity;
|
||||
# endif /* !HAVE_SECITEMPRIV_H */
|
||||
# if !defined(HAVE_SECIDENTITYSEARCHPRIV_H) && defined(HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY) /* Declare prototype for function in that header... */
|
||||
extern OSStatus SecIdentitySearchCreateWithPolicy(SecPolicyRef policy,
|
||||
CFStringRef idString, CSSM_KEYUSE keyUsage,
|
||||
@@ -442,5 +438,5 @@ extern int _httpWait(http_t *http, int msec, int usessl);
|
||||
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: http-private.h 12243 2014-11-12 12:12:59Z msweet $".
|
||||
* End of "$Id: http-private.h 12419 2015-01-22 15:51:20Z msweet $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: http.c 12230 2014-10-21 13:55:24Z msweet $"
|
||||
* "$Id: http.c 12334 2014-12-09 21:01:55Z msweet $"
|
||||
*
|
||||
* HTTP routines for CUPS.
|
||||
*
|
||||
@@ -4032,7 +4032,7 @@ http_debug_hex(const char *prefix, /* I - Prefix for line */
|
||||
for (i = 0; i < bytes; i += 16)
|
||||
{
|
||||
for (j = 0, ptr = start; j < 16 && (i + j) < bytes; j ++, ptr += 2)
|
||||
sprintf(ptr, "%02X", buffer[i + j] & 255);
|
||||
snprintf(ptr, 3, "%02X", buffer[i + j] & 255);
|
||||
|
||||
while (j < 16)
|
||||
{
|
||||
@@ -4850,5 +4850,5 @@ http_write_chunk(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: http.c 12230 2014-10-21 13:55:24Z msweet $".
|
||||
* End of "$Id: http.c 12334 2014-12-09 21:01:55Z msweet $".
|
||||
*/
|
||||
|
||||
+21
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12093 2014-08-19 12:10:17Z msweet $"
|
||||
* "$Id: ipp.c 12469 2015-02-01 04:51:08Z msweet $"
|
||||
*
|
||||
* Internet Printing Protocol functions for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -2032,7 +2032,7 @@ ippFindNextAttribute(ipp_t *ipp, /* I - IPP message */
|
||||
*childattr; /* Child attribute */
|
||||
ipp_tag_t value_tag; /* Value tag */
|
||||
char parent[1024], /* Parent attribute name */
|
||||
*child; /* Child attribute name */
|
||||
*child = NULL; /* Child attribute name */
|
||||
|
||||
|
||||
DEBUG_printf(("2ippFindNextAttribute(ipp=%p, name=\"%s\", type=%02x(%s))",
|
||||
@@ -6675,7 +6675,7 @@ ipp_length(ipp_t *ipp, /* I - IPP message or collection */
|
||||
DEBUG_printf(("5ipp_length: attr->name=\"%s\", attr->num_values=%d, "
|
||||
"bytes=" CUPS_LLFMT, attr->name, attr->num_values, CUPS_LLCAST bytes));
|
||||
|
||||
if (attr->value_tag < IPP_TAG_EXTENSION)
|
||||
if ((attr->value_tag & ~IPP_TAG_CUPS_CONST) < IPP_TAG_EXTENSION)
|
||||
bytes += (size_t)attr->num_values;/* Value tag for each value */
|
||||
else
|
||||
bytes += (size_t)(5 * attr->num_values);
|
||||
@@ -6830,6 +6830,22 @@ ipp_read_http(http_t *http, /* I - Client connection */
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (http->used == 0 && http->timeout_value > 0)
|
||||
{
|
||||
/*
|
||||
* Wait up to timeout seconds for more data on blocking sockets...
|
||||
*/
|
||||
|
||||
if (!httpWait(http, (int)(1000 * http->timeout_value)))
|
||||
{
|
||||
/*
|
||||
* Signal no data...
|
||||
*/
|
||||
|
||||
bytes = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bytes = httpRead2(http, (char *)buffer, length - (size_t)tbytes)) < 0)
|
||||
{
|
||||
@@ -7046,5 +7062,5 @@ ipp_write_file(int *fd, /* I - File descriptor */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12093 2014-08-19 12:10:17Z msweet $".
|
||||
* End of "$Id: ipp.c 12469 2015-02-01 04:51:08Z msweet $".
|
||||
*/
|
||||
|
||||
+34
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: language.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: language.c 12266 2014-11-19 16:05:28Z msweet $"
|
||||
*
|
||||
* I18N/language support for CUPS.
|
||||
*
|
||||
@@ -1139,7 +1139,7 @@ appleLangDefault(void)
|
||||
int i; /* Looping var */
|
||||
CFBundleRef bundle; /* Main bundle (if any) */
|
||||
CFArrayRef bundleList; /* List of localizations in bundle */
|
||||
CFPropertyListRef localizationList;
|
||||
CFPropertyListRef localizationList = NULL;
|
||||
/* List of localization data */
|
||||
CFStringRef languageName; /* Current name */
|
||||
CFStringRef localeName; /* Canonical from of name */
|
||||
@@ -1165,14 +1165,42 @@ appleLangDefault(void)
|
||||
else if ((bundle = CFBundleGetMainBundle()) != NULL &&
|
||||
(bundleList = CFBundleCopyBundleLocalizations(bundle)) != NULL)
|
||||
{
|
||||
CFURLRef resources = CFBundleCopyResourcesDirectoryURL(bundle);
|
||||
|
||||
DEBUG_puts("3appleLangDefault: Getting localizationList from bundle.");
|
||||
|
||||
localizationList =
|
||||
CFBundleCopyPreferredLocalizationsFromArray(bundleList);
|
||||
if (resources)
|
||||
{
|
||||
CFStringRef cfpath = CFURLCopyPath(resources);
|
||||
char path[1024];
|
||||
|
||||
if (cfpath)
|
||||
{
|
||||
/*
|
||||
* See if we have an Info.plist file in the bundle...
|
||||
*/
|
||||
|
||||
CFStringGetCString(cfpath, path,sizeof(path), kCFStringEncodingUTF8);
|
||||
DEBUG_printf(("3appleLangDefault: Got a resource URL (\"%s\")", path));
|
||||
strlcat(path, "Contents/Info.plist", sizeof(path));
|
||||
|
||||
if (!access(path, R_OK))
|
||||
localizationList = CFBundleCopyPreferredLocalizationsFromArray(bundleList);
|
||||
else
|
||||
DEBUG_puts("3appleLangDefault: No Info.plist, ignoring resource URL...");
|
||||
|
||||
CFRelease(cfpath);
|
||||
}
|
||||
|
||||
CFRelease(resources);
|
||||
}
|
||||
else
|
||||
DEBUG_puts("3appleLangDefault: No resource URL.");
|
||||
|
||||
CFRelease(bundleList);
|
||||
}
|
||||
else
|
||||
|
||||
if (!localizationList)
|
||||
{
|
||||
DEBUG_puts("3appleLangDefault: Getting localizationList from preferences.");
|
||||
|
||||
@@ -1560,5 +1588,5 @@ cups_unquote(char *d, /* O - Unquoted string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: language.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: language.c 12266 2014-11-19 16:05:28Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ppd-cache.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: ppd-cache.c 12434 2015-01-28 16:29:06Z msweet $"
|
||||
*
|
||||
* PPD cache implementation for CUPS.
|
||||
*
|
||||
* Copyright 2010-2014 by Apple Inc.
|
||||
* Copyright 2010-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -2691,6 +2691,25 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
*end; /* End of name buffer */
|
||||
|
||||
|
||||
if (_cups_islower(*ppd))
|
||||
{
|
||||
/*
|
||||
* Already lowercase name, use as-is?
|
||||
*/
|
||||
|
||||
const char *ppdptr; /* Pointer into PPD keyword */
|
||||
|
||||
for (ppdptr = ppd + 1; *ppdptr; ppdptr ++)
|
||||
if (_cups_isupper(*ppdptr) || strchr(dashchars, *ppdptr))
|
||||
break;
|
||||
|
||||
if (!*ppdptr)
|
||||
{
|
||||
strlcpy(name, ppd, namesize);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (ptr = name, end = name + namesize - 1; *ppd && ptr < end; ppd ++)
|
||||
{
|
||||
if (_cups_isalnum(*ppd) || *ppd == '-')
|
||||
@@ -2712,5 +2731,5 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ppd-cache.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: ppd-cache.c 12434 2015-01-28 16:29:06Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-6
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: testfile.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: testfile.c 12578 2015-03-30 19:07:29Z msweet $"
|
||||
*
|
||||
* File test program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -205,14 +205,14 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Cat the filename on the command-line...
|
||||
*/
|
||||
|
||||
char line[1024]; /* Line from file */
|
||||
char line[8192]; /* Line from file */
|
||||
|
||||
if ((fp = cupsFileOpen(argv[1], "r")) == NULL)
|
||||
{
|
||||
perror(argv[1]);
|
||||
status = 1;
|
||||
}
|
||||
else
|
||||
else if (argc == 2)
|
||||
{
|
||||
status = 0;
|
||||
|
||||
@@ -224,6 +224,21 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
status = 0;
|
||||
ssize_t bytes;
|
||||
|
||||
while ((bytes = cupsFileRead(fp, line, sizeof(line))) > 0)
|
||||
printf("%s: %d bytes\n", argv[1], (int)bytes);
|
||||
|
||||
if (cupsFileEOF(fp))
|
||||
printf("%s: EOF\n", argv[1]);
|
||||
else
|
||||
perror(argv[1]);
|
||||
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
return (status);
|
||||
@@ -798,7 +813,8 @@ read_write_tests(int compression) /* I - Use compression? */
|
||||
* Remove the test file...
|
||||
*/
|
||||
|
||||
unlink(compression ? "testfile.dat.gz" : "testfile.dat");
|
||||
if (!status)
|
||||
unlink(compression ? "testfile.dat.gz" : "testfile.dat");
|
||||
|
||||
/*
|
||||
* Return the test status...
|
||||
@@ -809,5 +825,5 @@ read_write_tests(int compression) /* I - Use compression? */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testfile.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: testfile.c 12578 2015-03-30 19:07:29Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: testppd.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: testppd.c 12604 2015-05-06 01:43:05Z msweet $"
|
||||
*
|
||||
* PPD test program for CUPS.
|
||||
*
|
||||
@@ -859,7 +859,19 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
struct stat fileinfo; /* File information */
|
||||
|
||||
|
||||
if (!strncmp(argv[1], "-d", 2))
|
||||
if (strchr(argv[1], ':'))
|
||||
{
|
||||
/*
|
||||
* Server PPD...
|
||||
*/
|
||||
|
||||
if ((filename = cupsGetServerPPD(CUPS_HTTP_DEFAULT, argv[1])) == NULL)
|
||||
{
|
||||
printf("%s: %s\n", argv[1], cupsLastErrorString());
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
else if (!strncmp(argv[1], "-d", 2))
|
||||
{
|
||||
const char *printer; /* Printer name */
|
||||
|
||||
@@ -1107,5 +1119,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: testppd.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: testppd.c 12604 2015-05-06 01:43:05Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-3
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: tls-darwin.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: tls-darwin.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* TLS support code for CUPS on OS X.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -546,6 +546,9 @@ httpCredentialsGetTrust(
|
||||
if ((secCert = http_cdsa_create_credential((http_credential_t *)cupsArrayFirst(credentials))) == NULL)
|
||||
return (HTTP_TRUST_UNKNOWN);
|
||||
|
||||
if (cg->any_root < 0)
|
||||
_cupsSetDefaults();
|
||||
|
||||
/*
|
||||
* Look this common name up in the default keychains...
|
||||
*/
|
||||
@@ -1779,5 +1782,5 @@ http_cdsa_write(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-darwin.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* End of "$Id: tls-darwin.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+26
-7
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: tls-gnutls.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: tls-gnutls.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* TLS support code for CUPS using GNU TLS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -407,6 +407,9 @@ httpCredentialsGetTrust(
|
||||
if ((cert = http_gnutls_create_credential((http_credential_t *)cupsArrayFirst(credentials))) == NULL)
|
||||
return (HTTP_TRUST_UNKNOWN);
|
||||
|
||||
if (cg->any_root < 0)
|
||||
_cupsSetDefaults();
|
||||
|
||||
/*
|
||||
* Look this common name up in the default keychains...
|
||||
*/
|
||||
@@ -1107,7 +1110,6 @@ _httpTLSStart(http_t *http) /* I - Connection to server */
|
||||
keyfile[1024]; /* Private key file */
|
||||
int have_creds = 0; /* Have credentials? */
|
||||
|
||||
|
||||
if (http->fields[HTTP_FIELD_HOST][0])
|
||||
{
|
||||
/*
|
||||
@@ -1197,14 +1199,31 @@ _httpTLSStart(http_t *http) /* I - Connection to server */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GNUTLS_PRIORITY_SET_DIRECT
|
||||
if (!tls_options)
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
else if ((tls_options & _HTTP_TLS_ALLOW_SSL3) && (tls_options & _HTTP_TLS_ALLOW_RC4))
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL", NULL);
|
||||
else if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:VERS-TLS-ALL", NULL);
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL", NULL);
|
||||
else
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
gnutls_priority_set_direct(http->tls, "NORMAL:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
|
||||
#else
|
||||
gnutls_priority_t priority; /* Priority */
|
||||
|
||||
if (!tls_options)
|
||||
gnutls_priority_init(&priority, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
else if ((tls_options & _HTTP_TLS_ALLOW_SSL3) && (tls_options & _HTTP_TLS_ALLOW_RC4))
|
||||
gnutls_priority_init(&priority, "NORMAL", NULL);
|
||||
else if (tls_options & _HTTP_TLS_ALLOW_SSL3)
|
||||
gnutls_priority_init(&priority, "NORMAL:-ARCFOUR-128:+VERS-TLS-ALL", NULL);
|
||||
else
|
||||
gnutls_priority_init(&priority, "NORMAL:+VERS-TLS-ALL:-VERS-SSL3.0", NULL);
|
||||
|
||||
gnutls_priority_set(http->tls, priority);
|
||||
gnutls_priority_deinit(priority);
|
||||
#endif /* HAVE_GNUTLS_PRIORITY_SET_DIRECT */
|
||||
|
||||
gnutls_transport_set_ptr(http->tls, (gnutls_transport_ptr_t)http);
|
||||
gnutls_transport_set_pull_function(http->tls, http_gnutls_read);
|
||||
@@ -1313,5 +1332,5 @@ _httpTLSWrite(http_t *http, /* I - Connection to server */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-gnutls.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* End of "$Id: tls-gnutls.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-3
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* "$Id: tls-sspi.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: tls-sspi.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* TLS support for CUPS on Windows using the Security Support Provider
|
||||
* Interface (SSPI).
|
||||
*
|
||||
* Copyright 2010-2014 by Apple Inc.
|
||||
* Copyright 2010-2015 by Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright
|
||||
@@ -262,6 +262,9 @@ httpCredentialsGetTrust(
|
||||
if (!cert)
|
||||
return (HTTP_TRUST_UNKNOWN);
|
||||
|
||||
if (cg->any_root < 0)
|
||||
_cupsSetDefaults();
|
||||
|
||||
if (cg->any_root)
|
||||
certFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA;
|
||||
|
||||
@@ -2413,5 +2416,5 @@ http_sspi_verify(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: tls-sspi.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* End of "$Id: tls-sspi.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+14
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: transcode.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: transcode.c 12332 2014-12-09 20:58:45Z msweet $"
|
||||
*
|
||||
* Transcoding support for CUPS.
|
||||
*
|
||||
@@ -154,11 +154,15 @@ cupsCharsetToUTF8(
|
||||
|
||||
if (map_encoding != encoding)
|
||||
{
|
||||
char toset[1024]; /* Destination character set */
|
||||
|
||||
_cupsCharmapFlush();
|
||||
|
||||
snprintf(toset, sizeof(toset), "%s//IGNORE", _cupsEncodingName(encoding));
|
||||
|
||||
map_encoding = encoding;
|
||||
map_from_utf8 = iconv_open(_cupsEncodingName(encoding), "UTF-8");
|
||||
map_to_utf8 = iconv_open("UTF-8", _cupsEncodingName(encoding));
|
||||
map_encoding = encoding;
|
||||
map_to_utf8 = iconv_open("UTF-8", toset);
|
||||
}
|
||||
|
||||
if (map_to_utf8 != (iconv_t)-1)
|
||||
@@ -279,11 +283,15 @@ cupsUTF8ToCharset(
|
||||
|
||||
if (map_encoding != encoding)
|
||||
{
|
||||
char toset[1024]; /* Destination character set */
|
||||
|
||||
_cupsCharmapFlush();
|
||||
|
||||
map_from_utf8 = iconv_open(_cupsEncodingName(encoding), "UTF-8");
|
||||
map_to_utf8 = iconv_open("UTF-8", _cupsEncodingName(encoding));
|
||||
snprintf(toset, sizeof(toset), "%s//IGNORE", _cupsEncodingName(encoding));
|
||||
|
||||
map_encoding = encoding;
|
||||
map_from_utf8 = iconv_open(_cupsEncodingName(encoding), "UTF-8");
|
||||
map_to_utf8 = iconv_open("UTF-8", toset);
|
||||
}
|
||||
|
||||
if (map_from_utf8 != (iconv_t)-1)
|
||||
@@ -708,5 +716,5 @@ cupsUTF32ToUTF8(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: transcode.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* End of "$Id: transcode.c 12332 2014-12-09 20:58:45Z msweet $"
|
||||
*/
|
||||
|
||||
+396
-311
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: usersys.c 12215 2014-10-20 18:24:56Z msweet $"
|
||||
* "$Id: usersys.c 12481 2015-02-03 12:45:14Z msweet $"
|
||||
*
|
||||
* User, system, and password routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -38,22 +38,45 @@
|
||||
#define _CUPS_PASSCHAR '*' /* Character that is echoed for password */
|
||||
|
||||
|
||||
/*
|
||||
* Local types...
|
||||
*/
|
||||
|
||||
typedef struct _cups_client_conf_s /**** client.conf config data ****/
|
||||
{
|
||||
#ifdef HAVE_SSL
|
||||
int ssl_options; /* SSLOptions values */
|
||||
#endif /* HAVE_SSL */
|
||||
int any_root, /* Allow any (e.g., self-signed) root */
|
||||
expired_certs, /* Allow expired certs */
|
||||
validate_certs; /* Validate certificates */
|
||||
http_encryption_t encryption; /* Encryption setting */
|
||||
char user[65], /* User name */
|
||||
server_name[256];
|
||||
/* Server hostname */
|
||||
#ifdef HAVE_GSSAPI
|
||||
char gss_service_name[32];
|
||||
/* Kerberos service name */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
} _cups_client_conf_t;
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void cups_read_client_conf(cups_file_t *fp,
|
||||
_cups_globals_t *cg,
|
||||
const char *cups_encryption,
|
||||
const char *cups_server,
|
||||
const char *cups_user,
|
||||
static void cups_finalize_client_conf(_cups_client_conf_t *cc);
|
||||
static void cups_init_client_conf(_cups_client_conf_t *cc);
|
||||
static void cups_read_client_conf(cups_file_t *fp, _cups_client_conf_t *cc);
|
||||
static void cups_set_encryption(_cups_client_conf_t *cc, const char *value);
|
||||
#ifdef HAVE_GSSAPI
|
||||
const char *cups_gssservicename,
|
||||
static void cups_set_gss_service_name(_cups_client_conf_t *cc, const char *value);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
const char *cups_anyroot,
|
||||
const char *cups_expiredcerts,
|
||||
const char *cups_validatecerts,
|
||||
int ssl_options);
|
||||
static void cups_set_server_name(_cups_client_conf_t *cc, const char *value);
|
||||
#ifdef HAVE_SSL
|
||||
static void cups_set_ssl_options(_cups_client_conf_t *cc, const char *value);
|
||||
#endif /* HAVE_SSL */
|
||||
static void cups_set_user(_cups_client_conf_t *cc, const char *value);
|
||||
|
||||
|
||||
/*
|
||||
@@ -826,266 +849,63 @@ void
|
||||
_cupsSetDefaults(void)
|
||||
{
|
||||
cups_file_t *fp; /* File */
|
||||
const char *home, /* Home directory of user */
|
||||
*cups_encryption, /* CUPS_ENCRYPTION env var */
|
||||
*cups_server, /* CUPS_SERVER env var */
|
||||
*cups_user, /* CUPS_USER/USER env var */
|
||||
#ifdef HAVE_GSSAPI
|
||||
*cups_gssservicename, /* CUPS_GSSSERVICENAME env var */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
*cups_anyroot, /* CUPS_ANYROOT env var */
|
||||
*cups_expiredcerts, /* CUPS_EXPIREDCERTS env var */
|
||||
*cups_validatecerts; /* CUPS_VALIDATECERTS env var */
|
||||
const char *home; /* Home directory of user */
|
||||
char filename[1024]; /* Filename */
|
||||
_cups_client_conf_t cc; /* client.conf values */
|
||||
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
|
||||
|
||||
|
||||
DEBUG_puts("_cupsSetDefaults()");
|
||||
|
||||
/*
|
||||
* First collect environment variables...
|
||||
* Load initial client.conf values...
|
||||
*/
|
||||
|
||||
cups_encryption = getenv("CUPS_ENCRYPTION");
|
||||
cups_server = getenv("CUPS_SERVER");
|
||||
#ifdef HAVE_GSSAPI
|
||||
cups_gssservicename = getenv("CUPS_GSSSERVICENAME");
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cups_anyroot = getenv("CUPS_ANYROOT");
|
||||
cups_expiredcerts = getenv("CUPS_EXPIREDCERTS");
|
||||
cups_user = getenv("CUPS_USER");
|
||||
cups_validatecerts = getenv("CUPS_VALIDATECERTS");
|
||||
cups_init_client_conf(&cc);
|
||||
|
||||
/*
|
||||
* Then, if needed, read the ~/.cups/client.conf or /etc/cups/client.conf
|
||||
* files to get the default values...
|
||||
* Read the /etc/cups/client.conf and ~/.cups/client.conf files, if
|
||||
* present.
|
||||
*/
|
||||
|
||||
if (cg->encryption == (http_encryption_t)-1 || !cg->server[0] ||
|
||||
!cg->user[0] || !cg->ipp_port)
|
||||
snprintf(filename, sizeof(filename), "%s/client.conf", cg->cups_serverroot);
|
||||
if ((fp = cupsFileOpen(filename, "r")) != NULL)
|
||||
{
|
||||
/*
|
||||
* Look for CUPS_SERVERROOT/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/client.conf",
|
||||
cg->cups_serverroot);
|
||||
fp = cupsFileOpen(filename, "r");
|
||||
|
||||
/*
|
||||
* Read the configuration file and apply any environment variables; both
|
||||
* functions handle NULL cups_file_t pointers...
|
||||
*/
|
||||
|
||||
cups_read_client_conf(fp, cg, cups_encryption, cups_server, cups_user,
|
||||
#ifdef HAVE_GSSAPI
|
||||
cups_gssservicename,
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cups_anyroot, cups_expiredcerts, cups_validatecerts, 1);
|
||||
cups_read_client_conf(fp, &cc);
|
||||
cupsFileClose(fp);
|
||||
|
||||
/*
|
||||
* Then user defaults, if it is safe to do so...
|
||||
*/
|
||||
}
|
||||
|
||||
# ifdef HAVE_GETEUID
|
||||
if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
|
||||
if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
|
||||
# elif !defined(WIN32)
|
||||
if (getuid() && (home = getenv("HOME")) != NULL)
|
||||
if (getuid() && (home = getenv("HOME")) != NULL)
|
||||
# else
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
if ((home = getenv("HOME")) != NULL)
|
||||
# endif /* HAVE_GETEUID */
|
||||
{
|
||||
/*
|
||||
* Look for ~/.cups/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
|
||||
if ((fp = cupsFileOpen(filename, "r")) != NULL)
|
||||
{
|
||||
/*
|
||||
* Look for ~/.cups/client.conf...
|
||||
*/
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
|
||||
fp = cupsFileOpen(filename, "r");
|
||||
|
||||
/*
|
||||
* Read the configuration file and apply any environment variables; both
|
||||
* functions handle NULL cups_file_t pointers...
|
||||
*/
|
||||
|
||||
cups_read_client_conf(fp, cg, cups_encryption, cups_server, cups_user,
|
||||
#ifdef HAVE_GSSAPI
|
||||
cups_gssservicename,
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cups_anyroot, cups_expiredcerts, cups_validatecerts, 0);
|
||||
cups_read_client_conf(fp, &cc);
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_read_client_conf()' - Read a client.conf file.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_read_client_conf(
|
||||
cups_file_t *fp, /* I - File to read */
|
||||
_cups_globals_t *cg, /* I - Global data */
|
||||
const char *cups_encryption, /* I - CUPS_ENCRYPTION env var */
|
||||
const char *cups_server, /* I - CUPS_SERVER env var */
|
||||
const char *cups_user, /* I - CUPS_USER env var */
|
||||
#ifdef HAVE_GSSAPI
|
||||
const char *cups_gssservicename,
|
||||
/* I - CUPS_GSSSERVICENAME env var */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
const char *cups_anyroot, /* I - CUPS_ANYROOT env var */
|
||||
const char *cups_expiredcerts, /* I - CUPS_EXPIREDCERTS env var */
|
||||
const char *cups_validatecerts,/* I - CUPS_VALIDATECERTS env var */
|
||||
int ssl_options) /* I - Allow setting of SSLOptions? */
|
||||
{
|
||||
int linenum; /* Current line number */
|
||||
char line[1024], /* Line from file */
|
||||
*value, /* Pointer into line */
|
||||
encryption[1024], /* Encryption value */
|
||||
#ifndef __APPLE__
|
||||
server_name[1024], /* ServerName value */
|
||||
#endif /* !__APPLE__ */
|
||||
user[256], /* User value */
|
||||
any_root[1024], /* AllowAnyRoot value */
|
||||
expired_certs[1024], /* AllowExpiredCerts value */
|
||||
validate_certs[1024]; /* ValidateCerts value */
|
||||
#ifdef HAVE_GSSAPI
|
||||
char gss_service_name[32]; /* GSSServiceName value */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
|
||||
/*
|
||||
* Read from the file...
|
||||
* Finalize things so every client.conf value is set...
|
||||
*/
|
||||
|
||||
linenum = 0;
|
||||
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
|
||||
{
|
||||
if (!cups_encryption && cg->encryption == (http_encryption_t)-1 &&
|
||||
!_cups_strcasecmp(line, "Encryption") && value)
|
||||
{
|
||||
strlcpy(encryption, value, sizeof(encryption));
|
||||
cups_encryption = encryption;
|
||||
}
|
||||
#ifndef __APPLE__
|
||||
/*
|
||||
* The Server directive is not supported on OS X due to app sandboxing
|
||||
* restrictions, i.e. not all apps request network access.
|
||||
*/
|
||||
else if (!cups_server && (!cg->server[0] || !cg->ipp_port) &&
|
||||
!_cups_strcasecmp(line, "ServerName") && value)
|
||||
{
|
||||
strlcpy(server_name, value, sizeof(server_name));
|
||||
cups_server = server_name;
|
||||
}
|
||||
#endif /* !__APPLE__ */
|
||||
else if (!cups_user && !_cups_strcasecmp(line, "User") && value)
|
||||
{
|
||||
strlcpy(user, value, sizeof(user));
|
||||
cups_user = user;
|
||||
}
|
||||
else if (!cups_anyroot && !_cups_strcasecmp(line, "AllowAnyRoot") && value)
|
||||
{
|
||||
strlcpy(any_root, value, sizeof(any_root));
|
||||
cups_anyroot = any_root;
|
||||
}
|
||||
else if (!cups_expiredcerts && !_cups_strcasecmp(line, "AllowExpiredCerts") &&
|
||||
value)
|
||||
{
|
||||
strlcpy(expired_certs, value, sizeof(expired_certs));
|
||||
cups_expiredcerts = expired_certs;
|
||||
}
|
||||
else if (!cups_validatecerts && !_cups_strcasecmp(line, "ValidateCerts") && value)
|
||||
{
|
||||
strlcpy(validate_certs, value, sizeof(validate_certs));
|
||||
cups_validatecerts = validate_certs;
|
||||
}
|
||||
#ifdef HAVE_GSSAPI
|
||||
else if (!cups_gssservicename && !_cups_strcasecmp(line, "GSSServiceName") &&
|
||||
value)
|
||||
{
|
||||
strlcpy(gss_service_name, value, sizeof(gss_service_name));
|
||||
cups_gssservicename = gss_service_name;
|
||||
}
|
||||
#endif /* HAVE_GSSAPI */
|
||||
else if (ssl_options && !_cups_strcasecmp(line, "SSLOptions") && value)
|
||||
{
|
||||
/*
|
||||
* SSLOptions [AllowRC4] [AllowSSL3] [None]
|
||||
*/
|
||||
cups_finalize_client_conf(&cc);
|
||||
|
||||
int options = 0; /* SSL/TLS options */
|
||||
char *start, /* Start of option */
|
||||
*end; /* End of option */
|
||||
if (cg->encryption == (http_encryption_t)-1)
|
||||
cg->encryption = cc.encryption;
|
||||
|
||||
for (start = value; *start; start = end)
|
||||
{
|
||||
/*
|
||||
* Find end of keyword...
|
||||
*/
|
||||
|
||||
end = start;
|
||||
while (*end && !_cups_isspace(*end))
|
||||
end ++;
|
||||
|
||||
if (*end)
|
||||
*end++ = '\0';
|
||||
|
||||
/*
|
||||
* Compare...
|
||||
*/
|
||||
|
||||
if (!_cups_strcasecmp(start, "AllowRC4"))
|
||||
options |= _HTTP_TLS_ALLOW_RC4;
|
||||
else if (!_cups_strcasecmp(start, "AllowSSL3"))
|
||||
options |= _HTTP_TLS_ALLOW_SSL3;
|
||||
else if (!_cups_strcasecmp(start, "None"))
|
||||
options = 0;
|
||||
}
|
||||
|
||||
_httpTLSSetOptions(options);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set values...
|
||||
*/
|
||||
|
||||
if (cg->encryption == (http_encryption_t)-1 && cups_encryption)
|
||||
{
|
||||
if (!_cups_strcasecmp(cups_encryption, "never"))
|
||||
cg->encryption = HTTP_ENCRYPTION_NEVER;
|
||||
else if (!_cups_strcasecmp(cups_encryption, "always"))
|
||||
cg->encryption = HTTP_ENCRYPTION_ALWAYS;
|
||||
else if (!_cups_strcasecmp(cups_encryption, "required"))
|
||||
cg->encryption = HTTP_ENCRYPTION_REQUIRED;
|
||||
else
|
||||
cg->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
}
|
||||
|
||||
if ((!cg->server[0] || !cg->ipp_port) && cups_server)
|
||||
cupsSetServer(cups_server);
|
||||
|
||||
if (!cg->server[0])
|
||||
{
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
/*
|
||||
* If we are compiled with domain socket support, only use the
|
||||
* domain socket if it exists and has the right permissions...
|
||||
*/
|
||||
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
(sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
||||
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
cups_server = "localhost";
|
||||
|
||||
cupsSetServer(cups_server);
|
||||
}
|
||||
if (!cg->server[0] || !cg->ipp_port)
|
||||
cupsSetServer(cc.server_name);
|
||||
|
||||
if (!cg->ipp_port)
|
||||
{
|
||||
@@ -1101,83 +921,348 @@ cups_read_client_conf(
|
||||
}
|
||||
|
||||
if (!cg->user[0])
|
||||
{
|
||||
if (cups_user)
|
||||
strlcpy(cg->user, cups_user, sizeof(cg->user));
|
||||
else
|
||||
{
|
||||
#ifdef WIN32
|
||||
/*
|
||||
* Get the current user name from the OS...
|
||||
*/
|
||||
|
||||
DWORD size; /* Size of string */
|
||||
|
||||
size = sizeof(cg->user);
|
||||
if (!GetUserName(cg->user, &size))
|
||||
#else
|
||||
/*
|
||||
* Try the USER environment variable as the default username...
|
||||
*/
|
||||
|
||||
const char *envuser = getenv("USER");
|
||||
/* Default username */
|
||||
struct passwd *pw = NULL; /* Account information */
|
||||
|
||||
if (envuser)
|
||||
{
|
||||
/*
|
||||
* Validate USER matches the current UID, otherwise don't allow it to
|
||||
* override things... This makes sure that printing after doing su or
|
||||
* sudo records the correct username.
|
||||
*/
|
||||
|
||||
if ((pw = getpwnam(envuser)) != NULL && pw->pw_uid != getuid())
|
||||
pw = NULL;
|
||||
}
|
||||
|
||||
if (!pw)
|
||||
pw = getpwuid(getuid());
|
||||
|
||||
if (pw)
|
||||
strlcpy(cg->user, pw->pw_name, sizeof(cg->user));
|
||||
else
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
/*
|
||||
* Use the default "unknown" user name...
|
||||
*/
|
||||
|
||||
strlcpy(cg->user, "unknown", sizeof(cg->user));
|
||||
}
|
||||
}
|
||||
}
|
||||
strlcpy(cg->user, cc.user, sizeof(cg->user));
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if (!cups_gssservicename)
|
||||
cups_gssservicename = CUPS_DEFAULT_GSSSERVICENAME;
|
||||
|
||||
strlcpy(cg->gss_service_name, cups_gssservicename,
|
||||
sizeof(cg->gss_service_name));
|
||||
if (!cg->gss_service_name[0])
|
||||
strlcpy(cg->gss_service_name, cc.gss_service_name, sizeof(cg->gss_service_name));
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if (cups_anyroot)
|
||||
cg->any_root = !_cups_strcasecmp(cups_anyroot, "yes") ||
|
||||
!_cups_strcasecmp(cups_anyroot, "on") ||
|
||||
!_cups_strcasecmp(cups_anyroot, "true");
|
||||
if (cg->any_root < 0)
|
||||
cg->any_root = cc.any_root;
|
||||
|
||||
if (cups_expiredcerts)
|
||||
cg->expired_certs = !_cups_strcasecmp(cups_expiredcerts, "yes") ||
|
||||
!_cups_strcasecmp(cups_expiredcerts, "on") ||
|
||||
!_cups_strcasecmp(cups_expiredcerts, "true");
|
||||
if (cg->expired_certs < 0)
|
||||
cg->expired_certs = cc.expired_certs;
|
||||
|
||||
if (cups_validatecerts)
|
||||
cg->validate_certs = !_cups_strcasecmp(cups_validatecerts, "yes") ||
|
||||
!_cups_strcasecmp(cups_validatecerts, "on") ||
|
||||
!_cups_strcasecmp(cups_validatecerts, "true");
|
||||
if (cg->validate_certs < 0)
|
||||
cg->validate_certs = cc.validate_certs;
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
_httpTLSSetOptions(cc.ssl_options);
|
||||
#endif /* HAVE_SSL */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usersys.c 12215 2014-10-20 18:24:56Z msweet $".
|
||||
* 'cups_boolean_value()' - Convert a string to a boolean value.
|
||||
*/
|
||||
|
||||
static int /* O - Boolean value */
|
||||
cups_boolean_value(const char *value) /* I - String value */
|
||||
{
|
||||
return (!_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "on") || !_cups_strcasecmp(value, "true"));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_finalize_client_conf()' - Finalize client.conf values.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_finalize_client_conf(
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
const char *value; /* Environment variable */
|
||||
|
||||
|
||||
if ((value = getenv("CUPS_ANYROOT")) != NULL)
|
||||
cc->any_root = cups_boolean_value(value);
|
||||
|
||||
if ((value = getenv("CUPS_ENCRYPTION")) != NULL)
|
||||
cups_set_encryption(cc, value);
|
||||
|
||||
if ((value = getenv("CUPS_EXPIREDCERTS")) != NULL)
|
||||
cc->expired_certs = cups_boolean_value(value);
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if ((value = getenv("CUPS_GSSSERVICENAME")) != NULL)
|
||||
cups_set_gss_service_name(cc, value);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if ((value = getenv("CUPS_SERVER")) != NULL)
|
||||
cups_set_server_name(cc, value);
|
||||
|
||||
if ((value = getenv("CUPS_USER")) != NULL)
|
||||
cups_set_user(cc, value);
|
||||
|
||||
if ((value = getenv("CUPS_VALIDATECERTS")) != NULL)
|
||||
cc->validate_certs = cups_boolean_value(value);
|
||||
|
||||
/*
|
||||
* Then apply defaults for those values that haven't been set...
|
||||
*/
|
||||
|
||||
if (cc->any_root < 0)
|
||||
cc->any_root = 1;
|
||||
|
||||
if (cc->encryption == (http_encryption_t)-1)
|
||||
cc->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
|
||||
if (cc->expired_certs < 0)
|
||||
cc->expired_certs = 1;
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
if (!cc->gss_service_name[0])
|
||||
cups_set_gss_service_name(cc, CUPS_DEFAULT_GSSSERVICENAME);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
if (!cc->server_name[0])
|
||||
{
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
/*
|
||||
* If we are compiled with domain socket support, only use the
|
||||
* domain socket if it exists and has the right permissions...
|
||||
*/
|
||||
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
(sockinfo.st_mode & S_IRWXO) == S_IRWXO)
|
||||
cups_set_server_name(cc, CUPS_DEFAULT_DOMAINSOCKET);
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
cups_set_server_name(cc, "localhost");
|
||||
}
|
||||
|
||||
if (!cc->user[0])
|
||||
{
|
||||
#ifdef WIN32
|
||||
/*
|
||||
* Get the current user name from the OS...
|
||||
*/
|
||||
|
||||
DWORD size; /* Size of string */
|
||||
|
||||
size = sizeof(cc->user);
|
||||
if (!GetUserName(cc->user, &size))
|
||||
#else
|
||||
/*
|
||||
* Try the USER environment variable as the default username...
|
||||
*/
|
||||
|
||||
const char *envuser = getenv("USER");
|
||||
/* Default username */
|
||||
struct passwd *pw = NULL; /* Account information */
|
||||
|
||||
if (envuser)
|
||||
{
|
||||
/*
|
||||
* Validate USER matches the current UID, otherwise don't allow it to
|
||||
* override things... This makes sure that printing after doing su
|
||||
* or sudo records the correct username.
|
||||
*/
|
||||
|
||||
if ((pw = getpwnam(envuser)) != NULL && pw->pw_uid != getuid())
|
||||
pw = NULL;
|
||||
}
|
||||
|
||||
if (!pw)
|
||||
pw = getpwuid(getuid());
|
||||
|
||||
if (pw)
|
||||
strlcpy(cc->user, pw->pw_name, sizeof(cc->user));
|
||||
else
|
||||
#endif /* WIN32 */
|
||||
{
|
||||
/*
|
||||
* Use the default "unknown" user name...
|
||||
*/
|
||||
|
||||
strlcpy(cc->user, "unknown", sizeof(cc->user));
|
||||
}
|
||||
}
|
||||
|
||||
if (cc->validate_certs < 0)
|
||||
cc->validate_certs = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_init_client_conf()' - Initialize client.conf values.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_init_client_conf(
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
/*
|
||||
* Clear all values to "not set"...
|
||||
*/
|
||||
|
||||
memset(cc, 0, sizeof(_cups_client_conf_t));
|
||||
|
||||
cc->encryption = (http_encryption_t)-1;
|
||||
cc->any_root = -1;
|
||||
cc->expired_certs = -1;
|
||||
cc->validate_certs = -1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_read_client_conf()' - Read a client.conf file.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_read_client_conf(
|
||||
cups_file_t *fp, /* I - File to read */
|
||||
_cups_client_conf_t *cc) /* I - client.conf values */
|
||||
{
|
||||
int linenum; /* Current line number */
|
||||
char line[1024], /* Line from file */
|
||||
*value; /* Pointer into line */
|
||||
|
||||
|
||||
/*
|
||||
* Read from the file...
|
||||
*/
|
||||
|
||||
linenum = 0;
|
||||
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
|
||||
{
|
||||
if (!_cups_strcasecmp(line, "Encryption") && value)
|
||||
cups_set_encryption(cc, value);
|
||||
#ifndef __APPLE__
|
||||
/*
|
||||
* The ServerName directive is not supported on OS X due to app
|
||||
* sandboxing restrictions, i.e. not all apps request network access.
|
||||
*/
|
||||
else if (!_cups_strcasecmp(line, "ServerName") && value)
|
||||
cups_set_server_name(cc, value);
|
||||
#endif /* !__APPLE__ */
|
||||
else if (!_cups_strcasecmp(line, "User") && value)
|
||||
cups_set_user(cc, value);
|
||||
else if (!_cups_strcasecmp(line, "AllowAnyRoot") && value)
|
||||
cc->any_root = cups_boolean_value(value);
|
||||
else if (!_cups_strcasecmp(line, "AllowExpiredCerts") &&
|
||||
value)
|
||||
cc->expired_certs = cups_boolean_value(value);
|
||||
else if (!_cups_strcasecmp(line, "ValidateCerts") && value)
|
||||
cc->validate_certs = cups_boolean_value(value);
|
||||
#ifdef HAVE_GSSAPI
|
||||
else if (!_cups_strcasecmp(line, "GSSServiceName") && value)
|
||||
cups_set_gss_service_name(cc, value);
|
||||
#endif /* HAVE_GSSAPI */
|
||||
#ifdef HAVE_SSL
|
||||
else if (!_cups_strcasecmp(line, "SSLOptions") && value)
|
||||
cups_set_ssl_options(cc, value);
|
||||
#endif /* HAVE_SSL */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_encryption()' - Set the Encryption value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_encryption(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
if (!_cups_strcasecmp(value, "never"))
|
||||
cc->encryption = HTTP_ENCRYPTION_NEVER;
|
||||
else if (!_cups_strcasecmp(value, "always"))
|
||||
cc->encryption = HTTP_ENCRYPTION_ALWAYS;
|
||||
else if (!_cups_strcasecmp(value, "required"))
|
||||
cc->encryption = HTTP_ENCRYPTION_REQUIRED;
|
||||
else
|
||||
cc->encryption = HTTP_ENCRYPTION_IF_REQUESTED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_gss_service_name()' - Set the GSSServiceName value.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
static void
|
||||
cups_set_gss_service_name(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
strlcpy(cc->gss_service_name, value, sizeof(cc->gss_service_name));
|
||||
}
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_server_name()' - Set the ServerName value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_server_name(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
strlcpy(cc->server_name, value, sizeof(cc->server_name));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_ssl_options()' - Set the SSLOptions value.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
static void
|
||||
cups_set_ssl_options(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
/*
|
||||
* SSLOptions [AllowRC4] [AllowSSL3] [None]
|
||||
*/
|
||||
|
||||
int options = 0; /* SSL/TLS options */
|
||||
char temp[256], /* Copy of value */
|
||||
*start, /* Start of option */
|
||||
*end; /* End of option */
|
||||
|
||||
|
||||
strlcpy(temp, value, sizeof(temp));
|
||||
|
||||
for (start = temp; *start; start = end)
|
||||
{
|
||||
/*
|
||||
* Find end of keyword...
|
||||
*/
|
||||
|
||||
end = start;
|
||||
while (*end && !_cups_isspace(*end))
|
||||
end ++;
|
||||
|
||||
if (*end)
|
||||
*end++ = '\0';
|
||||
|
||||
/*
|
||||
* Compare...
|
||||
*/
|
||||
|
||||
if (!_cups_strcasecmp(start, "AllowRC4"))
|
||||
options |= _HTTP_TLS_ALLOW_RC4;
|
||||
else if (!_cups_strcasecmp(start, "AllowSSL3"))
|
||||
options |= _HTTP_TLS_ALLOW_SSL3;
|
||||
else if (!_cups_strcasecmp(start, "None"))
|
||||
options = 0;
|
||||
}
|
||||
|
||||
cc->ssl_options = options;
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_set_user()' - Set the User value.
|
||||
*/
|
||||
|
||||
static void
|
||||
cups_set_user(
|
||||
_cups_client_conf_t *cc, /* I - client.conf values */
|
||||
const char *value) /* I - Value */
|
||||
{
|
||||
strlcpy(cc->user, value, sizeof(cc->user));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usersys.c 12481 2015-02-03 12:45:14Z msweet $".
|
||||
*/
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: util.c 12220 2014-10-20 22:03:01Z msweet $"
|
||||
* "$Id: util.c 12449 2015-01-29 20:32:16Z msweet $"
|
||||
*
|
||||
* Printing utilities for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1509,7 +1509,7 @@ cups_get_printer_uri(
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
|
||||
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requested-attributes", sizeof(requested_attrs) / sizeof(requested_attrs[0]), NULL, requested_attrs);
|
||||
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(requested_attrs) / sizeof(requested_attrs[0]), NULL, requested_attrs);
|
||||
|
||||
/*
|
||||
* Do the request and get back a response...
|
||||
@@ -1655,5 +1655,5 @@ cups_get_printer_uri(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: util.c 12220 2014-10-20 22:03:01Z msweet $".
|
||||
* End of "$Id: util.c 12449 2015-01-29 20:32:16Z msweet $".
|
||||
*/
|
||||
|
||||
+6
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: versioning.h 11232 2013-08-12 19:33:47Z msweet $"
|
||||
* "$Id: versioning.h 12419 2015-01-22 15:51:20Z msweet $"
|
||||
*
|
||||
* API versioning definitions for CUPS.
|
||||
*
|
||||
@@ -53,6 +53,9 @@
|
||||
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
|
||||
# define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __attribute__((unavailable))
|
||||
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER */
|
||||
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
|
||||
# define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER __attribute__((unavailable))
|
||||
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER */
|
||||
# define _CUPS_API_1_1_19 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
|
||||
# define _CUPS_API_1_1_20 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
|
||||
# define _CUPS_API_1_1_21 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
|
||||
@@ -62,7 +65,7 @@
|
||||
# define _CUPS_API_1_5 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
|
||||
# define _CUPS_API_1_6 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
|
||||
# define _CUPS_API_1_7 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
|
||||
# define _CUPS_API_2_0
|
||||
# define _CUPS_API_2_0 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
|
||||
# else
|
||||
# define _CUPS_API_1_1_19
|
||||
# define _CUPS_API_1_1_20
|
||||
@@ -159,5 +162,5 @@
|
||||
#endif /* !_CUPS_VERSIONING_H_ */
|
||||
|
||||
/*
|
||||
* End of "$Id: versioning.h 11232 2013-08-12 19:33:47Z msweet $".
|
||||
* End of "$Id: versioning.h 12419 2015-01-22 15:51:20Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Home - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">Home</a></li>
|
||||
<li><a href="/admin">Verwaltung</a></li>
|
||||
<li><a href="/classes/">Klassen</a></li>
|
||||
<li><a href="/help/">Hilfe</a></li>
|
||||
<li><a href="/jobs/">Aufträge</a></li>
|
||||
<li><a href="/printers/">Drucker</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS 2.0.2</h1>
|
||||
<p>CUPS basiert auf Standards, Open Source Drucksystem entwickelt durch <a href="http://www.apple.com/">Apple Inc.</a> für OS X<sup>®</sup> und andere UNIX<sup>®</sup>-artige Betriebssysteme.</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<h2>CUPS für Benutzer</h2>
|
||||
<p><a href="help/overview.html">Überblick über CUPS</a></p>
|
||||
<p><a href="help/options.html">Befehlszeilen-Druck und Optionen</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups">Benutzerforum</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS für Administratoren</h2>
|
||||
<p><a href="admin">Drucker und Klassen hinzufügen</a></p>
|
||||
<p><a href="help/policies.html">Betriebs-Richtlinie festlegen</a></p>
|
||||
<p><a href="help/network.html">Benutzung von Netzwerk-Druckern</a></p>
|
||||
<p><a href="help/man-cupsd.conf.html">cupsd.conf Referenz</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS für Entwickler</h2>
|
||||
<p><a href="help/api-overview.html">Einführung in die CUPS Programmierung</a></p>
|
||||
<p><a href="help/api-cups.html">CUPS API</a></p>
|
||||
<p><a href="help/api-filter.html">Filter und Backend Programmierung</a></p>
|
||||
<p><a href="help/api-httpipp.html">HTTP und IPP APIs</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups-devel">Entwicklerforum</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS und das CUPS Logo sind Warenzeichen der <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2015 Apple Inc. Alle Rechte vorbehalten.</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2014 Apple Inc. Todos los derechos reservados.</div>
|
||||
<div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor © 2007-2015 Apple Inc. Todos los derechos reservados.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -21,7 +21,7 @@ Comment lines start with the # character.
|
||||
The following directives are understood by
|
||||
<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8):</a>
|
||||
<dl class="man">
|
||||
<dt><b>AccessLog</b>
|
||||
<dt><a name="AccessLog"></a><b>AccessLog</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog </b><i>filename</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the access log filename.
|
||||
@@ -34,7 +34,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
</pre>
|
||||
The default is "/var/log/cups/access_log".
|
||||
<dt><b>ConfigFilePerm </b><i>mode</i>
|
||||
<dt><a name="ConfigFilePerm"></a><b>ConfigFilePerm </b><i>mode</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the permissions for all configuration files that the scheduler writes.
|
||||
The default is "0644" on OS X and "0640" on all other operating systems.
|
||||
</dl>
|
||||
@@ -42,13 +42,13 @@ The default is "0644" on OS X and "0640" on all other operating systems.
|
||||
This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system.
|
||||
There is no way to disable this security feature.
|
||||
<dl class="man">
|
||||
<dt><b>DataDir </b><i>path</i>
|
||||
<dt><a name="DataDir"></a><b>DataDir </b><i>path</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory where data files can be found.
|
||||
The default is usually "/usr/share/cups".
|
||||
<dt><b>DocumentRoot </b><i>directory</i>
|
||||
<dt><a name="DocumentRoot"></a><b>DocumentRoot </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the root directory for the CUPS web interface content.
|
||||
The default is usually "/usr/share/doc/cups".
|
||||
<dt><b>ErrorLog</b>
|
||||
<dt><a name="ErrorLog"></a><b>ErrorLog</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog </b><i>filename</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the error log filename.
|
||||
@@ -61,7 +61,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
</pre>
|
||||
The default is "/var/log/cups/error_log".
|
||||
<dt><b>FatalErrors none</b>
|
||||
<dt><a name="FatalErrors"></a><b>FatalErrors none</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>FatalErrors all </b><i>-kind </i>[ ... <i>-kind </i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>FatalErrors </b><i>kind </i>[ ... <i>kind </i>]
|
||||
<dd style="margin-left: 5.0em">Specifies which errors are fatal, causing the scheduler to exit.
|
||||
@@ -84,17 +84,17 @@ The <i>kind</i> strings are:
|
||||
<dt><b>permissions</b>
|
||||
<dd style="margin-left: 5.0em">Bad startup file permissions are fatal, for example shared TLS certificate and key files with world-read permissions.
|
||||
</div>
|
||||
<dt><b>FileDevice Yes</b>
|
||||
<dt><a name="FileDevice"></a><b>FileDevice Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>FileDevice No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the file pseudo-device can be used for new printer queues.
|
||||
The URI "file:///dev/null" is always allowed.
|
||||
<dt><b>Group </b><i>group-name-or-number</i>
|
||||
<dt><a name="Group"></a><b>Group </b><i>group-name-or-number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the group name or ID that will be used when executing external programs.
|
||||
The default group is operating system specific but is usually "lp" or "nobody".
|
||||
<dt><b>LogFilePerm </b><i>mode</i>
|
||||
<dt><a name="LogFilePerm"></a><b>LogFilePerm </b><i>mode</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the permissions of all log files that the scheduler writes.
|
||||
The default is "0644".
|
||||
<dt><b>PageLog </b>[ <i>filename</i> ]
|
||||
<dt><a name="PageLog"></a><b>PageLog </b>[ <i>filename</i> ]
|
||||
<dd style="margin-left: 5.0em"><dt><b>PageLog syslog</b>
|
||||
<dd style="margin-left: 5.0em">Defines the page log filename.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
@@ -106,40 +106,41 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
</pre>
|
||||
The default is "/var/log/cups/page_log".
|
||||
<dt><b>RemoteRoot </b><i>username</i>
|
||||
<dt><a name="RemoteRoot"></a><b>RemoteRoot </b><i>username</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the username that is associated with unauthenticated accesses by clients claiming to be the root user.
|
||||
The default is "remroot".
|
||||
<dt><b>RequestRoot </b><i>directory</i>
|
||||
<dt><a name="RequestRoot"></a><b>RequestRoot </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory that contains print jobs and other HTTP request data.
|
||||
The default is "/var/spool/cups".
|
||||
<dt><b>Sandboxing off</b>
|
||||
<dt><a name="Sandboxing"></a><b>Sandboxing off</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Sandboxing relaxed</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Sandboxing strict</b>
|
||||
<dd style="margin-left: 5.0em">Specifies the level of security sandboxing that is applied to print filters, backends, and other child processes of the scheduler.
|
||||
The default is "strict".
|
||||
This directive is currently only used/supported on OS X.
|
||||
<dt><b>ServerBin </b><i>directory</i>
|
||||
<dt><a name="ServerBin"></a><b>ServerBin </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory containing the backends, CGI programs, filters, helper programs, notifiers, and port monitors.
|
||||
The default is "/usr/lib/cups" or "/usr/libexec/cups" depending on the platform.
|
||||
<dt><b>ServerKeychain </b><i>path</i>
|
||||
<dt><a name="ServerKeychain"></a><b>ServerKeychain </b><i>path</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the location of TLS certificates and private keys.
|
||||
The default is "/Library/Keychains/System.keychain" on OS X and "/etc/cups/ssl" on all other operating systems.
|
||||
<dt><b>ServerRoot </b><i>directory</i>
|
||||
OS X uses its keychain database to store certificates and keys while other platforms use separate files in the specified directory, *.crt for PEM-encoded certificates and *.key for PEM-encoded private keys.
|
||||
<dt><a name="ServerRoot"></a><b>ServerRoot </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory containing the server configuration files.
|
||||
The default is "/etc/cups".
|
||||
<dt><b>SyncOnClose Yes</b>
|
||||
<dt><a name="SyncOnClose"></a><b>SyncOnClose Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>SyncOnClose No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the scheduler calls
|
||||
<b>fsync</b>(2)
|
||||
after writing configuration or state files.
|
||||
The default is "No".
|
||||
<dt><b>SystemGroup </b><i>group-name </i>[ ... <i>group-name</i> ]
|
||||
<dt><a name="SystemGroup"></a><b>SystemGroup </b><i>group-name </i>[ ... <i>group-name</i> ]
|
||||
<dd style="margin-left: 5.0em">Specifies the group(s) to use for <i>@SYSTEM</i> group authentication.
|
||||
The default contains "admin", "lpadmin", "root", "sys", and/or "system".
|
||||
<dt><b>TempDir </b><i>directory</i>
|
||||
<dt><a name="TempDir"></a><b>TempDir </b><i>directory</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the directory where temporary files are stored.
|
||||
The default is "/var/spool/cups/tmp".
|
||||
<dt><b>User </b><i>username</i>
|
||||
<dt><a name="User"></a><b>User </b><i>username</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the user name or ID that is used when running external programs.
|
||||
The default is "lp".
|
||||
</dl>
|
||||
@@ -154,7 +155,7 @@ The default is "lp".
|
||||
<a href="man-subscriptions.conf.html?TOPIC=Man+Pages"><b>subscriptions.conf</b>(5),</a>
|
||||
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
|
||||
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
|
||||
Copyright © 2007-2014 by Apple Inc.
|
||||
Copyright © 2007-2015 by Apple Inc.
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -28,7 +28,7 @@ Comment lines start with the # character.
|
||||
The following top-level directives are understood by
|
||||
<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8):</a>
|
||||
<dl class="man">
|
||||
<dt><b>AccessLogLevel config</b>
|
||||
<dt><a name="AccessLogLevel"></a><b>AccessLogLevel config</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLogLevel actions</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLogLevel all</b>
|
||||
<dd style="margin-left: 5.0em">Specifies the logging level for the AccessLog file.
|
||||
@@ -36,67 +36,67 @@ The "config" level logs when printers and classes are added, deleted, or modifie
|
||||
The "actions" level logs when print jobs are submitted, held, released, modified, or canceled, and any of the conditions for "config".
|
||||
The "all" level logs all requests.
|
||||
The default access log level is "actions".
|
||||
<dt><b>AutoPurgeJobs Yes</b>
|
||||
<dt><a name="AutoPurgeJobs"></a><b>AutoPurgeJobs Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AutoPurgeJobs No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether to purge job history data automatically when it is no longer required for quotas.
|
||||
The default is "No".
|
||||
<dt><b>BrowseLocalProtocols all</b>
|
||||
<dt><a name="BrowseLocalProtocols"></a><b>BrowseLocalProtocols all</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>BrowseLocalProtocols dnssd</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>BrowseLocalProtocols none</b>
|
||||
<dd style="margin-left: 5.0em">Specifies which protocols to use for local printer sharing.
|
||||
The default is "dnssd" on systems that support Bonjour and "none" otherwise.
|
||||
<dt><b>BrowseWebIF Yes</b>
|
||||
<dt><a name="BrowseWebIF"></a><b>BrowseWebIF Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>BrowseWebIF No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether the CUPS web interface is advertised.
|
||||
The default is "No".
|
||||
<dt><b>Browsing Yes</b>
|
||||
<dt><a name="Browsing"></a><b>Browsing Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Browsing No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether shared printers are advertised.
|
||||
The default is "No".
|
||||
<dt><b>Classification </b><i>banner</i>
|
||||
<dt><a name="Classification"></a><b>Classification </b><i>banner</i>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies the security classification of the server.
|
||||
Any valid banner name can be used, including "classified", "confidential", "secret", "topsecret", and "unclassified", or the banner can be omitted to disable secure printing functions.
|
||||
The default is no classification banner.
|
||||
<dt><b>ClassifyOverride Yes</b>
|
||||
<dt><a name="ClassifyOverride"></a><b>ClassifyOverride Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ClassifyOverride No</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies whether users may override the classification (cover page) of individual print jobs using the "job-sheets" option.
|
||||
The default is "No".
|
||||
<dt><b>DefaultAuthType Basic</b>
|
||||
<dt><a name="DefaultAuthType"></a><b>DefaultAuthType Basic</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultAuthType Negotiate</b>
|
||||
<dd style="margin-left: 5.0em"><br>
|
||||
Specifies the default type of authentication to use.
|
||||
The default is "Basic".
|
||||
<dt><b>DefaultEncryption Never</b>
|
||||
<dt><a name="DefaultEncryption"></a><b>DefaultEncryption Never</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultEncryption IfRequested</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultEncryption Required</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether encryption will be used for authenticated requests.
|
||||
The default is "Required".
|
||||
<dt><b>DefaultLanguage </b><i>locale</i>
|
||||
<dt><a name="DefaultLanguage"></a><b>DefaultLanguage </b><i>locale</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default language to use for text and web content.
|
||||
The default is "en".
|
||||
<dt><b>DefaultPaperSize Auto</b>
|
||||
<dt><a name="DefaultPaperSize"></a><b>DefaultPaperSize Auto</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultPaperSize None</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultPaperSize </b><i>sizename</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default paper size for new print queues. "Auto" uses a locale-specific default, while "None" specifies there is no default paper size.
|
||||
Specific size names are typically "Letter" or "A4".
|
||||
The default is "Auto".
|
||||
<dt><b>DefaultPolicy </b><i>policy-name</i>
|
||||
<dt><a name="DefaultPolicy"></a><b>DefaultPolicy </b><i>policy-name</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the default access policy to use.
|
||||
The default access policy is "default".
|
||||
<dt><b>DefaultShared Yes</b>
|
||||
<dt><a name="DefaultShared"></a><b>DefaultShared Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>DefaultShared No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether local printers are shared by default.
|
||||
The default is "Yes".
|
||||
<dt><b>DirtyCleanInterval </b><i>seconds</i>
|
||||
<dt><a name="DirtyCleanInterval"></a><b>DirtyCleanInterval </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the delay for updating of configuration and state files.
|
||||
A value of 0 causes the update to happen as soon as possible, typically within a few milliseconds.
|
||||
The default value is "30".
|
||||
<dt><b>ErrorPolicy abort-job</b>
|
||||
<dt><a name="ErrorPolicy"></a><b>ErrorPolicy abort-job</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should be aborted (discarded) unless otherwise specified for the printer.
|
||||
<dt><b>ErrorPolicy retry-job</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should be retried at a later time unless otherwise specified for the printer.
|
||||
@@ -104,24 +104,24 @@ The default value is "30".
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should be retried immediately unless otherwise specified for the printer.
|
||||
<dt><b>ErrorPolicy stop-printer</b>
|
||||
<dd style="margin-left: 5.0em">Specifies that a failed print job should stop the printer unless otherwise specified for the printer. The 'stop-printer' error policy is the default.
|
||||
<dt><b>FilterLimit </b><i>limit</i>
|
||||
<dt><a name="FilterLimit"></a><b>FilterLimit </b><i>limit</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum cost of filters that are run concurrently, which can be used to minimize disk, memory, and CPU resource problems.
|
||||
A limit of 0 disables filter limiting.
|
||||
An average print to a non-PostScript printer needs a filter limit of about 200.
|
||||
A PostScript printer needs about half that (100).
|
||||
Setting the limit below these thresholds will effectively limit the scheduler to printing a single job at any time.
|
||||
The default limit is "0".
|
||||
<dt><b>FilterNice </b><i>nice-value</i>
|
||||
<dt><a name="FilterNice"></a><b>FilterNice </b><i>nice-value</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the scheduling priority (
|
||||
<b>nice</b>(8)
|
||||
value) of filters that are run to print a job.
|
||||
The nice value ranges from 0, the highest priority, to 19, the lowest priority.
|
||||
The default is 0.
|
||||
<dt><b>GSSServiceName </b><i>name</i>
|
||||
<dt><a name="GSSServiceName"></a><b>GSSServiceName </b><i>name</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the service name when using Kerberos authentication.
|
||||
The default service name is "http."
|
||||
<dt><b>HostNameLookups On</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>HostNameLookups Off</b>
|
||||
<dd style="margin-left: 5.0em"><dt><a name="HostNameLookups"></a><b>HostNameLookups Off</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>HostNameLookups Double</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether to do reverse lookups on connecting clients.
|
||||
The "Double" setting causes
|
||||
@@ -130,50 +130,50 @@ to verify that the hostname resolved from the address matches one of the address
|
||||
Double lookups also prevent clients with unregistered addresses from connecting to your server.
|
||||
The default is "Off" to avoid the potential server performance problems with hostname lookups.
|
||||
Only set this option to "On" or "Double" if absolutely required.
|
||||
<dt><b>JobKillDelay </b><i>seconds</i>
|
||||
<dt><a name="JobKillDelay"></a><b>JobKillDelay </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of seconds to wait before killing the filters and backend associated with a canceled or held job.
|
||||
The default is "30".
|
||||
<dt><b>JobRetryInterval </b><i>seconds</i>
|
||||
<dt><a name="JobRetryInterval"></a><b>JobRetryInterval </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the interval between retries of jobs in seconds.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "30".
|
||||
<dt><b>JobRetryLimit </b><i>count</i>
|
||||
<dt><a name="JobRetryLimit"></a><b>JobRetryLimit </b><i>count</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of retries that are done for jobs.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "5".
|
||||
<dt><b>KeepAlive Yes</b>
|
||||
<dt><a name="KeepAlive"></a><b>KeepAlive Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>KeepAlive No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether to support HTTP keep-alive connections.
|
||||
The default is "Yes".
|
||||
<dt><b>KeepAliveTimeout </b><i>seconds</i>
|
||||
<dt><a name="KeepAliveTimeout"></a><b>KeepAliveTimeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies how long an idle client connection remains open.
|
||||
The default is "30".
|
||||
<dt><b><Limit </b><i>operation </i>...<b>> </b>... <b></Limit></b>
|
||||
<dt><a name="LimitIPP"></a><b><Limit </b><i>operation </i>...<b>> </b>... <b></Limit></b>
|
||||
<dd style="margin-left: 5.0em">Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATIONS".
|
||||
<dt><b><Limit </b><i>method </i>...<b>> </b>... <b></Limit></b>
|
||||
<dd style="margin-left: 5.0em"><dt><b><LimitExcept </b><i>method </i>...<b>> </b>... <b></LimitExcept></b>
|
||||
<dt><a name="Limit"></a><b><Limit </b><i>method </i>...<b>> </b>... <b></Limit></b>
|
||||
<dd style="margin-left: 5.0em"><dt><a name="LimitExcept"></a><b><LimitExcept </b><i>method </i>...<b>> </b>... <b></LimitExcept></b>
|
||||
<dd style="margin-left: 5.0em">Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHODS".
|
||||
<dt><b>LimitRequestBody </b><i>size</i>
|
||||
<dt><a name="LimitRequestBody"></a><b>LimitRequestBody </b><i>size</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum size of print files, IPP requests, and HTML form data.
|
||||
The default is "0" which disables the limit check.
|
||||
<dt><b>Listen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dt><a name="Listen"></a><b>Listen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Listen [</b><i>ipv6-address</i><b>]:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Listen *:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>Listen </b><i>/path/to/domain/socket</i>
|
||||
<dd style="margin-left: 5.0em">Listens to the specified address and port or domain socket path for connections.
|
||||
Multiple Listen directives can be provided to listen on multiple addresses.
|
||||
The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.
|
||||
<dt><b>ListenBackLog </b><i>number</i>
|
||||
<dt><a name="ListenBackLog"></a><b>ListenBackLog </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of pending connections that will be allowed.
|
||||
This normally only affects very busy servers that have reached the MaxClients limit, but can also be triggered by large numbers of simultaneous connections.
|
||||
When the limit is reached, the operating system will refuse additional connections until the scheduler can accept the pending ones.
|
||||
The default is the OS-defined default limit, typically either "5" for older operating systems or "128" for newer operating systems.
|
||||
<dt><b><Location </b><i>/path</i><b>> </b>... <b></Location></b>
|
||||
<dt><a name="Location"></a><b><Location </b><i>/path</i><b>> </b>... <b></Location></b>
|
||||
<dd style="margin-left: 5.0em">Specifies access control for the named location.
|
||||
Paths are documented below in the section "LOCATION PATHS".
|
||||
<dt><b>LogDebugHistory </b><i>number</i>
|
||||
<dt><a name="LogDebugHistory"></a><b>LogDebugHistory </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the number of debugging messages that are retained for logging if an error occurs in a print job. Debug messages are logged regardless of the LogLevel setting.
|
||||
<dt><b>LogLevel </b>none
|
||||
<dt><a name="LogLevel"></a><b>LogLevel </b>none
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogLevel </b>emerg
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogLevel </b>alert
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogLevel </b>crit
|
||||
@@ -186,45 +186,45 @@ Paths are documented below in the section "LOCATION PATHS".
|
||||
<dd style="margin-left: 5.0em">Specifies the level of logging for the ErrorLog file.
|
||||
The value "none" stops all logging while "debug2" logs everything.
|
||||
The default is "warn".
|
||||
<dt><b>LogTimeFormat </b>standard
|
||||
<dt><a name="LogTimeFormat"></a><b>LogTimeFormat </b>standard
|
||||
<dd style="margin-left: 5.0em"><dt><b>LogTimeFormat </b>usecs
|
||||
<dd style="margin-left: 5.0em">Specifies the format of the date and time in the log files.
|
||||
The value "standard" is the default and logs whole seconds while "usecs" logs microseconds.
|
||||
<dt><b>MaxClients </b><i>number</i>
|
||||
<dt><a name="MaxClients"></a><b>MaxClients </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous clients that are allowed by the scheduler.
|
||||
The default is "100".
|
||||
<dt><b>MaxClientsPerHost </b><i>number</i>
|
||||
<dt><a name="MaxClientPerHost"></a><b>MaxClientsPerHost </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous clients that are allowed from a
|
||||
single address.
|
||||
The default is the MaxClients value.
|
||||
<dt><b>MaxCopies </b><i>number</i>
|
||||
<dt><a name="MaxCopies"></a><b>MaxCopies </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of copies that a user can print of each job.
|
||||
The default is "9999".
|
||||
<dt><b>MaxHoldTime </b><i>seconds</i>
|
||||
<dt><a name="MaxHoldTime"></a><b>MaxHoldTime </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum time a job may remain in the "indefinite" hold state before it is canceled.
|
||||
The default is "0" which disables cancellation of held jobs.
|
||||
<dt><b>MaxJobs </b><i>number</i>
|
||||
<dt><a name="MaxJobs"></a><b>MaxJobs </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous jobs that are allowed.
|
||||
Set to "0" to allow an unlimited number of jobs.
|
||||
The default is "500".
|
||||
<dt><b>MaxJobsPerPrinter </b><i>number</i>
|
||||
<dt><a name="MaxJobsPerPrinter"></a><b>MaxJobsPerPrinter </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous jobs that are allowed per printer.
|
||||
The default is "0" which allows up to MaxJobs jobs per printer.
|
||||
<dt><b>MaxJobsPerUser </b><i>number</i>
|
||||
<dt><a name="MaxJobsPerUser"></a><b>MaxJobsPerUser </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum number of simultaneous jobs that are allowed per user.
|
||||
The default is "0" which allows up to MaxJobs jobs per user.
|
||||
<dt><b>MaxJobTime </b><i>seconds</i>
|
||||
<dt><a name="MaxJobTime"></a><b>MaxJobTime </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum time a job may take to print before it is canceled.
|
||||
Set to "0" to disable cancellation of "stuck" jobs.
|
||||
The default is "10800" (3 hours).
|
||||
<dt><b>MaxLogSize </b><i>size</i>
|
||||
<dt><a name="MaxLogSize"></a><b>MaxLogSize </b><i>size</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum size of the log files before they are rotated.
|
||||
The value "0" disables log rotation.
|
||||
The default is "1048576" (1MB).
|
||||
<dt><b>MultipleOperationTimeout </b><i>seconds</i>
|
||||
<dt><a name="MultipleOperationTimeout"></a><b>MultipleOperationTimeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum amount of time to allow between files in a multiple file print job.
|
||||
The default is "300" (5 minutes).
|
||||
<dt><b>PageLogFormat </b><i>format-string</i>
|
||||
<dt><a name="PageLogFormat"></a><b>PageLogFormat </b><i>format-string</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the format of PageLog lines.
|
||||
Sequences beginning with percent (%) characters are replaced with the corresponding information, while all other characters are copied literally.
|
||||
The following percent sequences are recognized:
|
||||
@@ -241,45 +241,45 @@ The following percent sequences are recognized:
|
||||
|
||||
</pre>
|
||||
The default is "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".
|
||||
<dt><b>PassEnv </b><i>variable </i>[ ... <i>variable </i>]
|
||||
<dt><a name="PassEnv"></a><b>PassEnv </b><i>variable </i>[ ... <i>variable </i>]
|
||||
<dd style="margin-left: 5.0em">Passes the specified environment variable(s) to child processes.
|
||||
<dt><b><Policy </b><i>name</i><b>> </b>... <b></Policy></b>
|
||||
<dt><a name="Policy"></a><b><Policy </b><i>name</i><b>> </b>... <b></Policy></b>
|
||||
<dd style="margin-left: 5.0em">Specifies access control for the named policy.
|
||||
<dt><b>Port </b><i>number</i>
|
||||
<dt><a name="Port"></a><b>Port </b><i>number</i>
|
||||
<dd style="margin-left: 5.0em">Listens to the specified port number for connections.
|
||||
<dt><b>PreserveJobFiles Yes</b>
|
||||
<dt><a name="PreserveJobFiles"></a><b>PreserveJobFiles Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobFiles No</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobFiles </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies whether job files (documents) are preserved after a job is printed.
|
||||
If a numeric value is specified, job files are preserved for the indicated number of seconds after printing.
|
||||
The default is "86400" (preserve 1 day).
|
||||
<dt><b>PreserveJobHistory Yes</b>
|
||||
<dt><a name="PreserveJobHistory"></a><b>PreserveJobHistory Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobHistory No</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>PreserveJobHistory </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the job history is preserved after a job is printed.
|
||||
If a numeric value is specified, the job history is preserved for the indicated number of seconds after printing.
|
||||
If "Yes", the job history is preserved until the MaxJobs limit is reached.
|
||||
The default is "Yes".
|
||||
<dt><b>ReloadTimeout </b><i>seconds</i>
|
||||
<dt><a name="ReloadTimeout"></a><b>ReloadTimeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the amount of time to wait for job completion before restarting the scheduler.
|
||||
The default is "30".
|
||||
<dt><b>RIPCache </b><i>size</i>
|
||||
<dt><a name="RIPCache"></a><b>RIPCache </b><i>size</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the maximum amount of memory to use when converting documents into bitmaps for a printer.
|
||||
The default is "128m".
|
||||
<dt><b>ServerAdmin </b><i>email-address</i>
|
||||
<dt><a name="ServerAdmin"></a><b>ServerAdmin </b><i>email-address</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the email address of the server administrator.
|
||||
The default value is "root@ServerName".
|
||||
<dt><b>ServerAlias </b><i>hostname </i>[ ... <i>hostname </i>]
|
||||
<dt><a name="ServerAlias"></a><b>ServerAlias </b><i>hostname </i>[ ... <i>hostname </i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerAlias *</b>
|
||||
<dd style="margin-left: 5.0em">The ServerAlias directive is used for HTTP Host header validation when clients connect to the scheduler from external interfaces.
|
||||
Using the special name "*" can expose your system to known browser-based DNS rebinding attacks, even when accessing sites through a firewall.
|
||||
If the auto-discovery of alternate names does not work, we recommend listing each alternate name with a ServerAlias directive instead of using "*".
|
||||
<dt><b>ServerName </b><i>hostname</i>
|
||||
<dt><a name="ServerName"></a><b>ServerName </b><i>hostname</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the fully-qualified hostname of the server.
|
||||
The default is the value reported by the
|
||||
<b>hostname</b>(1)
|
||||
command.
|
||||
<dt><b>ServerTokens None</b>
|
||||
<dt><a name="ServerTokens"></a><b>ServerTokens None</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerTokens ProductOnly</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerTokens Major</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ServerTokens Minor</b>
|
||||
@@ -297,28 +297,28 @@ command.
|
||||
command.
|
||||
"Full" reports "CUPS 2.0.0 (UNAME) IPP/2.0".
|
||||
The default is "Minimal".
|
||||
<dt><b>SetEnv </b><i>variable value</i>
|
||||
<dt><a name="SetEnv"></a><b>SetEnv </b><i>variable value</i>
|
||||
<dd style="margin-left: 5.0em">Set the specified environment variable to be passed to child processes.
|
||||
<dt><dt><b>SSLListen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dt><a name="SSLListen"></a><b>SSLListen </b><i>ipv4-address</i><b>:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLListen [</b><i>ipv6-address</i><b>]:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLListen *:</b><i>port</i>
|
||||
<dd style="margin-left: 5.0em">Listens on the specified address and port for encrypted connections.
|
||||
<dt><b>SSLOptions </b>[<i>AllowRC4</i>] [<i>AllowSSL3</i>]
|
||||
<dt><a name="SSLOptions"></a><b>SSLOptions </b>[<i>AllowRC4</i>] [<i>AllowSSL3</i>]
|
||||
<dd style="margin-left: 5.0em"><dt><b>SSLOptions None</b>
|
||||
<dd style="margin-left: 5.0em">Sets encryption options.
|
||||
By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
|
||||
The <i>AllowRC4</i> option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
|
||||
The <i>AllowSSL3</i> option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
|
||||
<dt><b>SSLPort </b><i>port</i>
|
||||
<dt><a name="SSLPort"></a><b>SSLPort </b><i>port</i>
|
||||
<dd style="margin-left: 5.0em">Listens on the specified port for encrypted connections.
|
||||
<dt><b>StrictConformance Yes</b>
|
||||
<dt><a name="StrictConformance"></a><b>StrictConformance Yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>StrictConformance No</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the scheduler requires clients to strictly adhere to the IPP specifications.
|
||||
The default is "No".
|
||||
<dt><b>Timeout </b><i>seconds</i>
|
||||
<dt><a name="Timeout"></a><b>Timeout </b><i>seconds</i>
|
||||
<dd style="margin-left: 5.0em">Specifies the HTTP request timeout.
|
||||
The default is "300" (5 minutes).
|
||||
<dt><b>WebInterface yes</b>
|
||||
<dt><a name="WebInterface"></a><b>WebInterface yes</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>WebInterface no</b>
|
||||
<dd style="margin-left: 5.0em">Specifies whether the web interface is enabled.
|
||||
The default is "No".
|
||||
|
||||
@@ -266,11 +266,11 @@ lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&op
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>sanitize_title=no</TT></TD>
|
||||
<TD>Specifies that the job title string should not be restricted to ASCII characters.</TD>
|
||||
<TD>Specifies that the job title string should not be restricted to ASCII alphanumeric and space characters.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>sanitize_title=yes</TT></TD>
|
||||
<TD>Specifies that the job title string should be restricted to ASCII characters.</TD>
|
||||
<TD>Specifies that the job title string should be restricted to ASCII alphanumeric and space characters.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><TT>snmp=false</TT></TD>
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
|
||||
<H2 CLASS="title"><A NAME="BASICS">The Basics</A></H2>
|
||||
|
||||
<P>Operation policies are used for all IPP requests sent to the scheduler and are evaluated <em>after</em> the <A HREF="ref-cupsd-conf.html#Location"><TT>Location</TT></A> based access control rules. This means that operation policies can only add additional security restrictions to a request, never relax them. Use <TT>Location</TT> based access control rules for server-wide limits and operation policies for limits on individual printers, tasks, or services.</P>
|
||||
<P>Operation policies are used for all IPP requests sent to the scheduler and are evaluated <em>after</em> the <A HREF="man-cupsd.conf.html#Location"><TT>Location</TT></A> based access control rules. This means that operation policies can only add additional security restrictions to a request, never relax them. Use <TT>Location</TT> based access control rules for server-wide limits and operation policies for limits on individual printers, tasks, or services.</P>
|
||||
|
||||
<P>Policies are stored in the <VAR>cupsd.conf</VAR> file in <A HREF="ref-cupsd-conf.html#Policy"><TT>Policy</TT></A> sections. Each policy has an alphanumeric name that is used to select it. Inside the policy section are one or more <A
|
||||
HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list the operations that are affected by the rules inside it. <A HREF="#LISTING01">Listing 1</A> shows the default operation policy, appropriately called "default", that is shipped with CUPS.</P>
|
||||
<P>Policies are stored in the <VAR>cupsd.conf</VAR> file in <A HREF="man-cupsd.conf.html#Policy"><TT>Policy</TT></A> sections. Each policy has an alphanumeric name that is used to select it. Inside the policy section are one or more <A
|
||||
HREF="man-cupsd.conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list the operations that are affected by the rules inside it. <A HREF="#LISTING01">Listing 1</A> shows the default operation policy, appropriately called "default", that is shipped with CUPS.</P>
|
||||
|
||||
<P>The easiest way to add a policy to the <VAR>cupsd.conf</VAR> file is to use the web interface. Click on the <VAR>Administration</VAR> tab and then the <VAR>Edit Configuration File</VAR> button to edit the current <VAR>cupsd.conf</VAR> file. Click on the <VAR>Save Changes</VAR> button to save the changes and restart the scheduler. If you edit the <VAR>cupsd.conf</VAR> file from the console, make sure to <A HREF="ref-cupsd-conf.html">restart the cupsd process</A> before trying to use the new policy.</P>
|
||||
<P>The easiest way to add a policy to the <VAR>cupsd.conf</VAR> file is to use the web interface. Click on the <VAR>Administration</VAR> tab and then the <VAR>Edit Configuration File</VAR> button to edit the current <VAR>cupsd.conf</VAR> file. Click on the <VAR>Save Changes</VAR> button to save the changes and restart the scheduler. If you edit the <VAR>cupsd.conf</VAR> file from the console, make sure to <A HREF="man-cupsd.conf.html">restart the cupsd process</A> before trying to use the new policy.</P>
|
||||
|
||||
<PRE CLASS="example">
|
||||
<EM>Listing 1: <A NAME="LISTING01">Default Operation Policy</A></EM>
|
||||
@@ -97,7 +97,7 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
|
||||
<P>The operation names are listed on a single line with spaces separating them. Each name corresponds to the IPP operation described in any of the IETF or PWG standards documents for the Internet Printing Protocol. <A HREF="#TABLE01">Table 1</A> lists all of the operations that have been defined along with their usage in CUPS.</P>
|
||||
|
||||
<P>The access control rules are listed after the <TT>Limit</TT> line and are the same as those used for <A HREF="ref-cupsd-conf.html#Location"><TT>Location</TT></A> sections. In this case, we require the owner of the job ("@OWNER") or a member of the <A HREF="ref-cupsd-conf.html#SystemGroup"><TT>SystemGroup</TT></A> ("@SYSTEM") to do the operation. Because we do not include an <A HREF="ref-cupsd-conf.html#AuthType"><TT>AuthType</TT></A> directive here, the user information can come from the IPP request itself or the authenticated username from the HTTP request. The administrative operations starting on line 9, however, <em>do</em> use the <TT>AuthType</TT> directive, and so administrative operations need to be authenticated:</P>
|
||||
<P>The access control rules are listed after the <TT>Limit</TT> line and are the same as those used for <A HREF="man-cupsd.conf.html#Location"><TT>Location</TT></A> sections. In this case, we require the owner of the job ("@OWNER") or a member of the <A HREF="man-cups-files.conf.html#SystemGroup"><TT>SystemGroup</TT></A> ("@SYSTEM") to do the operation. Because we do not include an <A HREF="man-cupsd.conf.html#AuthType"><TT>AuthType</TT></A> directive here, the user information can come from the IPP request itself or the authenticated username from the HTTP request. The administrative operations starting on line 9, however, <em>do</em> use the <TT>AuthType</TT> directive, and so administrative operations need to be authenticated:</P>
|
||||
|
||||
<PRE CLASS="example">
|
||||
9 <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class
|
||||
@@ -492,7 +492,7 @@ HREF="ref-cupsd-conf.html#LimitIPP"><TT>Limit</TT></A> subsections which list th
|
||||
</Limit>
|
||||
</PRE>
|
||||
|
||||
<P>The directives inside the <TT>Limit</TT> subsection can use any of the normal limiting directives: <A HREF="ref-cupsd-conf.html#Allow"><TT>Allow</TT></A>, <A HREF="ref-cupsd-conf.html#AuthType"><TT>AuthType</TT></A>, <A HREF="ref-cupsd-conf.html#Deny"><TT>Deny</TT></A>, <A HREF="ref-cupsd-conf.html#Encryption"><TT>Encryption</TT></A>, <A HREF="ref-cupsd-conf.html#Require"><TT>Require</TT></A>, and <A HREF="ref-cupsd-conf.html#Satisfy"><TT>Satisfy</TT></A>. <A HREF="#TABLE02">Table 2</A> lists some basic "recipes" for different access control rules.</P>
|
||||
<P>The directives inside the <TT>Limit</TT> subsection can use any of the normal limiting directives: <A HREF="man-cupsd.conf.html#Allow"><TT>Allow</TT></A>, <A HREF="man-cupsd.conf.html#AuthType"><TT>AuthType</TT></A>, <A HREF="man-cupsd.conf.html#Deny"><TT>Deny</TT></A>, <A HREF="man-cupsd.conf.html#Encryption"><TT>Encryption</TT></A>, <A HREF="man-cupsd.conf.html#Require"><TT>Require</TT></A>, and <A HREF="man-cupsd.conf.html#Satisfy"><TT>Satisfy</TT></A>. <A HREF="#TABLE02">Table 2</A> lists some basic "recipes" for different access control rules.</P>
|
||||
|
||||
<DIV CLASS="table"><TABLE WIDTH="80%" SUMMARY="Access Control Recipes">
|
||||
<CAPTION>Table 2: <A NAME="TABLE02">Access Control Recipes</A></CAPTION>
|
||||
@@ -599,7 +599,7 @@ Allow from @LOCAL</PRE></TD>
|
||||
|
||||
<H2 CLASS="title"><A NAME="SELECT">Using Policies</A></H2>
|
||||
|
||||
<P>Once you have created a policy, you can use it in two ways. The first way is to assign it as the default policy for the system using the <A HREF="ref-cupsd-conf.html#DefaultPolicy"><TT>DefaultPolicy</TT></A> directive in the <VAR>cupsd.conf</VAR> file. For example, add the following line to the <VAR>cupsd.conf</VAR> file to use the "lab999" policy from the previous section:</P>
|
||||
<P>Once you have created a policy, you can use it in two ways. The first way is to assign it as the default policy for the system using the <A HREF="man-cupsd.conf.html#DefaultPolicy"><TT>DefaultPolicy</TT></A> directive in the <VAR>cupsd.conf</VAR> file. For example, add the following line to the <VAR>cupsd.conf</VAR> file to use the "lab999" policy from the previous section:</P>
|
||||
|
||||
<PRE CLASS="example">
|
||||
DefaultPolicy lab999
|
||||
|
||||
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 6.6 KiB |
+1
-1
@@ -50,6 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2014 Apple Inc. All rights reserved.</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2015 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>ホーム - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">ホーム</a></li>
|
||||
<li><a href="/admin">管理</a></li>
|
||||
<li><a href="/classes/">クラス</a></li>
|
||||
<li><a href="/help/">ヘルプ</a></li>
|
||||
<li><a href="/jobs/">ジョブ</a></li>
|
||||
<li><a href="/printers/">プリンター</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS @CUPS_VERSION@</h1>
|
||||
<p>CUPS は、OS X<sup>®</sup> およびその他の UNIX <SUP>®</sup> 系 OS のために、<a href="http://www.apple.com/">Apple Inc.</a> によって開発された標準ベースのオープンソース印刷システムです。</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<h2>CUPS ユーザー向け</h2>
|
||||
<p><a href="help/overview.html">CUPS の概要</a></p>
|
||||
<p><a href="help/options.html">コマンドラインからの印刷とオプション</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups">ユーザーフォーラム</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS 管理者向け</h2>
|
||||
<p><a href="admin">プリンターとクラスの追加</a></p>
|
||||
<p><a href="help/policies.html">操作ポリシーの管理</a></p>
|
||||
<p><a href="help/network.html">ネットワークプリンターの使い方</a></p>
|
||||
<p><a href="help/man-cupsd.conf.html">ネットワークプリンターの使い方</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<h2>CUPS 開発者向け</h2>
|
||||
<p><a href="help/api-overview.html">CUPS プログラミングの導入</a></p>
|
||||
<p><a href="help/api-cups.html">CUPS API</a></p>
|
||||
<p><a href="help/api-filter.html">フィルタとバックエンドのプログラミング</a></p>
|
||||
<p><a href="help/api-httpipp.html">HTTP と IPP の API</a></p>
|
||||
<p><a href="http://www.cups.org/lists.php?LIST=cups-devel">開発者フォーラム</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright © 2007-2015 Apple Inc. All rights reserved.</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/cups.css" type="text/css">
|
||||
<link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Home - CUPS @CUPS_VERSION@@CUPS_REVISION@</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<ul>
|
||||
<li><a href="http://www.cups.org/" target="_blank">CUPS.org</a></li>
|
||||
<li><a class="active" href="/">Начало</a></li>
|
||||
<li><a href="/admin">Администрирование</a></li>
|
||||
<li><a href="/classes/">Группы</a></li>
|
||||
<li><a href="/help/">Справка</a></li>
|
||||
<li><a href="/jobs/">Задания</a></li>
|
||||
<li><a href="/printers/">Принтеры</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<h1>CUPS 2.0.1</h1>
|
||||
<P>CUPS — поддерживающая большинство стандартов, свободная подсистема печати, разрабатываемая компанией <A HREF="http://www.apple.com/">Apple Inc.</A> для операционной системы Mac OS<SUP>®</SUP> X и других UNIX<SUP>®</SUP>-подобных операционных систем.</P>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="thirds">
|
||||
<H2>CUPS для пользователей</H2>
|
||||
<P><A HREF="help/overview.html">Введение в CUPS</A></P>
|
||||
<P><A HREF="help/options.html">Печать из командной строки</A></P>
|
||||
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Форум пользователей</A></P>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
<H2>CUPS для администраторов</H2>
|
||||
<P><A HREF="admin">Добавление принтеров и групп</A></P>
|
||||
<P><A HREF="help/policies.html">Управление доступом</A></P>
|
||||
<P><A HREF="help/network.html">Использование сетевых принтеров</A></P>
|
||||
<p><a href="help/man-cupsd.conf.html">Справочник по cupsd.conf</a></p>
|
||||
</div>
|
||||
<div class="thirds">
|
||||
|
||||
<H2>CUPS для разработчиков</H2>
|
||||
<P><A HREF="help/api-overview.html">Введение в разработку CUPS</A></P>
|
||||
<P><A HREF="help/api-cups.html">CUPS API</A></P>
|
||||
<P><A HREF="help/api-filter.html">Разработка фильтров и модулей</A></P>
|
||||
<P><A HREF="help/api-httpipp.html">API доступа по HTTP и IPP</A></P>
|
||||
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Форум разработчиков</A></P>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2014) компании Apple Inc. Все права защищены.</div>
|
||||
</body>
|
||||
</html>
|
||||
+15
-7
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: gziptoany.c 12656 2015-05-22 17:27:37Z msweet $"
|
||||
*
|
||||
* GZIP/raw pre-filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -40,7 +40,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Check command-line...
|
||||
*/
|
||||
|
||||
if (argc != 7)
|
||||
if (argc < 6 || argc > 7)
|
||||
{
|
||||
_cupsLangPrintf(stderr,
|
||||
_("Usage: %s job-id user title copies options [file]"),
|
||||
@@ -62,8 +62,14 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Open the file...
|
||||
*/
|
||||
|
||||
if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
|
||||
if (argc == 6)
|
||||
{
|
||||
copies = 1;
|
||||
fp = cupsFileStdin();
|
||||
}
|
||||
else if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Unable to open \"%s\".\n", argv[6]);
|
||||
_cupsLangPrintError("ERROR", _("Unable to open print file"));
|
||||
return (1);
|
||||
}
|
||||
@@ -85,7 +91,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
_cupsLangPrintFilter(stderr, "ERROR",
|
||||
_("Unable to write uncompressed print data: %s"),
|
||||
strerror(errno));
|
||||
cupsFileClose(fp);
|
||||
if (argc == 7)
|
||||
cupsFileClose(fp);
|
||||
|
||||
return (1);
|
||||
}
|
||||
@@ -97,12 +104,13 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Close the file and return...
|
||||
*/
|
||||
|
||||
cupsFileClose(fp);
|
||||
if (argc == 7)
|
||||
cupsFileClose(fp);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: gziptoany.c 12656 2015-05-22 17:27:37Z msweet $".
|
||||
*/
|
||||
|
||||
+9
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: pstops.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: pstops.c 12656 2015-05-22 17:27:37Z msweet $"
|
||||
*
|
||||
* PostScript filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -264,7 +264,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
|
||||
{
|
||||
_cupsLangPrintError("ERROR", _("Unable to open print file"));
|
||||
if (!JobCanceled)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Unable to open \"%s\".\n", argv[6]);
|
||||
_cupsLangPrintError("ERROR", _("Unable to open print file"));
|
||||
}
|
||||
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
@@ -3400,5 +3405,5 @@ write_options(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: pstops.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: pstops.c 12656 2015-05-22 17:27:37Z msweet $".
|
||||
*/
|
||||
|
||||
+23
-14
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: raster.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: raster.c 12679 2015-05-28 19:09:57Z msweet $"
|
||||
*
|
||||
* Raster file routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* This file is part of the CUPS Imaging library.
|
||||
@@ -256,7 +256,10 @@ cupsRasterReadHeader(
|
||||
*/
|
||||
|
||||
if (!cups_raster_read_header(r))
|
||||
{
|
||||
memset(h, 0, sizeof(cups_page_header_t));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the header to the user-supplied buffer...
|
||||
@@ -285,7 +288,10 @@ cupsRasterReadHeader2(
|
||||
*/
|
||||
|
||||
if (!cups_raster_read_header(r))
|
||||
{
|
||||
memset(h, 0, sizeof(cups_page_header2_t));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the header to the user-supplied buffer...
|
||||
@@ -603,8 +609,9 @@ cupsRasterWriteHeader(
|
||||
fh.cupsInteger[15] = htonl(r->header.cupsInteger[15]);
|
||||
/* VendorLength */
|
||||
|
||||
memcpy(fh.cupsReal, r->header.cupsReal,
|
||||
sizeof(fh.cupsReal) + sizeof(fh.cupsString));
|
||||
void *dst = fh.cupsReal; /* Bypass bogus compiler warning */
|
||||
void *src = r->header.cupsReal;
|
||||
memcpy(dst, src, sizeof(fh.cupsReal) + sizeof(fh.cupsString));
|
||||
/* VendorData */
|
||||
|
||||
strlcpy(fh.cupsRenderingIntent, r->header.cupsRenderingIntent,
|
||||
@@ -699,14 +706,10 @@ cupsRasterWriteHeader2(
|
||||
fh.cupsInteger[0] = htonl(r->header.cupsInteger[0]);
|
||||
fh.cupsInteger[1] = htonl(r->header.cupsInteger[1]);
|
||||
fh.cupsInteger[2] = htonl(r->header.cupsInteger[2]);
|
||||
fh.cupsInteger[3] = htonl((unsigned)(r->header.cupsImagingBBox[0] *
|
||||
r->header.HWResolution[0]));
|
||||
fh.cupsInteger[4] = htonl((unsigned)(r->header.cupsImagingBBox[1] *
|
||||
r->header.HWResolution[1]));
|
||||
fh.cupsInteger[5] = htonl((unsigned)(r->header.cupsImagingBBox[2] *
|
||||
r->header.HWResolution[0]));
|
||||
fh.cupsInteger[6] = htonl((unsigned)(r->header.cupsImagingBBox[3] *
|
||||
r->header.HWResolution[1]));
|
||||
fh.cupsInteger[3] = htonl((unsigned)(r->header.cupsImagingBBox[0] * r->header.HWResolution[0] / 72.0));
|
||||
fh.cupsInteger[4] = htonl((unsigned)(r->header.cupsImagingBBox[1] * r->header.HWResolution[1] / 72.0));
|
||||
fh.cupsInteger[5] = htonl((unsigned)(r->header.cupsImagingBBox[2] * r->header.HWResolution[0] / 72.0));
|
||||
fh.cupsInteger[6] = htonl((unsigned)(r->header.cupsImagingBBox[3] * r->header.HWResolution[1] / 72.0));
|
||||
fh.cupsInteger[7] = htonl(0xffffff);
|
||||
|
||||
return (cups_raster_io(r, (unsigned char *)&fh, sizeof(fh)) == sizeof(fh));
|
||||
@@ -963,7 +966,7 @@ cups_raster_read_header(
|
||||
|
||||
cups_raster_update(r);
|
||||
|
||||
return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0);
|
||||
return (r->header.cupsBitsPerPixel != 0 && r->header.cupsBitsPerColor != 0 && r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1233,6 +1236,9 @@ cups_raster_update(cups_raster_t *r) /* I - Raster stream */
|
||||
else
|
||||
r->bpp = (r->header.cupsBitsPerColor + 7) / 8;
|
||||
|
||||
if (r->bpp == 0)
|
||||
r->bpp = 1;
|
||||
|
||||
/*
|
||||
* Set the number of remaining rows...
|
||||
*/
|
||||
@@ -1284,6 +1290,9 @@ cups_raster_write(
|
||||
*/
|
||||
|
||||
count = r->header.cupsBytesPerLine * 2;
|
||||
if (count < 3)
|
||||
count = 3;
|
||||
|
||||
if ((size_t)count > r->bufsize)
|
||||
{
|
||||
if (r->buffer)
|
||||
@@ -1448,5 +1457,5 @@ cups_write_fd(void *ctx, /* I - File descriptor pointer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: raster.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: raster.c 12679 2015-05-28 19:09:57Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertoepson.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: rastertoepson.c 12618 2015-05-06 20:28:48Z msweet $"
|
||||
*
|
||||
* EPSON ESC/P and ESC/P2 filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -274,7 +274,7 @@ StartPage(
|
||||
|
||||
if (header->cupsCompression || DotBytes)
|
||||
{
|
||||
if ((CompBuffer = calloc(2, header->cupsWidth)) == NULL)
|
||||
if ((CompBuffer = calloc(2, header->cupsWidth + 1)) == NULL)
|
||||
{
|
||||
fputs("ERROR: Unable to allocate memory\n", stderr);
|
||||
exit(1);
|
||||
@@ -655,13 +655,19 @@ OutputLine(
|
||||
}
|
||||
|
||||
for (width = header->cupsWidth, tempptr = CompBuffer;
|
||||
width > 0;
|
||||
width > 1;
|
||||
width -= 2, tempptr += 2, oddptr += DotBytes * 2,
|
||||
evenptr += DotBytes * 2)
|
||||
{
|
||||
evenptr[0] = tempptr[0];
|
||||
oddptr[0] = tempptr[1];
|
||||
}
|
||||
|
||||
if (width == 1)
|
||||
{
|
||||
evenptr[0] = tempptr[0];
|
||||
oddptr[0] = tempptr[1];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -873,6 +879,9 @@ OutputRows(
|
||||
putchar(0);
|
||||
}
|
||||
|
||||
if (dot_count & 1)
|
||||
putchar(*ptr);
|
||||
|
||||
/*
|
||||
* Move the head back and print the odd bytes...
|
||||
*/
|
||||
@@ -901,6 +910,9 @@ OutputRows(
|
||||
putchar(0);
|
||||
putchar(*ptr);
|
||||
}
|
||||
|
||||
if (dot_count & 1)
|
||||
putchar(0);
|
||||
}
|
||||
else
|
||||
pwrite(dot_ptr, dot_count);
|
||||
@@ -1138,5 +1150,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: rastertoepson.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: rastertoepson.c 12618 2015-05-06 20:28:48Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertohp.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: rastertohp.c 12575 2015-03-26 16:36:54Z msweet $"
|
||||
*
|
||||
* Hewlett-Packard Page Control Language filter for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1993-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -354,7 +354,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
|
||||
* Allocate memory for a line of graphics...
|
||||
*/
|
||||
|
||||
if ((Planes[0] = malloc(header->cupsBytesPerLine)) == NULL)
|
||||
if ((Planes[0] = malloc(header->cupsBytesPerLine + NumPlanes)) == NULL)
|
||||
{
|
||||
fputs("ERROR: Unable to allocate memory\n", stderr);
|
||||
exit(1);
|
||||
@@ -369,7 +369,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
|
||||
BitBuffer = NULL;
|
||||
|
||||
if (header->cupsCompression)
|
||||
CompBuffer = malloc(header->cupsBytesPerLine * 2);
|
||||
CompBuffer = malloc(header->cupsBytesPerLine * 2 + 2);
|
||||
else
|
||||
CompBuffer = NULL;
|
||||
}
|
||||
@@ -871,5 +871,5 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: rastertohp.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: rastertohp.c 12575 2015-03-26 16:36:54Z msweet $".
|
||||
*/
|
||||
|
||||
+14
-4
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: rastertopwg.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: rastertopwg.c 12610 2015-05-06 12:24:54Z msweet $"
|
||||
*
|
||||
* CUPS raster to PWG raster format filter for CUPS.
|
||||
*
|
||||
* Copyright 2011, 2014 Apple Inc.
|
||||
* Copyright 2011, 2014-2015 Apple Inc.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Apple Inc. and are protected by Federal copyright law.
|
||||
@@ -401,6 +401,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Copy raster data...
|
||||
*/
|
||||
|
||||
if (linesize < inheader.cupsBytesPerLine)
|
||||
linesize = inheader.cupsBytesPerLine;
|
||||
|
||||
line = malloc(linesize);
|
||||
|
||||
memset(line, white, linesize);
|
||||
@@ -415,7 +418,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
for (y = inheader.cupsHeight; y > 0; y --)
|
||||
{
|
||||
cupsRasterReadPixels(inras, line + lineoffset, inheader.cupsBytesPerLine);
|
||||
if (cupsRasterReadPixels(inras, line + lineoffset, inheader.cupsBytesPerLine) != inheader.cupsBytesPerLine)
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Error reading raster data."));
|
||||
fprintf(stderr, "DEBUG: Unable to read line %d for page %d.\n",
|
||||
inheader.cupsHeight - y + page_top + 1, page);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
|
||||
{
|
||||
_cupsLangPrintFilter(stderr, "ERROR", _("Error sending raster data."));
|
||||
@@ -449,5 +459,5 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: rastertopwg.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: rastertopwg.c 12610 2015-05-06 12:24:54Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: Makefile 11558 2014-02-06 18:33:34Z msweet $"
|
||||
# "$Id: Makefile 12347 2014-12-09 21:47:23Z msweet $"
|
||||
#
|
||||
# Locale file makefile for CUPS.
|
||||
#
|
||||
@@ -159,7 +159,7 @@ pot: checkpo po2strings
|
||||
#
|
||||
|
||||
checkpo: checkpo.o ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $<...
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o checkpo checkpo.o \
|
||||
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
@@ -178,7 +178,7 @@ checkall: checkpo
|
||||
#
|
||||
|
||||
po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $<...
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o po2strings po2strings.o \
|
||||
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
|
||||
$(COMMONLIBS) $(LIBZ)
|
||||
@@ -192,7 +192,7 @@ po2strings: po2strings.o ../cups/$(LIBCUPSSTATIC)
|
||||
#
|
||||
|
||||
strings2po: strings2po.o
|
||||
echo Linking $<...
|
||||
echo Linking $@...
|
||||
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o strings2po strings2po.o
|
||||
|
||||
|
||||
@@ -204,5 +204,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11558 2014-02-06 18:33:34Z msweet $".
|
||||
# End of "$Id: Makefile 12347 2014-12-09 21:47:23Z msweet $".
|
||||
#
|
||||
|
||||
+5730
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+1898
-123
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+1164
-6065
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,9 +1,9 @@
|
||||
.\"
|
||||
.\" "$Id: cups-files.conf.man.in 11927 2014-06-13 00:01:23Z msweet $"
|
||||
.\" "$Id: cups-files.conf.man.in 12477 2015-02-02 18:38:25Z msweet $"
|
||||
.\"
|
||||
.\" cups-files.conf man page for CUPS.
|
||||
.\"
|
||||
.\" Copyright 2007-2014 by Apple Inc.
|
||||
.\" Copyright 2007-2015 by Apple Inc.
|
||||
.\" Copyright 1997-2006 by Easy Software Products.
|
||||
.\"
|
||||
.\" These coded instructions, statements, and computer programs are the
|
||||
@@ -12,7 +12,7 @@
|
||||
.\" which should have been included with this file. If this file is
|
||||
.\" file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
.\"
|
||||
.TH cups-files.conf 5 "CUPS" "11 June 2014" "Apple Inc."
|
||||
.TH cups-files.conf 5 "CUPS" "2 February 2015" "Apple Inc."
|
||||
.SH NAME
|
||||
cups\-files.conf \- file and directory configuration file for cups
|
||||
.SH DESCRIPTION
|
||||
@@ -27,6 +27,7 @@ Comment lines start with the # character.
|
||||
.SS DIRECTIVES
|
||||
The following directives are understood by
|
||||
.BR cupsd (8):
|
||||
.\"#AccessLog
|
||||
.TP 5
|
||||
\fBAccessLog\fR
|
||||
.TP 5
|
||||
@@ -43,6 +44,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
.fi
|
||||
The default is "/var/log/cups/access_log".
|
||||
.\"#ConfigFilePerm
|
||||
.TP 5
|
||||
\fBConfigFilePerm \fImode\fR
|
||||
Specifies the permissions for all configuration files that the scheduler writes.
|
||||
@@ -51,14 +53,17 @@ The default is "0644" on OS X and "0640" on all other operating systems.
|
||||
\fBNote:\fR The permissions for the \fIprinters.conf\fR file are currently masked to only allow access from the scheduler user (typically root).
|
||||
This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system.
|
||||
There is no way to disable this security feature.
|
||||
.\"#DataDir
|
||||
.TP 5
|
||||
\fBDataDir \fIpath\fR
|
||||
Specifies the directory where data files can be found.
|
||||
The default is usually "/usr/share/cups".
|
||||
.\"#DocumentRoot
|
||||
.TP 5
|
||||
\fBDocumentRoot \fIdirectory\fR
|
||||
Specifies the root directory for the CUPS web interface content.
|
||||
The default is usually "/usr/share/doc/cups".
|
||||
.\"#ErrorLog
|
||||
.TP 5
|
||||
\fBErrorLog\fR
|
||||
.TP 5
|
||||
@@ -75,6 +80,7 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
.fi
|
||||
The default is "/var/log/cups/error_log".
|
||||
.\"#FatalErrors
|
||||
.TP 5
|
||||
\fBFatalErrors none\fR
|
||||
.TP 5
|
||||
@@ -107,20 +113,24 @@ Log file creation or write errors are fatal.
|
||||
.B permissions
|
||||
Bad startup file permissions are fatal, for example shared TLS certificate and key files with world-read permissions.
|
||||
.RE
|
||||
.\"#FileDevice
|
||||
.TP 5
|
||||
\fBFileDevice Yes\fR
|
||||
.TP 5
|
||||
\fBFileDevice No\fR
|
||||
Specifies whether the file pseudo-device can be used for new printer queues.
|
||||
The URI "file:///dev/null" is always allowed.
|
||||
.\"#Group
|
||||
.TP 5
|
||||
\fBGroup \fIgroup-name-or-number\fR
|
||||
Specifies the group name or ID that will be used when executing external programs.
|
||||
The default group is operating system specific but is usually "lp" or "nobody".
|
||||
.\"#LogFilePerm
|
||||
.TP 5
|
||||
\fBLogFilePerm \fImode\fR
|
||||
Specifies the permissions of all log files that the scheduler writes.
|
||||
The default is "0644".
|
||||
.\"#PageLog
|
||||
.TP 5
|
||||
\fBPageLog \fR[ \fIfilename\fR ]
|
||||
.TP 5
|
||||
@@ -135,14 +145,17 @@ The server name may be included in filenames using the string "%s", for example:
|
||||
|
||||
.fi
|
||||
The default is "/var/log/cups/page_log".
|
||||
.\"#RemoteRoot
|
||||
.TP 5
|
||||
\fBRemoteRoot \fIusername\fR
|
||||
Specifies the username that is associated with unauthenticated accesses by clients claiming to be the root user.
|
||||
The default is "remroot".
|
||||
.\"#RequestRoot
|
||||
.TP 5
|
||||
\fBRequestRoot \fIdirectory\fR
|
||||
Specifies the directory that contains print jobs and other HTTP request data.
|
||||
The default is "/var/spool/cups".
|
||||
.\"#Sandboxing
|
||||
.TP 5
|
||||
\fBSandboxing off\fR
|
||||
.TP 5
|
||||
@@ -152,18 +165,23 @@ The default is "/var/spool/cups".
|
||||
Specifies the level of security sandboxing that is applied to print filters, backends, and other child processes of the scheduler.
|
||||
The default is "strict".
|
||||
This directive is currently only used/supported on OS X.
|
||||
.\"#ServerBin
|
||||
.TP 5
|
||||
\fBServerBin \fIdirectory\fR
|
||||
Specifies the directory containing the backends, CGI programs, filters, helper programs, notifiers, and port monitors.
|
||||
The default is "/usr/lib/cups" or "/usr/libexec/cups" depending on the platform.
|
||||
.\"#ServerKeychain
|
||||
.TP 5
|
||||
\fBServerKeychain \fIpath\fR
|
||||
Specifies the location of TLS certificates and private keys.
|
||||
The default is "/Library/Keychains/System.keychain" on OS X and "/etc/cups/ssl" on all other operating systems.
|
||||
OS X uses its keychain database to store certificates and keys while other platforms use separate files in the specified directory, *.crt for PEM-encoded certificates and *.key for PEM-encoded private keys.
|
||||
.\"#ServerRoot
|
||||
.TP 5
|
||||
\fBServerRoot \fIdirectory\fR
|
||||
Specifies the directory containing the server configuration files.
|
||||
The default is "/etc/cups".
|
||||
.\"#SyncOnClose
|
||||
.TP 5
|
||||
\fBSyncOnClose Yes\fR
|
||||
.TP 5
|
||||
@@ -172,14 +190,17 @@ Specifies whether the scheduler calls
|
||||
.BR fsync (2)
|
||||
after writing configuration or state files.
|
||||
The default is "No".
|
||||
.\"#SystemGroup
|
||||
.TP 5
|
||||
\fBSystemGroup \fIgroup-name \fR[ ... \fIgroup-name\fR ]
|
||||
Specifies the group(s) to use for \fI@SYSTEM\fR group authentication.
|
||||
The default contains "admin", "lpadmin", "root", "sys", and/or "system".
|
||||
.\"#TempDir
|
||||
.TP 5
|
||||
\fBTempDir \fIdirectory\fR
|
||||
Specifies the directory where temporary files are stored.
|
||||
The default is "/var/spool/cups/tmp".
|
||||
.\"#User
|
||||
.TP 5
|
||||
\fBUser \fIusername\fR
|
||||
Specifies the user name or ID that is used when running external programs.
|
||||
@@ -195,7 +216,7 @@ The default is "lp".
|
||||
.BR subscriptions.conf (5),
|
||||
CUPS Online Help (http://localhost:631/help)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2014 by Apple Inc.
|
||||
Copyright \[co] 2007-2015 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cups-files.conf.man.in 11927 2014-06-13 00:01:23Z msweet $".
|
||||
.\" End of "$Id: cups-files.conf.man.in 12477 2015-02-02 18:38:25Z msweet $".
|
||||
.\"
|
||||
|
||||
+65
-3
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: cupsd.conf.man.in 12215 2014-10-20 18:24:56Z msweet $"
|
||||
.\" "$Id: cupsd.conf.man.in 12363 2014-12-12 19:51:33Z msweet $"
|
||||
.\"
|
||||
.\" cupsd.conf man page for CUPS.
|
||||
.\"
|
||||
@@ -34,6 +34,7 @@ Comment lines start with the # character.
|
||||
.SS TOP-LEVEL DIRECTIVES
|
||||
The following top-level directives are understood by
|
||||
.BR cupsd (8):
|
||||
.\"#AccessLogLevel
|
||||
.TP 5
|
||||
\fBAccessLogLevel config\fR
|
||||
.TP 5
|
||||
@@ -45,6 +46,7 @@ The "config" level logs when printers and classes are added, deleted, or modifie
|
||||
The "actions" level logs when print jobs are submitted, held, released, modified, or canceled, and any of the conditions for "config".
|
||||
The "all" level logs all requests.
|
||||
The default access log level is "actions".
|
||||
.\"#AutoPurgeJobs
|
||||
.TP 5
|
||||
\fBAutoPurgeJobs Yes\fR
|
||||
.TP 5
|
||||
@@ -52,6 +54,7 @@ The default access log level is "actions".
|
||||
.br
|
||||
Specifies whether to purge job history data automatically when it is no longer required for quotas.
|
||||
The default is "No".
|
||||
.\"#BrowseLocalProtocols
|
||||
.TP 5
|
||||
\fBBrowseLocalProtocols all\fR
|
||||
.TP 5
|
||||
@@ -60,6 +63,7 @@ The default is "No".
|
||||
\fBBrowseLocalProtocols none\fR
|
||||
Specifies which protocols to use for local printer sharing.
|
||||
The default is "dnssd" on systems that support Bonjour and "none" otherwise.
|
||||
.\"#BrowseWebIF
|
||||
.TP 5
|
||||
\fBBrowseWebIF Yes\fR
|
||||
.TP 5
|
||||
@@ -67,6 +71,7 @@ The default is "dnssd" on systems that support Bonjour and "none" otherwise.
|
||||
.br
|
||||
Specifies whether the CUPS web interface is advertised.
|
||||
The default is "No".
|
||||
.\"#Browsing
|
||||
.TP 5
|
||||
\fBBrowsing Yes\fR
|
||||
.TP 5
|
||||
@@ -74,12 +79,14 @@ The default is "No".
|
||||
.br
|
||||
Specifies whether shared printers are advertised.
|
||||
The default is "No".
|
||||
.\"#Classification
|
||||
.TP 5
|
||||
\fBClassification \fIbanner\fR
|
||||
.br
|
||||
Specifies the security classification of the server.
|
||||
Any valid banner name can be used, including "classified", "confidential", "secret", "topsecret", and "unclassified", or the banner can be omitted to disable secure printing functions.
|
||||
The default is no classification banner.
|
||||
.\"#ClassifyOverride
|
||||
.TP 5
|
||||
\fBClassifyOverride Yes\fR
|
||||
.TP 5
|
||||
@@ -87,6 +94,7 @@ The default is no classification banner.
|
||||
.br
|
||||
Specifies whether users may override the classification (cover page) of individual print jobs using the "job-sheets" option.
|
||||
The default is "No".
|
||||
.\"#DefaultAuthType
|
||||
.TP 5
|
||||
\fBDefaultAuthType Basic\fR
|
||||
.TP 5
|
||||
@@ -94,6 +102,7 @@ The default is "No".
|
||||
.br
|
||||
Specifies the default type of authentication to use.
|
||||
The default is "Basic".
|
||||
.\"#DefaultEncryption
|
||||
.TP 5
|
||||
\fBDefaultEncryption Never\fR
|
||||
.TP 5
|
||||
@@ -102,10 +111,12 @@ The default is "Basic".
|
||||
\fBDefaultEncryption Required\fR
|
||||
Specifies whether encryption will be used for authenticated requests.
|
||||
The default is "Required".
|
||||
.\"#DefaultLanguage
|
||||
.TP 5
|
||||
\fBDefaultLanguage \fIlocale\fR
|
||||
Specifies the default language to use for text and web content.
|
||||
The default is "en".
|
||||
.\"#DefaultPaperSize
|
||||
.TP 5
|
||||
\fBDefaultPaperSize Auto\fR
|
||||
.TP 5
|
||||
@@ -115,21 +126,25 @@ The default is "en".
|
||||
Specifies the default paper size for new print queues. "Auto" uses a locale-specific default, while "None" specifies there is no default paper size.
|
||||
Specific size names are typically "Letter" or "A4".
|
||||
The default is "Auto".
|
||||
.\"#DefaultPolicy
|
||||
.TP 5
|
||||
\fBDefaultPolicy \fIpolicy-name\fR
|
||||
Specifies the default access policy to use.
|
||||
The default access policy is "default".
|
||||
.\"#DefaultShared
|
||||
.TP 5
|
||||
\fBDefaultShared Yes\fR
|
||||
.TP 5
|
||||
\fBDefaultShared No\fR
|
||||
Specifies whether local printers are shared by default.
|
||||
The default is "Yes".
|
||||
.\"#DirtyCleanInterval
|
||||
.TP 5
|
||||
\fBDirtyCleanInterval \fIseconds\fR
|
||||
Specifies the delay for updating of configuration and state files.
|
||||
A value of 0 causes the update to happen as soon as possible, typically within a few milliseconds.
|
||||
The default value is "30".
|
||||
.\"#ErrorPolicy
|
||||
.TP 5
|
||||
\fBErrorPolicy abort-job\fR
|
||||
Specifies that a failed print job should be aborted (discarded) unless otherwise specified for the printer.
|
||||
@@ -142,6 +157,7 @@ Specifies that a failed print job should be retried immediately unless otherwise
|
||||
.TP 5
|
||||
\fBErrorPolicy stop-printer\fR
|
||||
Specifies that a failed print job should stop the printer unless otherwise specified for the printer. The 'stop-printer' error policy is the default.
|
||||
.\"#FilterLimit
|
||||
.TP 5
|
||||
\fBFilterLimit \fIlimit\fR
|
||||
Specifies the maximum cost of filters that are run concurrently, which can be used to minimize disk, memory, and CPU resource problems.
|
||||
@@ -150,6 +166,7 @@ An average print to a non-PostScript printer needs a filter limit of about 200.
|
||||
A PostScript printer needs about half that (100).
|
||||
Setting the limit below these thresholds will effectively limit the scheduler to printing a single job at any time.
|
||||
The default limit is "0".
|
||||
.\"#FilterNice
|
||||
.TP 5
|
||||
\fBFilterNice \fInice-value\fR
|
||||
Specifies the scheduling priority (
|
||||
@@ -157,11 +174,13 @@ Specifies the scheduling priority (
|
||||
value) of filters that are run to print a job.
|
||||
The nice value ranges from 0, the highest priority, to 19, the lowest priority.
|
||||
The default is 0.
|
||||
.\"#GSSServiceName
|
||||
.TP 5
|
||||
\fBGSSServiceName \fIname\fR
|
||||
Specifies the service name when using Kerberos authentication.
|
||||
The default service name is "http."
|
||||
.TP 5
|
||||
.\"#HostNameLookups
|
||||
\fBHostNameLookups On\fR
|
||||
.TP 5
|
||||
\fBHostNameLookups Off\fR
|
||||
@@ -174,42 +193,52 @@ to verify that the hostname resolved from the address matches one of the address
|
||||
Double lookups also prevent clients with unregistered addresses from connecting to your server.
|
||||
The default is "Off" to avoid the potential server performance problems with hostname lookups.
|
||||
Only set this option to "On" or "Double" if absolutely required.
|
||||
.\"#JobKillDelay
|
||||
.TP 5
|
||||
\fBJobKillDelay \fIseconds\fR
|
||||
Specifies the number of seconds to wait before killing the filters and backend associated with a canceled or held job.
|
||||
The default is "30".
|
||||
.\"#JobRetryInterval
|
||||
.TP 5
|
||||
\fBJobRetryInterval \fIseconds\fR
|
||||
Specifies the interval between retries of jobs in seconds.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "30".
|
||||
.\"#JobRetryLimit
|
||||
.TP 5
|
||||
\fBJobRetryLimit \fIcount\fR
|
||||
Specifies the number of retries that are done for jobs.
|
||||
This is typically used for fax queues but can also be used with normal print queues whose error policy is "retry-job" or "retry-current-job".
|
||||
The default is "5".
|
||||
.\"#KeepAlive
|
||||
.TP 5
|
||||
\fBKeepAlive Yes\fR
|
||||
.TP 5
|
||||
\fBKeepAlive No\fR
|
||||
Specifies whether to support HTTP keep-alive connections.
|
||||
The default is "Yes".
|
||||
.\"#KeepAliveTimeout
|
||||
.TP 5
|
||||
\fBKeepAliveTimeout \fIseconds\fR
|
||||
Specifies how long an idle client connection remains open.
|
||||
The default is "30".
|
||||
.\"#LimitIPP
|
||||
.TP 5
|
||||
\fB<Limit \fIoperation \fR...\fB> \fR... \fB</Limit>\fR
|
||||
Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATIONS".
|
||||
.\"#Limit
|
||||
.TP 5
|
||||
\fB<Limit \fImethod \fR...\fB> \fR... \fB</Limit>\fR
|
||||
.\"#LimitExcept
|
||||
.TP 5
|
||||
\fB<LimitExcept \fImethod \fR...\fB> \fR... \fB</LimitExcept>\fR
|
||||
Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHODS".
|
||||
.\"#LimitRequestBody
|
||||
.TP 5
|
||||
\fBLimitRequestBody \fIsize\fR
|
||||
Specifies the maximum size of print files, IPP requests, and HTML form data.
|
||||
The default is "0" which disables the limit check.
|
||||
.\"#Listen
|
||||
.TP 5
|
||||
\fBListen \fIipv4-address\fB:\fIport\fR
|
||||
.TP 5
|
||||
@@ -221,19 +250,23 @@ The default is "0" which disables the limit check.
|
||||
Listens to the specified address and port or domain socket path for connections.
|
||||
Multiple Listen directives can be provided to listen on multiple addresses.
|
||||
The Listen directive is similar to the Port directive but allows you to restrict access to specific interfaces or networks.
|
||||
.\"#ListenBackLog
|
||||
.TP 5
|
||||
\fBListenBackLog \fInumber\fR
|
||||
Specifies the number of pending connections that will be allowed.
|
||||
This normally only affects very busy servers that have reached the MaxClients limit, but can also be triggered by large numbers of simultaneous connections.
|
||||
When the limit is reached, the operating system will refuse additional connections until the scheduler can accept the pending ones.
|
||||
The default is the OS-defined default limit, typically either "5" for older operating systems or "128" for newer operating systems.
|
||||
.\"#Location
|
||||
.TP 5
|
||||
\fB<Location \fI/path\fB> \fR... \fB</Location>\fR
|
||||
Specifies access control for the named location.
|
||||
Paths are documented below in the section "LOCATION PATHS".
|
||||
.\"#LogDebugHistory
|
||||
.TP 5
|
||||
\fBLogDebugHistory \fInumber\fR
|
||||
Specifies the number of debugging messages that are retained for logging if an error occurs in a print job. Debug messages are logged regardless of the LogLevel setting.
|
||||
.\"#LogLevel
|
||||
.TP 5
|
||||
\fBLogLevel \fRnone
|
||||
.TP 5
|
||||
@@ -257,56 +290,68 @@ Specifies the number of debugging messages that are retained for logging if an e
|
||||
Specifies the level of logging for the ErrorLog file.
|
||||
The value "none" stops all logging while "debug2" logs everything.
|
||||
The default is "warn".
|
||||
.\"#LogTimeFormat
|
||||
.TP 5
|
||||
\fBLogTimeFormat \fRstandard
|
||||
.TP 5
|
||||
\fBLogTimeFormat \fRusecs
|
||||
Specifies the format of the date and time in the log files.
|
||||
The value "standard" is the default and logs whole seconds while "usecs" logs microseconds.
|
||||
.\"#MaxClients
|
||||
.TP 5
|
||||
\fBMaxClients \fInumber\fR
|
||||
Specifies the maximum number of simultaneous clients that are allowed by the scheduler.
|
||||
The default is "100".
|
||||
.\"#MaxClientPerHost
|
||||
.TP 5
|
||||
\fBMaxClientsPerHost \fInumber\fR
|
||||
Specifies the maximum number of simultaneous clients that are allowed from a
|
||||
single address.
|
||||
The default is the MaxClients value.
|
||||
.\"#MaxCopies
|
||||
.TP 5
|
||||
\fBMaxCopies \fInumber\fR
|
||||
Specifies the maximum number of copies that a user can print of each job.
|
||||
The default is "9999".
|
||||
.\"#MaxHoldTime
|
||||
.TP 5
|
||||
\fBMaxHoldTime \fIseconds\fR
|
||||
Specifies the maximum time a job may remain in the "indefinite" hold state before it is canceled.
|
||||
The default is "0" which disables cancellation of held jobs.
|
||||
.\"#MaxJobs
|
||||
.TP 5
|
||||
\fBMaxJobs \fInumber\fR
|
||||
Specifies the maximum number of simultaneous jobs that are allowed.
|
||||
Set to "0" to allow an unlimited number of jobs.
|
||||
The default is "500".
|
||||
.\"#MaxJobsPerPrinter
|
||||
.TP 5
|
||||
\fBMaxJobsPerPrinter \fInumber\fR
|
||||
Specifies the maximum number of simultaneous jobs that are allowed per printer.
|
||||
The default is "0" which allows up to MaxJobs jobs per printer.
|
||||
.\"#MaxJobsPerUser
|
||||
.TP 5
|
||||
\fBMaxJobsPerUser \fInumber\fR
|
||||
Specifies the maximum number of simultaneous jobs that are allowed per user.
|
||||
The default is "0" which allows up to MaxJobs jobs per user.
|
||||
.\"#MaxJobTime
|
||||
.TP 5
|
||||
\fBMaxJobTime \fIseconds\fR
|
||||
Specifies the maximum time a job may take to print before it is canceled.
|
||||
Set to "0" to disable cancellation of "stuck" jobs.
|
||||
The default is "10800" (3 hours).
|
||||
.\"#MaxLogSize
|
||||
.TP 5
|
||||
\fBMaxLogSize \fIsize\fR
|
||||
Specifies the maximum size of the log files before they are rotated.
|
||||
The value "0" disables log rotation.
|
||||
The default is "1048576" (1MB).
|
||||
.\"#MultipleOperationTimeout
|
||||
.TP 5
|
||||
\fBMultipleOperationTimeout \fIseconds\fR
|
||||
Specifies the maximum amount of time to allow between files in a multiple file print job.
|
||||
The default is "300" (5 minutes).
|
||||
.\"#PageLogFormat
|
||||
.TP 5
|
||||
\fBPageLogFormat \fIformat-string\fR
|
||||
Specifies the format of PageLog lines.
|
||||
@@ -325,15 +370,19 @@ The following percent sequences are recognized:
|
||||
|
||||
.fi
|
||||
The default is "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".
|
||||
.\"#PassEnv
|
||||
.TP 5
|
||||
\fBPassEnv \fIvariable \fR[ ... \fIvariable \fR]
|
||||
Passes the specified environment variable(s) to child processes.
|
||||
.\"#Policy
|
||||
.TP 5
|
||||
\fB<Policy \fIname\fB> \fR... \fB</Policy>\fR
|
||||
Specifies access control for the named policy.
|
||||
.\"#Port
|
||||
.TP 5
|
||||
\fBPort \fInumber\fR
|
||||
Listens to the specified port number for connections.
|
||||
.\"#PreserveJobFiles
|
||||
.TP 5
|
||||
\fBPreserveJobFiles Yes\fR
|
||||
.TP 5
|
||||
@@ -343,6 +392,7 @@ Listens to the specified port number for connections.
|
||||
Specifies whether job files (documents) are preserved after a job is printed.
|
||||
If a numeric value is specified, job files are preserved for the indicated number of seconds after printing.
|
||||
The default is "86400" (preserve 1 day).
|
||||
.\"#PreserveJobHistory
|
||||
.TP 5
|
||||
\fBPreserveJobHistory Yes\fR
|
||||
.TP 5
|
||||
@@ -353,18 +403,22 @@ Specifies whether the job history is preserved after a job is printed.
|
||||
If a numeric value is specified, the job history is preserved for the indicated number of seconds after printing.
|
||||
If "Yes", the job history is preserved until the MaxJobs limit is reached.
|
||||
The default is "Yes".
|
||||
.\"#ReloadTimeout
|
||||
.TP 5
|
||||
\fBReloadTimeout \fIseconds\fR
|
||||
Specifies the amount of time to wait for job completion before restarting the scheduler.
|
||||
The default is "30".
|
||||
.\"#RIPCache
|
||||
.TP 5
|
||||
\fBRIPCache \fIsize\fR
|
||||
Specifies the maximum amount of memory to use when converting documents into bitmaps for a printer.
|
||||
The default is "128m".
|
||||
.\"#ServerAdmin
|
||||
.TP 5
|
||||
\fBServerAdmin \fIemail-address\fR
|
||||
Specifies the email address of the server administrator.
|
||||
The default value is "root@ServerName".
|
||||
.\"#ServerAlias
|
||||
.TP 5
|
||||
\fBServerAlias \fIhostname \fR[ ... \fIhostname \fR]
|
||||
.TP 5
|
||||
@@ -372,12 +426,14 @@ The default value is "root@ServerName".
|
||||
The ServerAlias directive is used for HTTP Host header validation when clients connect to the scheduler from external interfaces.
|
||||
Using the special name "*" can expose your system to known browser-based DNS rebinding attacks, even when accessing sites through a firewall.
|
||||
If the auto-discovery of alternate names does not work, we recommend listing each alternate name with a ServerAlias directive instead of using "*".
|
||||
.\"#ServerName
|
||||
.TP 5
|
||||
\fBServerName \fIhostname\fR
|
||||
Specifies the fully-qualified hostname of the server.
|
||||
The default is the value reported by the
|
||||
.BR hostname (1)
|
||||
command.
|
||||
.\"#ServerTokens
|
||||
.TP 5
|
||||
\fBServerTokens None\fR
|
||||
.TP 5
|
||||
@@ -403,10 +459,11 @@ Specifies what information is included in the Server header of HTTP responses.
|
||||
command.
|
||||
"Full" reports "CUPS 2.0.0 (UNAME) IPP/2.0".
|
||||
The default is "Minimal".
|
||||
.\"#SetEnv
|
||||
.TP 5
|
||||
\fBSetEnv \fIvariable value\fR
|
||||
Set the specified environment variable to be passed to child processes.
|
||||
.TP 5
|
||||
.\"#SSLListen
|
||||
.TP 5
|
||||
\fBSSLListen \fIipv4-address\fB:\fIport\fR
|
||||
.TP 5
|
||||
@@ -414,6 +471,7 @@ Set the specified environment variable to be passed to child processes.
|
||||
.TP 5
|
||||
\fBSSLListen *:\fIport\fR
|
||||
Listens on the specified address and port for encrypted connections.
|
||||
.\"#SSLOptions
|
||||
.TP 5
|
||||
\fBSSLOptions \fR[\fIAllowRC4\fR] [\fIAllowSSL3\fR]
|
||||
.TP 5
|
||||
@@ -422,19 +480,23 @@ Sets encryption options.
|
||||
By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
|
||||
The \fIAllowRC4\fR option enables the 128-bit RC4 cipher suites, which are required for some older clients that do not implement newer ones.
|
||||
The \fIAllowSSL3\fR option enables SSL v3.0, which is required for some older clients that do not support TLS v1.0.
|
||||
.\"#SSLPort
|
||||
.TP 5
|
||||
\fBSSLPort \fIport\fR
|
||||
Listens on the specified port for encrypted connections.
|
||||
.\"#StrictConformance
|
||||
.TP 5
|
||||
\fBStrictConformance Yes\fR
|
||||
.TP 5
|
||||
\fBStrictConformance No\fR
|
||||
Specifies whether the scheduler requires clients to strictly adhere to the IPP specifications.
|
||||
The default is "No".
|
||||
.\"#Timeout
|
||||
.TP 5
|
||||
\fBTimeout \fIseconds\fR
|
||||
Specifies the HTTP request timeout.
|
||||
The default is "300" (5 minutes).
|
||||
.\"#WebInterface
|
||||
.TP 5
|
||||
\fBWebInterface yes\fR
|
||||
.TP 5
|
||||
@@ -809,5 +871,5 @@ CUPS Online Help (http://localhost:631/help)
|
||||
.SH COPYRIGHT
|
||||
Copyright \[co] 2007-2014 by Apple Inc.
|
||||
.\"
|
||||
.\" End of "$Id: cupsd.conf.man.in 12215 2014-10-20 18:24:56Z msweet $".
|
||||
.\" End of "$Id: cupsd.conf.man.in 12363 2014-12-12 19:51:33Z msweet $".
|
||||
.\"
|
||||
|
||||
+142
-9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: mantohtml.c 11818 2014-04-15 20:56:19Z msweet $"
|
||||
* "$Id: mantohtml.c 12363 2014-12-12 19:51:33Z msweet $"
|
||||
*
|
||||
* Man page to HTML conversion program.
|
||||
*
|
||||
@@ -53,6 +53,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
*outfile; /* Output file */
|
||||
char line[1024], /* Line from file */
|
||||
*lineptr, /* Pointer into line */
|
||||
anchor[1024], /* Anchor */
|
||||
name[1024], /* Man page name */
|
||||
ddpost[256]; /* Tagged list post markup */
|
||||
int section = -1, /* Man page section */
|
||||
@@ -114,6 +115,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
"\t<link rel=\"stylesheet\" type=\"text/css\" "
|
||||
"href=\"../cups-printable.css\">\n", outfile);
|
||||
|
||||
anchor[0] = '\0';
|
||||
|
||||
while (fgets(line, sizeof(line), infile))
|
||||
{
|
||||
size_t linelen = strlen(line); /* Length of line */
|
||||
@@ -176,13 +179,21 @@ main(int argc, /* I - Number of command-line args */
|
||||
else
|
||||
fputs("<h3><a name=\"", outfile);
|
||||
|
||||
for (lineptr = line + 4; *lineptr; lineptr ++)
|
||||
if (*lineptr == '\"')
|
||||
continue;
|
||||
else if (isalnum(*lineptr & 255))
|
||||
html_putc(*lineptr, outfile);
|
||||
else
|
||||
html_putc('_', outfile);
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs(anchor, outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
for (lineptr = line + 4; *lineptr; lineptr ++)
|
||||
if (*lineptr == '\"')
|
||||
continue;
|
||||
else if (isalnum(*lineptr & 255))
|
||||
html_putc(*lineptr, outfile);
|
||||
else
|
||||
html_putc('_', outfile);
|
||||
}
|
||||
|
||||
fputs("\">", outfile);
|
||||
|
||||
@@ -221,8 +232,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 3, "b", "b", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -238,8 +258,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 3, "i", "i", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -255,8 +284,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, "b", "i", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -272,8 +310,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, "b", NULL, outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -289,8 +336,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, "i", "b", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -306,8 +362,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, "i", NULL, outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -323,8 +388,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, NULL, "b", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -340,8 +414,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, NULL, "i", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -357,8 +440,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, "small", "b", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -374,8 +466,17 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs(end_fonts[font], outfile);
|
||||
font = 0;
|
||||
|
||||
if (anchor[0])
|
||||
fprintf(outfile, "<a name=\"%s\">", anchor);
|
||||
|
||||
html_alternate(line + 4, "small", "small", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fputs("</a>", outfile);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (post)
|
||||
{
|
||||
fputs(post, outfile);
|
||||
@@ -398,6 +499,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
|
||||
fputs("<p>", outfile);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fprintf(outfile, "<a name=\"%s\"></a>", anchor);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
}
|
||||
else if (!strcmp(line, ".RS") || !strncmp(line, ".RS ", 4))
|
||||
{
|
||||
@@ -467,6 +574,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
fprintf(outfile, "<p style=\"margin-left: %.1fem; text-indent: %.1fem\">", amount, -amount);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fprintf(outfile, "<a name=\"%s\"></a>", anchor);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
|
||||
if (line[1] == 'T')
|
||||
post = "<br>\n";
|
||||
}
|
||||
@@ -502,6 +615,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs("<dt>", outfile);
|
||||
snprintf(ddpost, sizeof(ddpost), "<dd style=\"margin-left: %.1fem\">", amount);
|
||||
post = ddpost;
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fprintf(outfile, "<a name=\"%s\"></a>", anchor);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
}
|
||||
else if (!strncmp(line, ".IP ", 4))
|
||||
{
|
||||
@@ -585,6 +704,12 @@ main(int argc, /* I - Number of command-line args */
|
||||
fprintf(outfile, "<li style=\"margin-left: %.1fem;\">", amount);
|
||||
else
|
||||
fprintf(outfile, "<p style=\"margin-left: %.1fem;\">", amount);
|
||||
|
||||
if (anchor[0])
|
||||
{
|
||||
fprintf(outfile, "<a name=\"%s\"></a>", anchor);
|
||||
anchor[0] = '\0';
|
||||
}
|
||||
}
|
||||
else if (!strncmp(line, ".br", 3))
|
||||
{
|
||||
@@ -686,6 +811,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
}
|
||||
#endif /* 0 */
|
||||
else if (!strncmp(line, ".\\\"#", 4))
|
||||
{
|
||||
/*
|
||||
* Anchor for HTML output...
|
||||
*/
|
||||
|
||||
strlcpy(anchor, line + 4, sizeof(anchor));
|
||||
}
|
||||
else if (strncmp(line, ".\\\"", 3))
|
||||
{
|
||||
/*
|
||||
@@ -1088,5 +1221,5 @@ strmove(char *d, /* I - Destination */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: mantohtml.c 11818 2014-04-15 20:56:19Z msweet $".
|
||||
* End of "$Id: mantohtml.c 12363 2014-12-12 19:51:33Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec.in 12222 2014-10-21 11:55:01Z msweet $"
|
||||
# "$Id: cups.spec.in 12501 2015-02-09 15:23:13Z msweet $"
|
||||
#
|
||||
# RPM "spec" file for CUPS.
|
||||
#
|
||||
@@ -44,12 +44,12 @@
|
||||
|
||||
Summary: CUPS
|
||||
Name: cups
|
||||
Version: 2.0.1
|
||||
Version: 2.0.3
|
||||
Release: 1
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
Source: http://www.cups.org/software/2.0.1/cups-2.0.1-source.tar.bz2
|
||||
Source: http://www.cups.org/software/2.0.3/cups-2.0.3-source.tar.bz2
|
||||
Url: http://www.cups.org
|
||||
Packager: Anonymous <anonymous@foo.com>
|
||||
Vendor: Apple Inc.
|
||||
@@ -272,8 +272,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/doc/cups/es/*
|
||||
#%dir /usr/share/doc/cups/fr
|
||||
#/usr/share/doc/cups/fr/*
|
||||
#%dir /usr/share/doc/cups/ja
|
||||
#/usr/share/doc/cups/ja/*
|
||||
%dir /usr/share/doc/cups/ja
|
||||
/usr/share/doc/cups/ja/*
|
||||
#%dir /usr/share/doc/cups/ru
|
||||
#/usr/share/doc/cups/ru/*
|
||||
|
||||
@@ -395,5 +395,5 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: cups.spec.in 12222 2014-10-21 11:55:01Z msweet $".
|
||||
# End of "$Id: cups.spec.in 12501 2015-02-09 15:23:13Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec.in 12222 2014-10-21 11:55:01Z msweet $"
|
||||
# "$Id: cups.spec.in 12501 2015-02-09 15:23:13Z msweet $"
|
||||
#
|
||||
# RPM "spec" file for CUPS.
|
||||
#
|
||||
@@ -272,8 +272,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/doc/cups/es/*
|
||||
#%dir /usr/share/doc/cups/fr
|
||||
#/usr/share/doc/cups/fr/*
|
||||
#%dir /usr/share/doc/cups/ja
|
||||
#/usr/share/doc/cups/ja/*
|
||||
%dir /usr/share/doc/cups/ja
|
||||
/usr/share/doc/cups/ja/*
|
||||
#%dir /usr/share/doc/cups/ru
|
||||
#/usr/share/doc/cups/ru/*
|
||||
|
||||
@@ -395,5 +395,5 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: cups.spec.in 12222 2014-10-21 11:55:01Z msweet $".
|
||||
# End of "$Id: cups.spec.in 12501 2015-02-09 15:23:13Z msweet $".
|
||||
#
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
#
|
||||
# "$Id: Makefile 11800 2014-04-08 19:53:57Z msweet $"
|
||||
# "$Id: Makefile 12616 2015-05-06 20:22:01Z msweet $"
|
||||
#
|
||||
# Makefile for the CUPS PPD Compiler.
|
||||
#
|
||||
# Copyright 2007-2014 by Apple Inc.
|
||||
# Copyright 2007-2015 by Apple Inc.
|
||||
# Copyright 2002-2006 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -354,7 +354,7 @@ libcupsppdc.1.dylib: $(LIBOBJS) ../cups/$(LIBCUPS)
|
||||
-current_version 1.0.0 \
|
||||
-compatibility_version 1.0.0 \
|
||||
-exported_symbols_list t.exp \
|
||||
$(LIBOBJS) $(LINKCUPS)
|
||||
$(LIBOBJS) $(LINKCUPS) $(COMMONLIBS)
|
||||
$(RM) libcupsppdc.dylib t.exp
|
||||
$(LN) $@ libcupsppdc.dylib
|
||||
|
||||
@@ -388,5 +388,5 @@ include Dependencies
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: Makefile 11800 2014-04-08 19:53:57Z msweet $".
|
||||
# End of "$Id: Makefile 12616 2015-05-06 20:22:01Z msweet $".
|
||||
#
|
||||
|
||||
+77
-72
@@ -1,21 +1,16 @@
|
||||
//
|
||||
// "$Id: ppdhtml.cxx 3071 2011-03-23 00:05:29Z msweet $"
|
||||
// "$Id: ppdhtml.cxx 12634 2015-05-15 19:17:07Z msweet $"
|
||||
//
|
||||
// PPD to HTML utility for the CUPS PPD Compiler.
|
||||
// PPD to HTML utility for the CUPS PPD Compiler.
|
||||
//
|
||||
// Copyright 2007-2011 by Apple Inc.
|
||||
// Copyright 2002-2005 by Easy Software Products.
|
||||
// Copyright 2007-2015 by Apple Inc.
|
||||
// Copyright 2002-2005 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/".
|
||||
//
|
||||
// Contents:
|
||||
//
|
||||
// main() - Main entry for the PPD to HTML utility.
|
||||
// usage() - Show usage and exit.
|
||||
// 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/".
|
||||
//
|
||||
|
||||
//
|
||||
@@ -58,7 +53,7 @@ main(int argc, // I - Number of command-line arguments
|
||||
_cupsSetLocale(argv);
|
||||
|
||||
// Scan the command-line...
|
||||
src = 0;
|
||||
src = new ppdcSource();
|
||||
|
||||
for (i = 1; i < argc; i ++)
|
||||
if (argv[i][0] == '-')
|
||||
@@ -97,65 +92,75 @@ main(int argc, // I - Number of command-line arguments
|
||||
else
|
||||
{
|
||||
// Open and load the driver info file...
|
||||
src = new ppdcSource(argv[i]);
|
||||
|
||||
// Create a composite group with all of the features from the
|
||||
// drivers in the info file...
|
||||
composite = new ppdcGroup("", "");
|
||||
|
||||
for (d = (ppdcDriver *)src->drivers->first(); d; d = (ppdcDriver *)src->drivers->next())
|
||||
for (g = (ppdcGroup *)d->groups->first(); g; g = (ppdcGroup *)d->groups->next())
|
||||
for (o = (ppdcOption *)g->options->first(); o; o = (ppdcOption *)g->options->next())
|
||||
{
|
||||
if ((compo = composite->find_option(o->name->value)) == NULL)
|
||||
composite->add_option(new ppdcOption(o));
|
||||
}
|
||||
|
||||
puts("<html>");
|
||||
printf("<head><title>Driver Summary for %s</title></head>\n", argv[i]);
|
||||
printf("<body><h1>Driver Summary for %s</h1>\n", argv[i]);
|
||||
printf("<p><table border='1'><thead><tr><th>Printer</th><th>Media Size</th>");
|
||||
for (compo = (ppdcOption *)composite->options->first(); compo; compo = (ppdcOption *)composite->options->next())
|
||||
printf("<th>%s</th>", compo->text->value);
|
||||
puts("</tr></thead><tbody>");
|
||||
|
||||
// Write HTML summary...
|
||||
for (d = (ppdcDriver *)src->drivers->first(); d; d = (ppdcDriver *)src->drivers->next())
|
||||
{
|
||||
// Write the summary for this driver...
|
||||
printf("<tr valign='top'><td nowrap>%s</td><td nowrap>", d->model_name->value);
|
||||
for (size = (ppdcMediaSize *)d->sizes->first(); size;
|
||||
size = (ppdcMediaSize *)d->sizes->next())
|
||||
printf("%s<br>", size->text->value);
|
||||
printf("</td>");
|
||||
|
||||
for (compo = (ppdcOption *)composite->options->first(); compo;
|
||||
compo = (ppdcOption *)composite->options->next())
|
||||
if ((o = d->find_option(compo->name->value)) != NULL)
|
||||
{
|
||||
printf("<td nowrap>");
|
||||
for (c = (ppdcChoice *)o->choices->first(); c;
|
||||
c = (ppdcChoice *)o->choices->next())
|
||||
printf("%s<br>", c->text->value);
|
||||
printf("</td>");
|
||||
}
|
||||
else
|
||||
printf("<td>N/A</td>");
|
||||
|
||||
puts("</tr>");
|
||||
}
|
||||
|
||||
puts("</tbody></table></p>");
|
||||
puts("</body>");
|
||||
puts("</html>");
|
||||
// Delete the printer driver information...
|
||||
composite->release();
|
||||
src->release();
|
||||
src->read_file(argv[i]);
|
||||
}
|
||||
|
||||
// If no drivers have been loaded, display the program usage message.
|
||||
if (!src)
|
||||
if ((d = (ppdcDriver *)src->drivers->first()) != NULL)
|
||||
{
|
||||
// Create a composite group with all of the features from the
|
||||
// drivers in the info file...
|
||||
composite = new ppdcGroup("", "");
|
||||
|
||||
while (d != NULL)
|
||||
{
|
||||
for (g = (ppdcGroup *)d->groups->first(); g; g = (ppdcGroup *)d->groups->next())
|
||||
for (o = (ppdcOption *)g->options->first(); o; o = (ppdcOption *)g->options->next())
|
||||
{
|
||||
if ((compo = composite->find_option(o->name->value)) == NULL)
|
||||
composite->add_option(new ppdcOption(o));
|
||||
}
|
||||
|
||||
d = (ppdcDriver *)src->drivers->next();
|
||||
}
|
||||
|
||||
puts("<html>");
|
||||
printf("<head><title>Driver Summary for %s</title></head>\n", argv[i]);
|
||||
printf("<body><h1>Driver Summary for %s</h1>\n", argv[i]);
|
||||
printf("<p><table border='1'><thead><tr><th>Printer</th><th>Media Size</th>");
|
||||
for (compo = (ppdcOption *)composite->options->first(); compo; compo = (ppdcOption *)composite->options->next())
|
||||
printf("<th>%s</th>", compo->text->value);
|
||||
puts("</tr></thead><tbody>");
|
||||
|
||||
// Write HTML summary...
|
||||
for (d = (ppdcDriver *)src->drivers->first(); d; d = (ppdcDriver *)src->drivers->next())
|
||||
{
|
||||
// Write the summary for this driver...
|
||||
printf("<tr valign='top'><td nowrap>%s</td><td nowrap>", d->model_name->value);
|
||||
for (size = (ppdcMediaSize *)d->sizes->first(); size;
|
||||
size = (ppdcMediaSize *)d->sizes->next())
|
||||
printf("%s<br>", size->text->value);
|
||||
printf("</td>");
|
||||
|
||||
for (compo = (ppdcOption *)composite->options->first(); compo;
|
||||
compo = (ppdcOption *)composite->options->next())
|
||||
if ((o = d->find_option(compo->name->value)) != NULL)
|
||||
{
|
||||
printf("<td nowrap>");
|
||||
for (c = (ppdcChoice *)o->choices->first(); c;
|
||||
c = (ppdcChoice *)o->choices->next())
|
||||
printf("%s<br>", c->text->value);
|
||||
printf("</td>");
|
||||
}
|
||||
else
|
||||
printf("<td>N/A</td>");
|
||||
|
||||
puts("</tr>");
|
||||
}
|
||||
|
||||
puts("</tbody></table></p>");
|
||||
puts("</body>");
|
||||
puts("</html>");
|
||||
|
||||
// Delete the printer driver information...
|
||||
composite->release();
|
||||
}
|
||||
else
|
||||
{
|
||||
// If no drivers have been loaded, display the program usage message.
|
||||
usage();
|
||||
}
|
||||
|
||||
src->release();
|
||||
|
||||
// Return with no errors.
|
||||
return (0);
|
||||
@@ -182,5 +187,5 @@ usage(void)
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: ppdhtml.cxx 3071 2011-03-23 00:05:29Z msweet $".
|
||||
// End of "$Id: ppdhtml.cxx 12634 2015-05-15 19:17:07Z msweet $".
|
||||
//
|
||||
|
||||
+32
-37
@@ -1,22 +1,16 @@
|
||||
//
|
||||
// "$Id: ppdpo.cxx 3794 2012-04-23 22:44:16Z msweet $"
|
||||
// "$Id: ppdpo.cxx 12634 2015-05-15 19:17:07Z msweet $"
|
||||
//
|
||||
// PPD file message catalog program for the CUPS PPD Compiler.
|
||||
// PPD file message catalog program for the CUPS PPD Compiler.
|
||||
//
|
||||
// Copyright 2007-2012 by Apple Inc.
|
||||
// Copyright 2002-2005 by Easy Software Products.
|
||||
// Copyright 2007-2015 by Apple Inc.
|
||||
// Copyright 2002-2005 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/".
|
||||
//
|
||||
// Contents:
|
||||
//
|
||||
// main() - Main entry for the PPD compiler.
|
||||
// add_ui_strings() - Add all UI strings from the driver.
|
||||
// usage() - Show usage and exit.
|
||||
// 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/".
|
||||
//
|
||||
|
||||
//
|
||||
@@ -58,7 +52,7 @@ main(int argc, // I - Number of command-line arguments
|
||||
|
||||
// Scan the command-line...
|
||||
catalog = new ppdcCatalog("en");
|
||||
src = 0;
|
||||
src = new ppdcSource();
|
||||
verbose = 0;
|
||||
outfile = 0;
|
||||
|
||||
@@ -123,24 +117,29 @@ main(int argc, // I - Number of command-line arguments
|
||||
_("ppdc: Loading driver information file \"%s\"."),
|
||||
argv[i]);
|
||||
|
||||
src = new ppdcSource(argv[i]);
|
||||
|
||||
// Add UI strings...
|
||||
for (d = (ppdcDriver *)src->drivers->first();
|
||||
d;
|
||||
d = (ppdcDriver *)src->drivers->next())
|
||||
{
|
||||
if (verbose)
|
||||
_cupsLangPrintf(stderr, _("ppdc: Adding/updating UI text from %s."),
|
||||
argv[i]);
|
||||
|
||||
add_ui_strings(d, catalog);
|
||||
}
|
||||
|
||||
// Delete the printer driver information...
|
||||
src->release();
|
||||
src->read_file(argv[i]);
|
||||
}
|
||||
|
||||
// If no drivers have been loaded, display the program usage message.
|
||||
if ((d = (ppdcDriver *)src->drivers->first()) != NULL)
|
||||
{
|
||||
// Add UI strings...
|
||||
while (d != NULL)
|
||||
{
|
||||
if (verbose)
|
||||
_cupsLangPrintf(stderr, _("ppdc: Adding/updating UI text from %s."), argv[i]);
|
||||
|
||||
add_ui_strings(d, catalog);
|
||||
|
||||
d = (ppdcDriver *)src->drivers->next();
|
||||
}
|
||||
}
|
||||
else
|
||||
usage();
|
||||
|
||||
// Delete the printer driver information...
|
||||
src->release();
|
||||
|
||||
// Write the message catalog...
|
||||
if (!outfile)
|
||||
usage();
|
||||
@@ -149,10 +148,6 @@ main(int argc, // I - Number of command-line arguments
|
||||
|
||||
catalog->release();
|
||||
|
||||
// If no drivers have been loaded, display the program usage message.
|
||||
if (!src)
|
||||
usage();
|
||||
|
||||
// Return with no errors.
|
||||
return (0);
|
||||
}
|
||||
@@ -263,5 +258,5 @@ usage(void)
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: ppdpo.cxx 3794 2012-04-23 22:44:16Z msweet $".
|
||||
// End of "$Id: ppdpo.cxx 12634 2015-05-15 19:17:07Z msweet $".
|
||||
//
|
||||
|
||||
+16
-7
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: auth.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: auth.c 12604 2015-05-06 01:43:05Z msweet $"
|
||||
*
|
||||
* Authorization routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -835,7 +835,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
|
||||
* to use it...
|
||||
*/
|
||||
|
||||
if (gss_init_sec_context == NULL)
|
||||
if (&gss_init_sec_context == NULL)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"[Client %d] GSSAPI/Kerberos authentication failed "
|
||||
@@ -1375,6 +1375,7 @@ cupsdCopyLocation(
|
||||
if (loc->location)
|
||||
temp->location = _cupsStrAlloc(loc->location);
|
||||
|
||||
temp->length = loc->length;
|
||||
temp->limit = loc->limit;
|
||||
temp->order_type = loc->order_type;
|
||||
temp->type = loc->type;
|
||||
@@ -1477,6 +1478,8 @@ cupsdFindBest(const char *path, /* I - Resource path */
|
||||
CUPSD_AUTH_LIMIT_DELETE,
|
||||
CUPSD_AUTH_LIMIT_TRACE,
|
||||
CUPSD_AUTH_LIMIT_ALL,
|
||||
CUPSD_AUTH_LIMIT_ALL,
|
||||
CUPSD_AUTH_LIMIT_ALL,
|
||||
CUPSD_AUTH_LIMIT_ALL
|
||||
};
|
||||
|
||||
@@ -1502,7 +1505,11 @@ cupsdFindBest(const char *path, /* I - Resource path */
|
||||
*uriptr = '\0';
|
||||
}
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindBest: uri = \"%s\"...", uri);
|
||||
if ((uriptr = strchr(uri, '?')) != NULL)
|
||||
*uriptr = '\0'; /* Drop trailing query string */
|
||||
|
||||
if ((uriptr = uri + strlen(uri) - 1) > uri && *uriptr == '/')
|
||||
*uriptr = '\0'; /* Remove trailing '/' */
|
||||
|
||||
/*
|
||||
* Loop through the list of locations to find a match...
|
||||
@@ -1512,12 +1519,14 @@ cupsdFindBest(const char *path, /* I - Resource path */
|
||||
best = NULL;
|
||||
bestlen = 0;
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindBest: uri = \"%s\", limit=%x...", uri, limit);
|
||||
|
||||
|
||||
for (loc = (cupsd_location_t *)cupsArrayFirst(Locations);
|
||||
loc;
|
||||
loc = (cupsd_location_t *)cupsArrayNext(Locations))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindBest: Location %s Limit %x",
|
||||
loc->location ? loc->location : "nil", loc->limit);
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindBest: Location %s(%d) Limit %x", loc->location ? loc->location : "(null)", (int)loc->length, loc->limit);
|
||||
|
||||
if (!strncmp(uri, "/printers/", 10) || !strncmp(uri, "/classes/", 9))
|
||||
{
|
||||
@@ -2327,5 +2336,5 @@ to64(char *s, /* O - Output string */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: auth.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: auth.c 12604 2015-05-06 01:43:05Z msweet $".
|
||||
*/
|
||||
|
||||
+21
-11
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: client.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: client.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* Client routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -484,7 +484,12 @@ cupsdCloseClient(cupsd_client_t *con) /* I - Client to close */
|
||||
|
||||
httpClose(con->http);
|
||||
|
||||
cupsdClearString(&con->filename);
|
||||
if (con->filename)
|
||||
{
|
||||
unlink(con->filename);
|
||||
cupsdClearString(&con->filename);
|
||||
}
|
||||
|
||||
cupsdClearString(&con->command);
|
||||
cupsdClearString(&con->options);
|
||||
cupsdClearString(&con->query_string);
|
||||
@@ -585,6 +590,17 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
* connection and we need to shut it down...
|
||||
*/
|
||||
|
||||
if (!httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1)
|
||||
{
|
||||
/*
|
||||
* Connection closed...
|
||||
*/
|
||||
|
||||
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF.");
|
||||
cupsdCloseClient(con);
|
||||
return;
|
||||
}
|
||||
|
||||
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on unexpected HTTP read state %s.",
|
||||
httpStateString(httpGetState(con->http)));
|
||||
cupsdCloseClient(con);
|
||||
@@ -1979,12 +1995,6 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
|
||||
if (httpGetState(con->http) == HTTP_STATE_POST_SEND)
|
||||
{
|
||||
/*
|
||||
* Don't listen for activity until we decide to do something with this...
|
||||
*/
|
||||
|
||||
cupsdAddSelect(httpGetFd(con->http), NULL, NULL, con);
|
||||
|
||||
if (con->file >= 0)
|
||||
{
|
||||
fstat(con->file, &filestats);
|
||||
@@ -3656,7 +3666,7 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
|
||||
snprintf(script_filename, sizeof(script_filename), "SCRIPT_FILENAME=%s%s",
|
||||
DocumentRoot, script_name + 12);
|
||||
|
||||
sprintf(server_port, "SERVER_PORT=%d", con->serverport);
|
||||
snprintf(server_port, sizeof(server_port), "SERVER_PORT=%d", con->serverport);
|
||||
|
||||
if (httpGetField(con->http, HTTP_FIELD_HOST)[0])
|
||||
{
|
||||
@@ -4055,5 +4065,5 @@ write_pipe(cupsd_client_t *con) /* I - Client connection */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: client.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: client.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: colorman.c 12226 2014-10-21 13:36:05Z msweet $"
|
||||
* "$Id: colorman.c 12369 2014-12-15 14:51:28Z msweet $"
|
||||
*
|
||||
* Color management routines for the CUPS scheduler.
|
||||
*
|
||||
@@ -151,8 +151,11 @@ cupsdRegisterColor(cupsd_printer_t *p) /* I - Printer */
|
||||
}
|
||||
|
||||
#elif defined(HAVE_DBUS)
|
||||
colord_unregister_printer(p);
|
||||
colord_register_printer(p);
|
||||
if (!RunUser)
|
||||
{
|
||||
colord_unregister_printer(p);
|
||||
colord_register_printer(p);
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
}
|
||||
|
||||
@@ -205,7 +208,8 @@ cupsdUnregisterColor(cupsd_printer_t *p)/* I - Printer */
|
||||
apple_unregister_profiles(p);
|
||||
|
||||
#elif defined(HAVE_DBUS)
|
||||
colord_unregister_printer(p);
|
||||
if (!RunUser)
|
||||
colord_unregister_printer(p);
|
||||
#endif /* __APPLE__ */
|
||||
}
|
||||
|
||||
@@ -1515,5 +1519,5 @@ colord_unregister_printer(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: colorman.c 12226 2014-10-21 13:36:05Z msweet $".
|
||||
* End of "$Id: colorman.c 12369 2014-12-15 14:51:28Z msweet $".
|
||||
*/
|
||||
|
||||
+72
-70
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: conf.c 12224 2014-10-21 13:16:30Z msweet $"
|
||||
* "$Id: conf.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* Configuration routines for the CUPS scheduler.
|
||||
*
|
||||
@@ -407,7 +407,7 @@ cupsdDefaultAuthType(void)
|
||||
* to use it...
|
||||
*/
|
||||
|
||||
if (gss_init_sec_context == NULL)
|
||||
if (&gss_init_sec_context == NULL)
|
||||
return (default_auth_type = CUPSD_AUTH_BASIC);
|
||||
# endif /* __APPLE__ */
|
||||
|
||||
@@ -993,7 +993,7 @@ cupsdReadConfiguration(void)
|
||||
* Log the error and reset the group to a safe value...
|
||||
*/
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_NOTICE,
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Group and SystemGroup cannot use the same groups.");
|
||||
if (FatalErrors & (CUPSD_FATAL_CONFIG | CUPSD_FATAL_PERMISSIONS))
|
||||
return (0);
|
||||
@@ -2008,8 +2008,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
else if (!_cups_strcasecmp(value, "always"))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Encryption value \"%s\" on line %d is invalid in this "
|
||||
"context. Using \"required\" instead.", value, linenum);
|
||||
"Encryption value \"%s\" on line %d of %s is invalid in this "
|
||||
"context. Using \"required\" instead.", value, linenum, ConfigurationFile);
|
||||
|
||||
loc->encryption = HTTP_ENCRYPT_REQUIRED;
|
||||
}
|
||||
@@ -2020,7 +2020,7 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Unknown Encryption value %s on line %d.", value, linenum);
|
||||
"Unknown Encryption value %s on line %d of %s.", value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
@@ -2036,8 +2036,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
loc->order_type = CUPSD_AUTH_DENY;
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown Order value %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown Order value %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
@@ -2139,8 +2139,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
|
||||
if (!get_addr_and_mask(value, ip, mask))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad netmask value %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad netmask value %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -2194,8 +2194,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"Unknown authorization type %s on line %d.",
|
||||
value, linenum);
|
||||
"Unknown authorization type %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
@@ -2221,8 +2221,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"\"AuthClass %s\" is deprecated; consider using "
|
||||
"\"Require valid-user\" on line %d.",
|
||||
value, linenum);
|
||||
"\"Require valid-user\" on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(value, "group"))
|
||||
{
|
||||
@@ -2230,8 +2230,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"\"AuthClass %s\" is deprecated; consider using "
|
||||
"\"Require user @groupname\" on line %d.",
|
||||
value, linenum);
|
||||
"\"Require user @groupname\" on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(value, "system"))
|
||||
{
|
||||
@@ -2241,14 +2241,14 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"\"AuthClass %s\" is deprecated; consider using "
|
||||
"\"Require user @SYSTEM\" on line %d.",
|
||||
value, linenum);
|
||||
"\"Require user @SYSTEM\" on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"Unknown authorization class %s on line %d.",
|
||||
value, linenum);
|
||||
"Unknown authorization class %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
@@ -2258,8 +2258,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"\"AuthGroupName %s\" directive is deprecated; consider "
|
||||
"using \"Require user @%s\" on line %d.",
|
||||
value, value, linenum);
|
||||
"using \"Require user @%s\" on line %d of %s.",
|
||||
value, value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Require"))
|
||||
{
|
||||
@@ -2285,8 +2285,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
loc->level = CUPSD_AUTH_GROUP;
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Require type %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Require type %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -2348,8 +2348,8 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
|
||||
loc->satisfy = CUPSD_AUTH_SATISFY_ANY;
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Satisfy value %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Satisfy value %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
@@ -2925,15 +2925,16 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
JobRetryInterval = atoi(value);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"FaxRetryInterval is deprecated; use "
|
||||
"JobRetryInterval on line %d.", linenum);
|
||||
"JobRetryInterval on line %d of %s.", linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "FaxRetryLimit") && value)
|
||||
{
|
||||
JobRetryLimit = atoi(value);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"FaxRetryLimit is deprecated; use "
|
||||
"JobRetryLimit on line %d.", linenum);
|
||||
"JobRetryLimit on line %d of %s.", linenum, ConfigurationFile);
|
||||
}
|
||||
#ifdef HAVE_SSL
|
||||
else if (!_cups_strcasecmp(line, "SSLOptions"))
|
||||
{
|
||||
/*
|
||||
@@ -2977,6 +2978,7 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
|
||||
_httpTLSSetOptions(options);
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
else if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")
|
||||
#ifdef HAVE_SSL
|
||||
|| !_cups_strcasecmp(line, "SSLPort") || !_cups_strcasecmp(line, "SSLListen")
|
||||
@@ -3105,8 +3107,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
if (protocols < 0)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Unknown browse protocol \"%s\" on line %d.",
|
||||
value, linenum);
|
||||
"Unknown browse protocol \"%s\" on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3131,8 +3133,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"Unknown default authorization type %s on line %d.",
|
||||
value, linenum);
|
||||
"Unknown default authorization type %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
@@ -3153,8 +3155,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"Unknown default encryption %s on line %d.",
|
||||
value, linenum);
|
||||
"Unknown default encryption %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
@@ -3175,8 +3177,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else if (!_cups_strcasecmp(value, "double"))
|
||||
HostNameLookups = 2;
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown HostNameLookups %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown HostNameLookups %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "AccessLogLevel") && value)
|
||||
{
|
||||
@@ -3193,8 +3195,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else if (!_cups_strcasecmp(value, "none"))
|
||||
AccessLogLevel = CUPSD_ACCESSLOG_NONE;
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown AccessLogLevel %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown AccessLogLevel %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "LogLevel") && value)
|
||||
{
|
||||
@@ -3223,8 +3225,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else if (!_cups_strcasecmp(value, "none"))
|
||||
LogLevel = CUPSD_LOG_NONE;
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogLevel %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogLevel %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "LogTimeFormat") && value)
|
||||
{
|
||||
@@ -3237,8 +3239,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else if (!_cups_strcasecmp(value, "usecs"))
|
||||
LogTimeFormat = CUPSD_TIME_USECS;
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "ServerTokens") && value)
|
||||
{
|
||||
@@ -3269,8 +3271,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
else if (!_cups_strcasecmp(value, "None"))
|
||||
cupsdClearString(&ServerHeader);
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown ServerTokens %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown ServerTokens %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "PassEnv") && value)
|
||||
{
|
||||
@@ -3346,8 +3348,8 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
|
||||
}
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Missing value for SetEnv directive on line %d.",
|
||||
linenum);
|
||||
"Missing value for SetEnv directive on line %d of %s.",
|
||||
linenum, ConfigurationFile);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "AccessLog") ||
|
||||
!_cups_strcasecmp(line, "CacheDir") ||
|
||||
@@ -3594,8 +3596,8 @@ read_location(cups_file_t *fp, /* I - Configuration file */
|
||||
|
||||
|
||||
if ((parent = cupsdFindLocation(location)) != NULL)
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Location %s> on line %d.",
|
||||
location, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Location %s> on line %d of %s.",
|
||||
location, linenum, ConfigurationFile);
|
||||
else if ((parent = cupsdNewLocation(location)) == NULL)
|
||||
return (0);
|
||||
else
|
||||
@@ -3620,7 +3622,7 @@ read_location(cups_file_t *fp, /* I - Configuration file */
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of %s.", linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
else
|
||||
@@ -3655,8 +3657,8 @@ read_location(cups_file_t *fp, /* I - Configuration file */
|
||||
else if (!strcmp(value, "TRACE"))
|
||||
loc->limit |= CUPSD_AUTH_LIMIT_TRACE;
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown request type %s on line %d.",
|
||||
value, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Unknown request type %s on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
|
||||
for (value = valptr; isspace(*value & 255); value ++);
|
||||
}
|
||||
@@ -3671,15 +3673,15 @@ read_location(cups_file_t *fp, /* I - Configuration file */
|
||||
loc = parent;
|
||||
else if (!value)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d of %s.", linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
else if (!parse_aaa(loc, line, value, linenum))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Unknown Location directive %s on line %d.",
|
||||
line, linenum);
|
||||
"Unknown Location directive %s on line %d of %s.",
|
||||
line, linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
@@ -3718,8 +3720,8 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
*/
|
||||
|
||||
if ((pol = cupsdFindPolicy(policy)) != NULL)
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Policy %s> on line %d.",
|
||||
policy, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Policy %s> on line %d of %s.",
|
||||
policy, linenum, ConfigurationFile);
|
||||
else if ((pol = cupsdAddPolicy(policy)) == NULL)
|
||||
return (0);
|
||||
|
||||
@@ -3740,8 +3742,8 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
{
|
||||
if (op)
|
||||
cupsdLogMessage(CUPSD_LOG_WARN,
|
||||
"Missing </Limit> before </Policy> on line %d.",
|
||||
linenum);
|
||||
"Missing </Limit> before </Policy> on line %d of %s.",
|
||||
linenum, ConfigurationFile);
|
||||
|
||||
set_policy_defaults(pol);
|
||||
|
||||
@@ -3751,7 +3753,7 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of %s.", linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
else
|
||||
@@ -3777,15 +3779,15 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
ops[num_ops] = IPP_ANY_OPERATION;
|
||||
else if ((ops[num_ops] = ippOpValue(value)) == IPP_BAD_OPERATION)
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Bad IPP operation name \"%s\" on line %d.",
|
||||
value, linenum);
|
||||
"Bad IPP operation name \"%s\" on line %d of %s.",
|
||||
value, linenum, ConfigurationFile);
|
||||
else
|
||||
num_ops ++;
|
||||
}
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Too many operations listed on line %d.",
|
||||
linenum);
|
||||
"Too many operations listed on line %d of %s.",
|
||||
linenum, ConfigurationFile);
|
||||
|
||||
for (value = valptr; isspace(*value & 255); value ++);
|
||||
}
|
||||
@@ -3826,7 +3828,7 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
}
|
||||
else if (!value)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d of %s.", linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
@@ -3839,7 +3841,7 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"%s directive must appear outside <Limit>...</Limit> "
|
||||
"on line %d.", line, linenum);
|
||||
"on line %d of %s.", line, linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
@@ -3937,16 +3939,16 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
|
||||
else if (!op)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Missing <Limit ops> directive before %s on line %d.",
|
||||
line, linenum);
|
||||
"Missing <Limit ops> directive before %s on line %d of %s.",
|
||||
line, linenum, ConfigurationFile);
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
}
|
||||
else if (!parse_aaa(op, line, value, linenum))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Unknown Policy Limit directive %s on line %d.",
|
||||
line, linenum);
|
||||
"Unknown Policy Limit directive %s on line %d of %s.",
|
||||
line, linenum, ConfigurationFile);
|
||||
|
||||
if (FatalErrors & CUPSD_FATAL_CONFIG)
|
||||
return (0);
|
||||
@@ -4141,5 +4143,5 @@ set_policy_defaults(cupsd_policy_t *pol)/* I - Policy */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: conf.c 12224 2014-10-21 13:16:30Z msweet $".
|
||||
* End of "$Id: conf.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: cups-lpd.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: cups-lpd.c 12612 2015-05-06 15:30:50Z msweet $"
|
||||
*
|
||||
* Line Printer Daemon interface for CUPS.
|
||||
*
|
||||
@@ -219,8 +219,10 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* resource list, and/or user name.
|
||||
*/
|
||||
|
||||
command = line[0];
|
||||
dest = line + 1;
|
||||
if ((command = line[0]) == '\0')
|
||||
dest = line;
|
||||
else
|
||||
dest = line + 1;
|
||||
|
||||
if (command == 0x02)
|
||||
list = NULL;
|
||||
@@ -1612,5 +1614,5 @@ smart_gets(char *s, /* I - Pointer to line buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: cups-lpd.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: cups-lpd.c 12612 2015-05-06 15:30:50Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: cupsfilter.c 11770 2014-03-28 14:49:58Z msweet $"
|
||||
* "$Id: cupsfilter.c 12303 2014-12-09 16:16:07Z msweet $"
|
||||
*
|
||||
* Filtering program for CUPS.
|
||||
*
|
||||
@@ -178,7 +178,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (i < argc && !infile)
|
||||
infile = argv[i];
|
||||
else
|
||||
usage(opt);
|
||||
usage(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1501,5 +1501,5 @@ usage(const char *opt) /* I - Incorrect option, if any */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: cupsfilter.c 11770 2014-03-28 14:49:58Z msweet $".
|
||||
* End of "$Id: cupsfilter.c 12303 2014-12-09 16:16:07Z msweet $".
|
||||
*/
|
||||
|
||||
+15
-8
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: dirsvc.c 11871 2014-05-09 20:57:11Z msweet $"
|
||||
* "$Id: dirsvc.c 12459 2015-01-30 16:16:12Z msweet $"
|
||||
*
|
||||
* Directory services routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1296,13 +1296,20 @@ dnssdStop(void)
|
||||
DNSSDMaster = NULL;
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
avahi_threaded_poll_stop(DNSSDMaster);
|
||||
if (DNSSDMaster)
|
||||
avahi_threaded_poll_stop(DNSSDMaster);
|
||||
|
||||
avahi_client_free(DNSSDClient);
|
||||
DNSSDClient = NULL;
|
||||
if (DNSSDClient)
|
||||
{
|
||||
avahi_client_free(DNSSDClient);
|
||||
DNSSDClient = NULL;
|
||||
}
|
||||
|
||||
avahi_threaded_poll_free(DNSSDMaster);
|
||||
DNSSDMaster = NULL;
|
||||
if (DNSSDMaster)
|
||||
{
|
||||
avahi_threaded_poll_free(DNSSDMaster);
|
||||
DNSSDMaster = NULL;
|
||||
}
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
cupsArrayDelete(DNSSDPrinters);
|
||||
@@ -1816,5 +1823,5 @@ update_smb(int onoff) /* I - 1 = turn on, 0 = turn off */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: dirsvc.c 11871 2014-05-09 20:57:11Z msweet $".
|
||||
* End of "$Id: dirsvc.c 12459 2015-01-30 16:16:12Z msweet $".
|
||||
*/
|
||||
|
||||
+17
-21
@@ -1,27 +1,16 @@
|
||||
/*
|
||||
* "$Id: env.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
* "$Id: env.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* Environment management routines for the CUPS scheduler.
|
||||
* Environment management routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2011 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* 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/".
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsdInitEnv() - Initialize the current environment with standard
|
||||
* variables.
|
||||
* cupsdLoadEnv() - Copy common environment variables into an array.
|
||||
* cupsdSetEnv() - Set a common environment variable.
|
||||
* cupsdSetEnvf() - Set a formatted common environment variable.
|
||||
* cupsdUpdateEnv() - Update the environment for the configured directories.
|
||||
* clear_env() - Clear common environment variables.
|
||||
* find_env() - Find a common environment variable.
|
||||
* 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -130,6 +119,13 @@ cupsdSetEnv(const char *name, /* I - Name of variable */
|
||||
if (!value)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Do not allow dynamic linker variables when running as root...
|
||||
*/
|
||||
|
||||
if (!RunUser && (!strncmp(name, "DYLD_", 5) || !strncmp(name, "LD_", 3)))
|
||||
return;
|
||||
|
||||
/*
|
||||
* See if this variable has already been defined...
|
||||
*/
|
||||
@@ -269,5 +265,5 @@ find_env(const char *name) /* I - Variable name */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: env.c 10996 2013-05-29 11:51:34Z msweet $".
|
||||
* End of "$Id: env.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
+25
-74
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: ipp.c 12124 2014-08-28 15:37:22Z msweet $"
|
||||
* "$Id: ipp.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* IPP routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* This file contains Kerberos support code, copyright 2006 by
|
||||
@@ -409,8 +409,7 @@ cupsdProcessIPPRequest(
|
||||
* Remote unauthenticated user masquerading as local root...
|
||||
*/
|
||||
|
||||
_cupsStrFree(username->values[0].string.text);
|
||||
username->values[0].string.text = _cupsStrAlloc(RemoteRoot);
|
||||
ippSetString(con->request, &username, 0, RemoteRoot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1556,7 +1555,7 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
cupsdSetString(&job->username, con->username);
|
||||
|
||||
if (attr)
|
||||
cupsdSetString(&attr->values[0].string.text, con->username);
|
||||
ippSetString(job->attrs, &attr, 0, con->username);
|
||||
}
|
||||
else if (attr)
|
||||
{
|
||||
@@ -1574,9 +1573,8 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
"job-originating-user-name", NULL, job->username);
|
||||
else
|
||||
{
|
||||
attr->group_tag = IPP_TAG_JOB;
|
||||
_cupsStrFree(attr->name);
|
||||
attr->name = _cupsStrAlloc("job-originating-user-name");
|
||||
ippSetGroupTag(job->attrs, &attr, IPP_TAG_JOB);
|
||||
ippSetName(job->attrs, &attr, "job-originating-user-name");
|
||||
}
|
||||
|
||||
if (con->username[0] || auth_info)
|
||||
@@ -1610,48 +1608,11 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
* Also, we can only have 1 value and it must be a name value.
|
||||
*/
|
||||
|
||||
switch (attr->value_tag)
|
||||
{
|
||||
case IPP_TAG_STRING :
|
||||
case IPP_TAG_TEXTLANG :
|
||||
case IPP_TAG_NAMELANG :
|
||||
case IPP_TAG_TEXT :
|
||||
case IPP_TAG_NAME :
|
||||
case IPP_TAG_KEYWORD :
|
||||
case IPP_TAG_URI :
|
||||
case IPP_TAG_URISCHEME :
|
||||
case IPP_TAG_CHARSET :
|
||||
case IPP_TAG_LANGUAGE :
|
||||
case IPP_TAG_MIMETYPE :
|
||||
/*
|
||||
* Free old strings...
|
||||
*/
|
||||
|
||||
for (i = 0; i < attr->num_values; i ++)
|
||||
{
|
||||
_cupsStrFree(attr->values[i].string.text);
|
||||
attr->values[i].string.text = NULL;
|
||||
if (attr->values[i].string.language)
|
||||
{
|
||||
_cupsStrFree(attr->values[i].string.language);
|
||||
attr->values[i].string.language = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
default :
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use the default connection hostname instead...
|
||||
*/
|
||||
|
||||
attr->value_tag = IPP_TAG_NAME;
|
||||
attr->num_values = 1;
|
||||
attr->values[0].string.text = _cupsStrAlloc(con->http->hostname);
|
||||
ippDeleteAttribute(job->attrs, attr);
|
||||
ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-originating-host-name", NULL, con->http->hostname);
|
||||
}
|
||||
|
||||
attr->group_tag = IPP_TAG_JOB;
|
||||
else
|
||||
ippSetGroupTag(job->attrs, &attr, IPP_TAG_JOB);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1747,8 +1708,8 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
|
||||
attr = ippAddStrings(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-sheets",
|
||||
2, NULL, NULL);
|
||||
attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
|
||||
attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
|
||||
ippSetString(job->attrs, &attr, 0, printer->job_sheets[0]);
|
||||
ippSetString(job->attrs, &attr, 1, printer->job_sheets[1]);
|
||||
}
|
||||
|
||||
job->job_sheets = attr;
|
||||
@@ -1774,7 +1735,7 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
* Force the leading banner to have the classification on it...
|
||||
*/
|
||||
|
||||
cupsdSetString(&attr->values[0].string.text, Classification);
|
||||
ippSetString(job->attrs, &attr, 0, Classification);
|
||||
|
||||
cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
|
||||
"job-sheets=\"%s,none\", "
|
||||
@@ -1791,7 +1752,7 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
* Can't put two different security markings on the same document!
|
||||
*/
|
||||
|
||||
cupsdSetString(&attr->values[1].string.text, attr->values[0].string.text);
|
||||
ippSetString(job->attrs, &attr, 1, attr->values[0].string.text);
|
||||
|
||||
cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
|
||||
"job-sheets=\"%s,%s\", "
|
||||
@@ -1831,18 +1792,18 @@ add_job(cupsd_client_t *con, /* I - Client connection */
|
||||
if (attr->num_values > 1 &&
|
||||
!strcmp(attr->values[0].string.text, attr->values[1].string.text))
|
||||
{
|
||||
cupsdSetString(&(attr->values[0].string.text), Classification);
|
||||
cupsdSetString(&(attr->values[1].string.text), Classification);
|
||||
ippSetString(job->attrs, &attr, 0, Classification);
|
||||
ippSetString(job->attrs, &attr, 1, Classification);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (attr->num_values == 1 ||
|
||||
strcmp(attr->values[0].string.text, "none"))
|
||||
cupsdSetString(&(attr->values[0].string.text), Classification);
|
||||
ippSetString(job->attrs, &attr, 0, Classification);
|
||||
|
||||
if (attr->num_values > 1 &&
|
||||
strcmp(attr->values[1].string.text, "none"))
|
||||
cupsdSetString(&(attr->values[1].string.text), Classification);
|
||||
ippSetString(job->attrs, &attr, 1, Classification);
|
||||
}
|
||||
|
||||
if (attr->num_values > 1)
|
||||
@@ -3069,8 +3030,8 @@ authenticate_job(cupsd_client_t *con, /* I - Client connection */
|
||||
|
||||
if (attr)
|
||||
{
|
||||
attr->value_tag = IPP_TAG_KEYWORD;
|
||||
cupsdSetString(&(attr->values[0].string.text), "no-hold");
|
||||
ippSetValueTag(job->attrs, &attr, IPP_TAG_KEYWORD);
|
||||
ippSetString(job->attrs, &attr, 0, "no-hold");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8191,11 +8152,7 @@ print_job(cupsd_client_t *con, /* I - Client connection */
|
||||
filetype->type);
|
||||
|
||||
if (format)
|
||||
{
|
||||
_cupsStrFree(format->values[0].string.text);
|
||||
|
||||
format->values[0].string.text = _cupsStrAlloc(mimetype);
|
||||
}
|
||||
ippSetString(con->request, &format, 0, mimetype);
|
||||
else
|
||||
ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, mimetype);
|
||||
@@ -8732,10 +8689,8 @@ release_job(cupsd_client_t *con, /* I - Client connection */
|
||||
|
||||
if (attr)
|
||||
{
|
||||
_cupsStrFree(attr->values[0].string.text);
|
||||
|
||||
attr->value_tag = IPP_TAG_KEYWORD;
|
||||
attr->values[0].string.text = _cupsStrAlloc("no-hold");
|
||||
ippSetValueTag(job->attrs, &attr, IPP_TAG_KEYWORD);
|
||||
ippSetString(job->attrs, &attr, 0, "no-hold");
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job,
|
||||
"Job job-hold-until value changed by user.");
|
||||
@@ -9425,11 +9380,7 @@ send_document(cupsd_client_t *con, /* I - Client connection */
|
||||
|
||||
if ((jformat = ippFindAttribute(job->attrs, "document-format",
|
||||
IPP_TAG_MIMETYPE)) != NULL)
|
||||
{
|
||||
_cupsStrFree(jformat->values[0].string.text);
|
||||
|
||||
jformat->values[0].string.text = _cupsStrAlloc(mimetype);
|
||||
}
|
||||
ippSetString(job->attrs, &jformat, 0, mimetype);
|
||||
else
|
||||
ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, mimetype);
|
||||
@@ -11096,5 +11047,5 @@ validate_user(cupsd_job_t *job, /* I - Job */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: ipp.c 12124 2014-08-28 15:37:22Z msweet $".
|
||||
* End of "$Id: ipp.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-28
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: job.c 12140 2014-08-30 01:51:22Z msweet $"
|
||||
* "$Id: job.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* Job management routines for the CUPS scheduler.
|
||||
*
|
||||
@@ -377,7 +377,7 @@ cupsdCheckJobs(void)
|
||||
|
||||
if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
cupsdSetString(&attr->values[0].string.text, printer->uri);
|
||||
ippSetString(job->attrs, &attr, 0, printer->uri);
|
||||
else
|
||||
ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI,
|
||||
"job-actual-printer-uri", NULL, printer->uri);
|
||||
@@ -489,7 +489,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
|
||||
/* Pipes used between filters */
|
||||
int envc; /* Number of environment variables */
|
||||
struct stat fileinfo; /* Job file information */
|
||||
int argc; /* Number of arguments */
|
||||
int argc = 0; /* Number of arguments */
|
||||
char **argv = NULL, /* Filter command-line arguments */
|
||||
filename[1024], /* Job filename */
|
||||
command[1024], /* Full path to command */
|
||||
@@ -2066,7 +2066,7 @@ cupsdMoveJob(cupsd_job_t *job, /* I - Job */
|
||||
|
||||
if ((attr = ippFindAttribute(job->attrs, "job-printer-uri",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
cupsdSetString(&(attr->values[0].string.text), p->uri);
|
||||
ippSetString(job->attrs, &attr, 0, p->uri);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job,
|
||||
"Job #%d moved from %s to %s.", job->id, olddest,
|
||||
@@ -2263,7 +2263,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
|
||||
attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
|
||||
|
||||
if (attr)
|
||||
cupsdSetString(&(attr->values[0].string.text), when);
|
||||
ippSetString(job->attrs, &attr, 0, when);
|
||||
else
|
||||
attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD,
|
||||
"job-hold-until", NULL, when);
|
||||
@@ -2518,8 +2518,8 @@ cupsdSetJobState(
|
||||
|
||||
if (attr)
|
||||
{
|
||||
attr->value_tag = IPP_TAG_KEYWORD;
|
||||
cupsdSetString(&(attr->values[0].string.text), "no-hold");
|
||||
ippSetValueTag(job->attrs, &attr, IPP_TAG_KEYWORD);
|
||||
ippSetString(job->attrs, &attr, 0, "no-hold");
|
||||
}
|
||||
|
||||
default :
|
||||
@@ -4059,14 +4059,13 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
{
|
||||
if (job)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing </Job> directive on line %d.",
|
||||
linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing </Job> directive on line %d of %s.", linenum, filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!value)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing job ID on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing job ID on line %d of %s.", linenum, filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4074,8 +4073,7 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
|
||||
if (jobid < 1)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad job ID %d on line %d.", jobid,
|
||||
linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad job ID %d on line %d of %s.", jobid, linenum, filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4114,7 +4112,7 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
else if (!job)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Missing <Job #> directive on line %d.", linenum);
|
||||
"Missing <Job #> directive on line %d of %s.", linenum, filename);
|
||||
continue;
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "</Job>"))
|
||||
@@ -4136,7 +4134,7 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
}
|
||||
else if (!value)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d of %s.", linenum, filename);
|
||||
continue;
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "State"))
|
||||
@@ -4190,8 +4188,7 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
|
||||
if (job->num_files < 0)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad NumFiles value %d on line %d.",
|
||||
job->num_files, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad NumFiles value %d on line %d of %s.", job->num_files, linenum, filename);
|
||||
job->num_files = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -4230,14 +4227,13 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
if (sscanf(value, "%d%*[ \t]%15[^/]/%255s%d", &number, super, type,
|
||||
&compression) != 4)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File on line %d.", linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File on line %d of %s.", linenum, filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (number < 1 || number > job->num_files)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File number %d on line %d.",
|
||||
number, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File number %d on line %d of %s.", number, linenum, filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4271,14 +4267,13 @@ load_job_cache(const char *filename) /* I - job.cache filename */
|
||||
}
|
||||
}
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown %s directive on line %d.",
|
||||
line, linenum);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown %s directive on line %d of %s.", line, linenum, filename);
|
||||
}
|
||||
|
||||
if (job)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
"Missing </Job> directive on line %d.", linenum);
|
||||
"Missing </Job> directive on line %d of %s.", linenum, filename);
|
||||
cupsdDeleteJob(job, CUPSD_JOB_PURGE);
|
||||
}
|
||||
|
||||
@@ -4570,7 +4565,7 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
"job-printer-state-message",
|
||||
IPP_TAG_TEXT);
|
||||
if (job->printer_message)
|
||||
cupsdSetString(&(job->printer_message->values[0].string.text), "");
|
||||
ippSetString(job->attrs, &job->printer_message, 0, "");
|
||||
|
||||
ippSetString(job->attrs, &job->reasons, 0, "job-printing");
|
||||
cupsdSetJobState(job, IPP_JOB_PROCESSING, CUPSD_JOB_DEFAULT, NULL);
|
||||
@@ -4738,7 +4733,7 @@ stop_job(cupsd_job_t *job, /* I - Job */
|
||||
FilterLevel -= job->cost;
|
||||
job->cost = 0;
|
||||
|
||||
if (action == CUPSD_JOB_DEFAULT && !job->kill_time)
|
||||
if (action == CUPSD_JOB_DEFAULT && !job->kill_time && job->backend > 0)
|
||||
job->kill_time = time(NULL) + JobKillDelay;
|
||||
else if (action >= CUPSD_JOB_FORCE)
|
||||
job->kill_time = 0;
|
||||
@@ -5210,15 +5205,14 @@ update_job_attrs(cupsd_job_t *job, /* I - Job to update */
|
||||
if (job->state_value != IPP_JOB_PROCESSING &&
|
||||
job->status_level == CUPSD_LOG_INFO)
|
||||
{
|
||||
cupsdSetString(&(job->printer_message->values[0].string.text), "");
|
||||
ippSetString(job->attrs, &job->printer_message, 0, "");
|
||||
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
}
|
||||
else if (job->printer->state_message[0] && do_message)
|
||||
{
|
||||
cupsdSetString(&(job->printer_message->values[0].string.text),
|
||||
job->printer->state_message);
|
||||
ippSetString(job->attrs, &job->printer_message, 0, job->printer->state_message);
|
||||
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
@@ -5286,5 +5280,5 @@ update_job_attrs(cupsd_job_t *job, /* I - Job to update */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: job.c 12140 2014-08-30 01:51:22Z msweet $".
|
||||
* End of "$Id: job.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
+11
-12
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: main.c 12248 2014-11-12 16:32:57Z msweet $"
|
||||
* "$Id: main.c 12701 2015-06-08 18:33:44Z msweet $"
|
||||
*
|
||||
* Main loop for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1137,8 +1137,8 @@ cupsdAddString(cups_array_t **a, /* IO - String array */
|
||||
if (!*a)
|
||||
*a = cupsArrayNew3((cups_array_func_t)strcmp, NULL,
|
||||
(cups_ahash_func_t)NULL, 0,
|
||||
(cups_acopy_func_t)_cupsStrAlloc,
|
||||
(cups_afree_func_t)_cupsStrFree);
|
||||
(cups_acopy_func_t)strdup,
|
||||
(cups_afree_func_t)free);
|
||||
|
||||
return (cupsArrayAdd(*a, (char *)s));
|
||||
}
|
||||
@@ -1168,7 +1168,7 @@ cupsdClearString(char **s) /* O - String value */
|
||||
{
|
||||
if (s && *s)
|
||||
{
|
||||
_cupsStrFree(*s);
|
||||
free(*s);
|
||||
*s = NULL;
|
||||
}
|
||||
}
|
||||
@@ -1249,10 +1249,10 @@ cupsdSetString(char **s, /* O - New string */
|
||||
return;
|
||||
|
||||
if (*s)
|
||||
_cupsStrFree(*s);
|
||||
free(*s);
|
||||
|
||||
if (v)
|
||||
*s = _cupsStrAlloc(v);
|
||||
*s = strdup(v);
|
||||
else
|
||||
*s = NULL;
|
||||
}
|
||||
@@ -1283,13 +1283,13 @@ cupsdSetStringf(char **s, /* O - New string */
|
||||
vsnprintf(v, sizeof(v), f, ap);
|
||||
va_end(ap);
|
||||
|
||||
*s = _cupsStrAlloc(v);
|
||||
*s = strdup(v);
|
||||
}
|
||||
else
|
||||
*s = NULL;
|
||||
|
||||
if (olds)
|
||||
_cupsStrFree(olds);
|
||||
free(olds);
|
||||
}
|
||||
|
||||
|
||||
@@ -1449,8 +1449,7 @@ process_children(void)
|
||||
}
|
||||
|
||||
if (job->printer_message)
|
||||
cupsdSetString(&(job->printer_message->values[0].string.text),
|
||||
message);
|
||||
ippSetString(job->attrs, &job->printer_message, 0, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2173,5 +2172,5 @@ usage(int status) /* O - Exit status */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: main.c 12248 2014-11-12 16:32:57Z msweet $".
|
||||
* End of "$Id: main.c 12701 2015-06-08 18:33:44Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: printers.c 12170 2014-09-30 16:12:03Z msweet $"
|
||||
* "$Id: printers.c 12463 2015-01-30 16:34:31Z msweet $"
|
||||
*
|
||||
* Printer routines for the CUPS scheduler.
|
||||
*
|
||||
@@ -3685,8 +3685,6 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
_ppdCacheDestroy(p->pc);
|
||||
p->pc = NULL;
|
||||
|
||||
cupsdClearString(&(p->make_model));
|
||||
|
||||
if (cache_info.st_mtime >= ppd_info.st_mtime)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG, "load_ppd: Loading %s...", cache_name);
|
||||
@@ -3710,6 +3708,8 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG, "load_ppd: Loading %s...", ppd_name);
|
||||
|
||||
cupsdClearString(&(p->make_model));
|
||||
|
||||
p->type &= (cups_ptype_t)~CUPS_PRINTER_OPTIONS;
|
||||
p->type |= CUPS_PRINTER_BW;
|
||||
|
||||
@@ -4724,14 +4724,12 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
|
||||
|
||||
pstatus = ppdLastError(&pline);
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "PPD file for %s cannot be loaded!",
|
||||
p->name);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "PPD file for %s cannot be loaded.", p->name);
|
||||
|
||||
if (pstatus <= PPD_ALLOC_ERROR)
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "%s", strerror(errno));
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "%s: %s", ppd_name, strerror(errno));
|
||||
else
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "%s on line %d.",
|
||||
ppdErrorString(pstatus), pline);
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "%s on line %d of %s.", ppdErrorString(pstatus), pline, ppd_name);
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_INFO,
|
||||
"Hint: Run \"cupstestppd %s\" and fix any errors.",
|
||||
@@ -4936,5 +4934,5 @@ write_xml_string(cups_file_t *fp, /* I - File to write to */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: printers.c 12170 2014-09-30 16:12:03Z msweet $".
|
||||
* End of "$Id: printers.c 12463 2015-01-30 16:34:31Z msweet $".
|
||||
*/
|
||||
|
||||
+22
-10
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: process.c 12252 2014-11-14 17:14:45Z msweet $"
|
||||
* "$Id: process.c 12522 2015-02-17 20:01:33Z msweet $"
|
||||
*
|
||||
* Process management routines for the CUPS scheduler.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -26,6 +26,15 @@
|
||||
# include <spawn.h>
|
||||
extern char **environ;
|
||||
#endif /* HAVE_POSIX_SPAWN */
|
||||
#ifdef HAVE_POSIX_SPAWN
|
||||
# if !defined(__OpenBSD__) || OpenBSD >= 201505
|
||||
# define USE_POSIX_SPAWN 1
|
||||
# else
|
||||
# define USE_POSIX_SPAWN 0
|
||||
# endif /* !__OpenBSD__ || */
|
||||
#else
|
||||
# define USE_POSIX_SPAWN 0
|
||||
#endif /* HAVE_POSIX_SPAWN */
|
||||
|
||||
|
||||
/*
|
||||
@@ -323,6 +332,9 @@ cupsdCreateProfile(int job_id, /* I - Job ID or 0 for none */
|
||||
/* Also allow access to device files... */
|
||||
cupsFilePuts(fp, "(allow file-write* file-read-data file-read-metadata file-ioctl\n"
|
||||
" (regex #\"^/dev/\"))\n");
|
||||
|
||||
/* And allow kernel extensions to be loaded, e.g., SMB */
|
||||
cupsFilePuts(fp, "(allow system-kext-load)\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -465,13 +477,13 @@ cupsdStartProcess(
|
||||
nice_str[16]; /* FilterNice string */
|
||||
uid_t user; /* Command UID */
|
||||
cupsd_proc_t *proc; /* New process record */
|
||||
#if defined(HAVE_POSIX_SPAWN) && !defined(__OpenBSD__)
|
||||
#if USE_POSIX_SPAWN
|
||||
posix_spawn_file_actions_t actions; /* Spawn file actions */
|
||||
posix_spawnattr_t attrs; /* Spawn attributes */
|
||||
sigset_t defsignals; /* Default signals */
|
||||
#elif defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
|
||||
struct sigaction action; /* POSIX signal handler */
|
||||
#endif /* HAVE_POSIX_SPAWN && !__OpenBSD__ */
|
||||
#endif /* USE_POSIX_SPAWN */
|
||||
#if defined(__APPLE__)
|
||||
char processPath[1024], /* CFProcessPath environment variable */
|
||||
linkpath[1024]; /* Link path for symlinks... */
|
||||
@@ -535,9 +547,9 @@ cupsdStartProcess(
|
||||
* Use helper program when we have a sandbox profile...
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_POSIX_SPAWN) || defined(__OpenBSD__)
|
||||
#if !USE_POSIX_SPAWN
|
||||
if (profile)
|
||||
#endif /* !HAVE_POSIX_SPAWN || __OpenBSD__ */
|
||||
#endif /* !USE_POSIX_SPAWN */
|
||||
{
|
||||
snprintf(cups_exec, sizeof(cups_exec), "%s/daemon/cups-exec", ServerBin);
|
||||
snprintf(user_str, sizeof(user_str), "%d", user);
|
||||
@@ -573,7 +585,7 @@ cupsdStartProcess(
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartProcess: argv[%d] = \"%s\"", i, argv[i]);
|
||||
}
|
||||
|
||||
#if defined(HAVE_POSIX_SPAWN) && !defined(__OpenBSD__) /* OpenBSD posix_spawn is busted with SETSIGDEF */
|
||||
#if USE_POSIX_SPAWN
|
||||
/*
|
||||
* Setup attributes and file actions for the spawn...
|
||||
*/
|
||||
@@ -594,7 +606,7 @@ cupsdStartProcess(
|
||||
if (infd != 0)
|
||||
{
|
||||
if (infd < 0)
|
||||
posix_spawn_file_actions_addopen(&actions, 0, "/dev/null", O_WRONLY, 0);
|
||||
posix_spawn_file_actions_addopen(&actions, 0, "/dev/null", O_RDONLY, 0);
|
||||
else
|
||||
posix_spawn_file_actions_adddup2(&actions, infd, 0);
|
||||
}
|
||||
@@ -796,7 +808,7 @@ cupsdStartProcess(
|
||||
}
|
||||
|
||||
cupsdReleaseSignals();
|
||||
#endif /* HAVE_POSIX_SPAWN && !__OpenBSD__ */
|
||||
#endif /* USE_POSIX_SPAWN */
|
||||
|
||||
if (*pid)
|
||||
{
|
||||
@@ -878,5 +890,5 @@ cupsd_requote(char *dst, /* I - Destination buffer */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: process.c 12252 2014-11-14 17:14:45Z msweet $".
|
||||
* End of "$Id: process.c 12522 2015-02-17 20:01:33Z msweet $".
|
||||
*/
|
||||
|
||||
+38
-5
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: type.c 11594 2014-02-14 20:09:01Z msweet $"
|
||||
* "$Id: type.c 12578 2015-03-30 19:07:29Z msweet $"
|
||||
*
|
||||
* MIME typing routines for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -613,8 +613,23 @@ mimeFileType(mime_t *mime, /* I - MIME database */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
fb.offset = -1;
|
||||
fb.length = 0;
|
||||
/*
|
||||
* Then preload the first MIME_MAX_BUFFER bytes of the file into the file
|
||||
* buffer, returning an error if we can't read anything...
|
||||
*/
|
||||
|
||||
fb.offset = 0;
|
||||
fb.length = (int)cupsFileRead(fb.fp, (char *)fb.buffer, MIME_MAX_BUFFER);
|
||||
|
||||
if (fb.length <= 0)
|
||||
{
|
||||
DEBUG_printf(("1mimeFileType: Unable to read from \"%s\": %s", pathname, strerror(errno)));
|
||||
DEBUG_puts("1mimeFileType: Returning NULL.");
|
||||
|
||||
cupsFileClose(fb.fp);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Figure out the base filename (without directory portion)...
|
||||
@@ -780,6 +795,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_ASCII fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -822,6 +839,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_PRINTABLE fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -870,6 +889,8 @@ mime_check_rules(
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_REGEX fb->length=%d", fb->length));
|
||||
|
||||
DEBUG_printf(("5mime_check_rules: loaded %d byte fb->buffer at %d, starts "
|
||||
"with \"%c%c%c%c\".",
|
||||
fb->length, fb->offset, fb->buffer[0], fb->buffer[1],
|
||||
@@ -914,6 +935,8 @@ mime_check_rules(
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_STRING fb->length=%d", fb->length));
|
||||
|
||||
DEBUG_printf(("5mime_check_rules: loaded %d byte fb->buffer at %d, starts "
|
||||
"with \"%c%c%c%c\".",
|
||||
fb->length, fb->offset, fb->buffer[0], fb->buffer[1],
|
||||
@@ -948,6 +971,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_ISTRING fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -976,6 +1001,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_CHAR fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1006,6 +1033,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_SHORT fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1039,6 +1068,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_INT fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1080,6 +1111,8 @@ mime_check_rules(
|
||||
fb->length = cupsFileRead(fb->fp, (char *)fb->buffer,
|
||||
sizeof(fb->buffer));
|
||||
fb->offset = rules->offset;
|
||||
|
||||
DEBUG_printf(("4mime_check_rules: MIME_MAGIC_CONTAINS fb->length=%d", fb->length));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1246,5 +1279,5 @@ mime_patmatch(const char *s, /* I - String to match against */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: type.c 11594 2014-02-14 20:09:01Z msweet $".
|
||||
* End of "$Id: type.c 12578 2015-03-30 19:07:29Z msweet $".
|
||||
*/
|
||||
|
||||
+5
-25
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: cupstestppd.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: cupstestppd.c 12412 2015-01-19 15:18:02Z msweet $"
|
||||
*
|
||||
* PPD test program for CUPS.
|
||||
*
|
||||
* Copyright 2007-2013 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -15,26 +15,6 @@
|
||||
* PostScript is a trademark of Adobe Systems, Inc.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Main entry for test program.
|
||||
* check_basics() - Check for CR LF, mixed line endings, and blank
|
||||
* lines.
|
||||
* check_constraints() - Check UIConstraints in the PPD file.
|
||||
* check_case() - Check that there are no duplicate groups, options,
|
||||
* or choices that differ only by case.
|
||||
* check_defaults() - Check default option keywords in the PPD file.
|
||||
* check_duplex() - Check duplex keywords in the PPD file.
|
||||
* check_filters() - Check filters in the PPD file.
|
||||
* check_profiles() - Check ICC color profiles in the PPD file.
|
||||
* check_sizes() - Check media sizes in the PPD file.
|
||||
* check_translations() - Check translations in the PPD file.
|
||||
* show_conflicts() - Show option conflicts in a PPD file.
|
||||
* test_raster() - Test PostScript commands for raster printers.
|
||||
* usage() - Show program usage.
|
||||
* valid_path() - Check whether a path has the correct capitalization.
|
||||
* valid_utf8() - Check whether a string contains valid UTF-8 text.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -3218,8 +3198,8 @@ check_sizes(ppd_file_t *ppd, /* I - PPD file */
|
||||
pwg_media = pwgMediaForSize(width_2540ths, length_2540ths);
|
||||
|
||||
if (pwg_media &&
|
||||
(fabs(pwg_media->width - width_2540ths) > 34 ||
|
||||
fabs(pwg_media->length - length_2540ths) > 34))
|
||||
(abs(pwg_media->width - width_2540ths) > 34 ||
|
||||
abs(pwg_media->length - length_2540ths) > 34))
|
||||
pwg_media = NULL; /* Only flag matches within a point */
|
||||
|
||||
if (pwg_media && pwg_media->ppd &&
|
||||
@@ -3992,5 +3972,5 @@ valid_utf8(const char *s) /* I - String to check */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: cupstestppd.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: cupstestppd.c 12412 2015-01-19 15:18:02Z msweet $".
|
||||
*/
|
||||
|
||||
+44
-9
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* "$Id: lpadmin.c 11558 2014-02-06 18:33:34Z msweet $"
|
||||
* "$Id: lpadmin.c 12604 2015-05-06 01:43:05Z msweet $"
|
||||
*
|
||||
* "lpadmin" command for CUPS.
|
||||
*
|
||||
* Copyright 2007-2014 by Apple Inc.
|
||||
* Copyright 2007-2015 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -1233,7 +1233,7 @@ set_printer_options(
|
||||
{
|
||||
ipp_t *request; /* IPP Request */
|
||||
const char *ppdfile; /* PPD filename */
|
||||
int ppdchanged; /* PPD changed? */
|
||||
int ppdchanged = 0; /* PPD changed? */
|
||||
ppd_file_t *ppd; /* PPD file */
|
||||
ppd_choice_t *choice; /* Marked choice */
|
||||
char uri[HTTP_MAX_URI], /* URI for printer/class */
|
||||
@@ -1243,11 +1243,13 @@ set_printer_options(
|
||||
tempfile[1024]; /* Temporary filename */
|
||||
cups_file_t *in, /* PPD file */
|
||||
*out; /* Temporary file */
|
||||
const char *protocol, /* Old protocol option */
|
||||
const char *ppdname, /* ppd-name value */
|
||||
*protocol, /* Old protocol option */
|
||||
*customval, /* Custom option value */
|
||||
*boolval; /* Boolean value */
|
||||
int wrote_ipp_supplies = 0, /* Wrote cupsIPPSupplies keyword? */
|
||||
wrote_snmp_supplies = 0;/* Wrote cupsSNMPSupplies keyword? */
|
||||
wrote_snmp_supplies = 0,/* Wrote cupsSNMPSupplies keyword? */
|
||||
copied_options = 0; /* Copied options? */
|
||||
|
||||
|
||||
DEBUG_printf(("set_printer_options(http=%p, printer=\"%s\", num_options=%d, "
|
||||
@@ -1294,6 +1296,26 @@ set_printer_options(
|
||||
|
||||
if (file)
|
||||
ppdfile = file;
|
||||
else if ((ppdname = cupsGetOption("ppd-name", num_options, options)) != NULL && strcmp(ppdname, "raw") && num_options > 1)
|
||||
{
|
||||
if ((ppdfile = cupsGetServerPPD(http, ppdname)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Copy options array and remove ppd-name from it...
|
||||
*/
|
||||
|
||||
cups_option_t *temp = NULL, *optr;
|
||||
int i, num_temp = 0;
|
||||
for (i = num_options, optr = options; i > 0; i --, optr ++)
|
||||
if (strcmp(optr->name, "ppd-name"))
|
||||
num_temp = cupsAddOption(optr->name, optr->value, num_temp, &temp);
|
||||
|
||||
copied_options = 1;
|
||||
ppdchanged = 1;
|
||||
num_options = num_temp;
|
||||
options = temp;
|
||||
}
|
||||
}
|
||||
else if (request->request.op.operation_id == CUPS_ADD_MODIFY_PRINTER)
|
||||
ppdfile = cupsGetPPD(printer);
|
||||
else
|
||||
@@ -1305,7 +1327,15 @@ set_printer_options(
|
||||
* Set default options in the PPD file...
|
||||
*/
|
||||
|
||||
ppd = ppdOpenFile(ppdfile);
|
||||
if ((ppd = ppdOpenFile(ppdfile)) == NULL)
|
||||
{
|
||||
int linenum; /* Line number of error */
|
||||
ppd_status_t status = ppdLastError(&linenum);
|
||||
/* Status code */
|
||||
|
||||
_cupsLangPrintf(stderr, _("lpadmin: Unable to open PPD \"%s\": %s on line %d."), ppdfile, ppdErrorString(status), linenum);
|
||||
}
|
||||
|
||||
ppdMarkDefaults(ppd);
|
||||
cupsMarkOptions(ppd, num_options, options);
|
||||
|
||||
@@ -1315,6 +1345,8 @@ set_printer_options(
|
||||
ippDelete(request);
|
||||
if (ppdfile != file)
|
||||
unlink(ppdfile);
|
||||
if (copied_options)
|
||||
cupsFreeOptions(num_options, options);
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -1326,13 +1358,13 @@ set_printer_options(
|
||||
ippDelete(request);
|
||||
if (ppdfile != file)
|
||||
unlink(ppdfile);
|
||||
if (copied_options)
|
||||
cupsFreeOptions(num_options, options);
|
||||
cupsFileClose(out);
|
||||
unlink(tempfile);
|
||||
return (1);
|
||||
}
|
||||
|
||||
ppdchanged = 0;
|
||||
|
||||
while (cupsFileGets(in, line, sizeof(line)))
|
||||
{
|
||||
if (!strncmp(line, "*cupsIPPSupplies:", 17) &&
|
||||
@@ -1454,6 +1486,9 @@ set_printer_options(
|
||||
ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
}
|
||||
|
||||
if (copied_options)
|
||||
cupsFreeOptions(num_options, options);
|
||||
|
||||
/*
|
||||
* Check the response...
|
||||
*/
|
||||
@@ -1499,5 +1534,5 @@ validate_name(const char *name) /* I - Name to check */
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: lpadmin.c 11558 2014-02-06 18:33:34Z msweet $".
|
||||
* End of "$Id: lpadmin.c 12604 2015-05-06 01:43:05Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<H2 CLASS="title">Klasse hinzufügen</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Name:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
|
||||
<SMALL>(Darf alle druckbaren Zeichen ausser "/", "#", und Leerzeichen enthalten)</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Beschreibung:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
|
||||
<SMALL>(Für Menschen lesbare Beschreibung wie "HP LaserJet with Duplexer")</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Ort:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
|
||||
<SMALL>(Für Menschen lesbarer Ort wie "Lab 1")</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Mitglieder:</TH>
|
||||
<TD>
|
||||
<SELECT NAME="MEMBER_URIS" SIZE="10" MULTIPLE>
|
||||
{[member_uris]<OPTION VALUE="{member_uris}" {?member_selected}>{member_names}}
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Klasse hinzufügen"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,44 @@
|
||||
<H2 CLASS="title">Drucker hinzufügen (Schritt 3/5)</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
|
||||
<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
|
||||
<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
|
||||
{?current_make!?<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE" VALUE="{current_make}">:}
|
||||
{?current_make_and_model!?<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{current_make_and_model}">:}
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Name:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
|
||||
<SMALL>(Darf druckbare Zeichen enthalten ausser "/", "#", und Leerzeichen)</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Beschreibung:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
|
||||
<SMALL>(Menschenlesbare Beschreibung wie etwa "HP LaserJet mit Duplexer")</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Ort:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
|
||||
<SMALL>(Menschenlesbarer Ort wie etwa "Labor 1")</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Verbindung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">{device_uri}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Freigabe:</TH>
|
||||
<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
|
||||
Gebe diesen Drucker frei</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,44 @@
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-rss-subscription">
|
||||
|
||||
<H2 CLASS="title">RSS Subskription hinzufügen</H2>
|
||||
|
||||
<TABLE SUMMARY="Forumlar zum Hinzufügen einer RSS Subskription">
|
||||
<TR>
|
||||
<TH CLASS="label">Name:</TH>
|
||||
<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="SUBSCRIPTION_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?SUBSCRIPTION_NAME}"><BR>
|
||||
<SMALL>(Darf alle druckbaren Zeichen ausser Leerzeichen, "/", "?", und "#" enthalten)</SMALL></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Warteschlange:</TH>
|
||||
<TD COLSPAN="5"><SELECT NAME="PRINTER_URI" SIZE="10"><OPTION VALUE="#ALL#"{?PRINTER_URI=#ALL#? SELECTED:}>Alle Warteschlangen</OPTION>{[printer_name]<OPTION VALUE="{printer_uri_supported}"{?PRINTER_URI={printer_uri_supported}? SELECTED:}>{printer_name}</OPTION>}</SELECT></TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TH CLASS="label">Ereignisse:</TH>
|
||||
<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_CREATED" {?EVENT_JOB_CREATED}>Auftrag erstellt<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_COMPLETED" {?EVENT_JOB_COMPLETED}>Auftrag abgeschlossen<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_STOPPED" {?EVENT_JOB_STOPPED}>Auftrag angehalten<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_CONFIG_CHANGED" {?EVENT_JOB_CONFIG_CHANGED}>Auftrags Parameter Geändert</TD>
|
||||
<TD> </TD>
|
||||
<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_STOPPED" {?EVENT_PRINTER_STOPPED}>Warteschlange angehalten<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_ADDED" {?EVENT_PRINTER_ADDED}>Warteschlange hinzugefügt<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_MODIFIED" {?EVENT_PRINTER_MODIFIED}>Warteschlange geändert<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_DELETED" {?EVENT_PRINTER_DELETED}>Warteschlange gelöscht</TD>
|
||||
<TD> </TD>
|
||||
<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_STARTED" {?EVENT_SERVER_STARTED}>Server gestartet<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_STOPPED" {?EVENT_SERVER_STOPPED}>Server angehalten<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_RESTARTED" {?EVENT_SERVER_RESTARTED}>Server neu gestartet<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_AUDIT" {?EVENT_SERVER_AUDIT}>Server Sicherheits Prüfung</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Maximale Ereignisse in Durchführung:</TH>
|
||||
<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD COLSPAN="5"><INPUT TYPE="SUBMIT" VALUE="RSS Subskription hinzufügen"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,97 @@
|
||||
<div class="row">
|
||||
<div class="halves">
|
||||
<H2 CLASS="title">Drucker</H2>
|
||||
|
||||
<P>
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-printer"><INPUT TYPE="SUBMIT" VALUE="Füge Drucker hinzu"></FORM>
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="find-new-printers"><INPUT TYPE="SUBMIT" VALUE="Finde neue Drucker"></FORM>
|
||||
<FORM ACTION="/printers/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Drucker"></FORM>
|
||||
{have_samba?<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="export-samba"><INPUT TYPE="SUBMIT" VALUE="Exportiere Drucker nach Samba"></FORM>:}
|
||||
</P>
|
||||
|
||||
<H2 CLASS="title">Klassen</H2>
|
||||
|
||||
<P>
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-class"><INPUT TYPE="SUBMIT" VALUE="Klasse hinzufügen"></FORM>
|
||||
<FORM ACTION="/classes/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Klasse managen"></FORM>
|
||||
</P>
|
||||
|
||||
<H2 CLASS="title">Aufträge</H2>
|
||||
|
||||
<P>
|
||||
<FORM ACTION="/jobs/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Aufträge managen"></FORM>
|
||||
</P>
|
||||
</div>
|
||||
<div class="halves">
|
||||
<H2 CLASS="title">Server</H2>
|
||||
|
||||
<P>
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server"><INPUT TYPE="SUBMIT" VALUE="Konfigurationsdatei bearbeiten"></FORM>
|
||||
<FORM ACTION="/admin/log/access_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Zugriffs-Log zeigen"></FORM>
|
||||
<FORM ACTION="/admin/log/error_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Fehler-Log zeigen"></FORM>
|
||||
<FORM ACTION="/admin/log/page_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Seiten-Log zeigen"></FORM>
|
||||
</P>
|
||||
|
||||
{SETTINGS_ERROR?<P>{SETTINGS_MESSAGE}</P>
|
||||
<BLOCKQUOTE>{SETTINGS_ERROR}</BLOCKQUOTE>:
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
|
||||
{ADVANCEDSETTINGS?<P><B>Server-Einstellungen\:</B></P>
|
||||
|
||||
<P><A HREF="/admin/">Erweitert <SMALL>▼</SMALL></A><BR>
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
|
||||
<INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
|
||||
<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Drucker dieses Systems im Netz freigeben<BR>
|
||||
Max clients\:
|
||||
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Erlaube Druck aus dem Internet<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" {?browse_web_if}> Mache die Web-Schnittstelle bekannt<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Erlaube Fernwartung<BR>
|
||||
{have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" {?kerberos}> Benutze Kerberos-Authentifizierung (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)<BR>:}
|
||||
<INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Erlaube Benutzern beliebige Aufträge abzubrechen (nicht nur die Eigenen)<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" {?preserve_jobs}> Behalte die Auftragshistorie<BR>
|
||||
Maximale Auftragsanzehl (0 für unbegrenzt)\:
|
||||
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
|
||||
Behalte Metadaten\:
|
||||
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
|
||||
Behalte Dokumente\:
|
||||
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Save debugging information for troubleshooting<BR>
|
||||
Maximale logDateigrösse\:
|
||||
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
|
||||
|
||||
:<P><B>Server Einstellungen:</B></P>
|
||||
|
||||
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Erweitert <SMALL>▶</SMALL></A><BR>
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
|
||||
<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Drucker dieses Systems im Netz freigeben<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Erlaube den Druck aus dem Internet<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Erlaube Fernwartung<BR>
|
||||
{have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" {?kerberos}> Benutze Kerberos Authentifizierung (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)<BR>:}
|
||||
<INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Erlaube Benutzern alle Aufträge zu löschen (nicht nur die eigenen)<BR>
|
||||
<INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Speichere debugging Information zur Fehlersuche</P>
|
||||
|
||||
}
|
||||
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Ändere Eintellungen"></P>
|
||||
|
||||
</FORM>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<H2 CLASS="title">RSS Subskriptionen</H2>
|
||||
|
||||
<P>
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-rss-subscription"><INPUT TYPE="SUBMIT" VALUE="RSS Subskription hinzufügen"></FORM>
|
||||
</P>
|
||||
|
||||
{notify_subscription_id?<TABLE CLASS="list" SUMMARY="RSS Subskriptionen">
|
||||
<THEAD><TR><TH>Name</TH><TH>Ereignisse</TH><TH>Queue Name</TH></TR></THEAD>
|
||||
<TBODY>{[notify_subscription_id]
|
||||
<TR><TD><A HREF="{notify_recipient_uri}">{notify_recipient_name}</A><BR>
|
||||
<FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="cancel-subscription"><INPUT TYPE="HIDDEN" NAME="notify_subscription_id" VALUE="{notify_subscription_id}"><INPUT TYPE="SUBMIT" VALUE="RSS Subskription kündigen"></FORM> </TD><TD>{notify_events}</TD><TD NOWRAP> {notify_printer_name?{notify_printer_name}:All Queues}</TD></TR>}
|
||||
</TBODY>
|
||||
</TABLE>:}
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
<H2 CLASS="title">{op=modify-printer?{printer_name} ändern:Drucker hinzufügen (Schritt 1/5)}</H2>
|
||||
|
||||
{CUPS_GET_DEVICES_DONE?<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{printer_name?<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">:}
|
||||
|
||||
<TABLE>
|
||||
{op=add-printer?:<TR>
|
||||
<TH CLASS="label">Aktuelle Verbindung\:</TH>
|
||||
<TD><INPUT TYPE="RADIO" NAME="DEVICE_URI" VALUE="{current_device_uri}" CHECKED>
|
||||
{current_device_uri}</TD>
|
||||
</TR>}
|
||||
<TR>
|
||||
<TH CLASS="label">Lokale Drucker\:</TH>
|
||||
<TD>
|
||||
{[device_uri]{device_class!network?<INPUT TYPE="RADIO" NAME="DEVICE_URI"
|
||||
VALUE="{device_uri}{?device_make_and_model!Unbekannt?|{device_make_and_model}:}">
|
||||
{device_info} {?device_make_and_model!Unbekannt?({device_make_and_model}):}<BR>
|
||||
:}}
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Entdeckte Netzwerkdrucker\:</TH>
|
||||
<TD>
|
||||
{[device_uri]{device_class=network?{device_uri~[a-z]+://?<INPUT TYPE="RADIO" NAME="DEVICE_URI"
|
||||
VALUE="{device_uri}{?device_make_and_model!Unbekannt?|{device_make_and_model}:}">
|
||||
{device_info} {?device_make_and_model!Unbekannt?({device_make_and_model}):}<BR>
|
||||
:}:}}
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Andere Netzwerkdrucker\:</TH>
|
||||
<TD>
|
||||
{[device_uri]{device_class=network?{device_uri~[a-z]+://?:<INPUT TYPE="RADIO" NAME="DEVICE_URI"
|
||||
VALUE="{device_uri}{?device_make_and_model!Unknown?|{device_make_and_model}:}">
|
||||
{device_info} {?device_make_and_model!Unknown?({device_make_and_model}):}<BR>
|
||||
}:}}
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>:<P><IMG SRC="/images/wait.gif" WIDTH="16" HEIGHT="16" ALIGN="ABSMIDDLE"
|
||||
ALT="Busy Indicator"> Suche nach Druckern...</P>}
|
||||
@@ -0,0 +1,61 @@
|
||||
<H2 CLASS="title">{op=modify-printer?{printer_name} ändern:Drucker hinzufügen (Schritt4/5)}</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{printer_name?<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">:}
|
||||
<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
|
||||
<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
|
||||
<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
|
||||
|
||||
<TABLE>
|
||||
{op=modify-printer?:<TR>
|
||||
<TH CLASS="label">Name:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">{printer_name}</TD>
|
||||
</TR>}
|
||||
<TR>
|
||||
<TH CLASS="label">Beschreibung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{printer_info}">{printer_info}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Ort:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{printer_location}">{printer_location}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Verbindung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">{device_uri}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Freigabe:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_IS_SHARED" VALUE="{?printer_is_shared}">
|
||||
Diesen Drucker {?printer_is_shared=?nicht:{?printer_is_shared=0?nicht:}} im Netz freigeben</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Marke:</TH>
|
||||
<TD>
|
||||
<SELECT NAME="PPD_MAKE" SIZE="10">
|
||||
{[ppd_make]<OPTION VALUE="{ppd_make}" {?current_make={ppd_make}?SELECTED:}>{ppd_make}}
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Or Provide a PPD File:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="262144"><INPUT
|
||||
TYPE="FILE" NAME="PPD_FILE"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="{op=add-printer?Add Printer:Modify Printer}"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,57 @@
|
||||
<H2 CLASS="title">{op=modify-printer?{printer_name} ändern:Drucker hinzufügen (Schritt 5/5)}</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{printer_name?<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">:}
|
||||
<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
|
||||
<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
|
||||
<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
|
||||
<TABLE>
|
||||
{op=modify-printer?:<TR>
|
||||
<TH CLASS="label">Name:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">{printer_name}</TD>
|
||||
</TR>}
|
||||
<TR>
|
||||
<TH CLASS="label">Beschreibung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{printer_info}">{printer_info}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Ort:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{printer_location}">{printer_location}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Verbindung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">{device_uri}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Freigabe:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_IS_SHARED" VALUE="{?printer_is_shared}">
|
||||
Dieser Drucker ist {?printer_is_shared=?nicht:{?printer_is_shared=0?nicht:}} im Netz freigeben</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Hersteller:</TH>
|
||||
<TD>{PPD_MAKE} <INPUT TYPE="SUBMIT" NAME="SELECT_MAKE" VALUE="Anderen Hersteller/Marke wählen"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Modell:</TH>
|
||||
<TD>
|
||||
<SELECT NAME="PPD_NAME" SIZE="10">
|
||||
{op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Aktueller Treiber - {current_make_and_model}</OPTION>:}
|
||||
{[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
|
||||
}</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Oder stelle eine PPD Datei zur Verfügung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="262144"><INPUT
|
||||
TYPE="FILE" NAME="PPD_FILE"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="{op=add-printer?Drucker hinzufügen:Drucker ändern}"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,49 @@
|
||||
<H2 CLASS="title">{op=modify-printer?{printer_name} ändern:Drucker hinzufügen}</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{printer_name?<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">:}
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Verbindung:</TH>
|
||||
<TD><INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">{device_uri}</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Baud Rate:</TH>
|
||||
<TD><SELECT NAME="BAUDRATE">
|
||||
{[baudrates]<OPTION {?baudrate={baudrates}?SELECTED:}>{baudrates}}
|
||||
</SELECT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Parität:</TH>
|
||||
<TD><SELECT NAME="PARITY">
|
||||
<OPTION VALUE="none" {?parity=none?SELECTED:}>Keine
|
||||
<OPTION VALUE="even" {?parity=even?SELECTED:}>Gerade
|
||||
<OPTION VALUE="odd" {?parity=odd?SELECTED:}>Ungerade
|
||||
</SELECT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Daten Bits:</TH>
|
||||
<TD><SELECT NAME="BITS">
|
||||
<OPTION {?bits=8?SELECTED:}>8
|
||||
<OPTION {?bits=7?SELECTED:}>7
|
||||
</SELECT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Flusskontrolle:</TH>
|
||||
<TD><SELECT NAME="FLOW">
|
||||
<OPTION VALUE="none" {?flow=none?SELECTED:}>None
|
||||
<OPTION VALUE="soft" {?flow=soft?SELECTED:}>XON/XOFF (Software)
|
||||
<OPTION VALUE="hard" {?flow=hard?SELECTED:}>RTS/CTS (Hardware)
|
||||
<OPTION VALUE="dtrdsr" {?flow=dtrdsr?SELECTED:}>DTR/DSR (Hardware)
|
||||
</SELECT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,40 @@
|
||||
<H2 CLASS="title">{op=modify-printer?{printer_name} ändern:Drucker hinzufügen (Schritt2/5)}</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{printer_name?<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">:}
|
||||
<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{?current_make_and_model}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Verbindung-URI:</TH>
|
||||
<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD>Beispiele:
|
||||
<PRE>
|
||||
http://hostname:631/ipp/
|
||||
http://hostname:631/ipp/port1
|
||||
|
||||
ipp://hostname/ipp/
|
||||
ipp://hostname/ipp/port1
|
||||
|
||||
lpd://hostname/queue
|
||||
|
||||
socket://hostname
|
||||
socket://hostname:9100
|
||||
</PRE>
|
||||
|
||||
<P>See <A HREF="/help/network.html" TARGET="_blank">"Netzwerkdrucker"</A> für die korrekte URI ihres Druckers.</P>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
@@ -0,0 +1,3 @@
|
||||
<H2 CLASS="title">Klasse hinzufügen</H2>
|
||||
|
||||
<P>Die Klasse <A HREF="/classes/{printer_name}">{printer_name}</A> wurde erfolgreich hinzugefügt.
|
||||
@@ -0,0 +1,6 @@
|
||||
<H2 CLASS="title">Klasse {printer_name} löschen</H2>
|
||||
|
||||
<P><B>Warnung:</B> Sind sie sicher dass sie die Klasse
|
||||
{printer_name} löschen wollen?</P>
|
||||
|
||||
<P ALIGN="CENTER"><FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="op" VALUE="delete-class"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}"><INPUT TYPE="SUBMIT" NAME="confirm" VALUE="Klasse löschen"></FORM></P>
|
||||
@@ -0,0 +1,3 @@
|
||||
<H2 CLASS="title">Klasse {printer_name} löschen</H2>
|
||||
|
||||
<P>Die Klasse {printer_name} wurde erfolgreich gelöscht.
|
||||
@@ -0,0 +1 @@
|
||||
<H3 CLASS="title">Aufträge</H3>
|
||||
@@ -0,0 +1,4 @@
|
||||
<H2 CLASS="title">Klasse {printer_name} ändern</H2>
|
||||
|
||||
<P>Class <A HREF="/classes/{printer_name}">{printer_name}</A> wurde
|
||||
erfolgreich geändert.
|
||||
@@ -0,0 +1,41 @@
|
||||
<H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>
|
||||
({printer_state=3?Im Leerlauf:{printer_state=4?Beschäftigt:Angehalten}},
|
||||
{printer_is_accepting_jobs=0?Aufträge werden ablehnt:Aufträge werden akzeptiert},
|
||||
{server_is_sharing_printers=0?Keine (Server):{printer_is_shared=0?Keine:}} Netzfreigabe{default_name={printer_name}?, Standarddrucker:})</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="{printer_uri_supported}" NAME="maintenance">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<SELECT NAME="OP" ONCHANGE="document.maintenance.submit();">
|
||||
<OPTION VALUE="">Wartung</OPTION>
|
||||
<OPTION VALUE="print-test-page">Drucke Testseite</OPTION>
|
||||
{printer_state=5?<OPTION VALUE="start-class">Klasse starten</OPTION>:<OPTION VALUE="stop-class">Klasse stoppen</OPTION>}
|
||||
{printer_is_accepting_jobs=0?<OPTION VALUE="accept-jobs">Aufträge akzeptieren</OPTION>:<OPTION VALUE="reject-jobs">Aufträge ablehnen</OPTION>}
|
||||
<OPTION VALUE="move-jobs">Alle Aufträge verschieben</OPTION>
|
||||
<OPTION VALUE="purge-jobs">Alle Aufträge abbrechen</OPTION>
|
||||
</SELECT>
|
||||
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
|
||||
</FORM>
|
||||
|
||||
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
|
||||
<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
|
||||
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
|
||||
<OPTION VALUE="">Verwaltung</OPTION>
|
||||
<OPTION VALUE="modify-class">Klasse ändern</OPTION>
|
||||
<OPTION VALUE="delete-class">Klasse löschen</OPTION>
|
||||
<OPTION VALUE="set-class-options">Standardeinstellungen festlegen</OPTION>
|
||||
<OPTION VALUE="set-as-default">Als Standard festlegen</OPTION>
|
||||
<OPTION VALUE="set-allowed-users">Erlaubte Benutzer festlegen</OPTION>
|
||||
</SELECT>
|
||||
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
|
||||
</FORM>
|
||||
|
||||
<TABLE SUMMARY="{printer_name}">
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Beschreibung:</TH><TD>{printer_info}</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Ort:</TH><TD>{printer_location}</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Mitglieder:</TH><TD>{?member_uris=?None:{member_uris}}</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Standardeinstellungen:</TH><TD>job-sheets={job_sheets_default}
|
||||
media={media_default?{media_default}:unbekannt}
|
||||
{sides_default?sides={sides_default}:}</TD></TR>
|
||||
</TABLE>
|
||||
@@ -0,0 +1 @@
|
||||
<P ALIGN="CENTER">{total=0?Keine Klassen:Zeige {#printer_name} von {total} Klasse{total=1?:n}}.</P>
|
||||
@@ -0,0 +1,11 @@
|
||||
{#printer_name=0?:
|
||||
<TABLE CLASS="list" SUMMARY="Class List">
|
||||
<THEAD>
|
||||
<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Wartweschlange <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Warteschlange <SMALL>▼</SMALL>}</A></TH><TH>Beschreibung</TH><TH>Ort</TH><TH>Mitglieder</TH><TH>Status</TH></TR>
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
{[printer_name]
|
||||
<TR><TD><A HREF="{printer_uri_supported}">{printer_name}</A></TD><TD>{printer_info}</TD><TD>{printer_location}</TD><TD>{?member_uris=?Keine:{member_uris}}</TD><TD>{printer_state=3?Im Leerlauf:{printer_state=4?Beschäftigt:Angehalten}}{printer_state_message? - "{printer_state_message}":}</TD></TR>
|
||||
}
|
||||
</TBODY>
|
||||
</TABLE></DIV>}
|
||||
@@ -0,0 +1,8 @@
|
||||
<H2 CLASS="title">{title} auf {printer_name}</H2>
|
||||
|
||||
<P>{job_state>5?:<IMG SRC="/images/wait.gif" WIDTH="16" HEIGHT="16"
|
||||
ALIGN="ABSMIDDLE" ALT="Busy Indicator"> }Drucker Befehlsauftrag
|
||||
{job_state=3?unerledigt:{job_state=4?gehalten:
|
||||
{job_state=5?verarbeite:{job_state=6?gestoppt:
|
||||
{job_state=7?gelöscht:{job_state=8?abgebrochen:beendet}}}}}}{job_state=9?:{job_printer_state_message?,
|
||||
<EM>"{job_printer_state_message}"</EM>:}}</P>
|
||||
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