Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 71f63681cb |
@@ -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.
|
||||
|
||||
+47
-1
@@ -1,6 +1,52 @@
|
||||
CHANGES.txt - 1.7.1 - 2014-01-08
|
||||
CHANGES.txt - 1.7.2 - 2014-04-10
|
||||
--------------------------------
|
||||
|
||||
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 #nnn)
|
||||
- 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
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v1.7.1 - 2014-01-08
|
||||
INSTALL - CUPS v1.7.2 - 2014-04-10
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
|
||||
+2
-2
@@ -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
@@ -1,4 +1,4 @@
|
||||
README - CUPS v1.7.1 - 2014-01-08
|
||||
README - CUPS v1.7.2 - 2014-04-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.
|
||||
|
||||
+12
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: dnssd.c 4074 2012-12-12 20:54:21Z msweet $"
|
||||
* "$Id: dnssd.c 11623 2014-02-19 20:18:10Z msweet $"
|
||||
*
|
||||
* DNS-SD discovery backend for CUPS.
|
||||
*
|
||||
@@ -95,6 +95,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 +346,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 +560,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 +716,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1320,5 +1329,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 11623 2014-02-19 20:18:10Z msweet $".
|
||||
*/
|
||||
|
||||
+31
-9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: ipp.c 11495 2013-12-22 05:29:16Z msweet $"
|
||||
* "$Id: ipp.c 11779 2014-03-28 20:48:44Z msweet $"
|
||||
*
|
||||
* IPP backend for CUPS.
|
||||
*
|
||||
@@ -2877,19 +2877,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);
|
||||
@@ -2985,6 +3005,8 @@ password_cb(const char *prompt, /* I - Prompt (not used) */
|
||||
{
|
||||
(*password_tries) ++;
|
||||
|
||||
cupsSetUser(username);
|
||||
|
||||
return (password);
|
||||
}
|
||||
else
|
||||
@@ -3680,5 +3702,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 11779 2014-03-28 20:48:44Z msweet $".
|
||||
*/
|
||||
|
||||
+43
-36
@@ -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 $".
|
||||
*/
|
||||
|
||||
@@ -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 $".
|
||||
*/
|
||||
|
||||
@@ -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.2
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -303,16 +303,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 +324,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
+30
-52
@@ -2517,7 +2517,7 @@ esac
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
CUPS_VERSION=1.7.1
|
||||
CUPS_VERSION=1.7.2
|
||||
CUPS_REVISION=
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -5500,12 +5500,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 +5512,7 @@ if test "${with_dbusdir+set}" = set; then :
|
||||
fi
|
||||
|
||||
|
||||
DBUSDIR=""
|
||||
DBUS_NOTIFIER=""
|
||||
DBUS_NOTIFIERLIBS=""
|
||||
|
||||
@@ -5539,9 +5534,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 +6953,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 +7970,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 :
|
||||
|
||||
@@ -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
@@ -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 < q)
|
||||
{
|
||||
*q = '\0';
|
||||
return (q);
|
||||
}
|
||||
|
||||
*qptr++ = '\'';
|
||||
*qptr++ = '\"';
|
||||
|
||||
while (*s && qptr < qend)
|
||||
{
|
||||
if (*s == '\\' || *s == '\"' || *s == '\'')
|
||||
{
|
||||
if (qptr < (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
-13
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
* "$Id: cups.h 11367 2013-10-28 15:35:57Z msweet $"
|
||||
* "$Id: cups.h 11551 2014-01-29 16:31:35Z 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_
|
||||
@@ -53,10 +53,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0701
|
||||
# define CUPS_VERSION 1.0702
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 7
|
||||
# define CUPS_VERSION_PATCH 1
|
||||
# define CUPS_VERSION_PATCH 2
|
||||
|
||||
# define CUPS_BC_FD 3
|
||||
/* Back-channel file descriptor for
|
||||
@@ -627,5 +627,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 11551 2014-01-29 16:31:35Z msweet $".
|
||||
*/
|
||||
|
||||
+36
-7
@@ -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 $".
|
||||
*/
|
||||
|
||||
+10
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: encode.c 11115 2013-07-10 14:35:53Z msweet $"
|
||||
* "$Id: encode.c 11734 2014-03-25 18:01:47Z msweet $"
|
||||
*
|
||||
* Option encoding routines for CUPS.
|
||||
*
|
||||
@@ -41,7 +41,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 +54,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 +64,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,6 +73,7 @@ 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,
|
||||
@@ -872,5 +878,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 11734 2014-03-25 18:01:47Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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 $".
|
||||
*/
|
||||
|
||||
@@ -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
@@ -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
@@ -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 $".
|
||||
*/
|
||||
|
||||
+17
-15
@@ -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 $".
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: request.c 11174 2013-07-23 12:33:52Z msweet $"
|
||||
* "$Id: request.c 11739 2014-03-26 21:06:04Z 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);
|
||||
@@ -1177,5 +1177,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 11739 2014-03-26 21:06:04Z msweet $".
|
||||
*/
|
||||
|
||||
+12
-29
@@ -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 $".
|
||||
*/
|
||||
|
||||
@@ -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
@@ -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 $".
|
||||
*/
|
||||
|
||||
+8
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* "$Id: usersys.c 11510 2014-01-08 16:00:25Z msweet $"
|
||||
* "$Id: usersys.c 11689 2014-03-05 21:22:12Z msweet $"
|
||||
*
|
||||
* User, system, and password routines for CUPS.
|
||||
*
|
||||
@@ -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)
|
||||
{
|
||||
/*
|
||||
@@ -851,6 +854,7 @@ _cupsSetDefaults(void)
|
||||
|
||||
if ((cups_user = getenv("CUPS_USER")) == NULL)
|
||||
{
|
||||
#ifndef WIN32
|
||||
/*
|
||||
* Try the USER environment variable...
|
||||
*/
|
||||
@@ -868,6 +872,7 @@ _cupsSetDefaults(void)
|
||||
if ((pw = getpwnam(cups_user)) == NULL || pw->pw_uid != getuid())
|
||||
cups_user = NULL;
|
||||
}
|
||||
#endif /* !WIN32 */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1136,5 +1141,5 @@ cups_read_client_conf(
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id: usersys.c 11510 2014-01-08 16:00:25Z msweet $".
|
||||
* End of "$Id: usersys.c 11689 2014-03-05 21:22:12Z msweet $".
|
||||
*/
|
||||
|
||||
@@ -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="/"> Startseite </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Verwaltung </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Klassen </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Online- Hilfe </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Aufträge </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Drucker </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>®</SUP> X und
|
||||
andere UNIX<SUP>®</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/newsgroups.php?gcups.general">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>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Druckertreiber finden</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/newsgroups.php?gcups.development">Entwicklerforum</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </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>
|
||||
@@ -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 < q)
|
||||
{
|
||||
*q = '\0';
|
||||
return (q);
|
||||
}
|
||||
|
||||
*qptr++ = '\'';
|
||||
*qptr++ = '\"';
|
||||
|
||||
while (*s && qptr < qend)
|
||||
{
|
||||
if (*s == '\\' || *s == '\"' || *s == '\'')
|
||||
{
|
||||
if (qptr < (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
|
||||
|
||||
@@ -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"> CUPS 1.2/OS X 10.5 </span></dt>
|
||||
<dd class="description">Create a job subscription </dd>
|
||||
<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTION <span class="info"> CUPS 1.2/OS X 10.5 </span></dt>
|
||||
<dd class="description">Create a printer subscription </dd>
|
||||
<dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info"> CUPS 1.2/OS X 10.5 </span></dt>
|
||||
<dd class="description">Create one of more job subscriptions </dd>
|
||||
<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info"> CUPS 1.2/OS X 10.5 </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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
@@ -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 $".
|
||||
*/
|
||||
|
||||
+478
-474
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -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.";
|
||||
|
||||
+4
-1
@@ -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-03-28 11:06-0400\n"
|
||||
"PO-Revision-Date: 2012-09-29 11:21+0200\n"
|
||||
"Last-Translator: Àngel Mompó <mecatxis@gmail.com>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
@@ -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."
|
||||
|
||||
+8739
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+4
-1
@@ -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-03-28 11:06-0400\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."
|
||||
|
||||
|
||||
+4
-1
@@ -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-03-28 11:06-0400\n"
|
||||
"PO-Revision-Date: 2012-12-12 11:12+0100\n"
|
||||
"Last-Translator: denis meramdjougoma <dcmeram@libertysurf.fr>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
+339
-1964
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+84
-1813
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+4
-1
@@ -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-03-28 11:06-0400\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 ""
|
||||
|
||||
|
||||
+15
-14
@@ -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
@@ -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
@@ -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 $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $"
|
||||
# "$Id: cups.spec.in 11808 2014-04-10 15:11:43Z msweet $"
|
||||
#
|
||||
# RPM "spec" file for CUPS.
|
||||
#
|
||||
@@ -40,12 +40,12 @@
|
||||
|
||||
Summary: CUPS
|
||||
Name: cups
|
||||
Version: 1.7.1
|
||||
Version: 1.7.2
|
||||
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.2/cups-1.7.2-source.tar.bz2
|
||||
Url: http://www.cups.org
|
||||
Packager: Anonymous <anonymous@foo.com>
|
||||
Vendor: Apple Inc.
|
||||
@@ -273,6 +273,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
|
||||
@@ -288,6 +290,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
|
||||
@@ -392,5 +396,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 11808 2014-04-10 15:11:43Z msweet $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec.in 11516 2014-01-08 16:24:32Z msweet $"
|
||||
# "$Id: cups.spec.in 11808 2014-04-10 15:11:43Z msweet $"
|
||||
#
|
||||
# RPM "spec" file for CUPS.
|
||||
#
|
||||
@@ -273,6 +273,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
|
||||
@@ -288,6 +290,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
|
||||
@@ -392,5 +396,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 11808 2014-04-10 15:11:43Z msweet $".
|
||||
#
|
||||
|
||||
+32
-41
@@ -1,46 +1,19 @@
|
||||
/*
|
||||
* "$Id: client.c 11308 2013-09-27 14:09:25Z msweet $"
|
||||
* "$Id: client.c 11642 2014-02-27 15:57:59Z 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -2884,6 +2857,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 +2910,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;
|
||||
|
||||
@@ -3707,6 +3690,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 +4370,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 11642 2014-02-27 15:57:59Z msweet $".
|
||||
*/
|
||||
|
||||
+18
-28
@@ -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
@@ -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 $".
|
||||
*/
|
||||
|
||||
+422
-278
@@ -1,46 +1,16 @@
|
||||
/*
|
||||
* "$Id: dirsvc.c 11193 2013-07-26 03:12:37Z msweet $"
|
||||
* "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z 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 */
|
||||
|
||||
@@ -284,11 +241,7 @@ cupsdStartBrowsing(void)
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -299,9 +252,6 @@ cupsdStartBrowsing(void)
|
||||
void
|
||||
cupsdStopBrowsing(void)
|
||||
{
|
||||
cupsd_printer_t *p; /* Current printer */
|
||||
|
||||
|
||||
if (!Browsing || !BrowseLocalProtocols)
|
||||
return;
|
||||
|
||||
@@ -309,11 +259,7 @@ cupsdStopBrowsing(void)
|
||||
* 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...
|
||||
@@ -344,161 +290,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 +525,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 +690,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 +700,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 +857,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 +958,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 +997,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 +1122,8 @@ dnssdRegisterInstance(
|
||||
name);
|
||||
}
|
||||
|
||||
avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
if (!from_callback)
|
||||
avahi_threaded_poll_unlock(DNSSDMaster);
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
if (error)
|
||||
@@ -1190,7 +1145,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 +1155,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 +1212,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 +1226,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 +1250,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 +1279,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 +1332,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.
|
||||
*/
|
||||
@@ -1670,5 +1814,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 11688 2014-03-05 21:11:32Z msweet $".
|
||||
*/
|
||||
|
||||
+55
-57
@@ -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
@@ -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
@@ -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
@@ -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 $".
|
||||
*/
|
||||
|
||||
@@ -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ß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>
|
||||
@@ -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ß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>
|
||||
@@ -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> </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> </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>
|
||||
@@ -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> </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>▼</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>
|
||||
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>
|
||||
Klienten maximal\:
|
||||
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
|
||||
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>
|
||||
<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Erlaube Drucken vom Internet aus<BR>
|
||||
<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>
|
||||
Anzahl der Aufträge\:
|
||||
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
|
||||
<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>
|
||||
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>▶</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>
|
||||
<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> </TD><TD>{notify_events}</TD><TD NOWRAP> {notify_printer_name?{notify_printer_name}:Alle Warteschlangen}</TD></TR>}
|
||||
</TBODY>
|
||||
</TABLE>:}
|
||||
@@ -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>
|
||||
|
||||
@@ -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> </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>
|
||||
@@ -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>
|
||||
@@ -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ß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>
|
||||
@@ -0,0 +1,44 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">{op=modify-printer?{printer_name} ändern:Drucker hinzufügen (Schritt2/5)}</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="/admin">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{printer_name?<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">:}
|
||||
<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{?current_make_and_model}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Verbindungs-URI:</TH>
|
||||
<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD>Beispiele:
|
||||
<PRE>
|
||||
http://Hostname:631/ipp/
|
||||
http://Hostname:631/ipp/Anschluss1
|
||||
|
||||
ipp://Hostname/ipp/
|
||||
ipp://Hostname/ipp/Anschluss1
|
||||
|
||||
lpd://Hostname/Warteschlange
|
||||
|
||||
socket://Hostname
|
||||
socket://Hostname:9100
|
||||
</PRE>
|
||||
|
||||
<P>Bitte lesen Sie <A HREF="/help/network.html" TARGET="_blank">"Netzwerk
|
||||
Drucker"</A> um die korrekte URI für Ihren Drucker zu benutzen.</P>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="Weiter"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
</DIV>
|
||||
@@ -0,0 +1,8 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Klasse hinzufügen</H2>
|
||||
|
||||
<P>Die Klasse <A HREF="/classes/{printer_name}">{printer_name}</A> wurde erfolgreich
|
||||
hinzugefügt.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,10 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Klasse {printer_name} löschen</H2>
|
||||
|
||||
<P><B>Warnung:</B> Sind Sie sicher, dass Sie die Klasse
|
||||
{printer_name} löschen wollen?</P>
|
||||
|
||||
<P ALIGN="CENTER"><FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="op" VALUE="delete-class"><INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}"><INPUT TYPE="SUBMIT" NAME="confirm" VALUE="Klasse löschen"></FORM></P>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,7 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Klasse {printer_name} löschen</H2>
|
||||
|
||||
<P>Die Klasse {printer_name} wurde erfolgreich gelöscht.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,3 @@
|
||||
<DIV CLASS="indent">
|
||||
<H3 CLASS="title">Aufträge</H3>
|
||||
</DIV>
|
||||
@@ -0,0 +1,8 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Klasse {printer_name} ändern</H2>
|
||||
|
||||
<P>Die Klasse <A HREF="/classes/{printer_name}">{printer_name}</A> wurde
|
||||
erfolgreich geändert.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,44 @@
|
||||
<DIV CLASS="indent">
|
||||
<H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>
|
||||
({printer_state=3?Im Leerlauf:{printer_state=4?Beschäftigt:Angehalten}},
|
||||
{printer_is_accepting_jobs=0?Aufträge werden ablehnt:Aufträge werden akzeptiert},
|
||||
{server_is_sharing_printers=0?Keine (Server):{printer_is_shared=0?Keine:}} Netzfreigabe{default_name={printer_name}?, Standarddrucker:})</H2>
|
||||
|
||||
<FORM METHOD="POST" ACTION="{printer_uri_supported}" NAME="maintenance">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<SELECT NAME="OP" ONCHANGE="document.maintenance.submit();">
|
||||
<OPTION VALUE="">Wartung</OPTION>
|
||||
<OPTION VALUE="print-test-page">Drucke Testseite</OPTION>
|
||||
{printer_state=5?<OPTION VALUE="start-class">Klasse starten</OPTION>:<OPTION VALUE="stop-class">Klasse stoppen</OPTION>}
|
||||
{printer_is_accepting_jobs=0?<OPTION VALUE="accept-jobs">Aufträge akzeptieren</OPTION>:<OPTION VALUE="reject-jobs">Aufträge ablehnen</OPTION>}
|
||||
<OPTION VALUE="move-jobs">Alle Aufträge verschieben</OPTION>
|
||||
<OPTION VALUE="purge-jobs">Alle Aufträge abbrechen</OPTION>
|
||||
</SELECT>
|
||||
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
|
||||
</FORM>
|
||||
|
||||
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
|
||||
<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
|
||||
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
|
||||
<OPTION VALUE="">Administration</OPTION>
|
||||
<OPTION VALUE="modify-class">Klasse ändern</OPTION>
|
||||
<OPTION VALUE="delete-class">Klasse löschen</OPTION>
|
||||
<OPTION VALUE="set-class-options">Standardeinstellungen festlegen</OPTION>
|
||||
<OPTION VALUE="set-as-default">Als Standard festlegen</OPTION>
|
||||
<OPTION VALUE="set-allowed-users">Erlaubte Benutzer festlegen</OPTION>
|
||||
</SELECT>
|
||||
<INPUT TYPE="SUBMIT" VALUE="Go" STYLE="display: none;">
|
||||
</FORM>
|
||||
|
||||
<TABLE SUMMARY="{printer_name}">
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Beschreibung:</TH><TD>{printer_info}</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Ort:</TH><TD>{printer_location}</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Mitglieder:</TH><TD>{?member_uris=?None:{member_uris}}</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Standardeinstellungen:</TH><TD>job-sheets={job_sheets_default}
|
||||
media={media_default?{media_default}:unbekannt}
|
||||
{sides_default?sides={sides_default}:}</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1 @@
|
||||
<P ALIGN="CENTER">{total=0?Keine Klassen:Zeige {#printer_name} von {total} Klasse{total=1?:n}}.</P>
|
||||
@@ -0,0 +1,11 @@
|
||||
{#printer_name=0?:
|
||||
<TABLE CLASS="list" SUMMARY="Class List">
|
||||
<THEAD>
|
||||
<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> Wartweschlange <SMALL>▲</SMALL>:<SMALL>▼</SMALL> Warteschlange <SMALL>▼</SMALL>}</A></TH><TH>Beschreibung</TH><TH>Ort</TH><TH>Mitglieder</TH><TH>Status</TH></TR>
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
{[printer_name]
|
||||
<TR><TD><A HREF="{printer_uri_supported}">{printer_name}</A></TD><TD>{printer_info}</TD><TD>{printer_location}</TD><TD>{?member_uris=?Keine:{member_uris}}</TD><TD>{printer_state=3?Im Leerlauf:{printer_state=4?Beschäftigt:Angehalten}}{printer_state_message? - "{printer_state_message}":}</TD></TR>
|
||||
}
|
||||
</TBODY>
|
||||
</TABLE></DIV>}
|
||||
@@ -0,0 +1,12 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">{title} auf {printer_name}</H2>
|
||||
|
||||
<P>{job_state>5?:<IMG SRC="/images/wait.gif" WIDTH="16" HEIGHT="16"
|
||||
ALIGN="ABSMIDDLE" ALT="Busy Indicator"> }Drucker Befehlsauftrag
|
||||
{job_state=3?unerledigt:{job_state=4?gehalten:
|
||||
{job_state=5?verarbeite:{job_state=6?gestoppt:
|
||||
{job_state=7?gelöscht:{job_state=8?abgebrochen:beendet}}}}}}{job_state=9?:{job_printer_state_message?,
|
||||
<EM>"{job_printer_state_message}"</EM>:}}</P>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,24 @@
|
||||
<SCRIPT TYPE="text/javascript">
|
||||
function reset_config()
|
||||
{
|
||||
document.cups.CUPSDCONF.value = "{?cupsdconf_default}";
|
||||
}
|
||||
</SCRIPT>
|
||||
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Konfigurationsdatei ändern</H2>
|
||||
|
||||
<FORM NAME="cups" METHOD="POST" ACTION="/admin/">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
|
||||
|
||||
<TEXTAREA NAME="CUPSDCONF" COLS="80" ROWS="25">{CUPSDCONF}</TEXTAREA>
|
||||
|
||||
<P><INPUT TYPE="SUBMIT" NAME="SAVECHANGES" VALUE="Änderungen speichern">
|
||||
<INPUT TYPE="BUTTON" VALUE="Standard Konfigurationsdatei verwenden"
|
||||
onClick="reset_config();"></P>
|
||||
|
||||
</FORM>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,9 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">{?title} {?printer_name} Error</H2>
|
||||
|
||||
<P>Fehler:</P>
|
||||
|
||||
<BLOCKQUOTE>Unbekannte Operation "{op}"!</BLOCKQUOTE>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,9 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">{?title} {?printer_name} Error</H2>
|
||||
|
||||
<P>{?message?{message}:Fehler:}</P>
|
||||
|
||||
<BLOCKQUOTE>{error}</BLOCKQUOTE>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,38 @@
|
||||
<!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>{title} - @CUPS_VERSION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
{refresh_page?<META HTTP-EQUIV="Refresh" CONTENT="{refresh_page}">:}
|
||||
<SCRIPT TYPE="text/javascript"><!--
|
||||
/* Show an error if cookies are disabled */
|
||||
function check_cookies() {
|
||||
if (!navigator.cookieEnabled) {
|
||||
document.getElementById('body').innerHTML = 'This page uses cookies to prevent common cross-site attacks. Please enable cookies in your browser.';
|
||||
}
|
||||
}
|
||||
--></SCRIPT>
|
||||
</HEAD>
|
||||
<BODY ONLOAD="check_cookies();">
|
||||
<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="unsel"><A HREF="/"> Startseite </A></TD>
|
||||
<TD CLASS="{SECTION=admin?:un}sel"><A HREF="/admin"> Administration </A></TD>
|
||||
<TD CLASS="{SECTION=classes?:un}sel"><A HREF="/classes/"> Klassen </A></TD>
|
||||
<TD CLASS="{SECTION=help?:un}sel"><A HREF="/help/"> Online Hilfe </A></TD>
|
||||
<TD CLASS="{SECTION=jobs?:un}sel"><A HREF="/jobs/"> Aufträge </A></TD>
|
||||
<TD CLASS="{SECTION=printers?:un}sel"><A HREF="/printers/"> Drucker </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Sucher in der Hilfe"
|
||||
VALUE="{SECTION=help?{?QUERY}:}" AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
<TR><TD COLSPAN="9"> </TD></TR>
|
||||
</TABLE>
|
||||
<DIV ID="body">
|
||||
@@ -0,0 +1,51 @@
|
||||
<DIV CLASS="indent">
|
||||
<FORM ACTION="/help/{?HELPFILE}" METHOD="GET">
|
||||
{TOPIC?<INPUT TYPE="HIDDEN" NAME="TOPIC" VALUE="{TOPIC}">:}
|
||||
|
||||
<P ALIGN="CENTER"><B>Suche in
|
||||
{HELPTITLE?{HELPTITLE}:{TOPIC?{TOPIC}:allen Dokumenten}}:</B> <INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" VALUE="{?QUERY}" SIZE="40" PLACEHOLDER=""
|
||||
AUTOSAVE="org.cups.help" RESULTS="20">
|
||||
<INPUT TYPE="SUBMIT" NAME="SEARCH" VALUE="Suchen">
|
||||
<INPUT TYPE="SUBMIT" NAME="CLEAR" VALUE="Leeren"></P>
|
||||
|
||||
</FORM>
|
||||
|
||||
<!-- Bookmarks -->
|
||||
<DIV CLASS="sidebar"><TABLE CLASS="inset" SUMMARY="Inhalt">
|
||||
<TR><TD>
|
||||
|
||||
<H3 CLASS="title">Online Hilfe Dokumente</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Alle Dokumente</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
}
|
||||
</TD></TR>
|
||||
</TABLE></DIV>
|
||||
|
||||
{QUERY?<P>Suchergebnisse in {HELPFILE?{HELPTITLE}:{TOPIC?{TOPIC}:allen Dokumenten}}\:</P>
|
||||
{QTEXT?<UL>
|
||||
{[QTEXT]<LI><A HREF="{QLINK}">{QTEXT}</A>{QPTEXT? (in <I><A HREF="{QPLINK}">{QPTEXT}</A></I>):}</LI>}
|
||||
{QTEXT?</UL>:}
|
||||
:<P>Keine Übereinstimmung gefunden.</P>}
|
||||
<HR NOSHADE>:}
|
||||
{HELPTITLE?<H1>{HELPTITLE}</H1>
|
||||
<FORM ACTION="/help/{?HELPFILE}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="PRINTABLE" VALUE="YES"><INPUT TYPE="SUBMIT" VALUE="Druckversion anzeigen"></FORM>:
|
||||
|
||||
<H1>CUPS Hilfeseiten</H1>
|
||||
|
||||
<P>Dies ist das CUPS online Hilfesystem. Geben Sie Ihren Suchbegriff
|
||||
oben ein oder klicken Sie auf einen der Dokumentationslinks
|
||||
um sich die Online Hilfe Informationen anzeigen zu lassen.</P>
|
||||
|
||||
<P>Wenn Sie noch unerfahren im Umgang mit CUPS sind, lesen Sie die "<a
|
||||
href="/help/overview.html">CUPS Übersicht</a>".
|
||||
Erfahrene Benutzer sollten "<a href="/help/whatsnew.html">Was ist neu in CUPS
|
||||
1.7</a>" lesen.</P>
|
||||
|
||||
<P>Die <A HREF="http://www.cups.org/">CUPS Webseite</A> bietet
|
||||
ebenfalls viele Angebote inklusive Diskussionsforen für Benutzer,
|
||||
Antworten auf häufig gestellte Fragen, und ein Formular für
|
||||
Fehlerberichte und Wünsche.</P>}
|
||||
@@ -0,0 +1,9 @@
|
||||
<!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>{HELPTITLE}</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups-printable.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
@@ -0,0 +1 @@
|
||||
</DIV>
|
||||
@@ -0,0 +1,7 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Auftrag {job_id} löschen</H2>
|
||||
|
||||
<P><A HREF="{job_printer_uri}">Auftrag {job_id}</A> wurde gelöscht.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,7 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Auftrag {job_id} anhalten</H2>
|
||||
|
||||
<P><A HREF="{job_printer_uri}">Auftrag {job_id}</A> wurde vom Drucken abgehalten.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,27 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<FORM METHOD="POST" ACTION="/{SECTION}/{job_id?:{printer_name}}">
|
||||
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
|
||||
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
|
||||
{job_id?<INPUT TYPE="HIDDEN" NAME="JOB_ID" VALUE="{job_id}">:}
|
||||
|
||||
<H2 CLASS="title">{job_id?Auftrag {job_id} verschieben:Alle Aufträge verschieben}</H2>
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Neues Ziel:</TH>
|
||||
<TD>
|
||||
<SELECT NAME="JOB_PRINTER_URI" SIZE="10">
|
||||
{[job_printer_uri]<OPTION VALUE="{job_printer_uri}">{job_printer_name}}
|
||||
</SELECT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD></TD>
|
||||
<TD><INPUT TYPE="SUBMIT" VALUE="{job_id?Auftrag verschieben:Aufträge verschieben}"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,8 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">{job_id?Auftrag {job_id} verschieben:Alle Aufträge verschieben}</H2>
|
||||
|
||||
<P>{job_id?<A HREF="/jobs/{job_id}">Auftrag {job_id}</A>:Alle Aufträge} nach
|
||||
<A HREF="{job_printer_uri}">{job_printer_name}</A> verschoben.</P>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,7 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Auftrag {job_id} freigeben</H2>
|
||||
|
||||
<P><A HREF="{job_printer_uri}">Auftrag {job_id}</A> wurde zum Drucken freigegeben.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,7 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Auftrag {job_id} neu starten</H2>
|
||||
|
||||
<P><A HREF="{job_printer_uri}">Auftrag {job_id}</A> wurde neu gestartet.
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,5 @@
|
||||
<DIV CLASS="indent">{?which_jobs=?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Aktive Aufträge anzeigen"></FORM>}
|
||||
{?which_jobs=completed?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="which_jobs" VALUE="completed"><INPUT TYPE="SUBMIT" VALUE="Fertige Aufträge anzeigen"></FORM>}
|
||||
{?which_jobs=all?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="which_jobs" VALUE="all"><INPUT TYPE="SUBMIT" VALUE="Alle Aufträge anzeigen"></FORM>}</DIV>
|
||||
|
||||
<P ALIGN="CENTER">{total=0?Keine Aufträge:Zeige {#job_id} von {total} {?which_jobs=?aktiven:{which_jobs=all?:beendeten}} {total=1?Auftrag:Aufträgen}}.</P>
|
||||
@@ -0,0 +1,37 @@
|
||||
{#job_id=0?:
|
||||
<TABLE CLASS="list" SUMMARY="Auftragsliste">
|
||||
<THEAD>
|
||||
<TR><TH><A HREF="{THISURL}?QUERY={?QUERY}&WHICH_JOBS={?WHICH_JOBS}&FIRST={FIRST}&ORDER={ORDER=dec?asc:dec}">{ORDER=dec?<SMALL>▲</SMALL> ID <SMALL>▲</SMALL>:<SMALL>▼</SMALL> ID <SMALL>▼</SMALL>}</A></TH><TH>Name</TH><TH>Benutzer</TH><TH>Grösse</TH><TH>Seiten</TH><TH>Status</TH><TH>Kontrolle</TH></TR>
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
{[job_id]
|
||||
<TR VALIGN="TOP">
|
||||
<TD><A HREF="{job_printer_uri}">{job_printer_name}</A>-{job_id} </TD>
|
||||
<TD>{?job_name=?Unbekannt:{job_name}} </TD>
|
||||
<TD>{job_originating_user_name} </TD>
|
||||
<TD>{job_k_octets}k </TD>
|
||||
<TD>{job_media_sheets_completed=0?Unbekannt:{?job_media_sheets_completed}} </TD>
|
||||
<TD>{job_state=3?unerledigt seit<BR>{time_at_creation}:{job_state=4?angehalten seit<BR>{time_at_creation}:
|
||||
{job_state=5?verarbeitet seit<BR>{time_at_processing}:{job_state=6?gestoppt:
|
||||
{job_state=7?gelöscht am<BR>{time_at_completed}:{job_state=8?abgebrochen:beendet am<BR>{time_at_completed}}}}}}} {job_printer_state_message?<BR>
|
||||
<EM>"{job_printer_state_message}"</EM>:}</TD>
|
||||
<TD>
|
||||
{job_preserved>0?{job_state>5?
|
||||
<FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="restart-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
|
||||
<INPUT TYPE="SUBMIT" VALUE="Auftrag neu drucken"></FORM>:}:}
|
||||
{job_state=4?
|
||||
<FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="release-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
|
||||
<INPUT TYPE="SUBMIT" VALUE="Auftrag freigeben"></FORM>:}
|
||||
{job_state=3?
|
||||
<FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="hold-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
|
||||
<INPUT TYPE="SUBMIT" VALUE="Auftrag anhalten"></FORM>:}
|
||||
{job_state<7?
|
||||
<FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="cancel-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
|
||||
<INPUT TYPE="SUBMIT" VALUE="Auftrag löschen"></FORM>
|
||||
<FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="move-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="SUBMIT" VALUE="Auftrag verschieben"></FORM>:}
|
||||
</TD>
|
||||
</TR>
|
||||
}
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Verfügbare Drucker</H2>
|
||||
|
||||
{#device_uri=0?<P>Keine Drucker gefunden.</P>
|
||||
:<UL>{[device_uri]
|
||||
<LI><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="HIDDEN" NAME="TEMPLATE_NAME" VALUE="{template_name}"><INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="Local Printer"><INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{device_make_and_model}"><INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}"><INPUT TYPE="SUBMIT" VALUE="Diesen Drucker hinzufügen"></FORM>
|
||||
{device_make_and_model} ({device_info})</LI>
|
||||
}</UL>}
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,34 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Klasse {printer_name} ändern</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="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Beschreibung:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" VALUE="{?printer_info}" SIZE="40" MAXLENGTH="127"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH CLASS="label">Ort:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" VALUE="{?printer_location}" SIZE="40" MAXLENGTH="127"></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 ändern"></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</FORM>
|
||||
</DIV>
|
||||
@@ -0,0 +1,46 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">{printer_name} ändern</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}">
|
||||
<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TH CLASS="label">Beschreibung:</TH>
|
||||
<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" VALUE="{?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" VALUE="{?printer_location}" SIZE="40" MAXLENGTH="127"><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>
|
||||
@@ -0,0 +1,8 @@
|
||||
<DIV CLASS="indent">
|
||||
|
||||
<H2 CLASS="title">Change Settings</H2>
|
||||
|
||||
<P>Der Server wurde nicht neu gestartet, da die Konfiguration
|
||||
nicht geändert wurde...</P>
|
||||
|
||||
</DIV>
|
||||
@@ -0,0 +1,6 @@
|
||||
<TR>
|
||||
<TH {conflicted=1?CLASS="conflict":CLASS="label"} WIDTH="50%"><A NAME="{keyword}">{keytext}</A>:</TH>
|
||||
<TD>
|
||||
{[choices]<INPUT TYPE="RADIO" NAME="{keyword-1}" {choices={defchoice-1}?CHECKED:} VALUE="{choices}">{text}}
|
||||
</TD>
|
||||
</TR>
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário