Comparar commits

..

3 Commits

Autor SHA1 Mensagem Data
Michael Sweet 215ef63830 Import CUPS v1.7.4 2016-03-15 10:37:23 -04:00
Michael Sweet a51f28ec99 Import CUPS v1.7.3 2016-03-15 10:37:18 -04:00
Michael Sweet 71f63681cb Import CUPS v1.7.2 2016-03-15 10:37:10 -04:00
242 arquivos alterados com 20512 adições e 5686 exclusões
+6 -1
Ver Arquivo
@@ -1,9 +1,14 @@
CHANGES-IPPTOOL.txt - 2013-07-15
CHANGES-IPPTOOL.txt - 2014-03-28
--------------------------------
This file provides a list of changes to the ipptool binary distribution posted
on cups.org.
2014-03-28
- Fixed SSL support on Windows (STR #4358)
2013-07-15
- New ippfind tool now included with ipptool.
+101 -1
Ver Arquivo
@@ -1,6 +1,106 @@
CHANGES.txt - 1.7.1 - 2014-01-08
CHANGES.txt - 1.7.4 - 2014-07-08
--------------------------------
CHANGES IN CUPS V1.7.4
- Security: The web interface incorrectly served symlinked files and
files that were not world-readable, potentially leading to a
disclosure of information (STR #4450)
- The CUPS headers incorrectly needed libdispatch for blocks support
(STR #4397)
- CUPS did not compile when Avahi or mDNSResponder was not present
(STR #4402, STR #4424)
- The "snmp" option did not work with the network backends (STR #4422)
- The User directive in client.conf did not override the USER
environment variable (STR #4426)
- The web interface now properly shows a "Go" button for all text-based
browsers (STR #4425)
- The MaxJobTime directive now properly supports time values (STR #4434)
- The RPM spec file did not work due to the new Brazilian Portuguese
localization (STR #4436)
- Fixed an "IPP read error" issue (STR #4440)
- Fixed the --disable-libusb configure option (STR #4439)
- Fixed the debug output from the DNS-SD backend when using Avahi
(STR #4444)
- Fixed a bug in the CUPS_SC_GET_DEVICE_ID handling by the network
backends (STR #4447)
- Added USB quirk rule for Lexmark E230 (STR #4448)
- The LPD backend did not work with some versions of glibc (STR #4452)
CHANGES IN CUPS V1.7.3
- Added Brazilian Portuguese translation (STR #4409)
- Fixed mapping of OutputBin values such as "Tray1"
(<rdar://problem/16685606>)
- Several ippGet* functions incorrectly returned -1 instead of 0 on
error.
- The cupsGetResponse function did not work properly with
CUPS_HTTP_DEFAULT (<rdar://problem/16762593>)
- The IPP backend did not abort a job when the printer did not validate
the supplied options (<rdar://problem/16836752>)
- Fixed an authentication race condition in cupsSendRequest (STR #4403)
- The scheduler did not add the "job-hold-until-specified" reason when
holding a job using the lp command (STR #4405)
- The configure script incorrectly added libgcrypt as a GNU TLS
dependency (STR #4399)
- cupsGetDestMediaCount did not work for CUPS_MEDIA_FLAGS DEFAULT
(STR #4414)
- Auto-typing of PWG Raster files did not work (STR #4417)
- IPP queues using hardcoded credentials would ask for credentials
(STR #4371)
- Dates in non-UTF-8 locales did not display correctly (STR #4388)
- The RPM spec file now looks for libusb-devel 1.0 or later.
- Fixed the "create-printer-subscription.test" file for IPPTOOL
(STR #4420)
CHANGES IN CUPS V1.7.2
- Security: The scheduler now blocks URLs containing embedded HTML
(STR #4356)
- Documentation fixes (STR #3259, STR #4346, STR #4355)
- Fixed the Japanese localization (STR #4385)
- Added a German localization (STR #4363)
- The cupsfilter command incorrectly read the cupsd.conf file; it now
reads the cups-files.conf file instead.
- Fixed OS X builds with Xcode 5.x (<rdar://problem/15914959>)
- Fixed SSL support on Windows (STR #4358)
- Fixed documentation and naming of Create-Job/Printer-Subscriptions
operations (STR #4389)
- Phone numbers in fax jobs were not properly filtered for IPP FaxOut
(<rdar://problem/16351701>)
- Fixed a memory leak in the label printer driver (STR #4393)
- Updated Linux "relro" support (STR #4349)
- cupsEnumDests did not set the "is_default" field (STR #4332)
- cupsDoIORequest could miss the server status, causing failed lpadmin
and other administrative commands (STR #4386)
- cupsEnumDests didn't always call the callback function (STR #4380)
- "lp -i job-id -H hold" did not work (STR #4401)
- CUPS didn't compile on older platforms (STR #4338)
- Several libcups files did not have the Apple license exception
notice (STR #4361)
- Fixed a D-BUS threading issue that caused the scheduler to crash
(STR #4347)
- The scheduler now automatically reconnects to Avahi as needed
(STR #4370, STR #4373)
- The scheduler did not handle GET requests for the log files properly
(STR #3265)
- The dnssd backend did not always report all discovered printers using
Avahi (STR #4365)
- The Zebra printer driver did not properly handle negative "label top"
values (STR #4354)
- The scheduler did not always update the MakeModel value in
printers.conf after updating the driver (STR #4264)
- The LPD mini daemon did not support print jobs larger than 2GB
(STR #4351)
- Fixed a bug in the status reading code when sending a compressed data
stream to an IPP printer/server (<rdar://problem/16019623>)
- The IPP backend might not include all job attributes in Validate-Job
operations (<rdar://problem/16025435>)
- Fixed some clang-reported issues (<rdar://problem/15936066>)
CHANGES IN CUPS V1.7.1
- Security: the lppasswd program incorrectly used settings from
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.7.1 - 2014-01-08
INSTALL - CUPS v1.7.4 - 2014-06-10
----------------------------------
This file describes how to compile and install CUPS from source code. For more
+2 -2
Ver Arquivo
@@ -1,4 +1,4 @@
IPPTOOL.txt - 2013-07-15
IPPTOOL.txt - 2014-04-10
------------------------
See the file CHANGES-IPPTOOL.txt for a list of changes to this software.
@@ -220,7 +220,7 @@ REPORTING BUGS
LEGAL STUFF
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
CUPS is Copyright 2007-2014 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
+2 -2
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.7.1 - 2014-01-08
README - CUPS v1.7.4 - 2014-06-10
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt" instead...
@@ -149,7 +149,7 @@ PRINTING FILES
LEGAL STUFF
CUPS is Copyright 2007-2013 by Apple Inc. CUPS and the CUPS logo are
CUPS is Copyright 2007-2014 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
+25 -29
Ver Arquivo
@@ -1,33 +1,17 @@
/*
* "$Id: dnssd.c 4074 2012-12-12 20:54:21Z msweet $"
* "$Id: dnssd.c 11971 2014-07-01 14:38:29Z msweet $"
*
* DNS-SD discovery backend for CUPS.
* DNS-SD discovery backend for CUPS.
*
* Copyright 2008-2012 by Apple Inc.
* Copyright 2008-2014 by Apple Inc.
*
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* main() - Browse for printers.
* browse_callback() - Browse devices.
* browse_local_callback() - Browse local devices.
* client_callback() - Avahi client callback function.
* compare_devices() - Compare two devices.
* exec_backend() - Execute the backend that corresponds to the
* resolved service name.
* device_type() - Get DNS-SD type enumeration from string.
* get_device() - Create or update a device.
* query_callback() - Process query data.
* find_device() - Find a device from its name and domain.
* sigterm_handler() - Handle termination signals.
* unquote() - Unquote a name string.
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
@@ -95,6 +79,7 @@ static int job_canceled = 0;
static AvahiSimplePoll *simple_poll = NULL;
/* Poll information */
static int got_data = 0; /* Got data from poll? */
static int browsers = 0; /* Number of running browsers */
#endif /* HAVE_AVAHI */
@@ -345,6 +330,7 @@ main(int argc, /* I - Number of command-line args */
return (1);
}
browsers = 6;
avahi_service_browser_new(client, AVAHI_IF_UNSPEC,
AVAHI_PROTO_UNSPEC,
"_fax-ipp._tcp", NULL, 0,
@@ -558,7 +544,11 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: sent=%d, count=%d\n", sent, count);
#ifdef HAVE_AVAHI
if (sent == cupsArrayCount(devices) && browsers == 0)
#else
if (sent == cupsArrayCount(devices))
#endif /* HAVE_AVAHI */
break;
}
}
@@ -710,9 +700,12 @@ browse_callback(
break;
case AVAHI_BROWSER_REMOVE:
case AVAHI_BROWSER_ALL_FOR_NOW:
case AVAHI_BROWSER_CACHE_EXHAUSTED:
break;
case AVAHI_BROWSER_ALL_FOR_NOW:
browsers--;
break;
}
}
@@ -915,8 +908,11 @@ get_device(cups_array_t *devices, /* I - Device array */
* Yes, add the device...
*/
fprintf(stderr, "DEBUG: Found \"%s.%s%s\"...\n", serviceName, regtype,
replyDomain);
#ifdef HAVE_DNSSD
fprintf(stderr, "DEBUG: Found \"%s.%s%s\"...\n", serviceName, regtype, replyDomain);
#else /* HAVE_AVAHI */
fprintf(stderr, "DEBUG: Found \"%s.%s.%s\"...\n", serviceName, regtype, replyDomain);
#endif /* HAVE_DNSSD */
device = calloc(sizeof(cups_device_t), 1);
device->name = strdup(serviceName);
@@ -1320,5 +1316,5 @@ unquote(char *dst, /* I - Destination buffer */
/*
* End of "$Id: dnssd.c 4074 2012-12-12 20:54:21Z msweet $".
* End of "$Id: dnssd.c 11971 2014-07-01 14:38:29Z msweet $".
*/
+53 -24
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: ipp.c 11495 2013-12-22 05:29:16Z msweet $"
* "$Id: ipp.c 11909 2014-06-09 18:58:16Z msweet $"
*
* IPP backend for CUPS.
*
@@ -91,8 +91,10 @@ static const char * const jattrs[] = /* Job attributes we want */
"job-state",
"job-state-reasons"
};
static int job_canceled = 0;
static int job_canceled = 0,
/* Job cancelled? */
uri_credentials = 0;
/* Credentials supplied in URI? */
static char username[256] = "",
/* Username for device URI */
*password = NULL;
@@ -526,8 +528,8 @@ main(int argc, /* I - Number of command-line args */
*/
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
_cups_strcasecmp(value, "yes") ||
_cups_strcasecmp(value, "true");
!_cups_strcasecmp(value, "yes") ||
!_cups_strcasecmp(value, "true");
}
else if (!_cups_strcasecmp(name, "version"))
{
@@ -630,6 +632,7 @@ main(int argc, /* I - Number of command-line args */
*password++ = '\0';
cupsSetUser(username);
uri_credentials = 1;
}
else
{
@@ -1410,6 +1413,7 @@ main(int argc, /* I - Number of command-line args */
sleep(10);
}
else if (ipp_status == IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED ||
ipp_status == IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES ||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED ||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED ||
ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED ||
@@ -2877,19 +2881,39 @@ new_request(
if ((keyword = cupsGetOption("phone", num_options, options)) != NULL)
{
ipp_t *destination; /* destination collection */
char tel_uri[1024]; /* tel: URI */
char phone[1024], /* Phone number string */
*ptr, /* Pointer into string */
tel_uri[1024]; /* tel: URI */
static const char * const allowed = "0123456789#*-+.()";
/* Allowed characters */
destination = ippNew();
httpAssembleURI(HTTP_URI_CODING_ALL, tel_uri, sizeof(tel_uri), "tel",
NULL, NULL, 0, keyword);
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_URI, "destination-uri",
NULL, tel_uri);
/*
* Unescape and filter out spaces and other characters that are not
* allowed in a tel: URI.
*/
_httpDecodeURI(phone, keyword, sizeof(phone));
for (ptr = phone; *ptr;)
{
if (!strchr(allowed, *ptr))
_cups_strcpy(ptr, ptr + 1);
else
ptr ++;
}
httpAssembleURI(HTTP_URI_CODING_ALL, tel_uri, sizeof(tel_uri), "tel", NULL, NULL, 0, phone);
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_URI, "destination-uri", NULL, tel_uri);
if ((keyword = cupsGetOption("faxPrefix", num_options,
options)) != NULL && *keyword)
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_TEXT,
"pre-dial-string", NULL, keyword);
{
char predial[1024]; /* Pre-dial string */
_httpDecodeURI(predial, keyword, sizeof(predial));
ippAddString(destination, IPP_TAG_JOB, IPP_TAG_TEXT, "pre-dial-string", NULL, predial);
}
ippAddCollection(request, IPP_TAG_JOB, "destination-uris", destination);
ippDelete(destination);
@@ -2965,26 +2989,31 @@ password_cb(const char *prompt, /* I - Prompt (not used) */
(void)method;
(void)resource;
/*
* Remember that we need to authenticate...
*/
auth_info_required = "username,password";
if (httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "username",
def_username))
if (!uri_credentials)
{
char quoted[HTTP_MAX_VALUE * 2 + 4];
/* Quoted string */
/*
* Remember that we need to authenticate...
*/
fprintf(stderr, "ATTR: auth-info-default=%s,\n",
quote_string(def_username, quoted, sizeof(quoted)));
auth_info_required = "username,password";
if (httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "username",
def_username))
{
char quoted[HTTP_MAX_VALUE * 2 + 4];
/* Quoted string */
fprintf(stderr, "ATTR: auth-info-default=%s,\n",
quote_string(def_username, quoted, sizeof(quoted)));
}
}
if (password && *password && *password_tries < 3)
{
(*password_tries) ++;
cupsSetUser(username);
return (password);
}
else
@@ -3680,5 +3709,5 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */
}
/*
* End of "$Id: ipp.c 11495 2013-12-22 05:29:16Z msweet $".
* End of "$Id: ipp.c 11909 2014-06-09 18:58:16Z msweet $".
*/
+5 -5
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: lpd.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: lpd.c 12005 2014-07-08 15:46:59Z msweet $"
*
* Line Printer Daemon backend for CUPS.
*
@@ -393,8 +393,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
_cups_strcasecmp(value, "yes") ||
_cups_strcasecmp(value, "true");
!_cups_strcasecmp(value, "yes") ||
!_cups_strcasecmp(value, "true");
}
else if (!_cups_strcasecmp(name, "timeout"))
{
@@ -1276,7 +1276,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */
* Try binding the port to the socket; return if all is OK...
*/
if (!bind(fd, (struct sockaddr *)&addr, sizeof(addr)))
if (!bind(fd, (struct sockaddr *)&addr, httpAddrSize(&addr)))
return (fd);
/*
@@ -1331,5 +1331,5 @@ sigterm_handler(int sig) /* I - Signal */
/*
* End of "$Id: lpd.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: lpd.c 12005 2014-07-08 15:46:59Z msweet $".
*/
+8 -8
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: network.c 3755 2012-03-30 05:59:14Z msweet $"
* "$Id: network.c 11971 2014-07-01 14:38:29Z msweet $"
*
* Common backend network APIs for CUPS.
*
@@ -268,6 +268,12 @@ backendNetworkSideCB(
datalen = 0;
break;
case CUPS_SC_CMD_GET_CONNECTED :
status = CUPS_SC_STATUS_OK;
data[0] = device_fd != -1;
datalen = 1;
break;
case CUPS_SC_CMD_GET_DEVICE_ID :
if (snmp_fd >= 0)
{
@@ -305,12 +311,6 @@ backendNetworkSideCB(
break;
}
case CUPS_SC_CMD_GET_CONNECTED :
status = CUPS_SC_STATUS_OK;
data[0] = device_fd != -1;
datalen = 1;
break;
default :
status = CUPS_SC_STATUS_NOT_IMPLEMENTED;
datalen = 0;
@@ -322,5 +322,5 @@ backendNetworkSideCB(
/*
* End of "$Id: network.c 3755 2012-03-30 05:59:14Z msweet $".
* End of "$Id: network.c 11971 2014-07-01 14:38:29Z msweet $".
*/
+3
Ver Arquivo
@@ -212,3 +212,6 @@
# Lexmark E238 (<rdar://problem/14493054>)
0x043d 0x00d7 no-reattach
# Lexmark E238 (STR #4448)
0x043d 0x009a no-reattach
+4 -4
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: socket.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: socket.c 11909 2014-06-09 18:58:16Z msweet $"
*
* AppSocket backend for CUPS.
*
@@ -250,8 +250,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
_cups_strcasecmp(value, "yes") ||
_cups_strcasecmp(value, "true");
!_cups_strcasecmp(value, "yes") ||
!_cups_strcasecmp(value, "true");
}
else if (!_cups_strcasecmp(name, "contimeout"))
{
@@ -520,5 +520,5 @@ wait_bc(int device_fd, /* I - Socket */
/*
* End of "$Id: socket.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: socket.c 11909 2014-06-09 18:58:16Z msweet $".
*/
+43 -36
Ver Arquivo
@@ -1,7 +1,7 @@
/*
* "$Id: usb-darwin.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: usb-darwin.c 11670 2014-03-04 14:53:59Z msweet $"
*
* Copyright 2005-2013 Apple Inc. All rights reserved.
* Copyright 2005-2014 Apple Inc. All rights reserved.
*
* IMPORTANT: This Apple software is supplied to you by Apple Computer,
* Inc. ("Apple") in consideration of your agreement to the following
@@ -40,35 +40,6 @@
* AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
* STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Contents:
*
* list_devices() - List all USB devices.
* print_device() - Print a file to a USB device.
* read_thread() - Thread to read the backchannel data on.
* sidechannel_thread() - Handle side-channel requests.
* iterate_printers() - Iterate over all the printers.
* device_added() - Device added notifier.
* list_device_cb() - list_device iterator callback.
* find_device_cb() - print_device iterator callback.
* status_timer_cb() - Status timer callback.
* copy_deviceinfo() - Copy strings from the 1284 device ID.
* release_deviceinfo() - Release deviceinfo strings.
* load_classdriver() - Load a classdriver.
* unload_classdriver() - Unload a classdriver.
* load_printerdriver() - Load vendor's classdriver.
* registry_open() - Open a connection to the printer.
* registry_close() - Close the connection to the printer.
* copy_deviceid() - Copy the 1284 device id string.
* copy_devicestring() - Copy the 1284 device id string.
* copy_value_for_key() - Copy value string associated with a key.
* cfstr_create_trim() - Create CFString and trim whitespace characters.
* parse_options() - Parse URI options.
* sigterm_handler() - SIGTERM handler.
* next_line() - Find the next line in a buffer.
* parse_pserror() - Scan the backchannel data for postscript errors.
* soft_reset() - Send a soft reset to the device.
* get_device_id() - Return IEEE-1284 device ID.
*/
/*
@@ -97,7 +68,7 @@
#include <IOKit/usb/IOUSBLib.h>
#include <IOKit/IOCFPlugIn.h>
#include <libproc.h>
#include <asl.h>
#include <spawn.h>
#include <pthread.h>
@@ -309,6 +280,9 @@ static void release_deviceinfo(CFStringRef *make, CFStringRef *model, CFStringRe
static void setup_cfLanguage(void);
static void soft_reset(void);
static void status_timer_cb(CFRunLoopTimerRef timer, void *info);
static void log_usb_class_driver(int is_64bit);
#define IS_64BIT 1
#define IS_NOT_64BIT 0
#if defined(__i386__) || defined(__x86_64__)
static pid_t child_pid; /* Child PID */
@@ -477,6 +451,11 @@ print_device(const char *uri, /* I - Device URI */
return (CUPS_BACKEND_STOP);
}
#ifdef __x86_64__
if (status == noErr && driverBundlePath != NULL && CFStringCompare(driverBundlePath, kUSBGenericTOPrinterClassDriver, 0) != kCFCompareEqualTo)
log_usb_class_driver(IS_64BIT);
#endif /* __x86_64__ */
if (driverBundlePath)
CFRelease(driverBundlePath);
@@ -1607,7 +1586,7 @@ static OSStatus copy_deviceid(classdriver_t **classdriver,
CFStringRef deviceMake = NULL;
CFStringRef deviceModel = NULL;
CFStringRef deviceSerial = NULL;
*deviceID = NULL;
OSStatus err = (*classdriver)->GetDeviceID(classdriver, &devID, DEFAULT_TIMEOUT);
@@ -1682,13 +1661,13 @@ static OSStatus copy_deviceid(classdriver_t **classdriver,
CFRange range = (deviceSerial != NULL ? CFStringFind(deviceSerial, CFSTR("+"), 0) : CFRangeMake(0, 0));
if (range.length == 1) {
range = CFStringFind(*deviceID, deviceSerial, 0);
CFMutableStringRef deviceIDString = CFStringCreateMutableCopy(NULL, 0, *deviceID);
CFStringFindAndReplace(deviceIDString, CFSTR("+"), CFSTR(""), range, 0);
CFRelease(*deviceID);
*deviceID = deviceIDString;
}
release_deviceinfo(&deviceMake, &deviceModel, &deviceSerial);
return err;
@@ -1976,6 +1955,8 @@ static void run_legacy_backend(int argc,
if (!usb_legacy_status)
{
log_usb_class_driver(IS_NOT_64BIT);
/*
* Setup a SIGTERM handler then block it before forking...
*/
@@ -2338,6 +2319,32 @@ static void get_device_id(cups_sc_status_t *status,
}
static void
log_usb_class_driver(int is_64bit) /* I - Is the USB class driver 64-bit? */
{
/*
* Report the usage of legacy USB class drivers to Apple if the user opts into providing
* feedback to Apple...
*/
aslmsg aslm = asl_new(ASL_TYPE_MSG);
if (aslm)
{
ppd_file_t *ppd = ppdOpenFile(getenv("PPD"));
const char *make_model = ppd ? ppd->nickname : NULL;
ppd_attr_t *version = ppdFindAttr(ppd, "FileVersion", "");
asl_set(aslm, "com.apple.message.domain", "com.apple.printing.usb.64bit");
asl_set(aslm, "com.apple.message.result", is_64bit ? "yes" : "no");
asl_set(aslm, "com.apple.message.signature", make_model ? make_model : "Unknown");
asl_set(aslm, "com.apple.message.signature2", version ? version->value : "?.?");
asl_set(aslm, "com.apple.message.summarize", "YES");
asl_log(NULL, aslm, ASL_LEVEL_NOTICE, "");
asl_free(aslm);
}
}
/*
* End of "$Id: usb-darwin.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: usb-darwin.c 11670 2014-03-04 14:53:59Z msweet $".
*/
+12 -36
Ver Arquivo
@@ -1,31 +1,16 @@
/*
* "$Id: ipp-var.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: ipp-var.c 11890 2014-05-22 13:59:21Z msweet $"
*
* CGI <-> IPP variable routines for CUPS.
* CGI <-> IPP variable routines for CUPS.
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* 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:
*
* cgiGetAttributes() - Get the list of attributes that are needed by the
* template file.
* cgiGetIPPObjects() - Get the objects in an IPP response.
* cgiMoveJobs() - Move one or more jobs.
* cgiPrintCommand() - Print a CUPS command job.
* cgiPrintTestPage() - Print a test page.
* cgiRewriteURL() - Rewrite a printer URI into a web browser URL...
* cgiSetIPPObjectVars() - Set CGI variables from an IPP object.
* cgiSetIPPVars() - Set CGI variables from an IPP response.
* cgiShowIPPError() - Show the last IPP error message.
* cgiShowJobs() - Show print jobs.
* cgiText() - Return localized text.
* 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/".
*/
/*
@@ -958,7 +943,6 @@ cgiSetIPPObjectVars(
*nameptr, /* Pointer into name */
value[16384], /* Value(s) */
*valptr; /* Pointer into value */
struct tm *date; /* Date information */
fprintf(stderr, "DEBUG2: cgiSetIPPObjectVars(obj=%p, prefix=\"%s\", "
@@ -1186,17 +1170,9 @@ cgiSetIPPObjectVars(
case IPP_TAG_INTEGER :
case IPP_TAG_ENUM :
if (strncmp(name, "time_at_", 8) == 0)
{
time_t t; /* Temporary time value */
t = (time_t)attr->values[i].integer;
date = localtime(&t);
strftime(valptr, sizeof(value) - (valptr - value), "%c", date);
}
_cupsStrDate(valptr, sizeof(value) - (size_t)(valptr - value), (time_t)ippGetInteger(attr, i));
else
snprintf(valptr, sizeof(value) - (valptr - value),
"%d", attr->values[i].integer);
snprintf(valptr, sizeof(value) - (size_t)(valptr - value), "%d", ippGetInteger(attr, i));
break;
case IPP_TAG_BOOLEAN :
@@ -1589,5 +1565,5 @@ cgiText(const char *message) /* I - Message */
/*
* End of "$Id: ipp-var.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: ipp-var.c 11890 2014-05-22 13:59:21Z msweet $".
*/
+3 -3
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: template.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: template.c 11688 2014-03-05 21:11:32Z msweet $"
*
* CGI template function.
*
@@ -553,7 +553,7 @@ cgi_copy(FILE *out, /* I - Output file */
if (regcomp(&re, compare, REG_EXTENDED | REG_ICASE))
{
fprintf(stderr,
"ERROR: Unable to compile regular expresion \"%s\"!\n",
"ERROR: Unable to compile regular expression \"%s\"!\n",
compare);
result = 0;
}
@@ -729,5 +729,5 @@ cgi_puturi(const char *s, /* I - String to output */
/*
* End of "$Id: template.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: template.c 11688 2014-03-05 21:11:32Z msweet $".
*/
+13 -13
Ver Arquivo
@@ -1,20 +1,20 @@
#
# "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $"
#
# Base MIME types file for CUPS.
# Base MIME types file for CUPS.
#
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.types" file that
# reflects your local configuration changes.
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.types" file that
# reflects your local configuration changes.
#
# Copyright 2007-2011 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
# Copyright 2007-2014 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
# property of Apple Inc. and are protected by Federal copyright
# 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/".
# 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/".
#
########################################################################
@@ -92,7 +92,7 @@ image/jpeg jpeg jpg jpe string(0,<FFD8FF>) +\
char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
char(3,0xec) char(3,0xed) char(3,0xee) char(3,0xef))
image/pwg-raster string(0,"RaS2") + string(4,PwgRaster<00>) priority(100)
image/pwg-raster string(0,"RaS2") + string(4,PwgRaster<00>) priority(150)
image/tiff tiff tif string(0,MM<002A>) string(0,II<2A00>)
image/x-photocd pcd string(2048,PCD_IPI)
image/x-portable-anymap pnm
@@ -152,7 +152,7 @@ application/vnd.cups-pdf
application/vnd.cups-postscript
application/vnd.cups-ppd ppd string(0,"*PPD-Adobe:")
application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR") \
string(0,"RaS2") string(0,"2SaR") \
(string(0,"RaS2") + !string(4,PwgRaster<00>)) string(0,"2SaR") \
string(0,"RaS3") string(0,"3SaR")
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
+19 -16
Ver Arquivo
@@ -1,16 +1,16 @@
dnl
dnl "$Id: cups-common.m4 8781 2009-08-28 17:34:54Z mike $"
dnl
dnl Common configuration stuff for CUPS.
dnl Common configuration stuff for CUPS.
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl Copyright 2007-2014 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
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 These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
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
dnl We need at least autoconf 2.60...
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
CUPS_VERSION=1.7.1
CUPS_VERSION=1.7.4
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -230,7 +230,7 @@ AC_SUBST(LIBUSB)
AC_SUBST(USBQUIRKS)
if test "x$PKGCONFIG" != x; then
if test x$enable_libusb = xyes -o $uname != Darwin; then
if test x$enable_libusb != xno -a $uname != Darwin; then
AC_MSG_CHECKING(for libusb-1.0)
if $PKGCONFIG --exists libusb-1.0; then
AC_MSG_RESULT(yes)
@@ -240,6 +240,9 @@ if test "x$PKGCONFIG" != x; then
USBQUIRKS="\$(DATADIR)/usb"
else
AC_MSG_RESULT(no)
if test x$enable_libusb = xyes; then
AC_MSG_ERROR(libusb required for --enable-libusb.)
fi
fi
fi
elif test x$enable_libusb = xyes; then
@@ -303,16 +306,11 @@ fi
LIBS="$SAVELIBS"
dnl Check for DBUS support
if test -d /etc/dbus-1; then
DBUSDIR="/etc/dbus-1"
else
DBUSDIR=""
fi
AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
DBUSDIR="$withval")
DBUSDIR=""
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
@@ -329,7 +327,12 @@ if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
LIBS="$LIBS $DBUS_NOTIFIERLIBS"
AC_CHECK_FUNC(dbus_message_iter_init_append,
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
AC_CHECK_FUNC(dbus_threads_init,
AC_DEFINE(HAVE_DBUS_THREADS_INIT))
LIBS="$SAVELIBS"
if test -d /etc/dbus-1; then
DBUSDIR="/etc/dbus-1"
fi
else
AC_MSG_RESULT(no)
fi
+9 -9
Ver Arquivo
@@ -1,16 +1,16 @@
dnl
dnl "$Id: cups-compiler.m4 7871 2008-08-27 21:12:43Z mike $"
dnl
dnl Compiler stuff for CUPS.
dnl Compiler stuff for CUPS.
dnl
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl Copyright 2007-2014 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
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 These coded instructions, statements, and computer programs are the
dnl property of Apple Inc. and are protected by Federal copyright
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
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
dnl Clear the debugging and non-shared library options unless the user asks
@@ -185,7 +185,7 @@ if test -n "$GCC"; then
# The -z relro option is provided by the Linux linker command to
# make relocatable data read-only.
if test x$enable_relro = xyes; then
RELROFLAGS="-Wl,-z,relro"
RELROFLAGS="-Wl,-z,relro,-z,now"
fi
;;
esac
+6 -35
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id$"
dnl "$Id: cups-gssapi.m4 11324 2013-10-04 03:11:42Z msweet $"
dnl
dnl GSSAPI/Kerberos library detection for CUPS.
dnl
dnl Copyright 2007-2012 by Apple Inc.
dnl Copyright 2007-2013 by Apple Inc.
dnl Copyright 2006-2007 by Easy Software Products.
dnl
dnl This file contains Kerberos support code, copyright 2006 by
@@ -71,38 +71,9 @@ if test x$enable_gssapi != xno; then
if test "x$LIBGSSAPI" != x; then
AC_CHECK_HEADER(krb5.h, AC_DEFINE(HAVE_KRB5_H))
if test -d /System/Library/Frameworks/GSS.framework; then
gssdir="/System/Library/Frameworks/GSS.framework"
AC_MSG_CHECKING(for GSS/gssapi.h presence)
if test -f $gssdir/Headers/gssapi.h; then
AC_DEFINE(HAVE_GSS_GSSAPI_H)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for GSS/gssapi_generic.h presence)
if test -f $gssdir/Headers/gssapi_generic.h; then
AC_DEFINE(HAVE_GSSAPI_GENERIC_H)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for GSS/gssapi_spi.h presence)
if test -f $gssdir/PrivateHeaders/gssapi_spi.h; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for GSS/gssapi_spi.h usability)
if test -s $gssdir/PrivateHeaders/gssapi_spi.h; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H)
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
if test $uversion -ge 110 -a $uversion -lt 120; then
# Broken public headers in 10.7.x...
AC_MSG_ERROR(Run 'sudo mkdir -p $gssdir/PrivateHeaders' and 'sudo touch $gssdir/PrivateHeaders/gssapi_spi.h' to build CUPS.)
fi
fi
AC_CHECK_HEADER(GSS/gssapi.h, AC_DEFINE(HAVE_GSS_GSSAPI_H))
AC_CHECK_HEADER(GSS/gssapi_generic.h, AC_DEFINE(HAVE_GSS_GSSAPI_GENERIC_H))
AC_CHECK_HEADER(GSS/gssapi_spi.h, AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H))
else
AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
@@ -158,5 +129,5 @@ AC_SUBST(CUPS_DEFAULT_GSSSERVICENAME)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
dnl
dnl End of "$Id$".
dnl End of "$Id: cups-gssapi.m4 11324 2013-10-04 03:11:42Z msweet $".
dnl
+3 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: config.h.in 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: config.h.in 11642 2014-02-27 15:57:59Z msweet $"
*
* Configuration file for CUPS.
*
@@ -535,6 +535,7 @@
#undef HAVE_DBUS
#undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
#undef HAVE_DBUS_THREADS_INIT
/*
@@ -706,5 +707,5 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
#endif /* !_CUPS_CONFIG_H_ */
/*
* End of "$Id: config.h.in 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: config.h.in 11642 2014-02-27 15:57:59Z msweet $".
*/
externo
+34 -53
Ver Arquivo
@@ -2517,7 +2517,7 @@ esac
ac_config_headers="$ac_config_headers config.h"
CUPS_VERSION=1.7.1
CUPS_VERSION=1.7.4
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -5238,7 +5238,7 @@ USBQUIRKS=""
if test "x$PKGCONFIG" != x; then
if test x$enable_libusb = xyes -o $uname != Darwin; then
if test x$enable_libusb != xno -a $uname != Darwin; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb-1.0" >&5
$as_echo_n "checking for libusb-1.0... " >&6; }
if $PKGCONFIG --exists libusb-1.0; then
@@ -5252,6 +5252,9 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test x$enable_libusb = xyes; then
as_fn_error $? "libusb required for --enable-libusb." "$LINENO" 5
fi
fi
fi
elif test x$enable_libusb = xyes; then
@@ -5500,12 +5503,6 @@ fi
fi
LIBS="$SAVELIBS"
if test -d /etc/dbus-1; then
DBUSDIR="/etc/dbus-1"
else
DBUSDIR=""
fi
# Check whether --enable-dbus was given.
if test "${enable_dbus+set}" = set; then :
enableval=$enable_dbus;
@@ -5518,6 +5515,7 @@ if test "${with_dbusdir+set}" = set; then :
fi
DBUSDIR=""
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
@@ -5539,9 +5537,18 @@ $as_echo "yes" >&6; }
if test "x$ac_cv_func_dbus_message_iter_init_append" = xyes; then :
$as_echo "#define HAVE_DBUS_MESSAGE_ITER_INIT_APPEND 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "dbus_threads_init" "ac_cv_func_dbus_threads_init"
if test "x$ac_cv_func_dbus_threads_init" = xyes; then :
$as_echo "#define HAVE_DBUS_THREADS_INIT 1" >>confdefs.h
fi
LIBS="$SAVELIBS"
if test -d /etc/dbus-1; then
DBUSDIR="/etc/dbus-1"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
@@ -6949,7 +6956,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# The -z relro option is provided by the Linux linker command to
# make relocatable data read-only.
if test x$enable_relro = xyes; then
RELROFLAGS="-Wl,-z,relro"
RELROFLAGS="-Wl,-z,relro,-z,now"
fi
;;
esac
@@ -7966,53 +7973,27 @@ fi
if test -d /System/Library/Frameworks/GSS.framework; then
gssdir="/System/Library/Frameworks/GSS.framework"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi.h presence" >&5
$as_echo_n "checking for GSS/gssapi.h presence... " >&6; }
if test -f $gssdir/Headers/gssapi.h; then
$as_echo "#define HAVE_GSS_GSSAPI_H 1" >>confdefs.h
ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi.h" "ac_cv_header_GSS_gssapi_h" "$ac_includes_default"
if test "x$ac_cv_header_GSS_gssapi_h" = xyes; then :
$as_echo "#define HAVE_GSS_GSSAPI_H 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_generic.h presence" >&5
$as_echo_n "checking for GSS/gssapi_generic.h presence... " >&6; }
if test -f $gssdir/Headers/gssapi_generic.h; then
$as_echo "#define HAVE_GSSAPI_GENERIC_H 1" >>confdefs.h
fi
ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi_generic.h" "ac_cv_header_GSS_gssapi_generic_h" "$ac_includes_default"
if test "x$ac_cv_header_GSS_gssapi_generic_h" = xyes; then :
$as_echo "#define HAVE_GSS_GSSAPI_GENERIC_H 1" >>confdefs.h
fi
ac_fn_c_check_header_mongrel "$LINENO" "GSS/gssapi_spi.h" "ac_cv_header_GSS_gssapi_spi_h" "$ac_includes_default"
if test "x$ac_cv_header_GSS_gssapi_spi_h" = xyes; then :
$as_echo "#define HAVE_GSS_GSSAPI_SPI_H 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_spi.h presence" >&5
$as_echo_n "checking for GSS/gssapi_spi.h presence... " >&6; }
if test -f $gssdir/PrivateHeaders/gssapi_spi.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSS/gssapi_spi.h usability" >&5
$as_echo_n "checking for GSS/gssapi_spi.h usability... " >&6; }
if test -s $gssdir/PrivateHeaders/gssapi_spi.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_GSS_GSSAPI_SPI_H 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test $uversion -ge 110 -a $uversion -lt 120; then
# Broken public headers in 10.7.x...
as_fn_error $? "Run 'sudo mkdir -p $gssdir/PrivateHeaders' and 'sudo touch $gssdir/PrivateHeaders/gssapi_spi.h' to build CUPS." "$LINENO" 5
fi
fi
else
ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
if test "x$ac_cv_header_gssapi_h" = xyes; then :
+1 -1
Ver Arquivo
@@ -3,7 +3,7 @@
Filter and backend programming header for CUPS.
Copyright 2008-2011 by Apple Inc.
Copyright 2008-2014 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
+97 -8
Ver Arquivo
@@ -237,7 +237,7 @@ prefix strings:</p>
<code>marker-types</code>, <code>printer-alert</code>, and
<code>printer-alert-description</code> printer attributes. Standard
<code>marker-types</code> values are listed in <a href='#TABLE1'>Table
1</a>.</dd>
1</a>. String values need special handling - see <a href="#ATTR_STRINGS">Reporting Attribute String Values</a> below.</dd>
<dt>CRIT: message</dt>
<dd>Sets the printer-state-message attribute and adds the specified
@@ -320,11 +320,11 @@ the "DEBUG:" prefix string.</p>
<td>Fuser unit</td>
</tr>
<tr>
<td>fuserCleaningPad</td>
<td>fuser-cleaning-pad</td>
<td>Fuser cleaning pad</td>
</tr>
<tr>
<td>fuserOil</td>
<td>fuser-oil</td>
<td>Fuser oil</td>
</tr>
<tr>
@@ -336,7 +336,7 @@ the "DEBUG:" prefix string.</p>
<td>Photo conductor</td>
</tr>
<tr>
<td>solidWax</td>
<td>solid-wax</td>
<td>Wax supply</td>
</tr>
<tr>
@@ -348,19 +348,19 @@ the "DEBUG:" prefix string.</p>
<td>Toner supply</td>
</tr>
<tr>
<td>transferUnit</td>
<td>transfer-unit</td>
<td>Transfer unit</td>
</tr>
<tr>
<td>wasteInk</td>
<td>waste-ink</td>
<td>Waste ink tank</td>
</tr>
<tr>
<td>wasteToner</td>
<td>waste-toner</td>
<td>Waste toner tank</td>
</tr>
<tr>
<td>wasteWax</td>
<td>waste-wax</td>
<td>Waste wax tank</td>
</tr>
</tbody>
@@ -440,6 +440,95 @@ the "DEBUG:" prefix string.</p>
</tbody>
</table></div>
<h4><a name="ATTR_STRINGS">Reporting Attribute String Values</a></h4>
<p>When reporting string values using "ATTR:" messages, a filter or backend must take special care to appropriately quote those values. The scheduler uses the CUPS option parsing code for attributes, so the general syntax is:</p>
<pre class="example">
name=simple
name=simple,simple,...
name='complex value'
name="complex value"
name='"complex value"','"complex value"',...
</pre>
<p>Simple values are strings that do not contain spaces, quotes, backslashes, or the comma and can be placed verbatim in the "ATTR:" message, for example:</p>
<pre class="example">
int levels[4] = { 40, 50, 60, 70 }; /* CMYK */
fputs("ATTR: marker-colors=#00FFFF,#FF00FF,#FFFF00,#000000\n", stderr);
fputs("ATTR: marker-high-levels=100,100,100,100\n", stderr);
fprintf(stderr, "ATTR: marker-levels=%d,%d,%d,%d\n", levels[0], levels[1],
levels[2], levels[3], levels[4]);
fputs("ATTR: marker-low-levels=5,5,5,5\n", stderr);
fputs("ATTR: marker-types=toner,toner,toner,toner\n", stderr);
</pre>
<p>Complex values that contains spaces, quotes, backslashes, or the comma must be quoted. For a single value a single set of quotes is sufficient:</p>
<pre class="example">
fputs("ATTR: marker-message='Levels shown are approximate.'\n", stderr);
</pre>
<p>When multiple values are reported, each value must be enclosed by a set of single and double quotes:</p>
<pre class="example">
fputs("ATTR: marker-names='\"Cyan Toner\"','\"Magenta Toner\"',"
"'\"Yellow Toner\"','\"Black Toner\"'\n", stderr);
</pre>
<p>The IPP backend includes a <var>quote_string</var> function that may be used to properly quote a complex value in an "ATTR:" message:</p>
<pre class="example">
static const char * /* O - Quoted string */
quote_string(const char *s, /* I - String */
char *q, /* I - Quoted string buffer */
size_t qsize) /* I - Size of quoted string buffer */
{
char *qptr, /* Pointer into string buffer */
*qend; /* End of string buffer */
qptr = q;
qend = q + qsize - 5;
if (qend &lt; q)
{
*q = '\0';
return (q);
}
*qptr++ = '\'';
*qptr++ = '\"';
while (*s && qptr &lt; qend)
{
if (*s == '\\' || *s == '\"' || *s == '\'')
{
if (qptr &lt; (qend - 4))
{
*qptr++ = '\\';
*qptr++ = '\\';
*qptr++ = '\\';
}
else
break;
}
*qptr++ = *s++;
}
*qptr++ = '\"';
*qptr++ = '\'';
*qptr = '\0';
return (q);
}
</pre>
<h4><a name="MANAGING_STATE">Managing Printer State in a Filter</a></h4>
<p>Filters are responsible for managing the state keywords they set using
+13 -17
Ver Arquivo
@@ -1,18 +1,18 @@
/*
* "$Id: cups.h 11367 2013-10-28 15:35:57Z msweet $"
* "$Id: cups.h 11978 2014-07-02 10:35:09Z msweet $"
*
* API definitions for CUPS.
* API definitions for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* 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/".
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_CUPS_H_
@@ -30,10 +30,6 @@
typedef off_t ssize_t; /* @private@ */
# endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
# ifdef __BLOCKS__
# include <dispatch/dispatch.h>
# endif /* __BLOCKS__ */
# include "file.h"
# include "ipp.h"
# include "language.h"
@@ -53,10 +49,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0701
# define CUPS_VERSION 1.0704
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 7
# define CUPS_VERSION_PATCH 1
# define CUPS_VERSION_PATCH 4
# define CUPS_BC_FD 3
/* Back-channel file descriptor for
@@ -627,5 +623,5 @@ extern const char *cupsUserAgent(void) _CUPS_API_1_7;
#endif /* !_CUPS_CUPS_H_ */
/*
* End of "$Id: cups.h 11367 2013-10-28 15:35:57Z msweet $".
* End of "$Id: cups.h 11978 2014-07-02 10:35:09Z msweet $".
*/
+57 -17
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: dest-options.c 11085 2013-07-03 13:53:05Z msweet $"
* "$Id: dest-options.c 11883 2014-05-16 21:04:07Z msweet $"
*
* Destination option/media support for CUPS.
*
@@ -886,7 +886,8 @@ cupsGetDestMediaByIndex(
unsigned flags, /* I - Media flags */
cups_size_t *size) /* O - Media size information */
{
cups_size_t *nsize; /* Size for N */
_cups_media_db_t *nsize; /* Size for N */
pwg_media_t *pwg; /* PWG media name for size */
/*
@@ -916,13 +917,30 @@ cupsGetDestMediaByIndex(
* Copy the size over and return...
*/
if ((nsize = (cups_size_t *)cupsArrayIndex(dinfo->cached_db, n)) == NULL)
if ((nsize = (_cups_media_db_t *)cupsArrayIndex(dinfo->cached_db, n)) == NULL)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(EINVAL), 0);
return (0);
}
if (nsize->size_name)
strlcpy(size->media, nsize->size_name, sizeof(size->media));
else if (nsize->key)
strlcpy(size->media, nsize->key, sizeof(size->media));
else if ((pwg = pwgMediaForSize(nsize->width, nsize->length)) != NULL)
strlcpy(size->media, pwg->pwg, sizeof(size->media));
else
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(EINVAL), 0);
return (0);
}
memcpy(size, nsize, sizeof(cups_size_t));
size->width = nsize->width;
size->length = nsize->length;
size->bottom = nsize->bottom;
size->left = nsize->left;
size->right = nsize->right;
size->top = nsize->top;
return (1);
}
@@ -1281,6 +1299,8 @@ cups_create_cached(http_t *http, /* I - Connection to destination */
*first; /* First entry this size */
DEBUG_printf(("3cups_create_cached(http=%p, dinfo=%p, flags=%u)", http, dinfo, flags));
if (dinfo->cached_db)
cupsArrayDelete(dinfo->cached_db);
@@ -1289,11 +1309,15 @@ cups_create_cached(http_t *http, /* I - Connection to destination */
if (flags & CUPS_MEDIA_FLAGS_READY)
{
DEBUG_puts("4cups_create_cached: ready media");
cups_update_ready(http, dinfo);
db = dinfo->ready_db;
}
else
{
DEBUG_puts("4cups_create_cached: supported media");
if (!dinfo->media_db)
cups_create_media_db(dinfo, CUPS_MEDIA_FLAGS_DEFAULT);
@@ -1304,26 +1328,40 @@ cups_create_cached(http_t *http, /* I - Connection to destination */
mdb;
mdb = (_cups_media_db_t *)cupsArrayNext(db))
{
DEBUG_printf(("4cups_create_cached: %p key=\"%s\", type=\"%s\", %dx%d, B%d L%d R%d T%d", mdb, mdb->key, mdb->type, mdb->width, mdb->length, mdb->bottom, mdb->left, mdb->right, mdb->top));
if (flags & CUPS_MEDIA_FLAGS_BORDERLESS)
{
if (!mdb->left && !mdb->right && !mdb->top && !mdb->bottom)
{
DEBUG_printf(("4cups_create_cached: add %p", mdb));
cupsArrayAdd(dinfo->cached_db, mdb);
}
}
else if (flags & CUPS_MEDIA_FLAGS_DUPLEX)
{
if (first->width != mdb->width || first->length != mdb->length)
{
DEBUG_printf(("4cups_create_cached: add %p", first));
cupsArrayAdd(dinfo->cached_db, first);
first = mdb;
}
else if (mdb->left >= first->left && mdb->right >= first->right &&
mdb->top >= first->top && mdb->bottom >= first->bottom)
else if (mdb->left >= first->left && mdb->right >= first->right && mdb->top >= first->top && mdb->bottom >= first->bottom &&
(mdb->left != first->left || mdb->right != first->right || mdb->top != first->top || mdb->bottom != first->bottom))
first = mdb;
}
else
{
DEBUG_printf(("4cups_create_cached: add %p", mdb));
cupsArrayAdd(dinfo->cached_db, mdb);
}
}
if (flags & CUPS_MEDIA_FLAGS_DUPLEX)
{
DEBUG_printf(("4cups_create_cached: add %p", first));
cupsArrayAdd(dinfo->cached_db, first);
}
}
@@ -1757,8 +1795,7 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
* Look for the smallest margins...
*/
if (best->left != 0 || best->right != 0 || best->top != 0 ||
best->bottom != 0)
if (best->left != 0 || best->right != 0 || best->top != 0 || best->bottom != 0)
{
for (mdb = (_cups_media_db_t *)cupsArrayNext(db);
mdb && !cups_compare_media_db(mdb, &key);
@@ -1795,7 +1832,8 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
mdb = (_cups_media_db_t *)cupsArrayNext(db))
{
if (mdb->left >= best->left && mdb->right >= best->right &&
mdb->top >= best->top && mdb->bottom >= best->bottom)
mdb->top >= best->top && mdb->bottom >= best->bottom &&
(mdb->bottom != best->bottom || mdb->left != best->left || mdb->right != best->right || mdb->top != best->top))
best = mdb;
}
}
@@ -1810,11 +1848,10 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
mdb = (_cups_media_db_t *)cupsArrayNext(db))
{
if (((mdb->left > 0 && mdb->left <= best->left) || best->left == 0) &&
((mdb->right > 0 && mdb->right <= best->right) ||
best->right == 0) &&
((mdb->right > 0 && mdb->right <= best->right) || best->right == 0) &&
((mdb->top > 0 && mdb->top <= best->top) || best->top == 0) &&
((mdb->bottom > 0 && mdb->bottom <= best->bottom) ||
best->bottom == 0))
((mdb->bottom > 0 && mdb->bottom <= best->bottom) || best->bottom == 0) &&
(mdb->bottom != best->bottom || mdb->left != best->left || mdb->right != best->right || mdb->top != best->top))
best = mdb;
}
}
@@ -1892,7 +1929,8 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
mdb = (_cups_media_db_t *)cupsArrayNext(db))
{
if (mdb->left <= best->left && mdb->right <= best->right &&
mdb->top <= best->top && mdb->bottom <= best->bottom)
mdb->top <= best->top && mdb->bottom <= best->bottom &&
(mdb->bottom != best->bottom || mdb->left != best->left || mdb->right != best->right || mdb->top != best->top))
{
best = mdb;
if (mdb->left == 0 && mdb->right == 0 && mdb->bottom == 0 &&
@@ -1913,7 +1951,8 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
mdb = (_cups_media_db_t *)cupsArrayNext(db))
{
if (mdb->left >= best->left && mdb->right >= best->right &&
mdb->top >= best->top && mdb->bottom >= best->bottom)
mdb->top >= best->top && mdb->bottom >= best->bottom &&
(mdb->bottom != best->bottom || mdb->left != best->left || mdb->right != best->right || mdb->top != best->top))
best = mdb;
}
}
@@ -1932,7 +1971,8 @@ cups_get_media_db(http_t *http, /* I - Connection to destination */
best->right == 0) &&
((mdb->top > 0 && mdb->top <= best->top) || best->top == 0) &&
((mdb->bottom > 0 && mdb->bottom <= best->bottom) ||
best->bottom == 0))
best->bottom == 0) &&
(mdb->bottom != best->bottom || mdb->left != best->left || mdb->right != best->right || mdb->top != best->top))
best = mdb;
}
}
@@ -2267,5 +2307,5 @@ cups_update_ready(http_t *http, /* I - Connection to destination */
/*
* End of "$Id: dest-options.c 11085 2013-07-03 13:53:05Z msweet $".
* End of "$Id: dest-options.c 11883 2014-05-16 21:04:07Z msweet $".
*/
+36 -7
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: dest.c 11141 2013-07-16 14:58:25Z msweet $"
* "$Id: dest.c 11688 2014-03-05 21:11:32Z msweet $"
*
* User-defined destination (and option) support for CUPS.
*
@@ -891,6 +891,10 @@ cupsEnumDests(
num_dests; /* Number of destinations */
cups_dest_t *dests = NULL, /* Destinations */
*dest; /* Current destination */
const char *defprinter; /* Default printer */
char name[1024], /* Copy of printer name */
*instance, /* Pointer to instance name */
*user_default; /* User default printer */
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
int count, /* Number of queries started */
remaining; /* Remainder of timeout */
@@ -936,6 +940,31 @@ cupsEnumDests(
num_dests = _cupsGetDests(CUPS_HTTP_DEFAULT, IPP_OP_CUPS_GET_PRINTERS, NULL,
&dests, type, mask);
if ((user_default = _cupsUserDefault(name, sizeof(name))) != NULL)
defprinter = name;
else if ((defprinter = cupsGetDefault2(CUPS_HTTP_DEFAULT)) != NULL)
{
strlcpy(name, defprinter, sizeof(name));
defprinter = name;
}
if (defprinter)
{
/*
* Separate printer and instance name...
*/
if ((instance = strchr(name, '/')) != NULL)
*instance++ = '\0';
/*
* Lookup the printer and instance and make it the default...
*/
if ((dest = cupsGetDest(name, instance, num_dests, dests)) != NULL)
dest->is_default = 1;
}
for (i = num_dests, dest = dests;
i > 0 && (!cancel || !*cancel);
i --, dest ++)
@@ -953,11 +982,11 @@ cupsEnumDests(
* Get Bonjour-shared printers...
*/
data.type = type;
data.mask = mask;
data.devices = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices,
NULL, NULL, 0, NULL,
(cups_afree_func_t)cups_dnssd_free_device);
data.type = type;
data.mask = mask;
data.cb = cb;
data.user_data = user_data;
data.devices = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices, NULL, NULL, 0, NULL, (cups_afree_func_t)cups_dnssd_free_device);
# ifdef HAVE_DNSSD
if (DNSServiceCreateConnection(&data.main_ref) != kDNSServiceErr_NoError)
@@ -3891,5 +3920,5 @@ cups_make_string(
/*
* End of "$Id: dest.c 11141 2013-07-16 14:58:25Z msweet $".
* End of "$Id: dest.c 11688 2014-03-05 21:11:32Z msweet $".
*/
+19 -44
Ver Arquivo
@@ -1,26 +1,18 @@
/*
* "$Id: encode.c 11115 2013-07-10 14:35:53Z msweet $"
* "$Id: encode.c 11867 2014-05-09 20:33:08Z msweet $"
*
* Option encoding routines for CUPS.
* Option encoding routines for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* 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/".
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* cupsEncodeOptions() - Encode printer options into IPP attributes.
* cupsEncodeOptions2() - Encode printer options into IPP attributes for
* a group.
* _ippFindOption() - Find the attribute information for an option.
* compare_ipp_options() - Compare two IPP options.
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
@@ -41,7 +33,10 @@ static const ipp_op_t ipp_job_creation[] =
{
IPP_OP_PRINT_JOB,
IPP_OP_PRINT_URI,
IPP_OP_VALIDATE_JOB,
IPP_OP_CREATE_JOB,
IPP_OP_HOLD_JOB,
IPP_OP_SET_JOB_ATTRIBUTES,
IPP_OP_CUPS_NONE
};
@@ -51,6 +46,8 @@ static const ipp_op_t ipp_doc_creation[] =
IPP_OP_PRINT_URI,
IPP_OP_SEND_DOCUMENT,
IPP_OP_SEND_URI,
IPP_OP_SET_JOB_ATTRIBUTES,
IPP_OP_SET_DOCUMENT_ATTRIBUTES,
IPP_OP_CUPS_NONE
};
@@ -59,8 +56,8 @@ static const ipp_op_t ipp_sub_creation[] =
IPP_OP_PRINT_JOB,
IPP_OP_PRINT_URI,
IPP_OP_CREATE_JOB,
IPP_OP_CREATE_PRINTER_SUBSCRIPTION,
IPP_OP_CREATE_JOB_SUBSCRIPTION,
IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS,
IPP_OP_CREATE_JOB_SUBSCRIPTIONS,
IPP_OP_CUPS_NONE
};
@@ -68,23 +65,13 @@ static const ipp_op_t ipp_all_print[] =
{
IPP_OP_PRINT_JOB,
IPP_OP_PRINT_URI,
IPP_OP_VALIDATE_JOB,
IPP_OP_CREATE_JOB,
IPP_OP_SEND_DOCUMENT,
IPP_OP_SEND_URI,
IPP_OP_CUPS_NONE
};
static const ipp_op_t ipp_all_limit[] =
{
IPP_OP_GET_JOBS,
IPP_OP_GET_PRINTER_ATTRIBUTES,
IPP_OP_CUPS_GET_PRINTERS,
IPP_OP_CUPS_GET_CLASSES,
IPP_OP_CUPS_GET_DEVICES,
IPP_OP_CUPS_GET_PPDS,
IPP_OP_CUPS_NONE
};
static const ipp_op_t ipp_set_printer[] =
{
IPP_OP_SET_PRINTER_ATTRIBUTES,
@@ -93,18 +80,6 @@ static const ipp_op_t ipp_set_printer[] =
IPP_OP_CUPS_NONE
};
static const ipp_op_t cups_am_class[] =
{
IPP_OP_CUPS_ADD_MODIFY_CLASS,
IPP_OP_CUPS_NONE
};
static const ipp_op_t cups_am_printer[] =
{
IPP_OP_CUPS_ADD_MODIFY_PRINTER,
IPP_OP_CUPS_NONE
};
static const ipp_op_t cups_schemes[] =
{
IPP_OP_CUPS_GET_DEVICES,
@@ -872,5 +847,5 @@ compare_ipp_options(_ipp_option_t *a, /* I - First option */
/*
* End of "$Id: encode.c 11115 2013-07-10 14:35:53Z msweet $".
* End of "$Id: encode.c 11867 2014-05-09 20:33:08Z msweet $".
*/
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: file-private.h 3275 2011-05-20 07:26:13Z msweet $"
* "$Id: file-private.h 11642 2014-02-27 15:57:59Z msweet $"
*
* Private file definitions for CUPS.
*
@@ -16,6 +16,8 @@
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_FILE_PRIVATE_H_
@@ -133,5 +135,5 @@ extern void _cupsFileCheckFilter(void *context,
#endif /* !_CUPS_FILE_PRIVATE_H_ */
/*
* End of "$Id: file-private.h 3275 2011-05-20 07:26:13Z msweet $".
* End of "$Id: file-private.h 11642 2014-02-27 15:57:59Z msweet $".
*/
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: file.c 11374 2013-11-04 23:49:10Z msweet $"
* "$Id: file.c 11642 2014-02-27 15:57:59Z msweet $"
*
* File functions for CUPS.
*
@@ -16,6 +16,8 @@
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
@@ -2670,5 +2672,5 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
/*
* End of "$Id: file.c 11374 2013-11-04 23:49:10Z msweet $".
* End of "$Id: file.c 11642 2014-02-27 15:57:59Z msweet $".
*/
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: file.h 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: file.h 11642 2014-02-27 15:57:59Z msweet $"
*
* Public file definitions for CUPS.
*
@@ -16,6 +16,8 @@
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_FILE_H_
@@ -112,5 +114,5 @@ extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf,
#endif /* !_CUPS_FILE_H_ */
/*
* End of "$Id: file.h 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: file.h 11642 2014-02-27 15:57:59Z msweet $".
*/
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: http-addr.c 11374 2013-11-04 23:49:10Z msweet $"
* "$Id: http-addr.c 11642 2014-02-27 15:57:59Z msweet $"
*
* HTTP address routines for CUPS.
*
@@ -11,6 +11,8 @@
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
@@ -754,5 +756,5 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
/*
* End of "$Id: http-addr.c 11374 2013-11-04 23:49:10Z msweet $".
* End of "$Id: http-addr.c 11642 2014-02-27 15:57:59Z msweet $".
*/
+5 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: http-addrlist.c 11374 2013-11-04 23:49:10Z msweet $"
* "$Id: http-addrlist.c 11642 2014-02-27 15:57:59Z msweet $"
*
* HTTP address list routines for CUPS.
*
@@ -11,6 +11,8 @@
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
@@ -455,6 +457,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
if ((first = (http_addrlist_t *)calloc(1, sizeof(http_addrlist_t))) != NULL)
{
addr = first;
first->addr.un.sun_family = AF_LOCAL;
strlcpy(first->addr.un.sun_path, hostname, sizeof(first->addr.un.sun_path));
}
@@ -874,5 +877,5 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
/*
* End of "$Id: http-addrlist.c 11374 2013-11-04 23:49:10Z msweet $".
* End of "$Id: http-addrlist.c 11642 2014-02-27 15:57:59Z msweet $".
*/
+29 -21
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id: http.c 11392 2013-11-06 01:29:56Z msweet $"
* "$Id: http.c 11761 2014-03-28 13:04:33Z msweet $"
*
* HTTP routines for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by Jelmer Vernooij.
@@ -1748,7 +1748,7 @@ httpPeek(http_t *http, /* I - Connection to server */
*/
#ifdef HAVE_LIBZ
if (http->coding)
if (http->coding >= _HTTP_CODING_GUNZIP)
http_content_coding_finish(http);
#endif /* HAVE_LIBZ */
@@ -1776,7 +1776,8 @@ httpPeek(http_t *http, /* I - Connection to server */
#ifdef HAVE_LIBZ
if (http->used == 0 &&
(http->coding == _HTTP_CODING_IDENTITY || http->stream.avail_in == 0))
(http->coding == _HTTP_CODING_IDENTITY ||
(http->coding >= _HTTP_CODING_GUNZIP && http->stream.avail_in == 0)))
#else
if (http->used == 0)
#endif /* HAVE_LIBZ */
@@ -1819,7 +1820,7 @@ httpPeek(http_t *http, /* I - Connection to server */
}
#ifdef HAVE_LIBZ
if (http->coding)
if (http->coding >= _HTTP_CODING_GUNZIP)
{
# ifdef HAVE_INFLATECOPY
int zerr; /* Decompressor error */
@@ -2056,7 +2057,7 @@ httpRead2(http_t *http, /* I - Connection to server */
return (0);
#ifdef HAVE_LIBZ
if (http->coding)
if (http->coding >= _HTTP_CODING_GUNZIP)
{
do
{
@@ -2210,14 +2211,15 @@ httpRead2(http_t *http, /* I - Connection to server */
if (
#ifdef HAVE_LIBZ
(http->coding == _HTTP_CODING_IDENTITY || http->stream.avail_in == 0) &&
(http->coding == _HTTP_CODING_IDENTITY ||
(http->coding >= _HTTP_CODING_GUNZIP && http->stream.avail_in == 0)) &&
#endif /* HAVE_LIBZ */
((http->data_remaining <= 0 &&
http->data_encoding == HTTP_ENCODING_LENGTH) ||
(http->data_encoding == HTTP_ENCODING_CHUNKED && bytes == 0)))
{
#ifdef HAVE_LIBZ
if (http->coding)
if (http->coding >= _HTTP_CODING_GUNZIP)
http_content_coding_finish(http);
#endif /* HAVE_LIBZ */
@@ -3478,7 +3480,7 @@ httpWrite2(http_t *http, /* I - Connection to server */
*/
#ifdef HAVE_LIBZ
if (http->coding)
if (http->coding == _HTTP_CODING_GZIP || http->coding == _HTTP_CODING_DEFLATE)
{
DEBUG_printf(("1httpWrite2: http->coding=%d", http->coding));
@@ -3578,7 +3580,7 @@ httpWrite2(http_t *http, /* I - Connection to server */
*/
#ifdef HAVE_LIBZ
if (http->coding)
if (http->coding == _HTTP_CODING_GZIP || http->coding == _HTTP_CODING_DEFLATE)
http_content_coding_finish(http);
#endif /* HAVE_LIBZ */
@@ -5394,6 +5396,7 @@ http_setup_ssl(http_t *http) /* I - Connection to server */
if (!http->tls)
{
DEBUG_puts("8http_setup_ssl: Unable to allocate SSPI data.");
_cupsSetHTTPError(HTTP_STATUS_ERROR);
return (-1);
}
@@ -5404,11 +5407,14 @@ http_setup_ssl(http_t *http) /* I - Connection to server */
_sntprintf_s(commonName, sizeof(commonName) / sizeof(TCHAR),
sizeof(commonName) / sizeof(TCHAR), TEXT("CN=%s"), username);
if (!_sspiGetCredentials(http->tls_credentials, L"ClientContainer",
commonName, FALSE))
DEBUG_printf(("8http_setup_ssl: commonName=\"%s\"", commonName));
if (!_sspiGetCredentials(http->tls, L"ClientContainer", commonName, FALSE))
{
_sspiFree(http->tls_credentials);
http->tls_credentials = NULL;
DEBUG_puts("8http_setup_ssl: _sspiGetCredentials failed.");
_sspiFree(http->tls);
http->tls = NULL;
http->error = EIO;
http->status = HTTP_STATUS_ERROR;
@@ -5419,13 +5425,15 @@ http_setup_ssl(http_t *http) /* I - Connection to server */
return (-1);
}
_sspiSetAllowsAnyRoot(http->tls_credentials, TRUE);
_sspiSetAllowsExpiredCerts(http->tls_credentials, TRUE);
_sspiSetAllowsAnyRoot(http->tls, TRUE);
_sspiSetAllowsExpiredCerts(http->tls, TRUE);
if (!_sspiConnect(http->tls_credentials, hostname))
if (!_sspiConnect(http->tls, hostname))
{
_sspiFree(http->tls_credentials);
http->tls_credentials = NULL;
DEBUG_printf(("8http_setup_ssl: _sspiConnect failed for \"%s\".", hostname));
_sspiFree(http->tls);
http->tls = NULL;
http->error = EIO;
http->status = HTTP_STATUS_ERROR;
@@ -5478,7 +5486,7 @@ http_shutdown_ssl(http_t *http) /* I - Connection to server */
CFRelease(http->tls_credentials);
# elif defined(HAVE_SSPISSL)
_sspiFree(http->tls_credentials);
_sspiFree(http->tls);
# endif /* HAVE_LIBSSL */
http->tls = NULL;
@@ -5898,5 +5906,5 @@ http_write_ssl(http_t *http, /* I - Connection to server */
/*
* End of "$Id: http.c 11392 2013-11-06 01:29:56Z msweet $".
* End of "$Id: http.c 11761 2014-03-28 13:04:33Z msweet $".
*/
+10 -4
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: ipp-support.c 11085 2013-07-03 13:53:05Z msweet $"
* "$Id: ipp-support.c 11734 2014-03-25 18:01:47Z msweet $"
*
* Internet Printing Protocol support functions for CUPS.
*
@@ -175,8 +175,8 @@ static const char * const ipp_std_ops[] =
"Set-Printer-Attributes",
"Set-Job-Attributes",
"Get-Printer-Supported-Values",
"Create-Printer-Subscription",
"Create-Job-Subscription",
"Create-Printer-Subscriptions",
"Create-Job-Subscriptions",
"Get-Subscription-Attributes",
"Get-Subscriptions",
"Renew-Subscription",
@@ -2083,6 +2083,12 @@ ippOpValue(const char *name) /* I - Textual name */
if (!_cups_strcasecmp(name, ipp_cups_ops2[i]))
return ((ipp_op_t)(i + 0x4027));
if (!_cups_strcasecmp(name, "Create-Job-Subscription"))
return (IPP_OP_CREATE_JOB_SUBSCRIPTIONS);
if (!_cups_strcasecmp(name, "Create-Printer-Subscription"))
return (IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS);
if (!_cups_strcasecmp(name, "CUPS-Add-Class"))
return (IPP_OP_CUPS_ADD_MODIFY_CLASS);
@@ -2248,5 +2254,5 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */
/*
* End of "$Id: ipp-support.c 11085 2013-07-03 13:53:05Z msweet $".
* End of "$Id: ipp-support.c 11734 2014-03-25 18:01:47Z msweet $".
*/
+28 -20
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: ipp.c 11113 2013-07-10 14:08:39Z msweet $"
* "$Id: ipp.c 11864 2014-05-08 23:10:47Z msweet $"
*
* Internet Printing Protocol functions for CUPS.
*
@@ -2204,7 +2204,7 @@ ippFirstAttribute(ipp_t *ipp) /* I - IPP message */
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Boolean value or -1 on error */
int /* O - Boolean value or 0 on error */
ippGetBoolean(ipp_attribute_t *attr, /* I - IPP attribute */
int element) /* I - Value number (0-based) */
{
@@ -2214,7 +2214,7 @@ ippGetBoolean(ipp_attribute_t *attr, /* I - IPP attribute */
if (!attr || attr->value_tag != IPP_TAG_BOOLEAN ||
element < 0 || element >= attr->num_values)
return (-1);
return (0);
/*
* Return the value...
@@ -2260,7 +2260,7 @@ ippGetCollection(
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Number of values or -1 on error */
int /* O - Number of values or 0 on error */
ippGetCount(ipp_attribute_t *attr) /* I - IPP attribute */
{
/*
@@ -2268,7 +2268,7 @@ ippGetCount(ipp_attribute_t *attr) /* I - IPP attribute */
*/
if (!attr)
return (-1);
return (0);
/*
* Return the number of values...
@@ -2340,7 +2340,7 @@ ippGetGroupTag(ipp_attribute_t *attr) /* I - IPP attribute */
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Value or -1 on error */
int /* O - Value or 0 on error */
ippGetInteger(ipp_attribute_t *attr, /* I - IPP attribute */
int element) /* I - Value number (0-based) */
{
@@ -2350,7 +2350,7 @@ ippGetInteger(ipp_attribute_t *attr, /* I - IPP attribute */
if (!attr || (attr->value_tag != IPP_TAG_INTEGER && attr->value_tag != IPP_TAG_ENUM) ||
element < 0 || element >= attr->num_values)
return (-1);
return (0);
/*
* Return the value...
@@ -2429,7 +2429,7 @@ ippGetOctetString(
* @since CUPS 1.6/OS X 10.8@
*/
ipp_op_t /* O - Operation ID or -1 on error */
ipp_op_t /* O - Operation ID or 0 on error */
ippGetOperation(ipp_t *ipp) /* I - IPP request message */
{
/*
@@ -2437,7 +2437,7 @@ ippGetOperation(ipp_t *ipp) /* I - IPP request message */
*/
if (!ipp)
return ((ipp_op_t)-1);
return ((ipp_op_t)0);
/*
* Return the value...
@@ -2456,7 +2456,7 @@ ippGetOperation(ipp_t *ipp) /* I - IPP request message */
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Lower value of range or -1 */
int /* O - Lower value of range or 0 */
ippGetRange(ipp_attribute_t *attr, /* I - IPP attribute */
int element, /* I - Value number (0-based) */
int *uppervalue)/* O - Upper value of range */
@@ -2469,9 +2469,9 @@ ippGetRange(ipp_attribute_t *attr, /* I - IPP attribute */
element < 0 || element >= attr->num_values)
{
if (uppervalue)
*uppervalue = -1;
*uppervalue = 0;
return (-1);
return (0);
}
/*
@@ -2491,7 +2491,7 @@ ippGetRange(ipp_attribute_t *attr, /* I - IPP attribute */
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Request ID or -1 on error */
int /* O - Request ID or 0 on error */
ippGetRequestId(ipp_t *ipp) /* I - IPP message */
{
/*
@@ -2499,7 +2499,7 @@ ippGetRequestId(ipp_t *ipp) /* I - IPP message */
*/
if (!ipp)
return (-1);
return (0);
/*
* Return the request ID...
@@ -2518,7 +2518,7 @@ ippGetRequestId(ipp_t *ipp) /* I - IPP message */
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Horizontal/cross feed resolution or -1 */
int /* O - Horizontal/cross feed resolution or 0 */
ippGetResolution(
ipp_attribute_t *attr, /* I - IPP attribute */
int element, /* I - Value number (0-based) */
@@ -2531,7 +2531,15 @@ ippGetResolution(
if (!attr || attr->value_tag != IPP_TAG_RESOLUTION ||
element < 0 || element >= attr->num_values)
return (-1);
{
if (yres)
*yres = 0;
if (units)
*units = (ipp_res_t)0;
return (0);
}
/*
* Return the value...
@@ -2659,7 +2667,7 @@ ippGetValueTag(ipp_attribute_t *attr) /* I - IPP attribute */
* @since CUPS 1.6/OS X 10.8@
*/
int /* O - Major version number or -1 on error */
int /* O - Major version number or 0 on error */
ippGetVersion(ipp_t *ipp, /* I - IPP message */
int *minor) /* O - Minor version number or @code NULL@ */
{
@@ -2670,9 +2678,9 @@ ippGetVersion(ipp_t *ipp, /* I - IPP message */
if (!ipp)
{
if (minor)
*minor = -1;
*minor = 0;
return (-1);
return (0);
}
/*
@@ -7064,5 +7072,5 @@ ipp_write_file(int *fd, /* I - File descriptor */
/*
* End of "$Id: ipp.c 11113 2013-07-10 14:08:39Z msweet $".
* End of "$Id: ipp.c 11864 2014-05-08 23:10:47Z msweet $".
*/
+17 -15
Ver Arquivo
@@ -1,18 +1,18 @@
/*
* "$Id: ipp.h 11085 2013-07-03 13:53:05Z msweet $"
* "$Id: ipp.h 11734 2014-03-25 18:01:47Z msweet $"
*
* Internet Printing Protocol definitions for CUPS.
* Internet Printing Protocol definitions for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* 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/".
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_IPP_H_
@@ -251,8 +251,8 @@ typedef enum ipp_op_e /**** IPP operations ****/
IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@ */
IPP_OP_SET_JOB_ATTRIBUTES, /* Set job attributes */
IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */
IPP_OP_CREATE_PRINTER_SUBSCRIPTION, /* Create a printer subscription @since CUPS 1.2/OS X 10.5@ */
IPP_OP_CREATE_JOB_SUBSCRIPTION, /* Create a job subscription @since CUPS 1.2/OS X 10.5@ */
IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS, /* Create one or more printer subscriptions @since CUPS 1.2/OS X 10.5@ */
IPP_OP_CREATE_JOB_SUBSCRIPTIONS, /* Create one of more job subscriptions @since CUPS 1.2/OS X 10.5@ */
IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @since CUPS 1.2/OS X 10.5@ */
IPP_OP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since CUPS 1.2/OS X 10.5@ */
IPP_OP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @since CUPS 1.2/OS X 10.5@ */
@@ -331,8 +331,10 @@ typedef enum ipp_op_e /**** IPP operations ****/
# define IPP_SET_PRINTER_ATTRIBUTES IPP_OP_SET_PRINTER_ATTRIBUTES
# define IPP_SET_JOB_ATTRIBUTES IPP_OP_SET_JOB_ATTRIBUTES
# define IPP_GET_PRINTER_SUPPORTED_VALUES IPP_OP_GET_PRINTER_SUPPORTED_VALUES
# define IPP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTION
# define IPP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTION
# define IPP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
# define IPP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS
# define IPP_OP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS
# define IPP_OP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS
# define IPP_GET_SUBSCRIPTION_ATTRIBUTES IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
# define IPP_GET_SUBSCRIPTIONS IPP_OP_GET_SUBSCRIPTIONS
# define IPP_RENEW_SUBSCRIPTION IPP_OP_RENEW_SUBSCRIPTION
@@ -992,5 +994,5 @@ extern int ippValidateAttributes(ipp_t *ipp) _CUPS_API_1_7;
#endif /* !_CUPS_IPP_H_ */
/*
* End of "$Id: ipp.h 11085 2013-07-03 13:53:05Z msweet $".
* End of "$Id: ipp.h 11734 2014-03-25 18:01:47Z msweet $".
*/
+1
Ver Arquivo
@@ -23,6 +23,7 @@ _cupsNextDelay
_cupsSetError
_cupsSetLocale
_cupsStrAlloc
_cupsStrDate
_cupsStrFlush
_cupsStrFormatd
_cupsStrFree
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: ppd-cache.c 4274 2013-04-09 20:10:23Z msweet $"
* "$Id: ppd-cache.c 11833 2014-04-24 15:04:15Z msweet $"
*
* PPD cache implementation for CUPS.
*
@@ -2719,6 +2719,8 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
if (!_cups_isupper(*ppd) && _cups_isalnum(*ppd) &&
_cups_isupper(ppd[1]) && ptr < end)
*ptr++ = '-';
else if (!isdigit(*ppd & 255) && isdigit(ppd[1] & 255))
*ptr++ = '-';
}
*ptr = '\0';
@@ -2726,5 +2728,5 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
/*
* End of "$Id: ppd-cache.c 4274 2013-04-09 20:10:23Z msweet $".
* End of "$Id: ppd-cache.c 11833 2014-04-24 15:04:15Z msweet $".
*/
+41 -13
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: request.c 11174 2013-07-23 12:33:52Z msweet $"
* "$Id: request.c 11867 2014-05-09 20:33:08Z msweet $"
*
* IPP utilities for CUPS.
*
@@ -261,7 +261,7 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
* Get the server's response...
*/
if (status != HTTP_STATUS_ERROR)
if (status <= HTTP_STATUS_CONTINUE || status == HTTP_STATUS_OK)
{
response = cupsGetResponse(http, resource);
status = httpGetStatus(http);
@@ -350,17 +350,31 @@ cupsGetResponse(http_t *http, /* I - Connection to server or @code CUPS_HTTP
DEBUG_printf(("cupsGetResponse(http=%p, resource=\"%s\")", http, resource));
DEBUG_printf(("1cupsGetResponse: http->state=%d", http ? http->state : HTTP_STATE_ERROR));
/*
* Connect to the default server as needed...
*/
if (!http)
http = _cupsConnect();
{
_cups_globals_t *cg = _cupsGlobals();
/* Pointer to library globals */
if (!http || (http->state != HTTP_STATE_POST_RECV &&
http->state != HTTP_STATE_POST_SEND))
if ((http = cg->http) == NULL)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("No active connection."), 1);
DEBUG_puts("1cupsGetResponse: No active connection - returning NULL.");
return (NULL);
}
}
if (http->state != HTTP_STATE_POST_RECV && http->state != HTTP_STATE_POST_SEND)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("No request sent."), 1);
DEBUG_puts("1cupsGetResponse: Not in POST state - returning NULL.");
return (NULL);
}
/*
* Check for an unfinished chunked request...
@@ -749,9 +763,8 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
got_status = 0;
while ((state = ippWrite(http, request)) != IPP_STATE_DATA)
if (state == IPP_STATE_ERROR)
break;
else if (httpCheck(http))
{
if (httpCheck(http))
{
got_status = 1;
@@ -759,15 +772,30 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
if (status >= HTTP_STATUS_MULTIPLE_CHOICES)
break;
}
else if (state == IPP_STATE_ERROR)
break;
}
if (state == IPP_STATE_ERROR)
{
DEBUG_puts("1cupsSendRequest: Unable to send IPP request.");
/*
* We weren't able to send the IPP request. But did we already get a HTTP
* error status?
*/
http->status = HTTP_STATUS_ERROR;
http->state = HTTP_STATE_WAITING;
if (!got_status || status < HTTP_STATUS_MULTIPLE_CHOICES)
{
/*
* No, something else went wrong.
*/
return (HTTP_STATUS_ERROR);
DEBUG_puts("1cupsSendRequest: Unable to send IPP request.");
http->status = HTTP_STATUS_ERROR;
http->state = HTTP_STATE_WAITING;
return (HTTP_STATUS_ERROR);
}
}
/*
@@ -1177,5 +1205,5 @@ _cupsSetHTTPError(http_status_t status) /* I - HTTP status code */
/*
* End of "$Id: request.c 11174 2013-07-23 12:33:52Z msweet $".
* End of "$Id: request.c 11867 2014-05-09 20:33:08Z msweet $".
*/
+12 -29
Ver Arquivo
@@ -1,35 +1,15 @@
/*
* "$Id: sspi.c 3247 2011-05-12 06:22:31Z msweet $"
* "$Id: sspi.c 11760 2014-03-28 12:58:24Z msweet $"
*
* Windows SSPI SSL implementation for CUPS.
* Windows SSPI SSL implementation for CUPS.
*
* Copyright 2010-2011 by Apple Inc.
* Copyright 2010-2014 by Apple Inc.
*
* 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:
*
* sspi_alloc() - Allocate SSPI ssl object
* _sspiGetCredentials() - Retrieve an SSL/TLS certificate from the
* system store If one cannot be found, one is
* created.
* _sspiConnect() - Make an SSL connection. This function
* assumes a TCP/IP connection has already been
* successfully made
* _sspiAccept() - Accept an SSL/TLS connection
* _sspiSetAllowsAnyRoot() - Set the client cert policy for untrusted
* root certs
* _sspiSetAllowsExpiredCerts() - Set the client cert policy for expired root
* certs
* _sspiWrite() - Write a buffer to an ssl socket
* _sspiRead() - Read a buffer from an ssl socket
* _sspiPending() - Returns the number of available bytes
* _sspiFree() - Close a connection and free resources
* sspi_verify_certificate() - Verify a server certificate
* 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/".
*/
/*
@@ -108,6 +88,9 @@ _sspiGetCredentials(_sspi_struct_t *conn,
CRYPT_KEY_PROV_INFO ckp; /* Handle to crypto key */
BOOL ok = TRUE; /* Return value */
DEBUG_printf(("_sspiGetCredentials(conn=%p, container=%p, cn=\"%s\", isServer=%d)", conn, container, cn, isServer));
if (!conn)
return (FALSE);
if (!cn)
@@ -1481,5 +1464,5 @@ cleanup:
/*
* End of "$Id: sspi.c 3247 2011-05-12 06:22:31Z msweet $".
* End of "$Id: sspi.c 11760 2014-03-28 12:58:24Z msweet $".
*/
+19 -11
Ver Arquivo
@@ -1,18 +1,18 @@
/*
* "$Id: string-private.h 11021 2013-06-06 22:08:14Z msweet $"
* "$Id: string-private.h 11890 2014-05-22 13:59:21Z msweet $"
*
* Private string definitions for CUPS.
* Private string definitions for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* 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/".
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_STRING_PRIVATE_H_
@@ -28,6 +28,7 @@
# include <ctype.h>
# include <errno.h>
# include <locale.h>
# include <time.h>
# include "config.h"
@@ -199,6 +200,13 @@ extern double _cupsStrScand(const char *buf, char **bufptr,
struct lconv *loc);
/*
* Date function...
*/
extern char *_cupsStrDate(char *buf, size_t bufsize, time_t timeval);
/*
* C++ magic...
*/
@@ -210,5 +218,5 @@ extern double _cupsStrScand(const char *buf, char **bufptr,
#endif /* !_CUPS_STRING_H_ */
/*
* End of "$Id: string-private.h 11021 2013-06-06 22:08:14Z msweet $".
* End of "$Id: string-private.h 11890 2014-05-22 13:59:21Z msweet $".
*/
+36 -6
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: string.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: string.c 11890 2014-05-22 13:59:21Z msweet $"
*
* String functions for CUPS.
*
@@ -37,10 +37,7 @@
*/
#define _CUPS_STRING_C_
#include "string-private.h"
#include "debug-private.h"
#include "thread-private.h"
#include "array.h"
#include "cups-private.h"
#include <stddef.h>
#include <limits.h>
@@ -161,6 +158,39 @@ _cupsStrAlloc(const char *s) /* I - String */
}
/*
* '_cupsStrDate()' - Return a localized date for a given time value.
*
* This function works around the locale encoding issues of strftime...
*/
char * /* O - Buffer */
_cupsStrDate(char *buf, /* I - Buffer */
size_t bufsize, /* I - Size of buffer */
time_t timeval) /* I - Time value */
{
struct tm *dateval; /* Local date/time */
char temp[1024]; /* Temporary buffer */
_cups_globals_t *cg = _cupsGlobals(); /* Per-thread globals */
if (!cg->lang_default)
cg->lang_default = cupsLangDefault();
dateval = localtime(&timeval);
if (cg->lang_default->encoding != CUPS_UTF8)
{
strftime(temp, sizeof(temp), "%c", dateval);
cupsCharsetToUTF8((cups_utf8_t *)buf, temp, (int)bufsize, cg->lang_default->encoding);
}
else
strftime(buf, bufsize, "%c", dateval);
return (buf);
}
/*
* '_cupsStrFlush()' - Flush the string pool.
*/
@@ -759,5 +789,5 @@ compare_sp_items(_cups_sp_item_t *a, /* I - First item */
/*
* End of "$Id: string.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: string.c 11890 2014-05-22 13:59:21Z msweet $".
*/
+3 -10
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: testipp.c 11215 2013-08-02 15:24:51Z msweet $"
* "$Id: testipp.c 11890 2014-05-22 13:59:21Z msweet $"
*
* IPP test program for CUPS.
*
@@ -901,17 +901,10 @@ print_attributes(ipp_t *ipp, /* I - IPP request */
case IPP_TAG_DATE :
{
time_t vtime; /* Date/Time value */
struct tm *vdate; /* Date info */
char vstring[256]; /* Formatted time */
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
{
vtime = ippDateToTime(val->date);
vdate = localtime(&vtime);
strftime(vstring, sizeof(vstring), "%c", vdate);
printf(" (%s)", vstring);
}
printf(" (%s)", _cupsStrDate(vstring, sizeof(vstring), ippDateToTime(val->date)));
}
putchar('\n');
break;
@@ -1019,5 +1012,5 @@ write_cb(_ippdata_t *data, /* I - Data */
/*
* End of "$Id: testipp.c 11215 2013-08-02 15:24:51Z msweet $".
* End of "$Id: testipp.c 11890 2014-05-22 13:59:21Z msweet $".
*/
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: thread-private.h 3794 2012-04-23 22:44:16Z msweet $"
* "$Id: thread-private.h 11642 2014-02-27 15:57:59Z msweet $"
*
* Private threading definitions for CUPS.
*
@@ -10,6 +10,8 @@
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_THREAD_PRIVATE_H_
@@ -94,5 +96,5 @@ extern int _cupsThreadCreate(_cups_thread_func_t func, void *arg);
#endif /* !_CUPS_THREAD_PRIVATE_H_ */
/*
* End of "$Id: thread-private.h 3794 2012-04-23 22:44:16Z msweet $".
* End of "$Id: thread-private.h 11642 2014-02-27 15:57:59Z msweet $".
*/
+4 -2
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: thread.c 3794 2012-04-23 22:44:16Z msweet $"
* "$Id: thread.c 11642 2014-02-27 15:57:59Z msweet $"
*
* Threading primitives for CUPS.
*
@@ -11,6 +11,8 @@
* which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
* Contents:
*
* _cupsMutexInit() - Initialize a mutex.
@@ -332,5 +334,5 @@ _cupsThreadCreate(
/*
* End of "$Id: thread.c 3794 2012-04-23 22:44:16Z msweet $".
* End of "$Id: thread.c 11642 2014-02-27 15:57:59Z msweet $".
*/
+24 -31
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id: usersys.c 11510 2014-01-08 16:00:25Z msweet $"
* "$Id: usersys.c 11909 2014-06-09 18:58:16Z msweet $"
*
* User, system, and password routines for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -703,7 +703,10 @@ _cupsGetPassword(const char *prompt) /* I - Prompt string */
while ((passbytes = read(tty, &passch, 1)) == 1)
{
if (passch == noecho.c_cc[VEOL] || passch == noecho.c_cc[VEOL2] ||
if (passch == noecho.c_cc[VEOL] ||
# ifdef VEOL2
passch == noecho.c_cc[VEOL2] ||
# endif /* VEOL2 */
passch == 0x0A || passch == 0x0D)
{
/*
@@ -848,27 +851,7 @@ _cupsSetDefaults(void)
cups_anyroot = getenv("CUPS_ANYROOT");
cups_expiredroot = getenv("CUPS_EXPIREDROOT");
cups_expiredcerts = getenv("CUPS_EXPIREDCERTS");
if ((cups_user = getenv("CUPS_USER")) == NULL)
{
/*
* Try the USER environment variable...
*/
if ((cups_user = getenv("USER")) != NULL)
{
/*
* 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.
*/
struct passwd *pw; /* Account information */
if ((pw = getpwnam(cups_user)) == NULL || pw->pw_uid != getuid())
cups_user = NULL;
}
}
cups_user = getenv("CUPS_USER");
/*
* Then, if needed, read the ~/.cups/client.conf or /etc/cups/client.conf
@@ -1084,20 +1067,30 @@ cups_read_client_conf(
if (!GetUserName(cg->user, &size))
#else
/*
* Get the user name corresponding to the current UID...
* Try the USER environment variable as the default username...
*/
struct passwd *pwd; /* User/password entry */
const char *envuser = getenv("USER");
/* Default username */
struct passwd *pw = NULL; /* Account information */
setpwent();
if ((pwd = getpwuid(getuid())) != NULL)
if (envuser)
{
/*
* Found a match!
* 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.
*/
strlcpy(cg->user, pwd->pw_name, sizeof(cg->user));
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 */
{
@@ -1136,5 +1129,5 @@ cups_read_client_conf(
/*
* End of "$Id: usersys.c 11510 2014-01-08 16:00:25Z msweet $".
* End of "$Id: usersys.c 11909 2014-06-09 18:58:16Z msweet $".
*/
+2
Ver Arquivo
@@ -33,6 +33,8 @@ Name[ja]=印刷の管理
Comment[ja]=CUPS Web インタフェース
Name[pl]=Zarządzanie drukowaniem
Comment[pl]=Interfejs WWW CUPS
Name[pt_BR]=Gerenciador de impressão
Comment[pt_BR]=Interface web do CUPS
Name[ru]=Настройка печати
Comment[ru]=Настройка CUPS
Name[sv]=Hantera skrivare
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">Novetats del CUPS 1.4</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Fòrum d'usuaris</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Fòrum d'usuaris</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">Referència del cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Cerca de controladors d'impressora</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS per desenvolupadors</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">Referència del fitxer d'inf. del compilador del controlador per PPD</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Fòrum de desenvolupadors</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Fòrum de desenvolupadors</A></P>
</TD></TR>
</TABLE>
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">Co je nového v CUPS 1.6</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Uživatelské fórum</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Uživatelské fórum</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">Konfigurační soubor cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Hedat ovladače tiskárny</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS pro vývojáře</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">PPD kompilátor Driver Information File Reference</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Vývojářské fórum</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Vývojářské fórum</A></P>
</TD></TR>
</TABLE>
+105
Ver Arquivo
@@ -0,0 +1,105 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>Home - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
<TABLE CLASS="page" SUMMARY="{title}">
<TR><TD CLASS="body">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR HEIGHT="36">
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
<TD CLASS="sel"><A HREF="/">&nbsp;&nbsp;Startseite&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/admin">&nbsp;&nbsp;Verwaltung&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/classes/">&nbsp;&nbsp;Klassen&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/help/">&nbsp;&nbsp;Online-&nbsp;Hilfe&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/jobs/">&nbsp;&nbsp;Aufträge&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/printers/">&nbsp;&nbsp;Drucker&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
</TR>
</TABLE>
<TABLE CLASS="indent" SUMMARY="">
<TR><TD STYLE="padding-right: 20px;">
<H1>CUPS @CUPS_VERSION@</H1>
<P>CUPS ist das auf Standards basierte, Opensource-Drucksystem, welches von
<A HREF="http://www.apple.com/">Apple Inc.</A> für Mac OS<SUP>&reg;</SUP> X und
andere UNIX<SUP>&reg;</SUP>-ähnliche Betriebssysteme entwickelt wird.</P>
</TD>
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
HEIGHT="128" ALT="CUPS"></A></TD>
</TR>
</TABLE>
<TABLE CLASS="indent" SUMMARY="">
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
<H2>CUPS für Benutzer</H2>
<P><A HREF="help/overview.html">CUPS Übersicht</A></P>
<P><A HREF="help/options.html">Kommandozeilendruck und Einstellungen</A></P>
<P><A HREF="help/whatsnew.html">Neues in CUPS 1.7</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Benutzerforum</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
<H2>CUPS für Administratoren</H2>
<P><A HREF="admin">Drucker und Klassen hinzufügen</A></P>
<P><A HREF="help/policies.html">Betriebsrichtlinien verwalten</A></P>
<P><A HREF="help/accounting.html">Basiswissen Druckabrechnung</A></P>
<P><A HREF="help/security.html">Sicherheit des Servers</A></P>
<P><A HREF="help/kerberos.html">Verwenden der Kerberos Authentifizierung</A></P>
<P><A HREF="help/network.html">Benutzen von Netzwerkdruckern</A></P>
<P><A HREF="help/ref-cupsd-conf.html">cupsd.conf Referenz</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<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="help/api-ppd.html">PPD-API</A></P>
<P><A HREF="help/api-raster.html">Raster-API</A></P>
<P><A HREF="help/ref-ppdcfile.html">PPD Compiler Treiber Dateireferenz</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Entwicklerforum</A></P>
</TD></TR>
</TABLE>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS und das CUPS Logo sind
eingetragene Warenzeichen der <A HREF="http://www.apple.com">Apple Inc.</A>
CUPS ist urheberrechtlich geschützt 2007-2014 von Apple Inc, alle Rechte vorbehalten.</TD></TR>
</TABLE>
</BODY>
</HTML>
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">Qu&eacute; hay de nuevo en CUPS 1.6</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Foro de usuarios</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Foro de usuarios</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">Referencia de cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Encontrar controladores de impresora</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS para desarrolladores</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">Referencia del archivo de informaci&oacute;n del compilador de controladores PPD</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Foro de desarrollo</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Foro de desarrollo</A></P>
</TD></TR>
</TABLE>
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">Quoi de neuf dans CUPS 1.6</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Forum utilisateur</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Forum utilisateur</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">R&eacute;f&eacute;rences sur cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Trouver des pilotes d'imprimantes</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS pour les d&eacute;veloppeurs</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">PPD Compiler Driver Information File Reference</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Forum d&eacute;veloppeurs</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Forum d&eacute;veloppeurs</A></P>
</TD></TR>
</TABLE>
+98 -9
Ver Arquivo
@@ -345,7 +345,7 @@ div.contents ul.subcontents li {
Filter and backend programming header for CUPS.
Copyright 2008-2011 by Apple Inc.
Copyright 2008-2014 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
@@ -664,7 +664,7 @@ prefix strings:</p>
<code>marker-types</code>, <code>printer-alert</code>, and
<code>printer-alert-description</code> printer attributes. Standard
<code>marker-types</code> values are listed in <a href='#TABLE1'>Table
1</a>.</dd>
1</a>. String values need special handling - see <a href="#ATTR_STRINGS">Reporting Attribute String Values</a> below.</dd>
<dt>CRIT: message</dt>
<dd>Sets the printer-state-message attribute and adds the specified
@@ -747,11 +747,11 @@ the "DEBUG:" prefix string.</p>
<td>Fuser unit</td>
</tr>
<tr>
<td>fuserCleaningPad</td>
<td>fuser-cleaning-pad</td>
<td>Fuser cleaning pad</td>
</tr>
<tr>
<td>fuserOil</td>
<td>fuser-oil</td>
<td>Fuser oil</td>
</tr>
<tr>
@@ -763,7 +763,7 @@ the "DEBUG:" prefix string.</p>
<td>Photo conductor</td>
</tr>
<tr>
<td>solidWax</td>
<td>solid-wax</td>
<td>Wax supply</td>
</tr>
<tr>
@@ -775,19 +775,19 @@ the "DEBUG:" prefix string.</p>
<td>Toner supply</td>
</tr>
<tr>
<td>transferUnit</td>
<td>transfer-unit</td>
<td>Transfer unit</td>
</tr>
<tr>
<td>wasteInk</td>
<td>waste-ink</td>
<td>Waste ink tank</td>
</tr>
<tr>
<td>wasteToner</td>
<td>waste-toner</td>
<td>Waste toner tank</td>
</tr>
<tr>
<td>wasteWax</td>
<td>waste-wax</td>
<td>Waste wax tank</td>
</tr>
</tbody>
@@ -867,6 +867,95 @@ the "DEBUG:" prefix string.</p>
</tbody>
</table></div>
<h4><a name="ATTR_STRINGS">Reporting Attribute String Values</a></h4>
<p>When reporting string values using "ATTR:" messages, a filter or backend must take special care to appropriately quote those values. The scheduler uses the CUPS option parsing code for attributes, so the general syntax is:</p>
<pre class="example">
name=simple
name=simple,simple,...
name='complex value'
name="complex value"
name='"complex value"','"complex value"',...
</pre>
<p>Simple values are strings that do not contain spaces, quotes, backslashes, or the comma and can be placed verbatim in the "ATTR:" message, for example:</p>
<pre class="example">
int levels[4] = { 40, 50, 60, 70 }; /* CMYK */
fputs("ATTR: marker-colors=#00FFFF,#FF00FF,#FFFF00,#000000\n", stderr);
fputs("ATTR: marker-high-levels=100,100,100,100\n", stderr);
fprintf(stderr, "ATTR: marker-levels=%d,%d,%d,%d\n", levels[0], levels[1],
levels[2], levels[3], levels[4]);
fputs("ATTR: marker-low-levels=5,5,5,5\n", stderr);
fputs("ATTR: marker-types=toner,toner,toner,toner\n", stderr);
</pre>
<p>Complex values that contains spaces, quotes, backslashes, or the comma must be quoted. For a single value a single set of quotes is sufficient:</p>
<pre class="example">
fputs("ATTR: marker-message='Levels shown are approximate.'\n", stderr);
</pre>
<p>When multiple values are reported, each value must be enclosed by a set of single and double quotes:</p>
<pre class="example">
fputs("ATTR: marker-names='\"Cyan Toner\"','\"Magenta Toner\"',"
"'\"Yellow Toner\"','\"Black Toner\"'\n", stderr);
</pre>
<p>The IPP backend includes a <var>quote_string</var> function that may be used to properly quote a complex value in an "ATTR:" message:</p>
<pre class="example">
static const char * /* O - Quoted string */
quote_string(const char *s, /* I - String */
char *q, /* I - Quoted string buffer */
size_t qsize) /* I - Size of quoted string buffer */
{
char *qptr, /* Pointer into string buffer */
*qend; /* End of string buffer */
qptr = q;
qend = q + qsize - 5;
if (qend &lt; q)
{
*q = '\0';
return (q);
}
*qptr++ = '\'';
*qptr++ = '\"';
while (*s && qptr &lt; qend)
{
if (*s == '\\' || *s == '\"' || *s == '\'')
{
if (qptr &lt; (qend - 4))
{
*qptr++ = '\\';
*qptr++ = '\\';
*qptr++ = '\\';
}
else
break;
}
*qptr++ = *s++;
}
*qptr++ = '\"';
*qptr++ = '\'';
*qptr = '\0';
return (q);
}
</pre>
<h4><a name="MANAGING_STATE">Managing Printer State in a Filter</a></h4>
<p>Filters are responsible for managing the state keywords they set using
+4 -4
Ver Arquivo
@@ -5986,10 +5986,10 @@ are server-oriented...</p>
<dd class="description">Close-Job</dd>
<dt>IPP_OP_CREATE_JOB </dt>
<dd class="description">Create an empty print job</dd>
<dt>IPP_OP_CREATE_JOB_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
<dd class="description">Create a job subscription </dd>
<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
<dd class="description">Create a printer subscription </dd>
<dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
<dd class="description">Create one of more job subscriptions </dd>
<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
<dd class="description">Create one or more printer subscriptions </dd>
<dt>IPP_OP_CUPS_ACCEPT_JOBS </dt>
<dd class="description">Accept new jobs on a printer</dd>
<dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt>
+5 -4
Ver Arquivo
@@ -36,7 +36,8 @@ cupsfilter - convert a file to another format using cups filters
</i><h2 class="title"><a name="DESCRIPTION">Description</a></h2>
<i>cupsfilter</i> is a front-end to the CUPS filter subsystem which allows you
to convert a file to a specific format, just as if you had printed the file
through CUPS. By default, <i>cupsfilter</i> generates a PDF file.
through CUPS. By default, <i>cupsfilter</i> generates a PDF file. The converted
file is sent to the standard output.
<h2 class="title"><a name="OPTIONS">Options</a></h2>
<dl>
<dt>-D
@@ -52,7 +53,7 @@ through CUPS. By default, <i>cupsfilter</i> generates a PDF file.
<dt>-c config-file
</dt>
<dd></dd>
<dd>Uses the named cupsd.conf configuration file.
<dd>Uses the named cups-files.conf configuration file.
</dd>
<dt>-d printer
</dt>
@@ -109,11 +110,11 @@ PPD file.
</dd>
</dl>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
<a href='man-cupsd.conf.html?TOPIC=Man+Pages'>cupsd.conf(5)</a>
<a href='man-cups-files.conf.html?TOPIC=Man+Pages'>cups-files.conf(5)</a>
<br>
<a href='http://localhost:631/help'>http://localhost:631/help</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
Copyright 2007-2013 by Apple Inc.
Copyright 2007-2014 by Apple Inc.
</body>
</html>
+14 -6
Ver Arquivo
@@ -38,10 +38,14 @@ The following options are recognized by <i>ipptool</i>:
<dt>--help
</dt>
<dd>Shows program help.
--stop-after-include-error
Tells <i>ipptool</i> to stop if an error occurs in an included file. Normally <i>ipptool</i> will continue with subsequent tests after the INCLUDE directive.
--version
Shows the version of <i>ipptool</i> being used.
</dd>
<dt>--stop-after-include-error
</dt>
<dd>Tells <i>ipptool</i> to stop if an error occurs in an included file. Normally <i>ipptool</i> will continue with subsequent tests after the INCLUDE directive.
</dd>
<dt>--version
</dt>
<dd>Shows the version of <i>ipptool</i> being used.
</dd>
<dt>-4
</dt>
@@ -165,11 +169,15 @@ The following standard files are available:
validate-job.test
</pre>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
<a href='man-ipptoolfile.html?TOPIC=Man+Pages'>ipptoolfile(5)</a>,
<a href='man-ipptoolfile.html?TOPIC=Man+Pages'>ipptoolfile(5)</a>, RFC 2911,
<br>
<a href='http://localhost:631/help'>http://localhost:631/help</a>
<br>
<a href='http://www.iana.org/assignments/ipp-registrations'>http://www.iana.org/assignments/ipp-registrations</a>
<br>
<a href='http://www.pwg.org/ipp'>http://www.pwg.org/ipp</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
Copyright 2007-2013 by Apple Inc.
Copyright 2007-2014 by Apple Inc.
</body>
</html>
+9 -6
Ver Arquivo
@@ -174,7 +174,7 @@ The following directives are understood in a test:
<dt>ATTR tag attribute-name value(s)
</dt>
<dd>Adds an attribute to the test request. Values are separated by the comma (",")
character - escape commas using the "" character.
character - escape commas using the "" character. Common attributes and values are listed in the IANA IPP registry - see references below.
</dd>
<dt>ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ]
</dt>
@@ -530,8 +530,8 @@ RFC 2911 and other IPP extension specifications. Here is a complete list:
Cancel-Subscription
Close-Job
Create-Job
Create-Job-Subscription
Create-Printer-Subscription
Create-Job-Subscriptions
Create-Printer-Subscriptions
Deactivate-Printer
Disable-Printer
Enable-Printer
@@ -735,12 +735,15 @@ no notify-subscription-id has been seen.
</dd>
</dl>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
<a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a>,
<a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a>, RFC 2911,
<br>
<a href='http://localhost:631/help'>http://localhost:631/help</a>
<br>
<a href='http://www.iana.org/assignments/ipp-registrations'>http://www.iana.org/assignments/ipp-registrations</a>
<br>
<a href='http://www.pwg.org/ipp'>http://www.pwg.org/ipp</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
Copyright 2007-2013 by Apple Inc.
Copyright 2007-2014 by Apple Inc.
</body>
</html>
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">What's New in CUPS 1.7</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">User Forum</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">User Forum</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">cupsd.conf Reference</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Find Printer Drivers</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS for Developers</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">PPD Compiler Driver Information File Reference</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Developer Forum</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Developer Forum</A></P>
</TD></TR>
</TABLE>
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">Le novità introdotte da CUPS 1.7</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Forum dell'utente</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Forum dell'utente</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">Riferimenti a cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Trovare i driver delle stampanti</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS per gli sviluppatori</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">File di riferimento del compilatore di driver PPD</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Forum dello sviluppatore</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Forum dello sviluppatore</A></P>
</TD></TR>
</TABLE>
+2 -4
Ver Arquivo
@@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">CUPS 1.6 の新機能</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">ユーザーフォーラム</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">ユーザーフォーラム</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">cupsd.conf リファレンス</A></P>
<P><A HREF="http://www.cups.org/ppd.php">プリンタードライバーの検索</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>開発者向け</H2>
@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">PPD コンパイラー用ドライバー情報ファイル リファレンス</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">開発者フォーラム</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">開発者フォーラム</A></P>
</TD></TR>
</TABLE>
+107
Ver Arquivo
@@ -0,0 +1,107 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>Home - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
<TABLE CLASS="page" SUMMARY="{title}">
<TR><TD CLASS="body">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR HEIGHT="36">
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
<TD CLASS="sel"><A HREF="/">&nbsp;&nbsp;In&iacute;cio&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/admin">&nbsp;&nbsp;Administra&ccedil;&atilde;o&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/classes/">&nbsp;&nbsp;Classes&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/help/">&nbsp;&nbsp;Ajuda&nbsp;online&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/jobs/">&nbsp;&nbsp;Trabalhos&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel"><A HREF="/printers/">&nbsp;&nbsp;Impressoras&nbsp;&nbsp;</A></TD>
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Procurar ajuda"
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
</TR>
</TABLE>
<TABLE CLASS="indent" SUMMARY="">
<TR><TD STYLE="padding-right: 20px;">
<H1>CUPS @CUPS_VERSION@</H1>
<P>CUPS &eacute; o sistema de impress&atilde;o de c&oacute;digo aberto e baseado em padr&otilde;es desenvolvido pela
<A HREF="http://www.apple.com/">Apple Inc.</A> para o OS<SUP>&reg;</SUP> X e
outros sistemas operacionais similares ao UNIX<SUP>&reg;</SUP>.</P>
</TD>
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
HEIGHT="128" ALT="CUPS"></A></TD>
</TR>
</TABLE>
<TABLE CLASS="indent" SUMMARY="">
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
<H2>CUPS para usu&aacute;rios</H2>
<P><A HREF="help/overview.html">Vis&atilde;o geral do CUPS</A></P>
<P><A HREF="help/options.html">Impress&atilde;o e op&ccedil;&otilde;es em linha de comando</A></P>
<P><A HREF="help/whatsnew.html">O que h&aacute; de novo no CUPS 1.7</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">F&oacute;rum de usu&aacute;rios</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
<H2>CUPS para administradores</H2>
<P><A HREF="admin">Adicionar impressoras e classes</A></P>
<P><A HREF="help/policies.html">Gerenciar pol&iacute;ticas de opera&ccedil;&atilde;o</A></P>
<P><A HREF="help/accounting.html">B&aacute;sico de contabilidade de impress&atilde;o</A></P>
<P><A HREF="help/security.html">Seguran&ccedil;a do servidor</A></P>
<P><A HREF="help/kerberos.html">Usar autentica&ccedil;&atilde;o via kerberos</A></P>
<P><A HREF="help/network.html">Usar impressoras de rede</A></P>
<P><A HREF="help/ref-cupsd-conf.html">Refer&ecirc;ncia para o cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Encontrar drivers de impressora</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS para desenvolvedores</H2>
<P><A HREF="help/api-overview.html">Introdu&ccedil;&atilde;o &agrave; programa&ccedil;&atilde;o do CUPS</A></P>
<P><A HREF="help/api-cups.html">API do CUPS</A></P>
<P><A HREF="help/api-filter.html">Programa&ccedil;&atilde;o de filtros e retaguarda</A></P>
<P><A HREF="help/api-httpipp.html">APIs HTTP e IPP</A></P>
<P><A HREF="help/api-ppd.html">API PPD</A></P>
<P><A HREF="help/api-raster.html">API de rasteriza&ccedil;&atilde;o</A></P>
<P><A HREF="help/ref-ppdcfile.html">Refer&ecirc;ncia para o compilador de arquivos de informa&ccedil;&atilde;o de driver PPD</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">F&oacute;rum de desenvolvedores</A></P>
</TD></TR>
</TABLE>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS e o logo do CUPS s&atilde;o marcas registradas de
<A HREF="http://www.apple.com">Apple Inc.</A> Copyright 2007-2014 Apple
Inc. Todos os direitos reservados.</TD></TR>
</TABLE>
</BODY>
</HTML>
+2 -4
Ver Arquivo
@@ -50,7 +50,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/whatsnew.html">Что нового в CUPS 1.6</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Форум пользователей</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups">Форум пользователей</A></P>
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
@@ -70,8 +70,6 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-cupsd-conf.html">Справочник по cupsd.conf</A></P>
<P><A HREF="http://www.cups.org/ppd.php">Поиск драйверов принтера</A></P>
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
<H2>CUPS для разработчиков</H2>
@@ -90,7 +88,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<P><A HREF="help/ref-ppdcfile.html">Справочник по компилятору PPD</A></P>
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Форум разработчиков</A></P>
<P><A HREF="http://www.cups.org/lists.php?LIST=cups-devel">Форум разработчиков</A></P>
</TD></TR>
</TABLE>
+6 -4
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: interpret.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: interpret.c 11551 2014-01-29 16:31:35Z msweet $"
*
* PPD command interpreter for CUPS.
*
@@ -470,6 +470,7 @@ _cupsRasterExecPS(
int *preferred_bits,/* O - Preferred bits per color */
const char *code) /* I - PS code to execute */
{
int error = 0; /* Error condition? */
_cups_ps_stack_t *st; /* PostScript value stack */
_cups_ps_obj_t *obj; /* Object from top of stack */
char *codecopy, /* Copy of code */
@@ -477,7 +478,7 @@ _cupsRasterExecPS(
DEBUG_printf(("_cupsRasterExecPS(h=%p, preferred_bits=%p, code=\"%s\")\n",
h, preferred_bits, code ? code : "(null)"));
h, preferred_bits, code));
/*
* Copy the PostScript code and create a stack...
@@ -612,12 +613,13 @@ _cupsRasterExecPS(
case CUPS_PS_OTHER :
_cupsRasterAddError("Unknown operator \"%s\"!\n", obj->value.other);
error = 1;
DEBUG_printf(("_cupsRasterExecPS: Unknown operator \"%s\"!\n",
obj->value.other));
break;
}
if (obj && obj->type == CUPS_PS_OTHER)
if (error)
break;
}
@@ -1684,5 +1686,5 @@ DEBUG_stack(_cups_ps_stack_t *st) /* I - Stack */
/*
* End of "$Id: interpret.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: interpret.c 11551 2014-01-29 16:31:35Z msweet $".
*/
+15 -10
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: rastertolabel.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: rastertolabel.c 11756 2014-03-27 17:06:25Z msweet $"
*
* Label printer filter for CUPS.
*
@@ -567,7 +567,7 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
*/
if (header->cupsRowStep != 200)
printf("^LT%u\n", header->cupsRowStep);
printf("^LT%d\n", header->cupsRowStep);
/*
* Set media type...
@@ -639,13 +639,6 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
puts("^IDR:CUPS.GRF^FS");
puts("^XZ");
/*
* Free compression buffers...
*/
free(CompBuffer);
free(LastBuffer);
break;
case ZEBRA_CPCL :
@@ -714,6 +707,18 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
*/
free(Buffer);
if (CompBuffer)
{
free(CompBuffer);
CompBuffer = NULL;
}
if (LastBuffer)
{
free(LastBuffer);
LastBuffer = NULL;
}
}
@@ -1297,5 +1302,5 @@ main(int argc, /* I - Number of command-line arguments */
/*
* End of "$Id: rastertolabel.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: rastertolabel.c 11756 2014-03-27 17:06:25Z msweet $".
*/
+487 -475
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+3
Ver Arquivo
@@ -233,6 +233,7 @@
" -a Browse for all services." = " -a Browse for all services.";
" -a Export all printers." = " -a Export all printers.";
" -c catalog.po Load the specified message catalog." = " -c catalog.po Load the specified message catalog.";
" -c cups-files.conf Set cups-files.conf file to use." = " -c cups-files.conf Set cups-files.conf file to use.";
" -c cupsd.conf Set cupsd.conf file to use." = " -c cupsd.conf Set cupsd.conf file to use.";
" -d domain Browse/resolve in specified domain." = " -d domain Browse/resolve in specified domain.";
" -d name=value Set named variable to value." = " -d name=value Set named variable to value.";
@@ -997,6 +998,7 @@
"No VarBind SEQUENCE" = "No VarBind SEQUENCE";
"No Windows printer drivers are installed." = "No Windows printer drivers are installed.";
"No active connection" = "No active connection";
"No active connection." = "No active connection.";
"No active jobs on %s." = "No active jobs on %s.";
"No attributes in request." = "No attributes in request.";
"No authentication information provided." = "No authentication information provided.";
@@ -1014,6 +1016,7 @@
"No printer-uri found" = "No printer-uri found";
"No printer-uri found for class" = "No printer-uri found for class";
"No printer-uri in request." = "No printer-uri in request.";
"No request sent." = "No request sent.";
"No request-id" = "No request-id";
"No subscription attributes in request." = "No subscription attributes in request.";
"No subscriptions found." = "No subscriptions found.";
+10 -1
Ver Arquivo
@@ -32,7 +32,7 @@ msgid ""
msgstr ""
"Project-Id-Version: CUPS 1.4.6\n"
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
"POT-Creation-Date: 2013-07-08 07:21-0400\n"
"POT-Creation-Date: 2014-05-09 13:32-0700\n"
"PO-Revision-Date: 2012-09-29 11:21+0200\n"
"Last-Translator: Àngel Mompó <mecatxis@gmail.com>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
@@ -1118,6 +1118,9 @@ msgstr " -a Exporta totes les impressores."
msgid " -c catalog.po Load the specified message catalog."
msgstr " -c catàleg.po Carrega el catàleg de missatges indicat."
msgid " -c cups-files.conf Set cups-files.conf file to use."
msgstr ""
msgid " -c cupsd.conf Set cupsd.conf file to use."
msgstr ""
" -c cupsd.conf Estableix el fitxer cupsd.conf que cal fer servir."
@@ -3693,6 +3696,9 @@ msgstr "No hi ha cap controlador d'impressores de Windows instal·lat."
msgid "No active connection"
msgstr "No hi ha cap connexió activa"
msgid "No active connection."
msgstr ""
#, c-format
msgid "No active jobs on %s."
msgstr "No hi ha cap feina activa a %s."
@@ -3747,6 +3753,9 @@ msgstr "No s'ha trobat cap printer-uri per la classe"
msgid "No printer-uri in request."
msgstr "No hi ha cap printer-uri a la sol·licitud."
msgid "No request sent."
msgstr ""
msgid "No request-id"
msgstr "No hi ha cap request-id"
+8739
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+10 -1
Ver Arquivo
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: CUPS 1.6\n"
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
"POT-Creation-Date: 2013-07-08 07:21-0400\n"
"POT-Creation-Date: 2014-05-09 13:32-0700\n"
"PO-Revision-Date: 2012-07-01 20:21+0100\n"
"Last-Translator: Juan Pablo González Riopedre <riopedre13@yahoo.es>\n"
"Language-Team: Spanish\n"
@@ -1110,6 +1110,9 @@ msgstr " -a Exporta todas las impresoras."
msgid " -c catalog.po Load the specified message catalog."
msgstr " -c catálogo.po Carga el catálogo de mensajes especificado."
msgid " -c cups-files.conf Set cups-files.conf file to use."
msgstr ""
msgid " -c cupsd.conf Set cupsd.conf file to use."
msgstr " -c cupsd.conf Establece el archivo cupsd.conf a usar."
@@ -3680,6 +3683,9 @@ msgstr "No está instalado ningún controlador de impresora de Windows."
msgid "No active connection"
msgstr "No hay conexión activa"
msgid "No active connection."
msgstr ""
#, c-format
msgid "No active jobs on %s."
msgstr "No hay trabajos activos en %s."
@@ -3734,6 +3740,9 @@ msgstr "No se encontró printer-uri para la clase"
msgid "No printer-uri in request."
msgstr "No hay printer-uri en la petición."
msgid "No request sent."
msgstr ""
msgid "No request-id"
msgstr "No hay request-id"
+10 -1
Ver Arquivo
@@ -29,7 +29,7 @@ msgid ""
msgstr ""
"Project-Id-Version: CUPS 1.6\n"
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
"POT-Creation-Date: 2013-07-08 07:21-0400\n"
"POT-Creation-Date: 2014-05-09 13:32-0700\n"
"PO-Revision-Date: 2012-12-12 11:12+0100\n"
"Last-Translator: denis meramdjougoma <dcmeram@libertysurf.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -961,6 +961,9 @@ msgstr ""
msgid " -c catalog.po Load the specified message catalog."
msgstr ""
msgid " -c cups-files.conf Set cups-files.conf file to use."
msgstr ""
msgid " -c cupsd.conf Set cupsd.conf file to use."
msgstr ""
@@ -3480,6 +3483,9 @@ msgstr ""
msgid "No active connection"
msgstr "Aucune connexion active"
msgid "No active connection."
msgstr ""
#, c-format
msgid "No active jobs on %s."
msgstr ""
@@ -3532,6 +3538,9 @@ msgstr ""
msgid "No printer-uri in request."
msgstr ""
msgid "No request sent."
msgstr ""
msgid "No request-id"
msgstr "Paramètre request-id absent"
+345 -1964
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+90 -1813
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+10 -1
Ver Arquivo
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: CUPS 1.4\n"
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
"POT-Creation-Date: 2013-07-08 07:21-0400\n"
"POT-Creation-Date: 2014-05-09 13:32-0700\n"
"PO-Revision-Date: 2009-02-16 12:00-0800\n"
"Last-Translator: Apple Inc.\n"
"Language-Team: Apple Inc.\n"
@@ -934,6 +934,9 @@ msgstr ""
msgid " -c catalog.po Load the specified message catalog."
msgstr ""
msgid " -c cups-files.conf Set cups-files.conf file to use."
msgstr ""
msgid " -c cupsd.conf Set cupsd.conf file to use."
msgstr ""
@@ -3456,6 +3459,9 @@ msgstr ""
msgid "No active connection"
msgstr "Нет рабочего подключения"
msgid "No active connection."
msgstr ""
#, c-format
msgid "No active jobs on %s."
msgstr ""
@@ -3508,6 +3514,9 @@ msgstr "Не указан адрес printer-uri для класса"
msgid "No printer-uri in request."
msgstr ""
msgid "No request sent."
msgstr ""
msgid "No request-id"
msgstr "Нет идентификатора request-id"
+15 -14
Ver Arquivo
@@ -1,17 +1,17 @@
.\"
.\" "$Id: cupsfilter.man 11022 2013-06-06 22:14:09Z msweet $"
.\" "$Id: cupsfilter.man 11772 2014-03-28 15:08:30Z msweet $"
.\"
.\" cupsfilter man page for CUPS.
.\" cupsfilter man page for CUPS.
.\"
.\" Copyright 2007-2013 by Apple Inc.
.\" Copyright 2007-2014 by Apple Inc.
.\"
.\" 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/".
.\" These coded instructions, statements, and computer programs are the
.\" property of Apple Inc. and are protected by Federal copyright
.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
.TH cupsfilter 8 "CUPS" "20 June 2012" "Apple Inc."
.TH cupsfilter 8 "CUPS" "28 March 2014" "Apple Inc."
.SH NAME
cupsfilter \- convert a file to another format using cups filters
.SH SYNOPSIS
@@ -41,7 +41,8 @@ cupsfilter \- convert a file to another format using cups filters
.SH DESCRIPTION
\fIcupsfilter\fR is a front-end to the CUPS filter subsystem which allows you
to convert a file to a specific format, just as if you had printed the file
through CUPS. By default, \fIcupsfilter\fR generates a PDF file.
through CUPS. By default, \fIcupsfilter\fR generates a PDF file. The converted
file is sent to the standard output.
.SH OPTIONS
.TP 5
-D
@@ -54,7 +55,7 @@ Specifies the username passed to the filters. The default is the name of the cur
.TP 5
-c config-file
.br
Uses the named cupsd.conf configuration file.
Uses the named cups-files.conf configuration file.
.TP 5
-d printer
Uses information from the named printer.
@@ -99,11 +100,11 @@ Specifies the document title.
.br
Delete the PPD file after conversion.
.SH SEE ALSO
\fIcupsd.conf(5)\fR
\fIcups-files.conf(5)\fR
.br
http://localhost:631/help
.SH COPYRIGHT
Copyright 2007-2013 by Apple Inc.
Copyright 2007-2014 by Apple Inc.
.\"
.\" End of "$Id: cupsfilter.man 11022 2013-06-06 22:14:09Z msweet $".
.\" End of "$Id: cupsfilter.man 11772 2014-03-28 15:08:30Z msweet $".
.\"
+18 -12
Ver Arquivo
@@ -1,17 +1,17 @@
.\"
.\" "$Id: ipptool.man 11022 2013-06-06 22:14:09Z msweet $"
.\" "$Id: ipptool.man 11642 2014-02-27 15:57:59Z msweet $"
.\"
.\" ipptool man page for CUPS.
.\" ipptool man page for CUPS.
.\"
.\" Copyright 2010-2013 by Apple Inc.
.\" Copyright 2010-2014 by Apple Inc.
.\"
.\" 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/".
.\" These coded instructions, statements, and computer programs are the
.\" property of Apple Inc. and are protected by Federal copyright
.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
.TH ipptool 1 "CUPS" "13 May 2013" "Apple Inc."
.TH ipptool 1 "CUPS" "20 February 2014" "Apple Inc."
.SH NAME
ipptool - perform internet printing protocol requests
.SH SYNOPSIS
@@ -42,8 +42,10 @@ The following options are recognized by \fIipptool\fR:
.TP 5
--help
Shows program help.
.TP 5
--stop-after-include-error
Tells \fIipptool\fR to stop if an error occurs in an included file. Normally \fIipptool\fR will continue with subsequent tests after the INCLUDE directive.
.TP 5
--version
Shows the version of \fIipptool\fR being used.
.TP 5
@@ -150,11 +152,15 @@ The following standard files are available:
validate-job.test
.fi
.SH SEE ALSO
\fIipptoolfile(5)\fR,
\fIipptoolfile(5)\fR, RFC 2911,
.br
http://localhost:631/help
.br
http://www.iana.org/assignments/ipp-registrations
.br
http://www.pwg.org/ipp
.SH COPYRIGHT
Copyright 2007-2013 by Apple Inc.
Copyright 2007-2014 by Apple Inc.
.\"
.\" End of "$Id: ipptool.man 11022 2013-06-06 22:14:09Z msweet $".
.\" End of "$Id: ipptool.man 11642 2014-02-27 15:57:59Z msweet $".
.\"
+19 -16
Ver Arquivo
@@ -1,17 +1,17 @@
.\"
.\" "$Id: ipptoolfile.man 11022 2013-06-06 22:14:09Z msweet $"
.\" "$Id: ipptoolfile.man 11734 2014-03-25 18:01:47Z msweet $"
.\"
.\" ipptoolfile man page for CUPS.
.\" ipptoolfile man page for CUPS.
.\"
.\" Copyright 2010-2013 by Apple Inc.
.\" Copyright 2010-2014 by Apple Inc.
.\"
.\" 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/".
.\" These coded instructions, statements, and computer programs are the
.\" property of Apple Inc. and are protected by Federal copyright
.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
.TH ipptoolfile 5 "CUPS" "13 May 2013" "Apple Inc."
.TH ipptoolfile 5 "CUPS" "25 March 2014" "Apple Inc."
.SH NAME
ipptoolfile \- ipptool file format
@@ -152,7 +152,7 @@ The following directives are understood in a test:
.TP 5
ATTR tag attribute-name value(s)
Adds an attribute to the test request. Values are separated by the comma (",")
character - escape commas using the "\" character.
character - escape commas using the "\" character. Common attributes and values are listed in the IANA IPP registry - see references below.
.TP 5
ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ]
Adds a collection attribute to the test request. Member attributes follow the
@@ -423,8 +423,8 @@ RFC 2911 and other IPP extension specifications. Here is a complete list:
Cancel-Subscription
Close-Job
Create-Job
Create-Job-Subscription
Create-Printer-Subscription
Create-Job-Subscriptions
Create-Printer-Subscriptions
Deactivate-Printer
Disable-Printer
Enable-Printer
@@ -614,12 +614,15 @@ $username
Inserts the username from the URI provided to \fIipptool\fR, if any.
.SH SEE ALSO
\fIipptool(1)\fR,
\fIipptool(1)\fR, RFC 2911,
.br
http://localhost:631/help
.br
http://www.iana.org/assignments/ipp-registrations
.br
http://www.pwg.org/ipp
.SH COPYRIGHT
Copyright 2007-2013 by Apple Inc.
Copyright 2007-2014 by Apple Inc.
.\"
.\" End of "$Id: ipptoolfile.man 11022 2013-06-06 22:14:09Z msweet $".
.\" End of "$Id: ipptoolfile.man 11734 2014-03-25 18:01:47Z msweet $".
.\"
+18 -5
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $"
# "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $"
#
# RPM "spec" file for CUPS.
#
@@ -21,6 +21,11 @@
# dnssd - Enable/disable DNS-SD support (default = enable)
# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable)
# static - Enable/disable static libraries (default = enable)
#
# Note: Older Linux distributions use the name "libusbx-devel" or just
# "libusb-devel" for LIBUSB 1.0. There is absolutely nothing we can
# do to make this spec file build as-is on those distributions, you'll
# need to change the "BuildRequires" line accordingly...
%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
%{?_with_dbus: %define _dbus --enable-dbus}
@@ -40,12 +45,12 @@
Summary: CUPS
Name: cups
Version: 1.7.1
Version: 1.7.4
Release: 1
Epoch: 1
License: GPL
Group: System Environment/Daemons
Source: http://www.cups.org/software/1.7.1/cups-1.7.1-source.tar.bz2
Source: http://www.cups.org/software/1.7.4/cups-1.7.4-source.tar.bz2
Url: http://www.cups.org
Packager: Anonymous <anonymous@foo.com>
Vendor: Apple Inc.
@@ -62,7 +67,7 @@ BuildRequires: avahi-devel
%endif
%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
BuildRequires: libusbx-devel
BuildRequires: libusb-devel >= 1.0
%endif
# Use buildroot so as not to disturb the version already installed
@@ -273,6 +278,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/doc/cups/ca/*
%dir /usr/share/doc/cups/cs
/usr/share/doc/cups/cs/*
%dir /usr/share/doc/cups/de
/usr/share/doc/cups/de/*
%dir /usr/share/doc/cups/es
/usr/share/doc/cups/es/*
%dir /usr/share/doc/cups/fr
@@ -281,6 +288,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/doc/cups/it/*
%dir /usr/share/doc/cups/ja
/usr/share/doc/cups/ja/*
%dir /usr/share/doc/cups/pt_BR
/usr/share/doc/cups/pt_BR/*
%dir /usr/share/doc/cups/ru
/usr/share/doc/cups/ru/*
@@ -288,6 +297,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/locale/ca/cups_ca.po
%dir /usr/share/locale/cs
/usr/share/locale/cs/cups_cs.po
%dir /usr/share/locale/de
/usr/share/locale/de/cups_de.po
%dir /usr/share/locale/es
/usr/share/locale/es/cups_es.po
%dir /usr/share/locale/fr
@@ -296,6 +307,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/locale/it/cups_it.po
%dir /usr/share/locale/ja
/usr/share/locale/ja/cups_ja.po
%dir /usr/share/locale/pt_BR
/usr/share/locale/pt_BR/cups_pt_BR.po
%dir /usr/share/locale/ru
/usr/share/locale/ru/cups_ru.po
@@ -392,5 +405,5 @@ rm -rf $RPM_BUILD_ROOT
#
# End of "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $".
# End of "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $".
#
+16 -3
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $"
# "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $"
#
# RPM "spec" file for CUPS.
#
@@ -21,6 +21,11 @@
# dnssd - Enable/disable DNS-SD support (default = enable)
# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable)
# static - Enable/disable static libraries (default = enable)
#
# Note: Older Linux distributions use the name "libusbx-devel" or just
# "libusb-devel" for LIBUSB 1.0. There is absolutely nothing we can
# do to make this spec file build as-is on those distributions, you'll
# need to change the "BuildRequires" line accordingly...
%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
%{?_with_dbus: %define _dbus --enable-dbus}
@@ -62,7 +67,7 @@ BuildRequires: avahi-devel
%endif
%if %{?_with_libusb1:1}%{!?_with_libusb1:0}
BuildRequires: libusbx-devel
BuildRequires: libusb-devel >= 1.0
%endif
# Use buildroot so as not to disturb the version already installed
@@ -273,6 +278,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/doc/cups/ca/*
%dir /usr/share/doc/cups/cs
/usr/share/doc/cups/cs/*
%dir /usr/share/doc/cups/de
/usr/share/doc/cups/de/*
%dir /usr/share/doc/cups/es
/usr/share/doc/cups/es/*
%dir /usr/share/doc/cups/fr
@@ -281,6 +288,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/doc/cups/it/*
%dir /usr/share/doc/cups/ja
/usr/share/doc/cups/ja/*
%dir /usr/share/doc/cups/pt_BR
/usr/share/doc/cups/pt_BR/*
%dir /usr/share/doc/cups/ru
/usr/share/doc/cups/ru/*
@@ -288,6 +297,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/locale/ca/cups_ca.po
%dir /usr/share/locale/cs
/usr/share/locale/cs/cups_cs.po
%dir /usr/share/locale/de
/usr/share/locale/de/cups_de.po
%dir /usr/share/locale/es
/usr/share/locale/es/cups_es.po
%dir /usr/share/locale/fr
@@ -296,6 +307,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/locale/it/cups_it.po
%dir /usr/share/locale/ja
/usr/share/locale/ja/cups_ja.po
%dir /usr/share/locale/pt_BR
/usr/share/locale/pt_BR/cups_pt_BR.po
%dir /usr/share/locale/ru
/usr/share/locale/ru/cups_ru.po
@@ -392,5 +405,5 @@ rm -rf $RPM_BUILD_ROOT
#
# End of "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $".
# End of "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $".
#
+61 -45
Ver Arquivo
@@ -1,46 +1,19 @@
/*
* "$Id: client.c 11308 2013-09-27 14:09:25Z msweet $"
* "$Id: client.c 12009 2014-07-09 17:02:38Z msweet $"
*
* Client routines for the CUPS scheduler.
* Client routines for the CUPS scheduler.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
* Jelmer Vernooij.
* This file contains Kerberos support code, copyright 2006 by
* Jelmer Vernooij.
*
* 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:
*
* cupsdAcceptClient() - Accept a new client.
* cupsdCloseAllClients() - Close all remote clients immediately.
* cupsdCloseClient() - Close a remote client.
* cupsdFlushHeader() - Flush the header fields to the client.
* cupsdReadClient() - Read data from a client.
* cupsdSendCommand() - Send output from a command via HTTP.
* cupsdSendError() - Send an error message via HTTP.
* cupsdSendHeader() - Send an HTTP request.
* cupsdUpdateCGI() - Read status messages from CGI scripts and
* programs.
* cupsdWriteClient() - Write data to a client as needed.
* check_if_modified() - Decode an "If-Modified-Since" line.
* compare_clients() - Compare two client connections.
* data_ready() - Check whether data is available from a client.
* get_file() - Get a filename and state info.
* install_cupsd_conf() - Install a configuration file.
* is_cgi() - Is the resource a CGI script/program?
* is_path_absolute() - Is a path absolute and free of relative elements
* (i.e. "..").
* pipe_command() - Pipe the output of a command to the remote
* client.
* valid_host() - Is the Host: field valid?
* write_file() - Send a file via HTTP.
* write_pipe() - Flag that data is available on the CGI pipe.
* 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/".
*/
/*
@@ -2170,6 +2143,9 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
* Grab any request data from the connection...
*/
if (!httpWait(HTTP(con), 0))
return;
if ((ipp_state = ippRead(&(con->http), con->request)) == IPP_ERROR)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -2237,7 +2213,8 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
{
if (!httpWait(HTTP(con), 0))
return;
else if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0)
if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0)
{
if (con->http.error && con->http.error != EPIPE)
cupsdLogMessage(CUPSD_LOG_DEBUG,
@@ -2884,6 +2861,17 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
con->file_ready = 0;
}
bytes = (ssize_t)(sizeof(con->header) - (size_t)con->header_used);
if (!con->pipe_pid && bytes > con->http.data_remaining)
{
/*
* Limit GET bytes to original size of file (STR #3265)...
*/
bytes = (ssize_t)con->http.data_remaining;
}
if (con->response && con->response->state != IPP_DATA)
{
int wused = con->http.wused; /* Previous write buffer use */
@@ -2926,8 +2914,7 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
con->http.fd, (int)bytes, con->http.state,
CUPS_LLCAST con->http.data_remaining);
}
else if ((bytes = read(con->file, con->header + con->header_used,
sizeof(con->header) - con->header_used)) > 0)
else if ((bytes = read(con->file, con->header + con->header_used, (size_t)bytes)) > 0)
{
con->header_used += bytes;
@@ -3340,7 +3327,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */
if ((ptr = strchr(filename, '?')) != NULL)
*ptr = '\0';
if ((status = stat(filename, filestats)) != 0)
if ((status = lstat(filename, filestats)) != 0)
{
/*
* Drop the language prefix and try the root directory...
@@ -3352,12 +3339,33 @@ get_file(cupsd_client_t *con, /* I - Client connection */
if ((ptr = strchr(filename, '?')) != NULL)
*ptr = '\0';
status = stat(filename, filestats);
status = lstat(filename, filestats);
}
}
/*
* If we're found a directory, get the index.html file instead...
* If we've found a symlink, 404 the sucker to avoid disclosing information.
*/
if (!status && S_ISLNK(filestats->st_mode))
{
cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Symlinks such as \"%s\" are not allowed.", con->http.fd, filename);
return (NULL);
}
/*
* Similarly, if the file/directory does not have world read permissions, do
* not allow access...
*/
if (!status && !(filestats->st_mode & S_IROTH))
{
cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Files/directories such as \"%s\" must be world-readable.", con->http.fd, filename);
return (NULL);
}
/*
* If we've found a directory, get the index.html file instead...
*/
if (!status && S_ISDIR(filestats->st_mode))
@@ -3707,6 +3715,14 @@ is_path_absolute(const char *path) /* I - Input path */
if (path[0] != '/')
return (0);
/*
* Check for "<" or quotes in the path and reject since this is probably
* someone trying to inject HTML...
*/
if (strchr(path, '<') != NULL || strchr(path, '\"') != NULL || strchr(path, '\'') != NULL)
return (0);
/*
* Check for "/.." in the path...
*/
@@ -4379,5 +4395,5 @@ write_pipe(cupsd_client_t *con) /* I - Client connection */
/*
* End of "$Id: client.c 11308 2013-09-27 14:09:25Z msweet $".
* End of "$Id: client.c 12009 2014-07-09 17:02:38Z msweet $".
*/
+3 -3
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: conf.c 11488 2013-12-22 05:04:41Z msweet $"
* "$Id: conf.c 11932 2014-06-16 16:13:06Z msweet $"
*
* Configuration routines for the CUPS scheduler.
*
@@ -104,7 +104,7 @@ static const cupsd_var_t cupsd_vars[] =
{ "MaxJobs", &MaxJobs, CUPSD_VARTYPE_INTEGER },
{ "MaxJobsPerPrinter", &MaxJobsPerPrinter, CUPSD_VARTYPE_INTEGER },
{ "MaxJobsPerUser", &MaxJobsPerUser, CUPSD_VARTYPE_INTEGER },
{ "MaxJobTime", &MaxJobTime, CUPSD_VARTYPE_INTEGER },
{ "MaxJobTime", &MaxJobTime, CUPSD_VARTYPE_TIME },
{ "MaxLeaseDuration", &MaxLeaseDuration, CUPSD_VARTYPE_TIME },
{ "MaxLogSize", &MaxLogSize, CUPSD_VARTYPE_INTEGER },
{ "MaxRequestSize", &MaxRequestSize, CUPSD_VARTYPE_INTEGER },
@@ -4063,5 +4063,5 @@ set_policy_defaults(cupsd_policy_t *pol)/* I - Policy */
/*
* End of "$Id: conf.c 11488 2013-12-22 05:04:41Z msweet $".
* End of "$Id: conf.c 11932 2014-06-16 16:13:06Z msweet $".
*/
+18 -28
Ver Arquivo
@@ -1,27 +1,16 @@
/*
* "$Id: cups-lpd.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: cups-lpd.c 11623 2014-02-19 20:18:10Z msweet $"
*
* Line Printer Daemon interface for CUPS.
* Line Printer Daemon interface for CUPS.
*
* Copyright 2007-2012 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:
*
* main() - Process an incoming LPD request...
* create_job() - Create a new print job.
* get_printer() - Get the named printer and its options.
* print_file() - Add a file to the current job.
* recv_print_job() - Receive a print job from the client.
* remove_jobs() - Cancel one or more jobs.
* send_state() - Send the queue state.
* smart_gets() - Get a line of text, removing the trailing CR and/or LF.
* 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/".
*/
/*
@@ -781,7 +770,8 @@ recv_print_job(
int fd; /* Temporary file */
FILE *fp; /* File pointer */
char filename[1024]; /* Temporary filename */
int bytes; /* Bytes received */
ssize_t bytes; /* Bytes received */
size_t total; /* Total bytes */
char line[256], /* Line from file/stdin */
command, /* Command from line */
*count, /* Number of bytes */
@@ -965,15 +955,15 @@ recv_print_job(
* Copy the data or control file from the client...
*/
for (i = atoi(count); i > 0; i -= bytes)
for (total = (size_t)strtoll(count, NULL, 10); total > 0; total -= (size_t)bytes)
{
if (i > sizeof(line))
bytes = sizeof(line);
if (total > sizeof(line))
bytes = (ssize_t)sizeof(line);
else
bytes = i;
bytes = (ssize_t)total;
if ((bytes = fread(line, 1, bytes, stdin)) > 0)
bytes = write(fd, line, bytes);
if ((bytes = (ssize_t)fread(line, 1, (size_t)bytes, stdin)) > 0)
bytes = write(fd, line, (size_t)bytes);
if (bytes < 1)
{
@@ -1622,5 +1612,5 @@ smart_gets(char *s, /* I - Pointer to line buffer */
/*
* End of "$Id: cups-lpd.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: cups-lpd.c 11623 2014-02-19 20:18:10Z msweet $".
*/
+22 -39
Ver Arquivo
@@ -1,34 +1,16 @@
/*
* "$Id: cupsfilter.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: cupsfilter.c 11772 2014-03-28 15:08:30Z msweet $"
*
* Filtering program for CUPS.
* Filtering program for CUPS.
*
* Copyright 2007-2013 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:
*
* main() - Main entry for the test program.
* add_printer_filter() - Add a single filters from a PPD file.
* add_printer_filters() - Add filters from a PPD file.
* check_cb() - Callback function for _cupsFileCheck.
* compare_pids() - Compare two filter PIDs...
* escape_options() - Convert an options array to a string.
* exec_filter() - Execute a single filter.
* exec_filters() - Execute filters for the given file and options.
* get_job_file() - Get the specified job file.
* open_pipe() - Create a pipe which is closed on exec.
* read_cupsd_conf() - Read the cupsd.conf file to get the filter
* settings.
* set_string() - Copy and set a string.
* sighandler() - Signal catcher for when we print from stdin...
* usage() - Show program usage...
* 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/".
*/
/*
@@ -99,7 +81,7 @@ static int exec_filters(mime_type_t *srctype,
cups_option_t *options);
static void get_job_file(const char *job);
static int open_pipe(int *fds);
static int read_cupsd_conf(const char *filename);
static int read_cups_files_conf(const char *filename);
static void set_string(char **s, const char *val);
static void sighandler(int sig);
static void usage(const char *opt) __attribute__((noreturn));
@@ -129,7 +111,7 @@ main(int argc, /* I - Number of command-line args */
char mimedir[1024]; /* MIME directory */
char *infile, /* File to filter */
*outfile; /* File to create */
char cupsdconf[1024]; /* cupsd.conf file */
char cupsfilesconf[1024]; /* cups-files.conf file */
const char *server_root; /* CUPS_SERVERROOT environment variable */
mime_type_t *src, /* Source type */
*dst; /* Destination type */
@@ -173,7 +155,7 @@ main(int argc, /* I - Number of command-line args */
if ((server_root = getenv("CUPS_SERVERROOT")) == NULL)
server_root = CUPS_SERVERROOT;
snprintf(cupsdconf, sizeof(cupsdconf), "%s/cupsd.conf", server_root);
snprintf(cupsfilesconf, sizeof(cupsfilesconf), "%s/cups-files.conf", server_root);
/*
* Process command-line arguments...
@@ -203,7 +185,7 @@ main(int argc, /* I - Number of command-line args */
usage(opt);
break;
case 'c' : /* Specify cupsd.conf file location... */
case 'c' : /* Specify cups-files.conf file location... */
i ++;
if (i < argc)
{
@@ -211,7 +193,7 @@ main(int argc, /* I - Number of command-line args */
num_options = cupsAddOption("copies", argv[i], num_options,
&options);
else
strlcpy(cupsdconf, argv[i], sizeof(cupsdconf));
strlcpy(cupsfilesconf, argv[i], sizeof(cupsfilesconf));
}
else
usage(opt);
@@ -373,10 +355,10 @@ main(int argc, /* I - Number of command-line args */
}
/*
* Load the cupsd.conf file and create the MIME database...
* Load the cups-files.conf file and create the MIME database...
*/
if (read_cupsd_conf(cupsdconf))
if (read_cups_files_conf(cupsfilesconf))
return (1);
snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
@@ -1354,13 +1336,14 @@ open_pipe(int *fds) /* O - Pipe file descriptors (2) */
/*
* 'read_cupsd_conf()' - Read the cupsd.conf file to get the filter settings.
* 'read_cups_files_conf()' - Read the cups-files.conf file to get the filter settings.
*/
static int /* O - 0 on success, 1 on error */
read_cupsd_conf(const char *filename) /* I - File to read */
read_cups_files_conf(
const char *filename) /* I - File to read */
{
cups_file_t *fp; /* cupsd.conf file */
cups_file_t *fp; /* cups-files.conf file */
const char *temp; /* Temporary string */
char line[1024], /* Line from file */
*ptr; /* Pointer into line */
@@ -1476,7 +1459,7 @@ usage(const char *opt) /* I - Incorrect option, if any */
"when finished."));
_cupsLangPuts(stdout, _(" -P filename.ppd Set PPD file."));
_cupsLangPuts(stdout, _(" -U username Specify username."));
_cupsLangPuts(stdout, _(" -c cupsd.conf Set cupsd.conf file to "
_cupsLangPuts(stdout, _(" -c cups-files.conf Set cups-files.conf file to "
"use."));
_cupsLangPuts(stdout, _(" -d printer Use the named "
"printer."));
@@ -1500,5 +1483,5 @@ usage(const char *opt) /* I - Incorrect option, if any */
/*
* End of "$Id: cupsfilter.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: cupsfilter.c 11772 2014-03-28 15:08:30Z msweet $".
*/
+426 -280
Ver Arquivo
@@ -1,46 +1,16 @@
/*
* "$Id: dirsvc.c 11193 2013-07-26 03:12:37Z msweet $"
* "$Id: dirsvc.c 11906 2014-06-09 18:33:24Z msweet $"
*
* Directory services routines for the CUPS scheduler.
* Directory services routines for the CUPS scheduler.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* 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:
*
* cupsdDeregisterPrinter() - Stop sending broadcast information for a local
* printer and remove any pending references to
* remote printers.
* cupsdRegisterPrinter() - Start sending broadcast information for a
* printer or update the broadcast contents.
* cupsdStartBrowsing() - Start sending and receiving broadcast
* information.
* cupsdStopBrowsing() - Stop sending and receiving broadcast
* information.
* cupsdUpdateDNSSDName() - Update the computer name we use for
* browsing...
* dnssdAddAlias() - Add a DNS-SD alias name.
* dnssdBuildTxtRecord() - Build a TXT record from printer info.
* dnssdDeregisterInstance() - Deregister a DNS-SD service instance.
* dnssdDeregisterPrinter() - Deregister all services for a printer.
* dnssdErrorString() - Return an error string for an error code.
* dnssdRegisterCallback() - Free a TXT record.
* dnssdRegisterCallback() - DNSServiceRegister callback.
* dnssdRegisterInstance() - Register an instance of a printer service.
* dnssdRegisterPrinter() - Start sending broadcast information for a
* printer or update the broadcast contents.
* dnssdStop() - Stop all DNS-SD registrations.
* dnssdUpdate() - Handle DNS-SD queries.
* get_auth_info_required() - Get the auth-info-required value to advertise.
* get_hostconfig() - Get an /etc/hostconfig service setting.
* update_lpd() - Update the LPD configuration as needed.
* update_smb() - Update the SMB configuration as needed.
* 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/".
*/
/*
@@ -57,6 +27,15 @@
#endif /* HAVE_DNSSD && __APPLE__ */
/*
* Local globals...
*/
#ifdef HAVE_AVAHI
static int avahi_running = 0;
#endif /* HAVE_AVAHI */
/*
* Local functions...
*/
@@ -78,11 +57,15 @@ static void dnssdAddAlias(const void *key, const void *value,
void *context);
# endif /* __APPLE__ */
static cupsd_txt_t dnssdBuildTxtRecord(cupsd_printer_t *p, int for_lpd);
static void dnssdDeregisterInstance(cupsd_srv_t *srv);
static void dnssdDeregisterPrinter(cupsd_printer_t *p,
int clear_name);
# ifdef HAVE_AVAHI
static void dnssdClientCallback(AvahiClient *c, AvahiClientState state, void *userdata);
# endif /* HAVE_AVAHI */
static void dnssdDeregisterAllPrinters(int from_callback);
static void dnssdDeregisterInstance(cupsd_srv_t *srv, int from_callback);
static void dnssdDeregisterPrinter(cupsd_printer_t *p, int clear_name, int from_callback);
static const char *dnssdErrorString(int error);
static void dnssdFreeTxtRecord(cupsd_txt_t *txt);
static void dnssdRegisterAllPrinters(int from_callback);
# ifdef HAVE_DNSSD
static void dnssdRegisterCallback(DNSServiceRef sdRef,
DNSServiceFlags flags,
@@ -96,16 +79,13 @@ static void dnssdRegisterCallback(AvahiEntryGroup *p,
AvahiEntryGroupState state,
void *context);
# endif /* HAVE_DNSSD */
static int dnssdRegisterInstance(cupsd_srv_t *srv,
cupsd_printer_t *p,
char *name, const char *type,
const char *subtypes, int port,
cupsd_txt_t *txt, int commit);
static void dnssdRegisterPrinter(cupsd_printer_t *p);
static int dnssdRegisterInstance(cupsd_srv_t *srv, cupsd_printer_t *p, char *name, const char *type, const char *subtypes, int port, cupsd_txt_t *txt, int commit, int from_callback);
static void dnssdRegisterPrinter(cupsd_printer_t *p, int from_callback);
static void dnssdStop(void);
# ifdef HAVE_DNSSD
static void dnssdUpdate(void);
# endif /* HAVE_DNSSD */
static void dnssdUpdateDNSSDName(int from_callback);
#endif /* HAVE_DNSSD || HAVE_AVAHI */
@@ -138,7 +118,7 @@ cupsdDeregisterPrinter(
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
dnssdDeregisterPrinter(p, 1);
dnssdDeregisterPrinter(p, 1, 0);
#endif /* HAVE_DNSSD || HAVE_AVAHI */
}
@@ -160,7 +140,7 @@ cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
dnssdRegisterPrinter(p);
dnssdRegisterPrinter(p, 0);
#endif /* HAVE_DNSSD || HAVE_AVAHI */
}
@@ -172,16 +152,12 @@ cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
void
cupsdStartBrowsing(void)
{
cupsd_printer_t *p; /* Current printer */
if (!Browsing || !BrowseLocalProtocols)
return;
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
if (BrowseLocalProtocols & BROWSE_DNSSD)
{
cupsd_listener_t *lis; /* Current listening socket */
# ifdef HAVE_DNSSD
DNSServiceErrorType error; /* Error from service creation */
@@ -211,6 +187,13 @@ cupsdStartBrowsing(void)
cupsdAddSelect(fd, (cupsd_selfunc_t)dnssdUpdate, NULL, NULL);
}
/*
* Set the computer name and register the web interface...
*/
DNSSDPort = 0;
cupsdUpdateDNSSDName();
# else /* HAVE_AVAHI */
if ((DNSSDMaster = avahi_threaded_poll_new()) == NULL)
{
@@ -223,8 +206,7 @@ cupsdStartBrowsing(void)
{
int error; /* Error code, if any */
DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), 0,
NULL, NULL, &error);
DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
if (DNSSDClient == NULL)
{
@@ -242,31 +224,6 @@ cupsdStartBrowsing(void)
avahi_threaded_poll_start(DNSSDMaster);
}
# endif /* HAVE_DNSSD */
/*
* Then get the port we use for registrations. If we are not listening
* on any non-local ports, there is no sense sharing local printers via
* Bonjour...
*/
DNSSDPort = 0;
for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
{
if (httpAddrLocalhost(&(lis->address)))
continue;
DNSSDPort = httpAddrPort(&(lis->address));
break;
}
/*
* Set the computer name and register the web interface...
*/
cupsdUpdateDNSSDName();
}
#endif /* HAVE_DNSSD || HAVE_AVAHI */
@@ -280,15 +237,13 @@ cupsdStartBrowsing(void)
if (BrowseLocalProtocols & BROWSE_SMB)
update_smb(1);
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
/*
* Register the individual printers
*/
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
cupsdRegisterPrinter(p);
dnssdRegisterAllPrinters(0);
#endif /* HAVE_DNSSD || HAVE_AVAHI */
}
@@ -299,27 +254,20 @@ cupsdStartBrowsing(void)
void
cupsdStopBrowsing(void)
{
cupsd_printer_t *p; /* Current printer */
if (!Browsing || !BrowseLocalProtocols)
return;
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
/*
* De-register the individual printers
*/
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
cupsdDeregisterPrinter(p, 1);
dnssdDeregisterAllPrinters(0);
/*
* Shut down browsing sockets...
*/
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
dnssdStop();
#endif /* HAVE_DNSSD || HAVE_AVAHI */
@@ -344,161 +292,7 @@ cupsdStopBrowsing(void)
void
cupsdUpdateDNSSDName(void)
{
char webif[1024]; /* Web interface share name */
# ifdef __APPLE__
SCDynamicStoreRef sc; /* Context for dynamic store */
CFDictionaryRef btmm; /* Back-to-My-Mac domains */
CFStringEncoding nameEncoding; /* Encoding of computer name */
CFStringRef nameRef; /* Host name CFString */
char nameBuffer[1024]; /* C-string buffer */
# endif /* __APPLE__ */
/*
* Only share the web interface and printers when non-local listening is
* enabled...
*/
if (!DNSSDPort)
return;
/*
* Get the computer name as a c-string...
*/
# ifdef __APPLE__
sc = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("cupsd"), NULL, NULL);
if (sc)
{
/*
* Get the computer name from the dynamic store...
*/
cupsdClearString(&DNSSDComputerName);
if ((nameRef = SCDynamicStoreCopyComputerName(sc, &nameEncoding)) != NULL)
{
if (CFStringGetCString(nameRef, nameBuffer, sizeof(nameBuffer),
kCFStringEncodingUTF8))
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Dynamic store computer name is \"%s\".", nameBuffer);
cupsdSetString(&DNSSDComputerName, nameBuffer);
}
CFRelease(nameRef);
}
if (!DNSSDComputerName)
{
/*
* Use the ServerName instead...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Using ServerName \"%s\" as computer name.", ServerName);
cupsdSetString(&DNSSDComputerName, ServerName);
}
/*
* Get the local hostname from the dynamic store...
*/
cupsdClearString(&DNSSDHostName);
if ((nameRef = SCDynamicStoreCopyLocalHostName(sc)) != NULL)
{
if (CFStringGetCString(nameRef, nameBuffer, sizeof(nameBuffer),
kCFStringEncodingUTF8))
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Dynamic store host name is \"%s\".", nameBuffer);
cupsdSetString(&DNSSDHostName, nameBuffer);
}
CFRelease(nameRef);
}
if (!DNSSDHostName)
{
/*
* Use the ServerName instead...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Using ServerName \"%s\" as host name.", ServerName);
cupsdSetString(&DNSSDHostName, ServerName);
}
/*
* Get any Back-to-My-Mac domains and add them as aliases...
*/
cupsdFreeAliases(DNSSDAlias);
DNSSDAlias = NULL;
btmm = SCDynamicStoreCopyValue(sc, CFSTR("Setup:/Network/BackToMyMac"));
if (btmm && CFGetTypeID(btmm) == CFDictionaryGetTypeID())
{
cupsdLogMessage(CUPSD_LOG_DEBUG, "%d Back to My Mac aliases to add.",
(int)CFDictionaryGetCount(btmm));
CFDictionaryApplyFunction(btmm, dnssdAddAlias, NULL);
}
else if (btmm)
cupsdLogMessage(CUPSD_LOG_ERROR,
"Bad Back to My Mac data in dynamic store!");
else
cupsdLogMessage(CUPSD_LOG_DEBUG, "No Back to My Mac aliases to add.");
if (btmm)
CFRelease(btmm);
CFRelease(sc);
}
else
# endif /* __APPLE__ */
# ifdef HAVE_AVAHI
if (DNSSDClient)
{
const char *host_name = avahi_client_get_host_name(DNSSDClient);
const char *host_fqdn = avahi_client_get_host_name_fqdn(DNSSDClient);
cupsdSetString(&DNSSDComputerName, host_name ? host_name : ServerName);
if (host_fqdn)
cupsdSetString(&DNSSDHostName, host_fqdn);
else if (strchr(ServerName, '.'))
cupsdSetString(&DNSSDHostName, ServerName);
else
cupsdSetStringf(&DNSSDHostName, "%s.local", ServerName);
}
else
# endif /* HAVE_AVAHI */
{
cupsdSetString(&DNSSDComputerName, ServerName);
if (strchr(ServerName, '.'))
cupsdSetString(&DNSSDHostName, ServerName);
else
cupsdSetStringf(&DNSSDHostName, "%s.local", ServerName);
}
/*
* Then (re)register the web interface if enabled...
*/
if (BrowseWebIF)
{
if (DNSSDComputerName)
snprintf(webif, sizeof(webif), "CUPS @ %s", DNSSDComputerName);
else
strlcpy(webif, "CUPS", sizeof(webif));
dnssdDeregisterInstance(&WebIFSrv);
dnssdRegisterInstance(&WebIFSrv, NULL, webif, "_http._tcp", "_printer",
DNSSDPort, NULL, 1);
}
dnssdUpdateDNSSDName(0);
}
@@ -733,24 +527,158 @@ dnssdBuildTxtRecord(
}
# ifdef HAVE_AVAHI
/*
* 'dnssdClientCallback()' - Client callback for Avahi.
*
* Called whenever the client or server state changes...
*/
static void
dnssdClientCallback(
AvahiClient *c, /* I - Client */
AvahiClientState state, /* I - Current state */
void *userdata) /* I - User data (unused) */
{
int error; /* Error code, if any */
(void)userdata;
if (!c)
return;
/*
* Make sure DNSSDClient is already set also if this callback function is
* already running before avahi_client_new() in dnssdStartBrowsing()
* finishes.
*/
if (!DNSSDClient)
DNSSDClient = c;
switch (state)
{
case AVAHI_CLIENT_S_REGISTERING:
case AVAHI_CLIENT_S_RUNNING:
case AVAHI_CLIENT_S_COLLISION:
cupsdLogMessage(CUPSD_LOG_DEBUG, "Avahi server connection now available, registering printers for Bonjour broadcasting.");
/*
* Mark that Avahi server is running...
*/
avahi_running = 1;
/*
* Set the computer name and register the web interface...
*/
DNSSDPort = 0;
dnssdUpdateDNSSDName(1);
/*
* Register the individual printers
*/
dnssdRegisterAllPrinters(1);
break;
case AVAHI_CLIENT_FAILURE:
if (avahi_client_errno(c) == AVAHI_ERR_DISCONNECTED)
{
cupsdLogMessage(CUPSD_LOG_DEBUG, "Avahi server disappeared, unregistering printers for Bonjour broadcasting.");
/*
* Unregister everything and close the client...
*/
dnssdDeregisterAllPrinters(1);
dnssdDeregisterInstance(&WebIFSrv, 1);
avahi_client_free(DNSSDClient);
DNSSDClient = NULL;
/*
* Mark that Avahi server is not running...
*/
avahi_running = 0;
/*
* Renew Avahi client...
*/
DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
if (!DNSSDClient)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to communicate with avahi-daemon: %s", dnssdErrorString(error));
if (FatalErrors & CUPSD_FATAL_BROWSE)
cupsdEndProcess(getpid(), 0);
}
}
else
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Communication with avahi-daemon has failed: %s", avahi_strerror(avahi_client_errno(c)));
if (FatalErrors & CUPSD_FATAL_BROWSE)
cupsdEndProcess(getpid(), 0);
}
break;
default:
break;
}
}
# endif /* HAVE_AVAHI */
/*
* 'dnssdDeregisterAllPrinters()' - Deregister all printers.
*/
static void
dnssdDeregisterAllPrinters(
int from_callback) /* I - Deregistering because of callback? */
{
cupsd_printer_t *p; /* Current printer */
if (!DNSSDMaster)
return;
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
dnssdDeregisterPrinter(p, 1, from_callback);
}
/*
* 'dnssdDeregisterInstance()' - Deregister a DNS-SD service instance.
*/
static void
dnssdDeregisterInstance(
cupsd_srv_t *srv) /* I - Service */
cupsd_srv_t *srv, /* I - Service */
int from_callback) /* I - Called from callback? */
{
if (!srv || !*srv)
return;
# ifdef HAVE_DNSSD
(void)from_callback;
DNSServiceRefDeallocate(*srv);
# else /* HAVE_AVAHI */
avahi_threaded_poll_lock(DNSSDMaster);
if (!from_callback)
avahi_threaded_poll_lock(DNSSDMaster);
avahi_entry_group_free(*srv);
avahi_threaded_poll_unlock(DNSSDMaster);
if (!from_callback)
avahi_threaded_poll_unlock(DNSSDMaster);
# endif /* HAVE_DNSSD */
*srv = NULL;
@@ -764,7 +692,8 @@ dnssdDeregisterInstance(
static void
dnssdDeregisterPrinter(
cupsd_printer_t *p, /* I - Printer */
int clear_name) /* I - Clear the name? */
int clear_name, /* I - Clear the name? */
int from_callback) /* I - Called from callback? */
{
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -773,13 +702,13 @@ dnssdDeregisterPrinter(
if (p->ipp_srv)
{
dnssdDeregisterInstance(&p->ipp_srv);
dnssdDeregisterInstance(&p->ipp_srv, from_callback);
# ifdef HAVE_DNSSD
# ifdef HAVE_SSL
dnssdDeregisterInstance(&p->ipps_srv);
dnssdDeregisterInstance(&p->ipps_srv, from_callback);
# endif /* HAVE_SSL */
dnssdDeregisterInstance(&p->printer_srv);
dnssdDeregisterInstance(&p->printer_srv, from_callback);
# endif /* HAVE_DNSSD */
}
@@ -930,6 +859,27 @@ dnssdFreeTxtRecord(cupsd_txt_t *txt) /* I - TXT record */
}
/*
* 'dnssdRegisterAllPrinters()' - Register all printers.
*/
static void
dnssdRegisterAllPrinters(int from_callback) /* I - Called from callback? */
{
cupsd_printer_t *p; /* Current printer */
if (!DNSSDMaster)
return;
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
dnssdRegisterPrinter(p, from_callback);
}
/*
* 'dnssdRegisterCallback()' - DNSServiceRegister callback.
*/
@@ -1010,15 +960,19 @@ dnssdRegisterInstance(
const char *subtypes, /* I - Subtypes to register or NULL */
int port, /* I - Port number or 0 */
cupsd_txt_t *txt, /* I - TXT record */
int commit) /* I - Commit registration? */
int commit, /* I - Commit registration? */
int from_callback) /* I - Called from callback? */
{
char temp[256], /* Temporary string */
*ptr; /* Pointer into string */
int error; /* Any error */
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Registering \"%s\" with DNS-SD type \"%s\".", name, type);
# ifdef HAVE_DNSSD
(void)from_callback;
# endif /* HAVE_DNSSD */
cupsdLogMessage(CUPSD_LOG_DEBUG, "Registering \"%s\" with DNS-SD type \"%s\".", name, type);
if (p && !srv)
{
@@ -1045,13 +999,15 @@ dnssdRegisterInstance(
(void)commit;
# else /* HAVE_AVAHI */
avahi_threaded_poll_lock(DNSSDMaster);
if (!from_callback)
avahi_threaded_poll_lock(DNSSDMaster);
if (!*srv)
*srv = avahi_entry_group_new(DNSSDClient, dnssdRegisterCallback, NULL);
if (!*srv)
{
avahi_threaded_poll_unlock(DNSSDMaster);
if (!from_callback)
avahi_threaded_poll_unlock(DNSSDMaster);
cupsdLogMessage(CUPSD_LOG_WARN, "DNS-SD registration of \"%s\" failed: %s",
name, dnssdErrorString(avahi_client_errno(DNSSDClient)));
@@ -1168,7 +1124,8 @@ dnssdRegisterInstance(
name);
}
avahi_threaded_poll_unlock(DNSSDMaster);
if (!from_callback)
avahi_threaded_poll_unlock(DNSSDMaster);
# endif /* HAVE_DNSSD */
if (error)
@@ -1190,7 +1147,9 @@ dnssdRegisterInstance(
*/
static void
dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
dnssdRegisterPrinter(
cupsd_printer_t *p, /* I - Printer */
int from_callback) /* I - Called from callback? */
{
char name[256]; /* Service name */
int printer_port; /* LPD port number */
@@ -1198,15 +1157,21 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
cupsd_txt_t ipp_txt, /* IPP(S) TXT record */
printer_txt; /* LPD TXT record */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name,
!p->ipp_srv ? "new" : "update");
# ifdef HAVE_AVAHI
if (!avahi_running)
return;
# endif /* HAVE_AVAHI */
/*
* Remove the current registrations if we have them and then return if
* per-printer sharing was just disabled...
*/
dnssdDeregisterPrinter(p, 0);
dnssdDeregisterPrinter(p, 0, from_callback);
if (!p->shared)
return;
@@ -1249,13 +1214,11 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
else
printer_port = 0;
status = dnssdRegisterInstance(NULL, p, name, "_printer._tcp", NULL,
printer_port, &printer_txt, 0);
status = dnssdRegisterInstance(NULL, p, name, "_printer._tcp", NULL, printer_port, &printer_txt, 0, from_callback);
# ifdef HAVE_SSL
if (status)
dnssdRegisterInstance(NULL, p, name, "_ipps._tcp", DNSSDSubTypes,
DNSSDPort, &ipp_txt, 0);
dnssdRegisterInstance(NULL, p, name, "_ipps._tcp", DNSSDSubTypes, DNSSDPort, &ipp_txt, 0, from_callback);
# endif /* HAVE_SSL */
if (status)
@@ -1265,11 +1228,9 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
*/
if (p->type & CUPS_PRINTER_FAX)
status = dnssdRegisterInstance(NULL, p, name, "_fax-ipp._tcp",
DNSSDSubTypes, DNSSDPort, &ipp_txt, 1);
status = dnssdRegisterInstance(NULL, p, name, "_fax-ipp._tcp", DNSSDSubTypes, DNSSDPort, &ipp_txt, 1, from_callback);
else
status = dnssdRegisterInstance(NULL, p, name, "_ipp._tcp", DNSSDSubTypes,
DNSSDPort, &ipp_txt, 1);
status = dnssdRegisterInstance(NULL, p, name, "_ipp._tcp", DNSSDSubTypes, DNSSDPort, &ipp_txt, 1, from_callback);
}
dnssdFreeTxtRecord(&ipp_txt);
@@ -1291,13 +1252,13 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
* Registration failed for this printer...
*/
dnssdDeregisterInstance(&p->ipp_srv);
dnssdDeregisterInstance(&p->ipp_srv, from_callback);
# ifdef HAVE_DNSSD
# ifdef HAVE_SSL
dnssdDeregisterInstance(&p->ipps_srv);
dnssdDeregisterInstance(&p->ipps_srv, from_callback);
# endif /* HAVE_SSL */
dnssdDeregisterInstance(&p->printer_srv);
dnssdDeregisterInstance(&p->printer_srv, from_callback);
# endif /* HAVE_DNSSD */
}
}
@@ -1320,13 +1281,13 @@ dnssdStop(void)
for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
dnssdDeregisterPrinter(p, 1);
dnssdDeregisterPrinter(p, 1, 0);
/*
* Shutdown the rest of the service refs...
*/
dnssdDeregisterInstance(&WebIFSrv);
dnssdDeregisterInstance(&WebIFSrv, 0);
# ifdef HAVE_DNSSD
cupsdRemoveSelect(DNSServiceRefSockFD(DNSSDMaster));
@@ -1373,6 +1334,191 @@ dnssdUpdate(void)
# endif /* HAVE_DNSSD */
/*
* 'dnssdUpdateDNSSDName()' - Update the listen port, computer name, and web interface registration.
*/
static void
dnssdUpdateDNSSDName(int from_callback) /* I - Called from callback? */
{
char webif[1024]; /* Web interface share name */
# ifdef __APPLE__
SCDynamicStoreRef sc; /* Context for dynamic store */
CFDictionaryRef btmm; /* Back-to-My-Mac domains */
CFStringEncoding nameEncoding; /* Encoding of computer name */
CFStringRef nameRef; /* Host name CFString */
char nameBuffer[1024]; /* C-string buffer */
# endif /* __APPLE__ */
/*
* Only share the web interface and printers when non-local listening is
* enabled...
*/
if (!DNSSDPort)
{
/*
* Get the port we use for registrations. If we are not listening on any
* non-local ports, there is no sense sharing local printers via Bonjour...
*/
cupsd_listener_t *lis; /* Current listening socket */
for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
{
if (httpAddrLocalhost(&(lis->address)))
continue;
DNSSDPort = httpAddrPort(&(lis->address));
break;
}
}
if (!DNSSDPort)
return;
/*
* Get the computer name as a c-string...
*/
# ifdef __APPLE__
sc = SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("cupsd"), NULL, NULL);
if (sc)
{
/*
* Get the computer name from the dynamic store...
*/
cupsdClearString(&DNSSDComputerName);
if ((nameRef = SCDynamicStoreCopyComputerName(sc, &nameEncoding)) != NULL)
{
if (CFStringGetCString(nameRef, nameBuffer, sizeof(nameBuffer),
kCFStringEncodingUTF8))
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Dynamic store computer name is \"%s\".", nameBuffer);
cupsdSetString(&DNSSDComputerName, nameBuffer);
}
CFRelease(nameRef);
}
if (!DNSSDComputerName)
{
/*
* Use the ServerName instead...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Using ServerName \"%s\" as computer name.", ServerName);
cupsdSetString(&DNSSDComputerName, ServerName);
}
/*
* Get the local hostname from the dynamic store...
*/
cupsdClearString(&DNSSDHostName);
if ((nameRef = SCDynamicStoreCopyLocalHostName(sc)) != NULL)
{
if (CFStringGetCString(nameRef, nameBuffer, sizeof(nameBuffer),
kCFStringEncodingUTF8))
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Dynamic store host name is \"%s\".", nameBuffer);
cupsdSetString(&DNSSDHostName, nameBuffer);
}
CFRelease(nameRef);
}
if (!DNSSDHostName)
{
/*
* Use the ServerName instead...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Using ServerName \"%s\" as host name.", ServerName);
cupsdSetString(&DNSSDHostName, ServerName);
}
/*
* Get any Back-to-My-Mac domains and add them as aliases...
*/
cupsdFreeAliases(DNSSDAlias);
DNSSDAlias = NULL;
btmm = SCDynamicStoreCopyValue(sc, CFSTR("Setup:/Network/BackToMyMac"));
if (btmm && CFGetTypeID(btmm) == CFDictionaryGetTypeID())
{
cupsdLogMessage(CUPSD_LOG_DEBUG, "%d Back to My Mac aliases to add.",
(int)CFDictionaryGetCount(btmm));
CFDictionaryApplyFunction(btmm, dnssdAddAlias, NULL);
}
else if (btmm)
cupsdLogMessage(CUPSD_LOG_ERROR,
"Bad Back to My Mac data in dynamic store!");
else
cupsdLogMessage(CUPSD_LOG_DEBUG, "No Back to My Mac aliases to add.");
if (btmm)
CFRelease(btmm);
CFRelease(sc);
}
else
# endif /* __APPLE__ */
# ifdef HAVE_AVAHI
if (DNSSDClient)
{
const char *host_name = avahi_client_get_host_name(DNSSDClient);
const char *host_fqdn = avahi_client_get_host_name_fqdn(DNSSDClient);
cupsdSetString(&DNSSDComputerName, host_name ? host_name : ServerName);
if (host_fqdn)
cupsdSetString(&DNSSDHostName, host_fqdn);
else if (strchr(ServerName, '.'))
cupsdSetString(&DNSSDHostName, ServerName);
else
cupsdSetStringf(&DNSSDHostName, "%s.local", ServerName);
}
else
# endif /* HAVE_AVAHI */
{
cupsdSetString(&DNSSDComputerName, ServerName);
if (strchr(ServerName, '.'))
cupsdSetString(&DNSSDHostName, ServerName);
else
cupsdSetStringf(&DNSSDHostName, "%s.local", ServerName);
}
/*
* Then (re)register the web interface if enabled...
*/
if (BrowseWebIF)
{
if (DNSSDComputerName)
snprintf(webif, sizeof(webif), "CUPS @ %s", DNSSDComputerName);
else
strlcpy(webif, "CUPS", sizeof(webif));
dnssdDeregisterInstance(&WebIFSrv, from_callback);
dnssdRegisterInstance(&WebIFSrv, NULL, webif, "_http._tcp", "_printer", DNSSDPort, NULL, 1, from_callback);
}
}
/*
* 'get_auth_info_required()' - Get the auth-info-required value to advertise.
*/
@@ -1404,7 +1550,7 @@ get_auth_info_required(
if (i)
*bufptr++ = ',';
strlcpy(bufptr, p->auth_info_required[i], bufsize - (bufptr - buffer));
strlcpy(bufptr, p->auth_info_required[i], bufsize - (size_t)(bufptr - buffer));
bufptr += strlen(bufptr);
}
@@ -1670,5 +1816,5 @@ update_smb(int onoff) /* I - 1 = turn on, 0 = turn off */
/*
* End of "$Id: dirsvc.c 11193 2013-07-26 03:12:37Z msweet $".
* End of "$Id: dirsvc.c 11906 2014-06-09 18:33:24Z msweet $".
*/
+55 -57
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: ipp.c 11500 2014-01-06 22:21:15Z msweet $"
* "$Id: ipp.c 11734 2014-03-25 18:01:47Z msweet $"
*
* IPP routines for the CUPS scheduler.
*
@@ -85,7 +85,7 @@ static void copy_subscription_attrs(cupsd_client_t *con,
cups_array_t *exclude);
static void create_job(cupsd_client_t *con, ipp_attribute_t *uri);
static cups_array_t *create_requested_array(ipp_t *request);
static void create_subscription(cupsd_client_t *con, ipp_attribute_t *uri);
static void create_subscriptions(cupsd_client_t *con, ipp_attribute_t *uri);
static void delete_printer(cupsd_client_t *con, ipp_attribute_t *uri);
static void get_default(cupsd_client_t *con);
static void get_devices(cupsd_client_t *con);
@@ -437,176 +437,176 @@ cupsdProcessIPPRequest(
switch (con->request->request.op.operation_id)
{
case IPP_PRINT_JOB :
case IPP_OP_PRINT_JOB :
print_job(con, uri);
break;
case IPP_VALIDATE_JOB :
case IPP_OP_VALIDATE_JOB :
validate_job(con, uri);
break;
case IPP_CREATE_JOB :
case IPP_OP_CREATE_JOB :
create_job(con, uri);
break;
case IPP_SEND_DOCUMENT :
case IPP_OP_SEND_DOCUMENT :
send_document(con, uri);
break;
case IPP_CANCEL_JOB :
case IPP_OP_CANCEL_JOB :
cancel_job(con, uri);
break;
case IPP_GET_JOB_ATTRIBUTES :
case IPP_OP_GET_JOB_ATTRIBUTES :
get_job_attrs(con, uri);
break;
case IPP_GET_JOBS :
case IPP_OP_GET_JOBS :
get_jobs(con, uri);
break;
case IPP_GET_PRINTER_ATTRIBUTES :
case IPP_OP_GET_PRINTER_ATTRIBUTES :
get_printer_attrs(con, uri);
break;
case IPP_GET_PRINTER_SUPPORTED_VALUES :
case IPP_OP_GET_PRINTER_SUPPORTED_VALUES :
get_printer_supported(con, uri);
break;
case IPP_HOLD_JOB :
case IPP_OP_HOLD_JOB :
hold_job(con, uri);
break;
case IPP_RELEASE_JOB :
case IPP_OP_RELEASE_JOB :
release_job(con, uri);
break;
case IPP_RESTART_JOB :
case IPP_OP_RESTART_JOB :
restart_job(con, uri);
break;
case IPP_PAUSE_PRINTER :
case IPP_OP_PAUSE_PRINTER :
stop_printer(con, uri);
break;
case IPP_RESUME_PRINTER :
case IPP_OP_RESUME_PRINTER :
start_printer(con, uri);
break;
case IPP_PURGE_JOBS :
case IPP_CANCEL_JOBS :
case IPP_CANCEL_MY_JOBS :
case IPP_OP_PURGE_JOBS :
case IPP_OP_CANCEL_JOBS :
case IPP_OP_CANCEL_MY_JOBS :
cancel_all_jobs(con, uri);
break;
case IPP_SET_JOB_ATTRIBUTES :
case IPP_OP_SET_JOB_ATTRIBUTES :
set_job_attrs(con, uri);
break;
case IPP_SET_PRINTER_ATTRIBUTES :
case IPP_OP_SET_PRINTER_ATTRIBUTES :
set_printer_attrs(con, uri);
break;
case IPP_HOLD_NEW_JOBS :
case IPP_OP_HOLD_NEW_JOBS :
hold_new_jobs(con, uri);
break;
case IPP_RELEASE_HELD_NEW_JOBS :
case IPP_OP_RELEASE_HELD_NEW_JOBS :
release_held_new_jobs(con, uri);
break;
case IPP_CLOSE_JOB :
case IPP_OP_CLOSE_JOB :
close_job(con, uri);
break;
case CUPS_GET_DEFAULT :
case IPP_OP_CUPS_GET_DEFAULT :
get_default(con);
break;
case CUPS_GET_PRINTERS :
case IPP_OP_CUPS_GET_PRINTERS :
get_printers(con, 0);
break;
case CUPS_GET_CLASSES :
case IPP_OP_CUPS_GET_CLASSES :
get_printers(con, CUPS_PRINTER_CLASS);
break;
case CUPS_ADD_PRINTER :
case IPP_OP_CUPS_ADD_MODIFY_PRINTER :
add_printer(con, uri);
break;
case CUPS_DELETE_PRINTER :
case IPP_OP_CUPS_DELETE_PRINTER :
delete_printer(con, uri);
break;
case CUPS_ADD_CLASS :
case IPP_OP_CUPS_ADD_MODIFY_CLASS :
add_class(con, uri);
break;
case CUPS_DELETE_CLASS :
case IPP_OP_CUPS_DELETE_CLASS :
delete_printer(con, uri);
break;
case CUPS_ACCEPT_JOBS :
case IPP_ENABLE_PRINTER :
case IPP_OP_CUPS_ACCEPT_JOBS :
case IPP_OP_ENABLE_PRINTER :
accept_jobs(con, uri);
break;
case CUPS_REJECT_JOBS :
case IPP_DISABLE_PRINTER :
case IPP_OP_CUPS_REJECT_JOBS :
case IPP_OP_DISABLE_PRINTER :
reject_jobs(con, uri);
break;
case CUPS_SET_DEFAULT :
case IPP_OP_CUPS_SET_DEFAULT :
set_default(con, uri);
break;
case CUPS_GET_DEVICES :
case IPP_OP_CUPS_GET_DEVICES :
get_devices(con);
break;
case CUPS_GET_DOCUMENT :
case IPP_OP_CUPS_GET_DOCUMENT :
get_document(con, uri);
break;
case CUPS_GET_PPD :
case IPP_OP_CUPS_GET_PPD :
get_ppd(con, uri);
break;
case CUPS_GET_PPDS :
case IPP_OP_CUPS_GET_PPDS :
get_ppds(con);
break;
case CUPS_MOVE_JOB :
case IPP_OP_CUPS_MOVE_JOB :
move_job(con, uri);
break;
case CUPS_AUTHENTICATE_JOB :
case IPP_OP_CUPS_AUTHENTICATE_JOB :
authenticate_job(con, uri);
break;
case IPP_CREATE_PRINTER_SUBSCRIPTION :
case IPP_CREATE_JOB_SUBSCRIPTION :
create_subscription(con, uri);
case IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS :
case IPP_OP_CREATE_JOB_SUBSCRIPTIONS :
create_subscriptions(con, uri);
break;
case IPP_GET_SUBSCRIPTION_ATTRIBUTES :
case IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES :
get_subscription_attrs(con, sub_id);
break;
case IPP_GET_SUBSCRIPTIONS :
case IPP_OP_GET_SUBSCRIPTIONS :
get_subscriptions(con, uri);
break;
case IPP_RENEW_SUBSCRIPTION :
case IPP_OP_RENEW_SUBSCRIPTION :
renew_subscription(con, sub_id);
break;
case IPP_CANCEL_SUBSCRIPTION :
case IPP_OP_CANCEL_SUBSCRIPTION :
cancel_subscription(con, sub_id);
break;
case IPP_GET_NOTIFICATIONS :
case IPP_OP_GET_NOTIFICATIONS :
get_notifications(con);
break;
@@ -5224,11 +5224,11 @@ create_requested_array(ipp_t *request) /* I - IPP request */
/*
* 'create_subscription()' - Create a notification subscription.
* 'create_subscriptions()' - Create one or more notification subscriptions.
*/
static void
create_subscription(
create_subscriptions(
cupsd_client_t *con, /* I - Client connection */
ipp_attribute_t *uri) /* I - Printer URI */
{
@@ -5276,9 +5276,7 @@ create_subscription(
* Is the destination valid?
*/
cupsdLogMessage(CUPSD_LOG_DEBUG,
"cupsdCreateSubscription(con=%p(%d), uri=\"%s\")",
con, con->http.fd, uri->values[0].string.text);
cupsdLogMessage(CUPSD_LOG_DEBUG, "create_subscriptions(con=%p(%d), uri=\"%s\")", con, con->http.fd, uri->values[0].string.text);
httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
sizeof(scheme), userpass, sizeof(userpass), host,
@@ -5529,7 +5527,7 @@ create_subscription(
if (MaxLeaseDuration && (lease == 0 || lease > MaxLeaseDuration))
{
cupsdLogMessage(CUPSD_LOG_INFO,
"create_subscription: Limiting notify-lease-duration to "
"create_subscriptions: Limiting notify-lease-duration to "
"%d seconds.",
MaxLeaseDuration);
lease = MaxLeaseDuration;
@@ -11016,5 +11014,5 @@ validate_user(cupsd_job_t *job, /* I - Job */
/*
* End of "$Id: ipp.c 11500 2014-01-06 22:21:15Z msweet $".
* End of "$Id: ipp.c 11734 2014-03-25 18:01:47Z msweet $".
*/
+22 -33
Ver Arquivo
@@ -1,39 +1,16 @@
/*
* "$Id: main.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: main.c 11721 2014-03-21 18:18:56Z msweet $"
*
* Main loop for the CUPS scheduler.
* Main loop for the CUPS scheduler.
*
* Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.txt"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
*
* Contents:
*
* main() - Main entry for the CUPS scheduler.
* cupsdAddString() - Copy and add a string to an array.
* cupsdCheckProcess() - Tell the main loop to check for dead children.
* cupsdClearString() - Clear a string.
* cupsdFreeStrings() - Free an array of strings.
* cupsdHoldSignals() - Hold child and termination signals.
* cupsdReleaseSignals() - Release signals for delivery.
* cupsdSetString() - Set a string value.
* cupsdSetStringf() - Set a formatted string value.
* launchd_checkin() - Check-in with launchd and collect the listening
* fds.
* launchd_checkout() - Update the launchd KeepAlive file as needed.
* parent_handler() - Catch USR1/CHLD signals...
* process_children() - Process all dead children...
* select_timeout() - Calculate the select timeout value.
* sigchld_handler() - Handle 'child' signals from old processes.
* sighup_handler() - Handle 'hangup' signals to reconfigure the
* scheduler.
* sigterm_handler() - Handle 'terminate' signals that stop the scheduler.
* usage() - Show scheduler usage.
* 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"
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -70,6 +47,10 @@
# include <notify.h>
#endif /* HAVE_NOTIFY_H */
#ifdef HAVE_DBUS
# include <dbus/dbus.h>
#endif /* HAVE_DBUS */
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
@@ -506,6 +487,14 @@ main(int argc, /* I - Number of command-line args */
setlocale(LC_TIME, "");
#endif /* LC_TIME */
#ifdef HAVE_DBUS_THREADS_INIT
/*
* Enable threading support for D-BUS...
*/
dbus_threads_init_default();
#endif /* HAVE_DBUS_THREADS_INIT */
/*
* Set the maximum number of files...
*/
@@ -2025,5 +2014,5 @@ usage(int status) /* O - Exit status */
/*
* End of "$Id: main.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: main.c 11721 2014-03-21 18:18:56Z msweet $".
*/
+20 -30
Ver Arquivo
@@ -1,32 +1,16 @@
/*
* "$Id: policy.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: policy.c 11684 2014-03-05 20:01:48Z msweet $"
*
* Policy routines for the CUPS scheduler.
* Policy routines for the CUPS scheduler.
*
* Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
* Copyright 2007-2011, 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:
*
* AddPolicy() - Add a policy to the system.
* cupsdAddPolicyOp() - Add an operation to a policy.
* cupsdCheckPolicy() - Check the IPP operation and username against a
* policy.
* cupsdDeleteAllPolicies() - Delete all policies in memory.
* cupsdFindPolicy() - Find a named policy.
* cupsdFindPolicyOp() - Find a policy operation.
* cupsdGetPrivateAttrs() - Get the private attributes for the current
* request.
* compare_ops() - Compare two operations.
* compare_policies() - Compare two policies.
* free_policy() - Free the memory used by a policy.
* hash_op() - Generate a lookup hash for the operation.
* 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/".
*/
/*
@@ -48,7 +32,7 @@ static int hash_op(cupsd_location_t *op);
/*
* 'AddPolicy()' - Add a policy to the system.
* 'cupsdAddPolicy()' - Add a policy to the system.
*/
cupsd_policy_t * /* O - Policy */
@@ -136,7 +120,7 @@ cupsdCheckPolicy(cupsd_policy_t *p, /* I - Policy */
if (!p || !con)
{
cupsdLogMessage(CUPSD_LOG_CRIT, "cupsdCheckPolicy: p=%p, con=%p!", p, con);
cupsdLogMessage(CUPSD_LOG_CRIT, "cupsdCheckPolicy: p=%p, con=%p.", p, con);
return ((http_status_t)0);
}
@@ -147,7 +131,7 @@ cupsdCheckPolicy(cupsd_policy_t *p, /* I - Policy */
if ((po = cupsdFindPolicyOp(p, con->request->request.op.operation_id)) == NULL)
{
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCheckPolicy: No matching operation, returning 0!");
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCheckPolicy: No matching operation, returning 0.");
return ((http_status_t)0);
}
@@ -263,7 +247,7 @@ cupsdFindPolicyOp(cupsd_policy_t *p, /* I - Policy */
return (po);
}
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindPolicyOp: No match found!");
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindPolicyOp: No match found.");
return (NULL);
}
@@ -296,6 +280,12 @@ cupsdGetPrivateAttrs(
con->http.fd, printer, printer ? printer->name : "", owner);
#endif /* DEBUG */
if (!policy)
{
cupsdLogMessage(CUPSD_LOG_CRIT, "cupsdGetPrivateAttrs: policy=%p, con=%p, printer=%p, owner=\"%s\", DefaultPolicyPtr=%p: This should never happen, please report a bug.", policy, con, printer, owner, DefaultPolicyPtr);
policy = DefaultPolicyPtr;
}
/*
* Get the access and attributes lists that correspond to the request...
*/
@@ -513,5 +503,5 @@ hash_op(cupsd_location_t *op) /* I - Operation */
/*
* End of "$Id: policy.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: policy.c 11684 2014-03-05 20:01:48Z msweet $".
*/
+4 -84
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: printers.c 11418 2013-11-08 15:18:01Z msweet $"
* "$Id: printers.c 11623 2014-02-19 20:18:10Z msweet $"
*
* Printer routines for the CUPS scheduler.
*
@@ -50,7 +50,6 @@ static int compare_printers(void *first, void *second, void *data);
static void delete_printer_filters(cupsd_printer_t *p);
static void dirty_printer(cupsd_printer_t *p);
static void load_ppd(cupsd_printer_t *p);
static void log_ipp_conformance(cupsd_printer_t *p, const char *reason);
static ipp_t *new_media_col(_pwg_size_t *size, const char *source,
const char *type);
static void write_xml_string(cups_file_t *fp, const char *s);
@@ -2486,10 +2485,6 @@ cupsdSetPrinterReasons(
if (i >= p->num_reasons)
{
if (!strncmp(reason, "cups-ipp-missing-", 17) ||
!strncmp(reason, "cups-ipp-wrong-", 15))
log_ipp_conformance(p, reason);
if (i >= (int)(sizeof(p->reasons) / sizeof(p->reasons[0])))
{
cupsdLogMessage(CUPSD_LOG_ALERT,
@@ -3678,6 +3673,8 @@ 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);
@@ -4850,83 +4847,6 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
}
/*
* 'log_ipp_conformance()' - Log an IPP conformance issue with a printer.
*/
static void
log_ipp_conformance(
cupsd_printer_t *p, /* I - Printer */
const char *reason) /* I - Printer state reason */
{
const char *message; /* Message to log */
#ifdef __APPLE__
aslmsg aslm; /* Apple System Log message */
#endif /* __APPLE__ */
/*
* Strip the leading "cups-ipp-" from the reason and create a log message for
* it...
*/
reason += 9;
if (!strcmp(reason, "missing-cancel-job"))
message = "Printer does not support REQUIRED Cancel-Job operation.";
else if (!strcmp(reason, "missing-get-job-attributes"))
message = "Printer does not support REQUIRED Get-Job-Attributes operation.";
else if (!strcmp(reason, "missing-print-job"))
message = "Printer does not support REQUIRED Print-Job operation.";
else if (!strcmp(reason, "missing-validate-job"))
message = "Printer does not support REQUIRED Validate-Job operation.";
else if (!strcmp(reason, "missing-get-printer-attributes"))
message = "Printer does not support REQUIRED Get-Printer-Attributes operation.";
else if (!strcmp(reason, "missing-send-document"))
message = "Printer supports Create-Job but not Send-Document operation.";
else if (!strcmp(reason, "missing-job-history"))
message = "Printer does not provide REQUIRED job history.";
else if (!strcmp(reason, "missing-job-id"))
message = "Printer does not provide REQUIRED job-id attribute.";
else if (!strcmp(reason, "missing-job-state"))
message = "Printer does not provide REQUIRED job-state attribute.";
else if (!strcmp(reason, "missing-operations-supported"))
message = "Printer does not provide REQUIRED operations-supported "
"attribute.";
else if (!strcmp(reason, "missing-printer-is-accepting-jobs"))
message = "Printer does not provide REQUIRED printer-is-accepting-jobs "
"attribute.";
else if (!strcmp(reason, "missing-printer-state-reasons"))
message = "Printer does not provide REQUIRED printer-state-reasons "
"attribute.";
else if (!strcmp(reason, "wrong-http-version"))
message = "Printer does not use REQUIRED HTTP/1.1 transport.";
else
message = "Unknown IPP conformance failure.";
cupsdLogMessage(CUPSD_LOG_WARN, "%s: %s", p->name, message);
#ifdef __APPLE__
/*
* Report the failure information to Apple if the user opts into providing
* feedback to Apple...
*/
aslm = asl_new(ASL_TYPE_MSG);
if (aslm)
{
asl_set(aslm, "com.apple.message.domain", "com.apple.printing.ipp.conformance");
asl_set(aslm, "com.apple.message.domain_scope", "com.apple.printing.ipp.conformance");
asl_set(aslm, "com.apple.message.signature", reason);
asl_set(aslm, "com.apple.message.signature2",
p->make_model ? p->make_model : "Unknown");
asl_log(NULL, aslm, ASL_LEVEL_NOTICE, "%s: %s",
p->make_model ? p->make_model : "Unknown", message);
asl_free(aslm);
}
#endif /* __APPLE__ */
}
/*
* 'new_media_col()' - Create a media-col collection value.
*/
@@ -5011,5 +4931,5 @@ write_xml_string(cups_file_t *fp, /* I - File to write to */
/*
* End of "$Id: printers.c 11418 2013-11-08 15:18:01Z msweet $".
* End of "$Id: printers.c 11623 2014-02-19 20:18:10Z msweet $".
*/
+3 -10
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: testsub.c 10996 2013-05-29 11:51:34Z msweet $"
* "$Id: testsub.c 11890 2014-05-22 13:59:21Z msweet $"
*
* Scheduler notification tester for CUPS.
*
@@ -435,17 +435,10 @@ print_attributes(ipp_t *ipp, /* I - IPP request */
case IPP_TAG_DATE :
{
time_t vtime; /* Date/Time value */
struct tm *vdate; /* Date info */
char vstring[256]; /* Formatted time */
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
{
vtime = ippDateToTime(val->date);
vdate = localtime(&vtime);
strftime(vstring, sizeof(vstring), "%c", vdate);
printf(" (%s)", vstring);
}
printf(" (%s)", _cupsStrDate(vstring, sizeof(vstring), ippDateToTime(val->date)));
}
putchar('\n');
break;
@@ -519,5 +512,5 @@ usage(void)
/*
* End of "$Id: testsub.c 10996 2013-05-29 11:51:34Z msweet $".
* End of "$Id: testsub.c 11890 2014-05-22 13:59:21Z msweet $".
*/
+5 -5
Ver Arquivo
@@ -1,5 +1,5 @@
/*
* "$Id: tls-gnutls.c 3755 2012-03-30 05:59:14Z msweet $"
* "$Id: tls-gnutls.c 11899 2014-05-27 15:10:09Z msweet $"
*
* TLS support code for the CUPS scheduler using GNU TLS.
*
@@ -117,7 +117,7 @@ cupsdStartTLS(cupsd_client_t *con) /* I - Client connection */
gnutls_set_default_priority(con->http.tls);
gnutls_credentials_set(con->http.tls, GNUTLS_CRD_CERTIFICATE, *credentials);
gnutls_transport_set_ptr(con->http.tls, (gnutls_transport_ptr)HTTP(con));
gnutls_transport_set_ptr(con->http.tls, (gnutls_transport_ptr_t)HTTP(con));
gnutls_transport_set_pull_function(con->http.tls, _httpReadGNUTLS);
gnutls_transport_set_push_function(con->http.tls, _httpWriteGNUTLS);
@@ -152,8 +152,8 @@ cupsdStartTLS(cupsd_client_t *con) /* I - Client connection */
static int /* O - 1 on success, 0 on failure */
make_certificate(cupsd_client_t *con) /* I - Client connection */
{
gnutls_x509_crt crt; /* Self-signed certificate */
gnutls_x509_privkey key; /* Encryption key */
gnutls_x509_crt_t crt; /* Self-signed certificate */
gnutls_x509_privkey_t key; /* Encryption key */
cups_lang_t *language; /* Default language info */
cups_file_t *fp; /* Key/cert file */
unsigned char buffer[8192]; /* Buffer for x509 data */
@@ -288,5 +288,5 @@ make_certificate(cupsd_client_t *con) /* I - Client connection */
/*
* End of "$Id: tls-gnutls.c 3755 2012-03-30 05:59:14Z msweet $".
* End of "$Id: tls-gnutls.c 11899 2014-05-27 15:10:09Z msweet $".
*/
+31 -54
Ver Arquivo
@@ -1,9 +1,9 @@
/*
* "$Id: lpstat.c 11395 2013-11-06 20:06:50Z msweet $"
* "$Id: lpstat.c 11890 2014-05-22 13:59:21Z msweet $"
*
* "lpstat" command for CUPS.
*
* Copyright 2007-2013 by Apple Inc.
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -649,7 +649,6 @@ show_accepting(const char *printers, /* I - Destinations */
*message; /* Printer device URI */
int accepting; /* Accepting requests? */
time_t ptime; /* Printer state time */
struct tm *pdate; /* Printer state date & time */
char printer_state_time[255];/* Printer state time */
static const char *pattrs[] = /* Attributes we need for printers... */
{
@@ -772,8 +771,7 @@ show_accepting(const char *printers, /* I - Destinations */
if (match_list(printers, printer))
{
pdate = localtime(&ptime);
strftime(printer_state_time, sizeof(printer_state_time), "%c", pdate);
_cupsStrDate(printer_state_time, sizeof(printer_state_time), ptime);
if (accepting)
_cupsLangPrintf(stdout, _("%s accepting requests since %s"),
@@ -1323,7 +1321,6 @@ show_jobs(const char *dests, /* I - Destinations */
jobid, /* job-id */
size; /* job-k-octets */
time_t jobtime; /* time-at-creation */
struct tm *jobdate; /* Date & time */
char temp[255], /* Temporary buffer */
date[255]; /* Date buffer */
static const char *jattrs[] = /* Attributes we need for jobs... */
@@ -1481,62 +1478,44 @@ show_jobs(const char *dests, /* I - Destinations */
if (match_list(dests, dest) && match_list(users, username))
{
jobdate = localtime(&jobtime);
snprintf(temp, sizeof(temp), "%s-%d", dest, jobid);
if (long_status == 3)
{
/*
* Show the consolidated output format for the SGI tools...
*/
_cupsStrDate(date, sizeof(date), jobtime);
if (!strftime(date, sizeof(date), "%b %d %H:%M", jobdate))
strlcpy(date, "Unknown", sizeof(date));
_cupsLangPrintf(stdout, "%s;%s;%d;%s;%s",
temp, username ? username : "unknown",
size, title ? title : "unknown", date);
}
if (ranking)
_cupsLangPrintf(stdout, "%3d %-21s %-13s %8.0f %s",
rank, temp, username ? username : "unknown",
1024.0 * size, date);
else
_cupsLangPrintf(stdout, "%-23s %-13s %8.0f %s",
temp, username ? username : "unknown",
1024.0 * size, date);
if (long_status)
{
if (!strftime(date, sizeof(date), "%c", jobdate))
strlcpy(date, "Unknown", sizeof(date));
if (message)
_cupsLangPrintf(stdout, _("\tStatus: %s"), message);
if (ranking)
_cupsLangPrintf(stdout, "%3d %-21s %-13s %8.0f %s",
rank, temp, username ? username : "unknown",
1024.0 * size, date);
else
_cupsLangPrintf(stdout, "%-23s %-13s %8.0f %s",
temp, username ? username : "unknown",
1024.0 * size, date);
if (long_status)
{
if (message)
_cupsLangPrintf(stdout, _("\tStatus: %s"), message);
if (reasons)
{
char alerts[1024], /* Alerts string */
*aptr; /* Pointer into alerts string */
if (reasons)
for (i = 0, aptr = alerts; i < reasons->num_values; i ++)
{
char alerts[1024], /* Alerts string */
*aptr; /* Pointer into alerts string */
if (i)
snprintf(aptr, sizeof(alerts) - (aptr - alerts), " %s",
reasons->values[i].string.text);
else
strlcpy(alerts, reasons->values[i].string.text,
sizeof(alerts));
for (i = 0, aptr = alerts; i < reasons->num_values; i ++)
{
if (i)
snprintf(aptr, sizeof(alerts) - (aptr - alerts), " %s",
reasons->values[i].string.text);
else
strlcpy(alerts, reasons->values[i].string.text,
sizeof(alerts));
aptr += strlen(aptr);
}
_cupsLangPrintf(stdout, _("\tAlerts: %s"), alerts);
aptr += strlen(aptr);
}
_cupsLangPrintf(stdout, _("\tqueued for %s"), dest);
_cupsLangPrintf(stdout, _("\tAlerts: %s"), alerts);
}
_cupsLangPrintf(stdout, _("\tqueued for %s"), dest);
}
}
@@ -1579,7 +1558,6 @@ show_printers(const char *printers, /* I - Destinations */
ipp_pstate_t pstate; /* Printer state */
cups_ptype_t ptype; /* Printer type */
time_t ptime; /* Printer state time */
struct tm *pdate; /* Printer state date & time */
int jobid; /* Job ID of current job */
char printer_uri[HTTP_MAX_URI],
/* Printer URI */
@@ -1823,8 +1801,7 @@ show_printers(const char *printers, /* I - Destinations */
* Display it...
*/
pdate = localtime(&ptime);
strftime(printer_state_time, sizeof(printer_state_time), "%c", pdate);
_cupsStrDate(printer_state_time, sizeof(printer_state_time), ptime);
switch (pstate)
{
@@ -2105,5 +2082,5 @@ show_scheduler(void)
/*
* End of "$Id: lpstat.c 11395 2013-11-06 20:06:50Z msweet $".
* End of "$Id: lpstat.c 11890 2014-05-22 13:59:21Z msweet $".
*/
+2 -2
Ver Arquivo
@@ -17,7 +17,7 @@
<OPTION VALUE="move-jobs">Mou totes les tasques</OPTION>
<OPTION VALUE="purge-jobs">Cancel&middot;la totes les tasques</OPTION>
</SELECT>
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
<NOSCRIPT><INPUT TYPE="SUBMIT" VALUE="Go"></NOSCRIPT>
</FORM>
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
@@ -31,7 +31,7 @@
<OPTION VALUE="set-as-default">Configura com a servidor per defecte</OPTION>
<OPTION VALUE="set-allowed-users">Configura els permisos dels usuaris</OPTION>
</SELECT>
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
<NOSCRIPT><INPUT TYPE="SUBMIT" VALUE="Go"></NOSCRIPT>
</FORM>
<TABLE SUMMARY="{printer_name}">
+2 -2
Ver Arquivo
@@ -17,7 +17,7 @@
<OPTION VALUE="move-jobs">Přesun všech úloh</OPTION>
<OPTION VALUE="purge-jobs">Výmaz všech úloh</OPTION>
</SELECT>
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
<NOSCRIPT><INPUT TYPE="SUBMIT" VALUE="Go"></NOSCRIPT>
</FORM>
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
@@ -31,7 +31,7 @@
<OPTION VALUE="set-as-default">Nastavení jako výchozí na serveru</OPTION>
<OPTION VALUE="set-allowed-users">Nastavení přístupu uživatelů</OPTION>
</SELECT>
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
<NOSCRIPT><INPUT TYPE="SUBMIT" VALUE="Go"></NOSCRIPT>
</FORM>
<TABLE SUMMARY="{printer_name}">
+40
Ver Arquivo
@@ -0,0 +1,40 @@
<DIV CLASS="indent">
<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 au&szlig;er "/", "#", 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>
</DIV>
+52
Ver Arquivo
@@ -0,0 +1,52 @@
<DIV CLASS="indent">
<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 alle druckbaren Zeichen au&szlig;er "/", "#", und Leerzeichen enthalten)</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>(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" VALUE="{?PRINTER_LOCATION}"><BR>
<SMALL>(Für Menschen lesbarer Ort wie "Lab 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:}>
Diesen Drucker im Netz freigeben</TD>
</TR>
<TR>
<TH CLASS="label">Farbmanagement:</TH>
<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_COLORMANAGED" {PRINTER_IS_COLORMANAGED=1?CHECKED:}>
Einschalten</TD>
</TR>
<TR>
<TD></TD>
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
</TR>
</TABLE>
</FORM>
</DIV>
+44
Ver Arquivo
@@ -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 Gestoppt<BR>
<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_CONFIG_CHANGED" {?EVENT_JOB_CONFIG_CHANGED}>Auftrags Parameter Geändert</TD>
<TD>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_STOPPED" {?EVENT_PRINTER_STOPPED}>Warteschlange Gestoppt<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>&nbsp;&nbsp;&nbsp;&nbsp;</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 Gestoppt<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>
+110
Ver Arquivo
@@ -0,0 +1,110 @@
<TABLE CLASS="indent" SUMMARY="Administrative Tätigkeiten">
<TR><TD VALIGN="TOP">
<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="Drucker hinzufügen"></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="Verfügbare Drucker auflisten"></FORM>
<FORM ACTION="/printers/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Drucker verwalten"></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="Drucker für Samba freigeben"></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="Klassen verwalten"></FORM>
</P>
<H2 CLASS="title">Druckaufträge</H2>
<P>
<FORM ACTION="/jobs/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Aufträge verwalten"></FORM>
</P>
</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
<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="Zugriffsprotokoll betrachten"></FORM>
<FORM ACTION="/admin/log/error_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Fehlerprotokoll betrachten"></FORM>
<FORM ACTION="/admin/log/page_log" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Seitenprotokoll betrachten"></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>Erweiterte Servereinstellungen\:</B></P>
<P><A HREF="/admin/">Erweitert <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
<INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
<INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Zeige freigegebene Drucker von anderen Systemen<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protokolle\:
<INPUT TYPE="CHECKBOX" NAME="BROWSE_REMOTE_CUPS" {?browse_remote_cups}> CUPS
{HAVE_LDAP?<INPUT TYPE="CHECKBOX" NAME="BROWSE_REMOTE_LDAP" {?browse_remote_ldap}> LDAP:}
{HAVE_LIBSLP?<INPUT TYPE="CHECKBOX" NAME="BROWSE_REMOTE_SLP" {?browse_remote_slp}> SLP:}<BR>
<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Freigeben von Druckern welche mit diesem System verbunden sind<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Klienten maximal\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protokolle\:
<INPUT TYPE="CHECKBOX" NAME="BROWSE_LOCAL_CUPS" {?browse_local_cups}> CUPS
{HAVE_DNSSD?<INPUT TYPE="CHECKBOX" NAME="BROWSE_LOCAL_DNSSD" {?browse_local_dnssd}> DNS-SD:}
{HAVE_LDAP?<INPUT TYPE="CHECKBOX" NAME="BROWSE_LOCAL_LDAP" {?browse_local_ldap}> LDAP:}
{HAVE_LIBSLP?<INPUT TYPE="CHECKBOX" NAME="BROWSE_LOCAL_SLP" {?browse_local_slp}> SLP:}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Erlaube Drucken vom Internet aus<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" {?browse_web_if}> Veröffentliche Webinterface<BR>
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Erlaube entfernte Verwaltung<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 jeden Auftrag abzubrechen (nicht nur die Eigenen)<BR>
<INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOB_HISTORY" {?preserve_job_history}> Auftragsverlauf aufbewahren<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Anzahl der Aufträge\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOB_FILES" {?preserve_job_files}> Dateien von Druckaufträgen aufbewahren<BR>
<INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Speichere Fehlerinformationen für Fehlersuche<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maximale Grösse der Protokolldatei\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
:<P><B>Grundlegende Servereinstellungen:</B></P>
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Erweitert <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
<INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Zeige freigegebene Drucker von anderen Systemen<BR>
<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Freigeben von Druckern welche mit diesem System verbunden sind<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Erlaube Drucken vom Internet aus<BR>
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Erlaube entfernte Verwaltung<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 jeden Auftrag abzubrechen (nicht nur die Eigenen)<BR>
<INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Speichere Fehlerinformationen für Fehlersuche</P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Einstellungen ändern"></P>
</FORM>}
</TD></TR>
</TABLE>
<DIV CLASS="indent">
<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>
</DIV>
{notify_subscription_id?<TABLE CLASS="list" SUMMARY=">RSS Subskriptionen">
<THEAD><TR><TH>Name</TH><TH>Ereignis</TH><TH>Warteschlange</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>&nbsp;</TD><TD>{notify_events}</TD><TD NOWRAP>&nbsp;{notify_printer_name?{notify_printer_name}:Alle Warteschlangen}</TD></TR>}
</TBODY>
</TABLE>:}
+53
Ver Arquivo
@@ -0,0 +1,53 @@
<DIV CLASS="indent">
<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>}
</DIV>
+68
Ver Arquivo
@@ -0,0 +1,68 @@
<DIV CLASS="indent">
<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">Farbmanagement:</TH>
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_IS_COLORMANAGED" VALUE="{?printer_is_colormanaged}">{?printer_is_colormanaged=?Not:{?printer_is_colormanaged=0?Not:}} Enabled</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>&nbsp;</TD>
</TR>
<TR>
<TH CLASS="label">Oder stellen Sie eine PPD Datei bereit:</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>
</DIV>
+65
Ver Arquivo
@@ -0,0 +1,65 @@
<DIV CLASS="indent">
<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">Farmbmanagement:</TH>
<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_IS_COLORMANAGED" VALUE="{?printer_is_colormanaged}">
{?printer_is_colormanaged=?Eingeschaltet:{?printer_is_colormanaged=0?Ausgeschaltet:}} Eingeschaltet</TD>
</TR>
<TR>
<TH CLASS="label">Marke:</TH>
<TD>{PPD_MAKE} <INPUT TYPE="SUBMIT" NAME="SELECT_MAKE" VALUE="Andere(n) Marke/Hersteller auswä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 stellen Sie eine PPD Datei bereit:</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>
</DIV>
+52
Ver Arquivo
@@ -0,0 +1,52 @@
<DIV CLASS="indent">
<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">Flu&szlig;kontrolle:</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>
</DIV>

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais