Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet a74847a90d Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.3rc2@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
179 arquivos alterados com 8384 adições e 8074 exclusões
+71 -1
Ver Arquivo
@@ -1,6 +1,76 @@
CHANGES.txt - 2007-07-12
CHANGES.txt - 2007-07-30
------------------------
CHANGES IN CUPS V1.3rc2
- Added more range checking to the pdftops filter.
- The scheduler would crash if a remote IPP queue was stopped
(STR #2460)
- The scheduler did not allow "DefaultAuthType None".
CHANGES IN CUPS V1.3rc1
- Updated the German localization (STR #2443)
- cupsAdminGetServerSettings() did not handle </Foo> properly.
- When lprm and cancel are run with no job ID, they now will
cancel the first stopped job if no pending or processing
jobs are left in the queue.
- The scheduler now logs successful print jobs, filter
failures, and the job file types at the default log
level (STR #2458)
- The scheduler now logs the usernames it is using for
authorization at LogLevel debug instead of debug2 (STR #2448)
- Added Intellitech Intellibar and Zebra CPCL PPDs to the list
of installed PPDs.
- Added 6" and 8" wide label sizes for the Zebra ZPL Label
Printer driver (STR #2442)
- The cupsaddsmb program and web interface now support
exporting of 64-bit Windows drivers, when available
(STR #2439)
- Moving a job that was printing did not stop the job on the
original printer (STR #2262)
- The cups-lpd mini-daemon did not work on Mac OS X server.
- Added httpGetAuthString() and httpSetAuthString() APIs to get
and set the current (cached) authorization string to use for
HTTP requests.
- Updated the default cupsd.conf policy to list the
"administrative" operations separately from the "printer
control" operations so that it is easier to define a
group of users that are "printer operators".
- The web interface now pulls the default cupsd.conf file
from cupsd.conf.default in the CUPS config directory.
- Added a help file for using Kerberos with CUPS.
- The scheduler now strips the "@KDC" portion of Kerberos
usernames since those usernames typically do not appear in
the group membership lists used by CUPS.
- cupsMarkOptions() could (incorrectly) leave multiple option
choices marked.
- Backends could (incorrectly) run as root during discovery
(STR #2454)
- Avahi is now supported for DNS-SD (Bonjour) printer sharing
(STR #2455)
- The default cupsd.conf file had typos and old operation names
(STR #2450)
- The scheduler now erases authentication cache files using the
7-pass US DoD algorithm.
- Delegated Kerberos credentials (proxy authentication) did not
work.
- The filter makefile did not optimize the libcupsimage.2.dylib
with a sectorder file.
- The IPP backend incorrectly wrote an empty printer message
when processing the "none" state reason.
- The USB backend could deadlock on Mac OS X while performing
a side-channel command.
- The scheduler did not prevent remote queues from being
shared/published.
- The scheduler did not remove the temporary request file on
authentication errors.
- ppdLocalizeIPPReason() did not handle "scheme:" schemes or
"file" URLs.
- ppdLocalizeIPPReason() was not exported on Mac OS X.
CHANGES IN CUPS V1.3b1
- Copyright updates - CUPS is now owned by Apple Inc.
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
INSTALL - CUPS v1.3b1 - 2007-07-12
----------------------------------
INSTALL - CUPS v1.3rc2 - 2007-07-30
-----------------------------------
This file describes how to compile and install CUPS from source
code. For more information on CUPS see the file called
+1
Ver Arquivo
@@ -131,6 +131,7 @@ LDFLAGS = -L../cups -L../filter @LDARCHFLAGS@ \
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
LEGACY_BACKENDS = @LEGACY_BACKENDS@
LIBCUPSORDER = @LIBCUPSORDER@
LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@
LINKCUPS = @LINKCUPS@ $(SSLLIBS)
LINKCUPSIMAGE = @LINKCUPSIMAGE@
LIBS = $(LINKCUPS) $(COMMONLIBS)
+2 -10
Ver Arquivo
@@ -1,13 +1,5 @@
README - CUPS v1.3b1 - 2007-07-13
---------------------------------
******************************************************************
******************************************************************
**** ****
**** BETA SOFTWARE - USE AT YOUR OWN RISK ****
**** ****
******************************************************************
******************************************************************
README - CUPS v1.3rc2 - 2007-07-30
----------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
instead...
+1 -1
Ver Arquivo
@@ -1482,7 +1482,7 @@ report_printer_state(ipp_t *ipp) /* I - IPP response */
reason);
}
if (message)
if (message[0])
{
count ++;
if (strstr(reasons->values[i].string.text, "error"))
+40 -4
Ver Arquivo
@@ -104,6 +104,7 @@
* the printer after we've finished sending all the data
*/
#define WAIT_EOF_DELAY 7
#define WAIT_SIDE_DELAY 3
#define DEFAULT_TIMEOUT 60L
#define USB_INTERFACE_KIND CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID190)
@@ -230,6 +231,11 @@ typedef struct globals_s
Boolean wait_eof;
int drain_output; /* Drain all pending output */
int bidi_flag; /* 0=unidirectional, 1=bidirectional */
pthread_mutex_t sidechannel_thread_mutex;
pthread_cond_t sidechannel_thread_cond;
int sidechannel_thread_stop;
int sidechannel_thread_done;
} globals_t;
@@ -442,6 +448,12 @@ print_device(const char *uri, /* I - Device URI */
if ((select(CUPS_SC_FD+1, &input_set, NULL, NULL, &stimeout)) >= 0)
{
g.sidechannel_thread_stop = 0;
g.sidechannel_thread_done = 0;
pthread_cond_init(&g.sidechannel_thread_cond, NULL);
pthread_mutex_init(&g.sidechannel_thread_mutex, NULL);
if (pthread_create(&sidechannel_thread_id, NULL, sidechannel_thread, NULL))
{
fputs(_("WARNING: Couldn't create side channel\n"), stderr);
@@ -621,7 +633,8 @@ print_device(const char *uri, /* I - Device URI */
OSStatus err = (*g.classdriver)->Abort(g.classdriver);
fprintf(stderr, _("ERROR: %ld: (canceled:%ld)\n"), (long)status, (long)err);
return CUPS_BACKEND_STOP;
status = CUPS_BACKEND_STOP;
break;
}
fprintf(stderr, "DEBUG: Wrote %d bytes of print data...\n", (int)bytes);
@@ -649,8 +662,22 @@ print_device(const char *uri, /* I - Device URI */
pthread_cond_signal(&g.readwrite_lock_cond);
pthread_mutex_unlock(&g.readwrite_lock_mutex);
g.sidechannel_thread_stop = 1;
pthread_mutex_lock(&g.sidechannel_thread_mutex);
if (!g.sidechannel_thread_done)
{
cond_timeout.tv_sec = time(NULL) + WAIT_SIDE_DELAY;
cond_timeout.tv_nsec = 0;
pthread_cond_timedwait(&g.sidechannel_thread_cond,
&g.sidechannel_thread_mutex, &cond_timeout);
}
pthread_mutex_unlock(&g.sidechannel_thread_mutex);
pthread_join(sidechannel_thread_id, NULL);
pthread_cond_destroy(&g.sidechannel_thread_cond);
pthread_mutex_destroy(&g.sidechannel_thread_mutex);
pthread_cond_destroy(&g.readwrite_lock_cond);
pthread_mutex_destroy(&g.readwrite_lock_mutex);
@@ -674,7 +701,8 @@ print_device(const char *uri, /* I - Device URI */
cond_timeout.tv_sec = time(NULL) + WAIT_EOF_DELAY;
cond_timeout.tv_nsec = 0;
if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex, &cond_timeout) != 0)
if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
&cond_timeout) != 0)
g.wait_eof = false;
}
pthread_mutex_unlock(&g.read_thread_mutex);
@@ -788,12 +816,13 @@ sidechannel_thread(void *reference)
char data[2048]; /* Request/response data */
int datalen; /* Request/response data size */
for (;;)
do
{
datalen = sizeof(data);
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
break;
continue;
switch (command)
{
@@ -828,6 +857,13 @@ sidechannel_thread(void *reference)
break;
}
}
while (!g.sidechannel_thread_stop);
pthread_mutex_lock(&g.sidechannel_thread_mutex);
g.sidechannel_thread_done = 1;
pthread_cond_signal(&g.sidechannel_thread_cond);
pthread_mutex_unlock(&g.sidechannel_thread_mutex);
return NULL;
}
+128 -16
Ver Arquivo
@@ -165,7 +165,8 @@ main(int argc, /* I - Number of command-line arguments */
do_printer_op(http, CUPS_SET_DEFAULT, cgiText(_("Set As Default")));
else if (!strcmp(op, "set-sharing"))
do_set_sharing(http);
else if (!strcmp(op, "list-available-printers"))
else if (!strcmp(op, "find-new-printers") ||
!strcmp(op, "list-available-printers"))
do_list_printers(http);
else if (!strcmp(op, "add-class"))
do_am_class(http, 0);
@@ -366,7 +367,12 @@ do_add_rss_subscription(http_t *http) /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(_("Add RSS Subscription"));
cgiShowIPPError(_("Unable to add RSS subscription:"));
@@ -627,7 +633,12 @@ do_am_class(http_t *http, /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/admin/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(title);
cgiShowIPPError(modify ? _("Unable to modify class:") :
@@ -1179,7 +1190,12 @@ do_am_printer(http_t *http, /* I - HTTP connection */
else
ippDelete(cupsDoRequest(http, request, "/admin/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(title);
cgiShowIPPError(modify ? _("Unable to modify printer:") :
@@ -1271,7 +1287,12 @@ do_cancel_subscription(http_t *http)/* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(_("Cancel RSS Subscription"));
cgiShowIPPError(_("Unable to cancel RSS subscription:"));
@@ -1399,6 +1420,12 @@ do_config_server(http_t *http) /* I - HTTP connection */
if (!cupsAdminSetServerSettings(http, num_settings, settings))
{
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
cgiStartHTML(cgiText(_("Change Settings")));
cgiSetVariable("MESSAGE",
cgiText(_("Unable to change server settings:")));
@@ -1501,7 +1528,13 @@ do_config_server(http_t *http) /* I - HTTP connection */
status = cupsPutFile(http, "/admin/conf/cupsd.conf", tempfile);
if (status != HTTP_CREATED)
if (status == HTTP_UNAUTHORIZED)
{
puts("Status: 401\n");
unlink(tempfile);
exit(0);
}
else if (status != HTTP_CREATED)
{
cgiSetVariable("MESSAGE",
cgiText(_("Unable to upload cupsd.conf file:")));
@@ -1526,7 +1559,10 @@ do_config_server(http_t *http) /* I - HTTP connection */
{
struct stat info; /* cupsd.conf information */
cups_file_t *cupsd; /* cupsd.conf file */
char *buffer; /* Buffer for entire file */
char *buffer, /* Buffer for entire file */
*bufptr, /* Pointer into buffer */
*bufend; /* End of buffer */
int ch; /* Character from file */
char filename[1024]; /* Filename */
const char *server_root; /* Location of config files */
@@ -1606,14 +1642,55 @@ do_config_server(http_t *http) /* I - HTTP connection */
cgiSetVariable("CUPSDCONF", buffer);
free(buffer);
/*
* Then get the default cupsd.conf file and put that into a string as
* well...
*/
strlcat(filename, ".default", sizeof(filename));
if (!stat(filename, &info) && info.st_size < (1024 * 1024) &&
(cupsd = cupsFileOpen(filename, "r")) != NULL)
{
buffer = calloc(1, 2 * info.st_size + 1);
bufend = buffer + 2 * info.st_size - 1;
for (bufptr = buffer;
bufptr < bufend && (ch = cupsFileGetChar(cupsd)) != EOF;)
{
if (ch == '\\' || ch == '\"')
{
*bufptr++ = '\\';
*bufptr++ = ch;
}
else if (ch == '\n')
{
*bufptr++ = '\\';
*bufptr++ = 'n';
}
else if (ch == '\t')
{
*bufptr++ = '\\';
*bufptr++ = 't';
}
else if (ch >= ' ')
*bufptr++ = ch;
}
*bufptr = '\0';
cupsFileClose(cupsd);
cgiSetVariable("CUPSDCONF_DEFAULT", buffer);
free(buffer);
}
/*
* Show the current config file...
*/
cgiStartHTML(cgiText(_("Edit Configuration File")));
printf("<!-- \"%s\" -->\n", filename);
cgiCopyTemplateLang("edit-config.tmpl");
cgiEndHTML();
@@ -1681,7 +1758,12 @@ do_delete_class(http_t *http) /* I - HTTP connection */
* Show the results...
*/
if (cupsLastError() <= IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() <= IPP_OK_CONFLICT)
{
/*
* Redirect successful updates back to the classes page...
@@ -1761,7 +1843,12 @@ do_delete_printer(http_t *http) /* I - HTTP connection */
* Show the results...
*/
if (cupsLastError() <= IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() <= IPP_OK_CONFLICT)
{
/*
* Redirect successful updates back to the printers page...
@@ -2325,7 +2412,12 @@ do_printer_op(http_t *http, /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/admin/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(title);
cgiShowIPPError(_("Unable to change printer:"));
@@ -2446,7 +2538,12 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
cgiStartHTML(cgiText(_("Set Allowed Users")));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
cgiShowIPPError(_("Unable to get printer attributes:"));
else
cgiCopyTemplateLang("users.tmpl");
@@ -2583,7 +2680,12 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, "/admin/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(cgiText(_("Set Allowed Users")));
cgiShowIPPError(_("Unable to change printer:"));
@@ -3127,7 +3229,12 @@ do_set_options(http_t *http, /* I - HTTP connection */
else
ippDelete(cupsDoRequest(http, request, "/admin/"));
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(title);
cgiShowIPPError(_("Unable to set options:"));
@@ -3221,7 +3328,12 @@ do_set_sharing(http_t *http) /* I - HTTP connection */
ippDelete(response);
}
if (cupsLastError() > IPP_OK_CONFLICT)
if (cupsLastError() == IPP_NOT_AUTHORIZED)
{
puts("Status: 401\n");
exit(0);
}
else if (cupsLastError() > IPP_OK_CONFLICT)
{
cgiStartHTML(cgiText(_("Set Publishing")));
cgiShowIPPError(_("Unable to change printer-is-shared attribute:"));
+20 -18
Ver Arquivo
@@ -50,7 +50,7 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */
FILE *in; /* Input file */
fprintf(stderr, "DEBUG: cgiCopyTemplateFile(out=%p, tmpl=\"%s\")\n", out,
fprintf(stderr, "DEBUG2: cgiCopyTemplateFile(out=%p, tmpl=\"%s\")\n", out,
tmpl ? tmpl : "(null)");
/*
@@ -93,7 +93,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
FILE *in; /* Input file */
fprintf(stderr, "DEBUG: cgiCopyTemplateLang(tmpl=\"%s\")\n",
fprintf(stderr, "DEBUG2: cgiCopyTemplateLang(tmpl=\"%s\")\n",
tmpl ? tmpl : "(null)");
/*
@@ -115,7 +115,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
else
locale[0] = '\0';
fprintf(stderr, "DEBUG: locale=\"%s\"...\n", locale);
fprintf(stderr, "DEBUG2: locale=\"%s\"...\n", locale);
/*
* See if we have a template file for this language...
@@ -133,7 +133,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
snprintf(filename, sizeof(filename), "%s/%s", directory, tmpl);
}
fprintf(stderr, "DEBUG: Template file is \"%s\"...\n", filename);
fprintf(stderr, "DEBUG2: Template file is \"%s\"...\n", filename);
/*
* Open the template file...
@@ -231,7 +231,7 @@ cgi_copy(FILE *out, /* I - Output file */
int uriencode; /* Encode as URI */
fprintf(stderr, "DEBUG: %*sStarting at file position %ld...\n", indent, "",
fprintf(stderr, "DEBUG2: %*sStarting at file position %ld...\n", indent, "",
ftell(in));
/*
@@ -263,7 +263,7 @@ cgi_copy(FILE *out, /* I - Output file */
if (s == name && isspace(ch & 255))
{
fprintf(stderr, "DEBUG: %*sLone { at %ld...\n", indent, "", ftell(in));
fprintf(stderr, "DEBUG2: %*sLone { at %ld...\n", indent, "", ftell(in));
if (out)
{
@@ -275,7 +275,7 @@ cgi_copy(FILE *out, /* I - Output file */
}
if (ch == '}')
fprintf(stderr, "DEBUG: %*s\"{%s}\" at %ld...\n", indent, "", name,
fprintf(stderr, "DEBUG2: %*s\"{%s}\" at %ld...\n", indent, "", name,
ftell(in));
/*
@@ -339,7 +339,7 @@ cgi_copy(FILE *out, /* I - Output file */
pos = ftell(in);
fprintf(stderr, "DEBUG: %*sLooping on \"%s\" at %ld, count=%d...\n",
fprintf(stderr, "DEBUG2: %*sLooping on \"%s\" at %ld, count=%d...\n",
indent, "", name + 1, pos, count);
if (count > 0)
@@ -355,7 +355,7 @@ cgi_copy(FILE *out, /* I - Output file */
else
cgi_copy(NULL, in, 0, '}', indent + 2);
fprintf(stderr, "DEBUG: %*sFinished looping on \"%s\"...\n", indent,
fprintf(stderr, "DEBUG2: %*sFinished looping on \"%s\"...\n", indent,
"", name + 1);
continue;
@@ -400,6 +400,8 @@ cgi_copy(FILE *out, /* I - Output file */
{
if (uriencode)
cgi_puturi(outptr, out);
else if (!strcasecmp(name, "?cupsdconf_default"))
fputs(outptr, stdout);
else
cgi_puts(outptr, out);
}
@@ -491,7 +493,7 @@ cgi_copy(FILE *out, /* I - Output file */
if (ch != '?')
{
fprintf(stderr,
"DEBUG: %*sBad terminator '%c' at file position %ld...\n",
"DEBUG2: %*sBad terminator '%c' at file position %ld...\n",
indent, "", ch, ftell(in));
return;
}
@@ -521,7 +523,7 @@ cgi_copy(FILE *out, /* I - Output file */
}
fprintf(stderr,
"DEBUG: %*sStarting \"{%s%c%s\" at %ld, result=%d...\n",
"DEBUG2: %*sStarting \"{%s%c%s\" at %ld, result=%d...\n",
indent, "", name, op, compare, ftell(in), result);
if (result)
@@ -530,10 +532,10 @@ cgi_copy(FILE *out, /* I - Output file */
* Comparison true; output first part and ignore second...
*/
fprintf(stderr, "DEBUG: %*sOutput first part...\n", indent, "");
fprintf(stderr, "DEBUG2: %*sOutput first part...\n", indent, "");
cgi_copy(out, in, element, ':', indent + 2);
fprintf(stderr, "DEBUG: %*sSkip second part...\n", indent, "");
fprintf(stderr, "DEBUG2: %*sSkip second part...\n", indent, "");
cgi_copy(NULL, in, element, '}', indent + 2);
}
else
@@ -542,14 +544,14 @@ cgi_copy(FILE *out, /* I - Output file */
* Comparison false; ignore first part and output second...
*/
fprintf(stderr, "DEBUG: %*sSkip first part...\n", indent, "");
fprintf(stderr, "DEBUG2: %*sSkip first part...\n", indent, "");
cgi_copy(NULL, in, element, ':', indent + 2);
fprintf(stderr, "DEBUG: %*sOutput second part...\n", indent, "");
fprintf(stderr, "DEBUG2: %*sOutput second part...\n", indent, "");
cgi_copy(out, in, element, '}', indent + 2);
}
fprintf(stderr, "DEBUG: %*sFinished \"{%s%c%s\", out=%p...\n", indent, "",
fprintf(stderr, "DEBUG2: %*sFinished \"{%s%c%s\", out=%p...\n", indent, "",
name, op, compare, out);
}
else if (ch == '\\') /* Quoted char */
@@ -563,11 +565,11 @@ cgi_copy(FILE *out, /* I - Output file */
putc(ch, out);
if (ch == EOF)
fprintf(stderr, "DEBUG: %*sReturning at file position %ld on EOF...\n",
fprintf(stderr, "DEBUG2: %*sReturning at file position %ld on EOF...\n",
indent, "", ftell(in));
else
fprintf(stderr,
"DEBUG: %*sReturning at file position %ld on character '%c'...\n",
"DEBUG2: %*sReturning at file position %ld on character '%c'...\n",
indent, "", ftell(in), ch);
if (ch == EOF && term)
+11 -4
Ver Arquivo
@@ -49,22 +49,29 @@ DefaultAuthType Basic
# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an adminstrator...
# Job-related operations must be done by the owner or an administrator...
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an adminstrator to authenticate...
<Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @CUPS_DEFAULT_PRINTADMIN_AUTH@
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Require user @OWNER @CUPS_DEFAULT_PRINTADMIN_AUTH@
Order deny,allow
</Limit>
+11 -10
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 6661 2007-07-13 05:53:03Z mike $"
dnl "$Id: cups-common.m4 6749 2007-07-31 00:00:21Z mike $"
dnl
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Versio number information...
CUPS_VERSION="1.3b1"
CUPS_VERSION="1.3rc2"
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'`"
@@ -157,8 +157,7 @@ esac
AC_CHECK_FUNCS(sigaction)
dnl Checks for wait functions.
AC_CHECK_FUNCS(waitpid)
AC_CHECK_FUNCS(wait3)
AC_CHECK_FUNCS(waitpid wait3)
dnl See if the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
@@ -168,6 +167,9 @@ AC_TRY_COMPILE([#include <time.h>],[struct tm t;
AC_DEFINE(HAVE_TM_GMTOFF),
AC_MSG_RESULT(no))
dnl See if we have the removefile(3) function for securely removing files
AC_CHECK_FUNCS(removefile)
dnl Flags for "ar" command...
case $uname in
Darwin* | *BSD*)
@@ -184,15 +186,11 @@ dnl Extra platform-specific libraries...
BACKLIBS=""
CUPSDLIBS=""
DBUSDIR=""
CUPS_DEFAULT_PRINTADMIN_AUTH="@SYSTEM"
CUPS_SYSTEM_AUTHKEY=""
AC_ARG_ENABLE(dbus, [ --enable-dbus enable DBUS support, default=auto])
AC_ARG_WITH(libcupsorder, [ --with-libcupsorder libcups secorder file, default=libcups.order],
LIBCUPSORDER="$withval",
LIBCUPSORDER="libcups.order")
AC_SUBST(LIBCUPSORDER)
FONTS="fonts"
AC_SUBST(FONTS)
LEGACY_BACKENDS="parallel scsi"
@@ -235,6 +233,7 @@ case $uname in
dnl Check for Authorization Services support
AC_CHECK_HEADER(Security/Authorization.h, [
AC_DEFINE(HAVE_AUTHORIZATION_H)
CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin"
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"])
AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
;;
@@ -263,6 +262,8 @@ case $uname in
;;
esac
AC_SUBST(CUPS_DEFAULT_PRINTADMIN_AUTH)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTADMIN_AUTH, "$CUPS_DEFAULT_PRINTADMIN_AUTH")
AC_SUBST(CUPS_SYSTEM_AUTHKEY)
dnl See if we have POSIX ACL support...
@@ -285,5 +286,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl
dnl End of "$Id: cups-common.m4 6661 2007-07-13 05:53:03Z mike $".
dnl End of "$Id: cups-common.m4 6749 2007-07-31 00:00:21Z mike $".
dnl
+17 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 6649 2007-07-11 21:46:42Z mike $"
dnl "$Id: cups-compiler.m4 6698 2007-07-20 14:15:44Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -72,6 +72,21 @@ AC_SUBST(PIEFLAGS)
RELROFLAGS=""
AC_SUBST(RELROFLAGS)
LIBCUPSORDER="libcups.order"
AC_ARG_WITH(libcupsorder, [ --with-libcupsorder libcups secorder file, default=libcups.order],
if test -f "$withval"; then
LIBCUPSORDER="$withval"
fi)
AC_SUBST(LIBCUPSORDER)
LIBCUPSIMAGEORDER="libcupsimage.order"
AC_ARG_WITH(libcupsimageorder, [ --with-libcupsimagesorder
libcupsimage secorder file, default=libcupsimage.order],
if test -f "$withval"; then
LIBCUPSIMAGEORDER="$withval"
fi)
AC_SUBST(LIBCUPSIMAGEORDER)
if test -n "$GCC"; then
# Add GCC-specific compiler options...
if test -z "$OPTIM"; then
@@ -449,5 +464,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 6649 2007-07-11 21:46:42Z mike $".
dnl End of "$Id: cups-compiler.m4 6698 2007-07-20 14:15:44Z mike $".
dnl
+18 -6
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 6656 2007-07-12 23:56:23Z mike $"
dnl "$Id: cups-defaults.m4 6740 2007-07-26 23:07:46Z mike $"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -159,7 +159,13 @@ dnl Determine the correct username and group for this OS...
AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
CUPS_USER="$withval",
AC_MSG_CHECKING(for default print user)
if test -f /etc/passwd; then
if test x$uname = xDarwin; then
if test x`id -u _lp 2>/dev/null` = x; then
CUPS_USER="lp";
else
CUPS_USER="_lp";
fi
elif test -f /etc/passwd; then
CUPS_USER=""
for user in lp lpd guest daemon nobody; do
if test "`grep \^${user}: /etc/passwd`" != ""; then
@@ -181,8 +187,14 @@ AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
CUPS_GROUP="$withval",
AC_MSG_CHECKING(for default print group)
if test -f /etc/group; then
GROUP_LIST="lp nobody"
if test x$uname = xDarwin; then
if test x`id -g _lp 2>/dev/null` = x; then
CUPS_GROUP="lp";
else
CUPS_GROUP="_lp";
fi
elif test -f /etc/group; then
GROUP_LIST="_lp lp nobody"
CUPS_GROUP=""
for group in $GROUP_LIST; do
if test "`grep \^${group}: /etc/group`" != ""; then
@@ -204,7 +216,7 @@ AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
AC_ARG_WITH(system_groups, [ --with-system-groups set default system groups for CUPS],
CUPS_SYSTEM_GROUPS="$withval",
if test x$uname = xDarwin; then
CUPS_SYSTEM_GROUPS="lpadmin admin"
CUPS_SYSTEM_GROUPS="admin"
else
AC_MSG_CHECKING(for default system groups)
if test -f /etc/group; then
@@ -324,5 +336,5 @@ AC_SUBST(CUPS_SNMP_ADDRESS)
AC_SUBST(CUPS_SNMP_COMMUNITY)
dnl
dnl End of "$Id: cups-defaults.m4 6656 2007-07-12 23:56:23Z mike $".
dnl End of "$Id: cups-defaults.m4 6740 2007-07-26 23:07:46Z mike $".
dnl
+4 -2
Ver Arquivo
@@ -29,17 +29,19 @@ DNSSDLIBS=""
if test x$enable_dnssd != xno; then
AC_CHECK_HEADER(dns_sd.h, [
AC_DEFINE(HAVE_DNSSD)
case "$uname" in
Darwin*)
# Darwin and MacOS X...
DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
AC_DEFINE(HAVE_DNSSD)
AC_DEFINE(HAVE_COREFOUNDATION)
AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
;;
*)
# All others...
DNSSDLIBS="???"
AC_CHECK_LIB(dns_sd,DNSServiceProcessResult,
AC_DEFINE(HAVE_DNSSD)
DNSSDLIBS="-ldns_sd")
;;
esac
])
+8
Ver Arquivo
@@ -31,6 +31,7 @@
#define CUPS_DEFAULT_USER "lp"
#define CUPS_DEFAULT_GROUP "sys"
#define CUPS_DEFAULT_SYSTEM_GROUPS "sys root system"
#define CUPS_DEFAULT_PRINTADMIN_AUTH "@SYSTEM"
/*
@@ -529,6 +530,13 @@
#undef HAVE_SYS_UCRED_H
/*
* Do we have removefile()?
*/
#undef HAVE_REMOVEFILE
#endif /* !_CUPS_CONFIG_H_ */
/*
+2 -5
Ver Arquivo
@@ -53,10 +53,6 @@ if test "x$LANGUAGES" != x; then
LANGFILES="$LANGFILES doc/$lang/index.html"
fi
if test -f templates/$lang/edit-config.tmpl.in; then
LANGFILES="$LANGFILES templates/$lang/edit-config.tmpl"
fi
if test -f templates/$lang/header.tmpl.in; then
LANGFILES="$LANGFILES templates/$lang/header.tmpl"
fi
@@ -69,10 +65,11 @@ AC_SUBST(UNINSTALL_LANGUAGES)
AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh init/cups-lpd cups-config
conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
doc/index.html doc/help/ref-cupsd-conf.html doc/help/standard.html
init/org.cups.cups-lpd.plist
man/client.conf.man man/cups-deviced.man man/cups-driverd.man
man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
man/cupsd.conf.man man/lpoptions.man
templates/edit-config.tmpl templates/header.tmpl
templates/header.tmpl
$LANGFILES)
chmod +x cups-config
+143 -7
Ver Arquivo
@@ -583,6 +583,10 @@ cupsAdminExportSamba(
}
}
/*
* See if we have the Win9x PS driver...
*/
snprintf(file, sizeof(file), "%s/drivers/ADOBEPS4.DRV", cg->cups_datadir);
if (!access(file, 0))
{
@@ -653,6 +657,136 @@ cupsAdminExportSamba(
}
}
/*
* See if we have the 64-bit Windows PS driver...
*
* Files:
*
* x64/ps5ui.dll
* x64/pscript.hlp
* x64/pscript.ntf
* x64/pscript5.dll
*/
snprintf(file, sizeof(file), "%s/drivers/x64/pscript5.dll", cg->cups_datadir);
if (!access(file, 0))
{
have_drivers |= 4;
/*
* 64-bit Windows driver is installed; do the smbclient commands needed
* to copy the Win64 drivers over...
*/
snprintf(address, sizeof(address), "//%s/print$", samba_server);
snprintf(subcmd, sizeof(subcmd),
"mkdir x64;"
"put %s x64/%s.ppd;"
"put %s/drivers/x64/ps5ui.dll x64/ps5ui.dll;"
"put %s/drivers/x64/pscript.hlp x64/pscript.hlp;"
"put %s/drivers/x64/pscript.ntf x64/pscript.ntf;"
"put %s/drivers/x64/pscript5.dll x64/pscript5.dll",
ppd, dest, cg->cups_datadir, cg->cups_datadir,
cg->cups_datadir, cg->cups_datadir);
if ((status = do_samba_command("smbclient", address, subcmd,
authfile, logfile)) != 0)
{
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy 64-bit Windows printer "
"driver files (%d)!")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message);
if (logfile)
_cupsLangPrintf(logfile, "%s\n", message);
unlink(authfile);
return (0);
}
/*
* See if we also have the CUPS driver files; if so, use them!
*/
snprintf(file, sizeof(file), "%s/drivers/x64/cupsps6.dll", cg->cups_datadir);
if (!access(file, 0))
{
/*
* Copy the CUPS driver files over...
*/
snprintf(subcmd, sizeof(subcmd),
"put %s/drivers/x64/cups6.ini x64/cups6.ini;"
"put %s/drivers/x64/cupsps6.dll x64/cupsps6.dll;"
"put %s/drivers/x64/cupsui6.dll x64/cupsui6.dll",
cg->cups_datadir, cg->cups_datadir, cg->cups_datadir);
if ((status = do_samba_command("smbclient", address, subcmd,
authfile, logfile)) != 0)
{
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy 64-bit CUPS printer driver "
"files (%d)!")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message);
if (logfile)
_cupsLangPrintf(logfile, "%s\n", message);
unlink(authfile);
return (0);
}
/*
* Do the rpcclient command needed for the CUPS drivers...
*/
snprintf(subcmd, sizeof(subcmd),
"adddriver \"Windows x64\" \"%s:"
"pscript5.dll:%s.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:"
"pscript5.dll,%s.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,"
"cups6.ini,cupsps6.dll,cupsui6.dll\"",
dest, dest, dest);
}
else
{
/*
* Don't have the CUPS drivers, so just use the standard Windows
* drivers...
*/
snprintf(subcmd, sizeof(subcmd),
"adddriver \"Windows x64\" \"%s:"
"pscript5.dll:%s.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:"
"pscript5.dll,%s.ppd,ps5ui.dll,pscript.hlp,pscript.ntf\"",
dest, dest, dest);
}
if ((status = do_samba_command("rpcclient", samba_server, subcmd,
authfile, logfile)) != 0)
{
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to install Windows 2000 printer "
"driver files (%d)!")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message);
if (logfile)
_cupsLangPrintf(logfile, "%s\n", message);
unlink(authfile);
return (0);
}
}
if (logfile && !(have_drivers & 1))
{
if (!have_drivers)
@@ -821,7 +955,7 @@ _cupsAdminGetServerSettings(
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
{
if (!value)
if (!value && strncmp(line, "</", 2))
continue;
if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
@@ -1403,8 +1537,8 @@ _cupsAdminSetServerSettings(
"cancel a job...\n"
" <Limit Cancel-Job>\n"
" Order deny,allow\n"
" Allow @SYSTEM\n"
" Allow @OWNER\n"
" Require user @OWNER "
CUPS_DEFAULT_PRINTADMIN_AUTH "\n"
" </Limit>\n");
}
@@ -1556,7 +1690,8 @@ _cupsAdminSetServerSettings(
"a job...\n"
" <Limit Cancel-Job>\n"
" Order deny,allow\n"
" Require user @OWNER @SYSTEM\n"
" Require user @OWNER "
CUPS_DEFAULT_PRINTADMIN_AUTH "\n"
" </Limit>\n");
in_cancel_job = 0;
@@ -1754,7 +1889,7 @@ _cupsAdminSetServerSettings(
{
cupsFilePuts(temp, "<Policy default>\n"
" # Job-related operations must be done by the owner "
"or an adminstrator...\n"
"or an administrator...\n"
" <Limit Send-Document Send-URI Hold-Job Release-Job "
"Restart-Job Purge-Jobs Set-Job-Attributes "
"Create-Job-Subscription Renew-Subscription "
@@ -1765,7 +1900,7 @@ _cupsAdminSetServerSettings(
" Order deny,allow\n"
" </Limit>\n"
" # All administration operations require an "
"adminstrator to authenticate...\n"
"administrator to authenticate...\n"
" <Limit Pause-Printer Resume-Printer "
"Set-Printer-Attributes Enable-Printer "
"Disable-Printer Pause-Printer-After-Current-Job "
@@ -1785,8 +1920,9 @@ _cupsAdminSetServerSettings(
cupsFilePuts(temp, " # Only the owner or an administrator can cancel "
"a job...\n"
" <Limit Cancel-Job>\n"
" Require user @OWNER @SYSTEM\n"
" Order deny,allow\n"
" Require user @OWNER "
CUPS_DEFAULT_PRINTADMIN_AUTH "\n"
" </Limit>\n");
cupsFilePuts(temp, " <Limit All>\n"
+57 -48
Ver Arquivo
@@ -65,6 +65,8 @@ extern const char *cssmErrorString(int error);
# ifdef DEBUG
static void DEBUG_gss_printf(OM_uint32 major_status, OM_uint32 minor_status,
const char *message);
# else
# define DEBUG_gss_printf(major, minor, message)
# endif /* DEBUG */
static gss_name_t cups_get_gss_creds(http_t *http, const char *service_name);
#endif /* HAVE_GSSAPI */
@@ -106,12 +108,7 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
* Clear the current authentication string...
*/
http->_authstring[0] = '\0';
if (http->authstring && http->authstring != http->_authstring)
free(http->authstring);
http->authstring = http->_authstring;
httpSetAuthString(http, NULL, NULL);
/*
* See if we can do local authentication...
@@ -176,13 +173,6 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
if (!strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
{
if (http->status == HTTP_UNAUTHORIZED && http->digest_tries >= 3)
{
DEBUG_printf(("cupsDoAuthentication: too many Negotiate tries (%d)\n",
http->digest_tries));
return (-1);
}
#ifdef HAVE_GSSAPI
/*
* Kerberos authentication...
@@ -196,8 +186,10 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
/* Input token */
char *gss_service_name;
/* GSS service name */
# ifdef USE_SPNEGO
const char *authorization;
/* Pointer into Authorization string */
# endif /* USE_SPNEGO */
# ifdef __APPLE__
@@ -214,6 +206,14 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
}
# endif /* __APPLE__ */
if (http->status == HTTP_UNAUTHORIZED && http->digest_tries >= 3)
{
DEBUG_printf(("cupsDoAuthentication: too many Negotiate tries (%d)\n",
http->digest_tries));
return (-1);
}
if (http->gssname == GSS_C_NO_NAME)
{
if ((gss_service_name = getenv("CUPS_GSSSERVICENAME")) == NULL)
@@ -224,6 +224,7 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
http->gssname = cups_get_gss_creds(http, gss_service_name);
}
# ifdef USE_SPNEGO /* We don't implement SPNEGO just yet... */
/*
* Find the start of the Kerberos input token...
*/
@@ -237,10 +238,36 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
if (*authorization)
{
/*
* For SPNEGO, this is where we'll feed the server's authorization data
* back into gss via input_token...
* Decode the authorization string to get the input token...
*/
int len = strlen(authorization);
input_token.value = malloc(len);
input_token.value = httpDecode64_2(input_token.value, &len,
authorization);
input_token.length = len;
# ifdef DEBUG
{
char *ptr = (char *)input_token.value;
int left = len;
fputs("input_token=", stdout);
while (left > 0)
{
if (*ptr < ' ')
printf("\\%03o", *ptr & 255);
else
putchar(*ptr);
ptr ++;
left --;
}
putchar('\n');
}
# endif /* DEBUG */
}
# endif /* USE_SPNEGO */
if (http->gssctx != GSS_C_NO_CONTEXT)
{
@@ -252,7 +279,8 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
major_status = gss_init_sec_context(&minor_status, GSS_C_NO_CREDENTIAL,
&http->gssctx,
http->gssname, http->gssmech,
GSS_C_DELEG_FLAG | GSS_C_MUTUAL_FLAG,
GSS_C_DELEG_FLAG | GSS_C_MUTUAL_FLAG |
GSS_C_INTEG_FLAG,
GSS_C_INDEFINITE,
GSS_C_NO_CHANNEL_BINDINGS,
&input_token, &http->gssmech,
@@ -270,27 +298,17 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
return (-1);
}
# ifdef DEBUG
if (major_status == GSS_S_CONTINUE_NEEDED)
DEBUG_gss_printf(major_status, minor_status, "Continuation needed!");
# endif /* DEBUG */
if (output_token.length)
{
httpEncode64_2(encode, sizeof(encode), output_token.value,
output_token.length);
http->authstring = malloc(strlen(encode) + 11);
sprintf(http->authstring, "Negotiate %s", encode); /* Safe because allocated */
httpSetAuthString(http, "Negotiate", encode);
major_status = gss_release_buffer(&minor_status, &output_token);
}
/*
* Copy back what we can to _authstring for backwards compatibility...
*/
strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
#endif /* HAVE_GSSAPI */
}
else if (strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Digest", 6))
@@ -301,7 +319,7 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
httpEncode64_2(encode, sizeof(encode), http->userpass,
(int)strlen(http->userpass));
snprintf(http->_authstring, sizeof(http->_authstring), "Basic %s", encode);
httpSetAuthString(http, "Basic", encode);
}
else
{
@@ -309,15 +327,18 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
* Digest authentication...
*/
char digest[1024]; /* Digest auth data */
httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "realm", realm);
httpGetSubField(http, HTTP_FIELD_WWW_AUTHENTICATE, "nonce", nonce);
httpMD5(cupsUser(), realm, strchr(http->userpass, ':') + 1, encode);
httpMD5Final(nonce, method, resource, encode);
snprintf(http->_authstring, sizeof(http->_authstring),
"Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", "
"uri=\"%s\", response=\"%s\"", cupsUser(), realm, nonce,
resource, encode);
snprintf(digest, sizeof(digest),
"username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", "
"response=\"%s\"", cupsUser(), realm, nonce, resource, encode);
httpSetAuthString(http, "Digest", digest);
}
DEBUG_printf(("cupsDoAuthentication: authstring=\"%s\"\n", http->authstring));
@@ -523,11 +544,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
httpEncode64_2(buffer, sizeof(buffer), (void *)&auth_extrn,
sizeof(auth_extrn));
http->authstring = malloc(strlen(buffer) + 9);
sprintf(http->authstring, "AuthRef %s", buffer);
/* Copy back to _authstring for backwards compatibility */
strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
httpSetAuthString(http, "AuthRef", buffer);
DEBUG_printf(("cups_local_auth: Returning authstring = \"%s\"\n",
http->authstring));
@@ -563,7 +580,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
* check if we need Kerberos authentication...
*/
if (!strcmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate"))
if (!strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
{
/*
* Yes, don't try the root certificate...
@@ -590,11 +607,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
* Set the authorization string and return...
*/
http->authstring = malloc(strlen(certificate) + 7);
sprintf(http->authstring, "Local %s", certificate);
/* Copy back to _authstring for backwards compatibility */
strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
httpSetAuthString(http, "Local", certificate);
DEBUG_printf(("cups_local_auth: Returning authstring = \"%s\"\n",
http->authstring));
@@ -623,11 +636,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
if ((pwd = getpwnam(username)) != NULL && pwd->pw_uid == getuid())
{
http->authstring = malloc(strlen(username) + 10);
sprintf(http->authstring, "PeerCred %s", username);
/* Copy back to _authstring for backwards compatibility */
strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
httpSetAuthString(http, "PeerCred", username);
DEBUG_printf(("cups_local_auth: Returning authstring = \"%s\"\n",
http->authstring));
+7 -2
Ver Arquivo
@@ -26,10 +26,9 @@
* Include necessary headers...
*/
#include "http-private.h"
#include "globals.h"
#include "cups.h"
#include "language.h"
#include "string.h"
#include "debug.h"
#include <stdlib.h>
#include <ctype.h>
@@ -167,7 +166,10 @@ cupsGetFd(http_t *http, /* I - HTTP connection to server */
write(fd, buffer, bytes);
}
else
{
_cupsSetHTTPError(status);
httpFlush(http);
}
/*
* Return the request status...
@@ -416,7 +418,10 @@ cupsPutFd(http_t *http, /* I - HTTP connection to server */
*/
if (status != HTTP_CREATED)
{
_cupsSetHTTPError(status);
httpFlush(http);
}
return (status);
}
+1
Ver Arquivo
@@ -127,6 +127,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
extern const char *_cupsGetPassword(const char *prompt);
extern _cups_globals_t *_cupsGlobals(void);
extern void _cupsSetError(ipp_status_t status, const char *message);
extern void _cupsSetHTTPError(http_status_t status);
/*
+78
Ver Arquivo
@@ -34,6 +34,7 @@
* httpFlush() - Flush data from a HTTP connection.
* httpFlushWrite() - Flush data in write buffer.
* httpGet() - Send a GET request to the server.
* httpGetAuthString() - Get the current authorization string.
* httpGetBlocking() - Get the blocking/non-block state of a connection.
* httpGetCookie() - Get any cookie data from the response.
* httpGetFd() - Get the file descriptor associated with a
@@ -58,6 +59,7 @@
* _httpReadCDSA() - Read function for the CDSA library.
* _httpReadGNUTLS() - Read function for the GNU TLS library.
* httpReconnect() - Reconnect to a HTTP server...
* httpSetAuthString() - Set the current authorization string.
* httpSetCookie() - Set the cookie value(s)...
* httpSetExpect() - Set the Expect: header in a request.
* httpSetField() - Set the value of an HTTP header.
@@ -605,6 +607,27 @@ httpGet(http_t *http, /* I - HTTP connection */
}
/*
* 'httpGetAuthString()' - Get the current authorization string.
*
* The authorization string is set by cupsDoAuthentication() and
* httpSetAuthString(). Use httpGetAuthString() to retrieve the
* string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
* value.
*
* @since CUPS 1.3@
*/
char * /* O - Authorization string */
httpGetAuthString(http_t *http) /* I - HTTP connection */
{
if (http)
return (http->authstring);
else
return (NULL);
}
/*
* 'httpGetBlocking()' - Get the blocking/non-block state of a connection.
*
@@ -1677,6 +1700,61 @@ httpReconnect(http_t *http) /* I - HTTP connection */
}
/*
* 'httpSetAuthString()' - Set the current authorization string.
*
* This function just stores a copy of the current authorization string in
* the HTTP connection object. You must still call httpSetField() to set
* HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
* httpHead(), httpOptions(), httpPost, or httpPut().
*
* @since CUPS 1.3@
*/
void
httpSetAuthString(http_t *http, /* I - HTTP connection */
const char *scheme, /* I - Auth scheme (NULL to clear it) */
const char *data) /* I - Auth data (NULL for none) */
{
/*
* Range check input...
*/
if (!http)
return;
if (http->authstring && http->authstring != http->_authstring)
free(http->authstring);
http->authstring = http->_authstring;
if (scheme)
{
/*
* Set the current authorization string...
*/
int len = (int)strlen(scheme) + (data ? (int)strlen(data) + 1 : 0) + 1;
if (len > (int)sizeof(http->_authstring))
http->authstring = malloc(len);
if (data)
snprintf(http->authstring, len, "%s %s", scheme, data);
else
strlcpy(http->authstring, scheme, len);
}
else
{
/*
* Clear the current authorization string...
*/
http->_authstring[0] = '\0';
}
}
/*
* 'httpSetCookie()' - Set the cookie value(s)...
*
+4
Ver Arquivo
@@ -442,6 +442,10 @@ extern void httpSetLength(http_t *http, size_t length);
extern ssize_t httpWrite2(http_t *http, const char *buffer,
size_t length);
/**** New in CUPS 1.3 ****/
extern char *httpGetAuthString(http_t *http);
extern void httpSetAuthString(http_t *http, const char *scheme,
const char *data);
/*
* C++ magic...
+3
Ver Arquivo
@@ -183,6 +183,7 @@ _httpError
_httpFlush
_httpFlushWrite
_httpGet
_httpGetAuthString
_httpGetBlocking
_httpGetCookie
_httpGetDateString
@@ -213,6 +214,7 @@ _httpReconnect
_httpSeparate
_httpSeparate2
_httpSeparateURI
_httpSetAuthString
_httpSetCookie
_httpSetExpect
_httpSetField
@@ -282,6 +284,7 @@ _ppdFirstOption
_ppdIsMarked
_ppdLastError
_ppdLocalize
_ppdLocalizeIPPReason
_ppdMarkDefaults
_ppdMarkOption
_ppdNextCustomParam
+50 -5
Ver Arquivo
@@ -54,6 +54,10 @@ static ppd_attr_t *ppd_localized_attr(ppd_file_t *ppd,
/*
* 'ppdLocalize()' - Localize the PPD file to the current locale.
*
* All groups, options, and choices are localized, as are ICC profile
* descriptions, printer presets, and custom option parameters. Each
* localized string uses the UTF-8 character encoding.
*
* @since CUPS 1.2@
*/
@@ -195,7 +199,7 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
*
* This function uses the current locale to find the corresponding reason
* text or URI from the attribute value. If "scheme" is NULL or "text",
* the returned value contains human-readable text from the translation
* the returned value contains human-readable (UTF-8) text from the translation
* string or attribute value. Otherwise the corresponding URI is returned.
*
* If no value of the requested scheme can be found, NULL is returned.
@@ -265,6 +269,7 @@ ppdLocalizeIPPReason(
strlcpy(buffer, locattr->text, bufsize);
for (valptr = locattr->value, bufptr = buffer; *valptr && bufptr < bufend;)
{
if (!strncmp(valptr, "text:", 5))
{
/*
@@ -307,10 +312,24 @@ ppdLocalizeIPPReason(
else
*bufptr++ = *valptr++;
}
while (isspace(*valptr & 255))
valptr ++;
}
else
{
/*
* Skip this URI...
*/
while (*valptr && !isspace(*valptr & 255))
valptr++;
}
/*
* Skip whitespace...
*/
while (isspace(*valptr & 255))
valptr ++;
}
if (bufptr > buffer)
*bufptr = '\0';
@@ -324,9 +343,18 @@ ppdLocalizeIPPReason(
*/
schemelen = strlen(scheme);
if (scheme[schemelen - 1] == ':') /* Force scheme to be just the name */
schemelen --;
for (valptr = locattr->value, bufptr = buffer; *valptr && bufptr < bufend;)
if (!strncmp(valptr, scheme, schemelen) && valptr[schemelen] == ':')
{
if ((!strncmp(valptr, scheme, schemelen) && valptr[schemelen] == ':') ||
(*valptr == '/' && !strcmp(scheme, "file")))
{
/*
* Copy URI...
*/
while (*valptr && !isspace(*valptr & 255) && bufptr < bufend)
*bufptr++ = *valptr++;
@@ -334,6 +362,23 @@ ppdLocalizeIPPReason(
return (buffer);
}
else
{
/*
* Skip this URI...
*/
while (*valptr && !isspace(*valptr & 255))
valptr++;
}
/*
* Skip whitespace...
*/
while (isspace(*valptr & 255))
valptr ++;
}
return (NULL);
}
+5 -2
Ver Arquivo
@@ -73,6 +73,8 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
for (o1 = ppdFirstOption(ppd); o1; o1 = ppdNextOption(ppd))
o1->conflicted = 0;
cupsArraySave(ppd->marked);
/*
* Loop through all of the UI constraints and flag any options
* that conflict...
@@ -173,6 +175,8 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
}
}
cupsArrayRestore(ppd->marked);
/*
* Return the number of conflicts found...
*/
@@ -617,8 +621,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
else if (!strcasecmp(option, "InputSlot"))
{
/*
* Unmark ManualFeed True and possibly mark ManualFeed False
* option...
* Unmark ManualFeed option...
*/
if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL)
+38 -4
Ver Arquivo
@@ -22,6 +22,7 @@
* cupsMarkOptions() - Mark command-line options in a PPD file.
* cupsParseOptions() - Parse options from a command-line argument.
* cupsRemoveOptions() - Remove an option from an option array.
* debug_marked() - Output the marked array to stdout...
* ppd_mark_choices() - Mark one or more option choices from a string.
*/
@@ -40,6 +41,11 @@
* Local functions...
*/
#ifdef DEBUG
static void debug_marked(ppd_file_t *ppd, const char *title);
#else
# define debug_marked(ppd,title)
#endif /* DEBUG */
static int ppd_mark_choices(ppd_file_t *ppd, const char *options);
@@ -205,6 +211,8 @@ cupsMarkOptions(
if (ppd == NULL || num_options <= 0 || options == NULL)
return (0);
debug_marked(ppd, "Before...");
/*
* Mark options...
*/
@@ -256,7 +264,7 @@ cupsMarkOptions(
conflict = 1;
if (cupsGetOption("EFMediaType", num_options, options) == NULL)
if (ppdMarkOption(ppd, "EFMediaType", s))
if (ppdMarkOption(ppd, "EFMediaType", s)) /* EFI */
conflict = 1;
if (cupsGetOption("EFMediaQualityMode", num_options, options) == NULL)
@@ -429,12 +437,16 @@ cupsMarkOptions(
conflict = 1;
}
}
else if (!strcasecmp(optptr->name, "mirror") &&
ppdMarkOption(ppd, "MirrorPrint", optptr->value))
conflict = 1;
else if (!strcasecmp(optptr->name, "mirror"))
{
if (ppdMarkOption(ppd, "MirrorPrint", optptr->value))
conflict = 1;
}
else if (ppdMarkOption(ppd, optptr->name, optptr->value))
conflict = 1;
debug_marked(ppd, "After...");
return (conflict);
}
@@ -695,6 +707,28 @@ cupsRemoveOption(
}
#ifdef DEBUG
/*
* 'debug_marked()' - Output the marked array to stdout...
*/
static void
debug_marked(ppd_file_t *ppd, /* I - PPD file data */
const char *title) /* I - Title for list */
{
ppd_choice_t *c; /* Current choice */
printf("cupsMarkOptions: %s\n", title);
for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked);
c;
c = (ppd_choice_t *)cupsArrayNext(ppd->marked))
printf("cupsMarkOptions: %s=%s\n", c->option->keyword, c->choice);
}
#endif /* DEBUG */
/*
* 'ppd_mark_choices()' - Mark one or more option choices from a string.
*/
+2 -2
Ver Arquivo
@@ -573,7 +573,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
return (NULL);
}
ppd->language_level = 1;
ppd->language_level = 2;
ppd->color_device = 0;
ppd->colorspace = PPD_CS_GRAY;
ppd->landscape = -90;
@@ -2248,7 +2248,7 @@ static int /* O - Result of comparison */
ppd_compare_choices(ppd_choice_t *a, /* I - First choice */
ppd_choice_t *b) /* I - Second choice */
{
return (a->option - b->option);
return (strcmp(a->option->keyword, b->option->keyword));
}
+48 -38
Ver Arquivo
@@ -19,6 +19,7 @@
* cupsDoFileRequest() - Do an IPP request with a file.
* cupsDoRequest() - Do an IPP request.
* _cupsSetError() - Set the last IPP status code and status-message.
* _cupsSetHTTPError() - Set the last error using the HTTP status.
*/
/*
@@ -455,44 +456,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
ippErrorString(response->request.status.status_code));
}
else if (status != HTTP_OK)
{
switch (status)
{
case HTTP_NOT_FOUND :
_cupsSetError(IPP_NOT_FOUND, httpStatus(status));
break;
case HTTP_UNAUTHORIZED :
_cupsSetError(IPP_NOT_AUTHORIZED, httpStatus(status));
break;
case HTTP_FORBIDDEN :
_cupsSetError(IPP_FORBIDDEN, httpStatus(status));
break;
case HTTP_BAD_REQUEST :
_cupsSetError(IPP_BAD_REQUEST, httpStatus(status));
break;
case HTTP_REQUEST_TOO_LARGE :
_cupsSetError(IPP_REQUEST_VALUE, httpStatus(status));
break;
case HTTP_NOT_IMPLEMENTED :
_cupsSetError(IPP_OPERATION_NOT_SUPPORTED, httpStatus(status));
break;
case HTTP_NOT_SUPPORTED :
_cupsSetError(IPP_VERSION_NOT_SUPPORTED, httpStatus(status));
break;
default :
DEBUG_printf(("HTTP error %d mapped to IPP_SERVICE_UNAVAILABLE!\n",
status));
_cupsSetError(IPP_SERVICE_UNAVAILABLE, httpStatus(status));
break;
}
}
_cupsSetHTTPError(status);
return (response);
}
@@ -541,6 +505,52 @@ _cupsSetError(ipp_status_t status, /* I - IPP status code */
}
/*
* '_cupsSetHTTPError()' - Set the last error using the HTTP status.
*/
void
_cupsSetHTTPError(http_status_t status) /* I - HTTP status code */
{
switch (status)
{
case HTTP_NOT_FOUND :
_cupsSetError(IPP_NOT_FOUND, httpStatus(status));
break;
case HTTP_UNAUTHORIZED :
_cupsSetError(IPP_NOT_AUTHORIZED, httpStatus(status));
break;
case HTTP_FORBIDDEN :
_cupsSetError(IPP_FORBIDDEN, httpStatus(status));
break;
case HTTP_BAD_REQUEST :
_cupsSetError(IPP_BAD_REQUEST, httpStatus(status));
break;
case HTTP_REQUEST_TOO_LARGE :
_cupsSetError(IPP_REQUEST_VALUE, httpStatus(status));
break;
case HTTP_NOT_IMPLEMENTED :
_cupsSetError(IPP_OPERATION_NOT_SUPPORTED, httpStatus(status));
break;
case HTTP_NOT_SUPPORTED :
_cupsSetError(IPP_VERSION_NOT_SUPPORTED, httpStatus(status));
break;
default :
DEBUG_printf(("HTTP error %d mapped to IPP_SERVICE_UNAVAILABLE!\n",
status));
_cupsSetError(IPP_SERVICE_UNAVAILABLE, httpStatus(status));
break;
}
}
/*
* End of "$Id$".
*/
+29 -27
Ver Arquivo
@@ -2,36 +2,26 @@
*%
*% "$Id$"
*%
*% Test PPD file for the Common UNIX Printing System (CUPS).
*% Test PPD file for the Common UNIX Printing System (CUPS).
*%
*% This file is used to test the CUPS PPD API functions and cannot be
*% used with any known printers. Look at the PPD files in the "ppd"
*% subdirectory as well as the CUPS web site for working PPD files.
*% This file is used to test the CUPS PPD API functions and cannot be
*% used with any known printers. Look at the PPD files in the "ppd"
*% subdirectory as well as the CUPS web site for working PPD files.
*%
*% If you are a PPD file developer, consider using the CUPS DDK to
*% create your PPD files - not only will it save you time, it produces
*% consistently high-quality files.
*%
*% Copyright 2002-2006 by Easy Software Products.
*%
*% These coded instructions, statements, and computer programs are the
*% property of Easy Software Products 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 missing or damaged please contact Easy Software Products
*% at:
*%
*% Attn: CUPS Licensing Information
*% Easy Software Products
*% 44141 Airport View Drive, Suite 204
*% Hollywood, Maryland 20636-3111 USA
*%
*% Voice: (301) 373-9603
*% EMail: cups-info@cups.org
*% WWW: http://www.cups.org
*% If you are a PPD file developer, consider using the CUPS DDK to
*% create your PPD files - not only will it save you time, it produces
*% consistently high-quality files.
*%
*% Copyright 2007 by Apple Inc.
*% Copyright 2002-2006 by Easy Software Products.
*%
*% These coded instructions, statements, and computer programs are the
*% property of Apple Inc. and are protected by Federal copyright
*% law. Distribution and use rights are outlined in the file "LICENSE.txt"
*% 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/".
*FormatVersion: "4.3"
*FileVersion: "1.2"
*FileVersion: "1.3"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "TEST.PPD"
@@ -43,7 +33,7 @@
*cupsModelNumber: 1
*ModelName: "Test"
*ShortNickName: "Test"
*NickName: "Test for CUPS v1.2"
*NickName: "Test for CUPS v1.3"
*PSVersion: "(3010.000) 81501"
*LanguageLevel: "3"
*ColorDevice: True
@@ -148,6 +138,18 @@
*CloseGroup: Extended
*% IPP reasons (for ppdLocalizeIPPReason tests)
*cupsIPPReason foo/Foo Reason: "http://foo/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/foo/bar.html"
*End
*fr.cupsIPPReason foo/La Foo Reason: "text:La%20Long
text:Foo%20Reason
http://foo/fr/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/fr/foo/bar.html"
*End
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
+59
Ver Arquivo
@@ -98,6 +98,7 @@ main(int argc, /* I - Number of command-line arguments */
int status; /* Status of tests (0 = success, 1 = fail) */
int conflicts; /* Number of conflicts */
char *s; /* String */
char buffer[8192]; /* String buffer */
status = 0;
@@ -137,6 +138,7 @@ main(int argc, /* I - Number of command-line arguments */
puts("PASS");
else
{
status ++;
printf("FAIL (%d bytes instead of %d)\n", s ? (int)strlen(s) : 0,
(int)strlen(default_code));
@@ -155,6 +157,7 @@ main(int argc, /* I - Number of command-line arguments */
puts("PASS");
else
{
status ++;
printf("FAIL (%d bytes instead of %d)\n", s ? (int)strlen(s) : 0,
(int)strlen(custom_code));
@@ -165,6 +168,62 @@ main(int argc, /* I - Number of command-line arguments */
if (s)
free(s);
/*
* Test localization...
*/
fputs("ppdLocalizeIPPReason(text): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
!strcmp(buffer, "Foo Reason"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"Foo Reason\")\n", buffer);
}
fputs("ppdLocalizeIPPReason(http): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", "http", buffer, sizeof(buffer)) &&
!strcmp(buffer, "http://foo/bar.html"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"http://foo/bar.html\")\n", buffer);
}
fputs("ppdLocalizeIPPReason(help): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", "help", buffer, sizeof(buffer)) &&
!strcmp(buffer, "help:anchor='foo'%20bookID=Vendor%20Help"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"help:anchor='foo'%%20bookID=Vendor%%20Help\")\n", buffer);
}
fputs("ppdLocalizeIPPReason(file): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", "file", buffer, sizeof(buffer)) &&
!strcmp(buffer, "/help/foo/bar.html"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"/help/foo/bar.html\")\n", buffer);
}
putenv("LANG=fr");
fputs("ppdLocalizeIPPReason(fr text): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
!strcmp(buffer, "La Long Foo Reason"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"La Long Foo Reason\")\n", buffer);
}
ppdClose(ppd);
}
else
+2 -1
Ver Arquivo
@@ -42,9 +42,9 @@ WEBBUTTONS = \
images/button-delete-printer.gif \
images/button-edit-configuration-file.gif \
images/button-export-samba.gif \
images/button-find-new-printers.gif \
images/button-help.gif \
images/button-hold-job.gif \
images/button-list-available-printers.gif \
images/button-manage-classes.gif \
images/button-manage-jobs.gif \
images/button-manage-printers.gif \
@@ -115,6 +115,7 @@ HELPFILES = \
help/api-raster.html \
help/cgi.html \
help/glossary.html \
help/kerberos.html \
help/license.html \
help/man-accept.html \
help/man-backend.html \
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 853 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 713 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 671 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 864 B

+7 -16
Ver Arquivo
@@ -16,27 +16,18 @@
</head>
<body>
<!--
"$Id: api-array.shtml 5138 2006-02-21 10:49:06Z mike $"
"$Id: api-array.shtml 6649 2007-07-11 21:46:42Z mike $"
Array API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2006 by Easy Software Products.
Copyright 2007 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
property of Easy Software Products 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 missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
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/".
-->
<h2 class='title'>Introduction</h2>
+8 -17
Ver Arquivo
@@ -16,27 +16,18 @@
</head>
<body>
<!--
"$Id: api-cups.shtml 5138 2006-02-21 10:49:06Z mike $"
"$Id: api-cups.shtml 6649 2007-07-11 21:46:42Z mike $"
CUPS API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2006 by Easy Software Products.
Copyright 2007 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
property of Easy Software Products 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 missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
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/".
-->
<h2 class='title'>Introduction</h2>
@@ -129,7 +120,7 @@ CUPS 1.1 or higher.</p>
</td></tr>
<tr><td><tt>CUPS_PRINTER_NOT_SHARED</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Printer is not shared
</td></tr>
<tr><td><tt>CUPS_PRINTER_OPTIONS</tt> </td><td>~(CLASS | REMOTE | IMPLICIT)
<tr><td><tt>CUPS_PRINTER_OPTIONS</tt> </td><td>~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED)
</td></tr>
<tr><td><tt>CUPS_PRINTER_PUNCH</tt> </td><td>Can punch output
</td></tr>
+7 -16
Ver Arquivo
@@ -16,27 +16,18 @@
</head>
<body>
<!--
"$Id: api-filedir.shtml 5138 2006-02-21 10:49:06Z mike $"
"$Id: api-filedir.shtml 6649 2007-07-11 21:46:42Z mike $"
File and directory API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2005 by Easy Software Products.
Copyright 2007 by Apple Inc.
Copyright 1997-2005 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
property of Easy Software Products 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 missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
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/".
-->
<h2 class='title'>Introduction</h2>
+7 -16
Ver Arquivo
@@ -16,27 +16,18 @@
</head>
<body>
<!--
"$Id: api-filter.shtml 6170 2007-01-02 17:26:41Z mike $"
"$Id: api-filter.shtml 6649 2007-07-11 21:46:42Z mike $"
Filter and backend API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2006 by Easy Software Products.
Copyright 2007 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
property of Easy Software Products 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 missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
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/".
-->
<h2 class='title'>Introduction</h2>
+61 -16
Ver Arquivo
@@ -16,27 +16,18 @@
</head>
<body>
<!--
"$Id: api-httpipp.shtml 5138 2006-02-21 10:49:06Z mike $"
"$Id: api-httpipp.shtml 6649 2007-07-11 21:46:42Z mike $"
HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2006 by Easy Software Products.
Copyright 2007 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
property of Easy Software Products 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 missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
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/".
-->
<h2 class='title'>Introduction</h2>
@@ -945,6 +936,7 @@ require CUPS 1.1 or higher.</p>
<li><a href='#httpFlush'><tt>httpFlush()</tt></a> </li>
<li><a href='#httpFlushWrite'><tt>httpFlushWrite()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
<li><a href='#httpGet'><tt>httpGet()</tt></a> </li>
<li><a href='#httpGetAuthString'><tt>httpGetAuthString()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
<li><a href='#httpGetBlocking'><tt>httpGetBlocking()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
<li><a href='#httpGetCookie'><tt>httpGetCookie()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
<li><a href='#httpGetDateString'><tt>httpGetDateString()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
@@ -974,6 +966,7 @@ require CUPS 1.1 or higher.</p>
<li><a href='#httpSeparate'><tt>httpSeparate()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
<li><a href='#httpSeparate2'><tt>httpSeparate2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
<li><a href='#httpSeparateURI'><tt>httpSeparateURI()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
<li><a href='#httpSetAuthString'><tt>httpSetAuthString()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
<li><a href='#httpSetCookie'><tt>httpSetCookie()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
<li><a href='#httpSetExpect'><tt>httpSetExpect()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
<li><a href='#httpSetField'><tt>httpSetField()</tt></a> </li>
@@ -1750,6 +1743,30 @@ httpGet(
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='httpGetAuthString'>httpGetAuthString()</a></h3>
<h4>Description</h4>
<p>Get the current authorization string.
<p>The authorization string is set by cupsDoAuthentication() and
httpSetAuthString(). Use httpGetAuthString() to retrieve the
string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
value.
<h4>Syntax</h4>
<p><tt>
char *<br>
httpGetAuthString(
<a href='#http_t'>http_t</a> * http);
</tt></p>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Authorization string</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetBlocking'>httpGetBlocking()</a></h3>
<h4>Description</h4>
<p>Get the blocking/non-block state of a connection.
@@ -2429,6 +2446,34 @@ httpSeparateURI(
<h4>Returns</h4>
<p>Result of separation</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='httpSetAuthString'>httpSetAuthString()</a></h3>
<h4>Description</h4>
<p>Set the current authorization string.
<p>This function just stores a copy of the current authorization string in
the HTTP connection object. You must still call httpSetField() to set
HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
httpHead(), httpOptions(), httpPost, or httpPut().
<h4>Syntax</h4>
<p><tt>
void<br>
httpSetAuthString(
<a href='#http_t'>http_t</a> * http,
const char * scheme,
const char * data);
</tt></p>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>scheme</tt></td><td>Auth scheme (NULL to clear it)</td></tr>
<tr><td><tt>data</tt></td><td>Auth data (NULL for none)</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='httpSetCookie'>httpSetCookie()</a></h3>
<h4>Description</h4>
<p>Set the cookie value(s)...
+11 -17
Ver Arquivo
@@ -16,27 +16,18 @@
</head>
<body>
<!--
"$Id: api-ppd.shtml 5138 2006-02-21 10:49:06Z mike $"
"$Id: api-ppd.shtml 6649 2007-07-11 21:46:42Z mike $"
PPD API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2006 by Easy Software Products.
Copyright 2007 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
property of Easy Software Products 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 missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
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/".
-->
<h2 class='title'>Introduction</h2>
@@ -769,6 +760,9 @@ ppdLastError(
<h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ppdLocalize'>ppdLocalize()</a></h3>
<h4>Description</h4>
<p>Localize the PPD file to the current locale.
<p>All groups, options, and choices are localized, as are ICC profile
descriptions, printer presets, and custom option parameters. Each
localized string uses the UTF-8 character encoding.
<h4>Syntax</h4>
@@ -792,7 +786,7 @@ ppdLocalize(
attribute.
<p>This function uses the current locale to find the corresponding reason
text or URI from the attribute value. If &quot;scheme&quot; is NULL or &quot;text&quot;,
the returned value contains human-readable text from the translation
the returned value contains human-readable (UTF-8) text from the translation
string or attribute value. Otherwise the corresponding URI is returned.
<p>If no value of the requested scheme can be found, NULL is returned.
+137
Ver Arquivo
@@ -0,0 +1,137 @@
<HTML>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Using Kerberos Authentication</TITLE>
</HEAD>
<BODY>
<P>CUPS 1.3 adds Kerberos support which allows you to use a Key Distribution
Center (KDC) for authentication on your local CUPS server and when printing
to a remote authenticated queue. This document describes how to configure
CUPS to use Kerberos authentication and provides helpful links to the MIT
help pages for configuring Kerberos on your systems and network.</P>
<H2 CLASS="title"><A NAME="KRB5">Configuring Kerberos on Your System</A></H2>
<P>Before you can use Kerberos with CUPS, you will need to configure
Kerberos on your system and setup a system as a KDC. Because this
configuration is highly system and site-specific, please consult
the following on-line resources provided by the creators of Kerberos
at the Massachussetts Institute of Technology (MIT):</P>
<UL>
<LI><A HREF="http://web.mit.edu/kerberos/">Kerberos: The Network
Authentication Protocol</A></LI>
<LI><A HREF="http://web.mit.edu/macdev/KfM/Common/Documentation/faq-osx.html">Kerberos
on Mac OS X Frequently Asked Questions</A></LI>
</UL>
<P>The Linux Documentation Project also has a HOWTO on Kerberos:</P>
<UL>
<LI><A HREF="http://tldp.org/HOWTO/html_single/Kerberos-Infrastructure-HOWTO/">Kerberos
Infrastructure HOWTO</A></LI>
</UL>
<H2 CLASS="title"><A NAME="CUPS">Configuring CUPS to Use Kerberos</A></H2>
<P>Once you have configured Kerberos on your system(s), you can then
enable Kerberos authentication by selecting the <tt>Negotiate</tt>
authentication type. The simplest way to do this is using the
<tt>cupsctl(8)</tt> command:</P>
<PRE CLASS="command">
<KBD>cupsctl DefaultAuthType=Negotiate</KBD>
</PRE>
<P>You can also enable Kerberos from the web interface by checking the
<VAR>Use Kerberos Authentication</VAR> box and clicking <VAR>Change
Settings</VAR>:</P>
<PRE CLASS="command">
http://localhost:631/admin
</PRE>
<P>After you have enabled Kerberos authentication, add <tt>AuthType Default</tt>
lines to the policies you want to protect with authentication, for example:</P>
<PRE CLASS="command">
<EM>Listing 1: <A NAME="LISTING01">Remote Printer Operation Policy</A></EM>
1 &lt;Policy remote>
2 # Job-related operations must be done by the owner or an
administrator...
3 &lt;Limit Send-Document Send-URI Hold-Job Release-Job
Restart-Job Purge-Jobs Set-Job-Attributes
Create-Job-Subscription Renew-Subscription
Cancel-Subscription Get-Notifications Reprocess-Job
Cancel-Current-Job Suspend-Current-Job Resume-Job
CUPS-Move-Job>
4 AuthType Default
5 Require user @OWNER @SYSTEM
6 Order deny,allow
7 &lt;/Limit>
8
9 # Require authentication when creating jobs
10 &lt;Limit Create-Job Print-Job Print-URI>
11 AuthType Default
12 Require valid-user
13 Order deny,allow
14 &lt;/Limit>
15
16 # All administration operations require an administrator
to authenticate...
17 &lt;Limit CUPS-Add-Printer CUPS-Delete-Printer
CUPS-Add-Class CUPS-Delete-Class CUPS-Set-Default>
18 AuthType Default
19 Require user @SYSTEM
20 Order deny,allow
21 &lt;/Limit>
22
23 # All printer operations require a printer operator
to authenticate...
24 &lt;Limit Pause-Printer Resume-Printer
Set-Printer-Attributes Enable-Printer Disable-Printer
Pause-Printer-After-Current-Job Hold-New-Jobs
Release-Held-New-Jobs Deactivate-Printer Activate-Printer
Restart-Printer Shutdown-Printer Startup-Printer
Promote-Job Schedule-Job-After CUPS-Accept-Jobs
CUPS-Reject-Jobs>
25 AuthType Default
26 Require user <em>varies by OS</em>
27 Order deny,allow
28 &lt;/Limit>
29
30 # Only the owner or an administrator can cancel or
authenticate a job...
31 &lt;Limit Cancel-Job CUPS-Authenticate-Job>
32 Require user @OWNER @SYSTEM
33 Order deny,allow
34 &lt;/Limit>
35
36 &lt;Limit All>
37 Order deny,allow
38 &lt;/Limit>
39 &lt;/Policy>
</PRE>
<H2 CLASS="title"><A NAME="IMPLEMENT">Implementation Information</A></H2>
<P>CUPS implements Kerberos over HTTP using GSS API and the service name
"ipp". Delegation of credentials (needed for remote printers with
authentication) is only supported when using a single KDC on your network.</P>
<P>After getting a user's Kerberos credentials, CUPS strips the "@KDC"
portion of the username so that it can check the group membership locally,
effectively treating the Kerberos account as a local user account.</P>
</BODY>
</HTML>
+48 -32
Ver Arquivo
@@ -54,7 +54,7 @@ trying to use the new policy.</P>
1 &lt;Policy default>
2 # Job-related operations must be done by the owner or an
adminstrator...
administrator...
3 &lt;Limit Send-Document Send-URI Hold-Job Release-Job
Restart-Job Purge-Jobs Set-Job-Attributes
Create-Job-Subscription Renew-Subscription
@@ -65,32 +65,40 @@ trying to use the new policy.</P>
5 Order deny,allow
6 &lt;/Limit>
7
8 # All administration operations require an adminstrator
8 # All administration operations require an administrator
to authenticate...
9 &lt;Limit Pause-Printer Resume-Printer
Set-Printer-Attributes Enable-Printer Disable-Printer
Pause-Printer-After-Current-Job Hold-New-Jobs
Release-Held-New-Jobs Deactivate-Printer Activate-Printer
Restart-Printer Shutdown-Printer Startup-Printer
Promote-Job Schedule-Job-After CUPS-Add-Printer
CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class
CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
10 AuthType Basic
9 &lt;Limit CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class
CUPS-Delete-Class CUPS-Set-Default>
10 AuthType Default
11 Require user @SYSTEM
12 Order deny,allow
13 &lt;/Limit>
14
15 # Only the owner or an administrator can cancel or
15 # All printer operations require a printer operator
to authenticate...
16 &lt;Limit Pause-Printer Resume-Printer
Set-Printer-Attributes Enable-Printer Disable-Printer
Pause-Printer-After-Current-Job Hold-New-Jobs
Release-Held-New-Jobs Deactivate-Printer Activate-Printer
Restart-Printer Shutdown-Printer Startup-Printer
Promote-Job Schedule-Job-After CUPS-Accept-Jobs
CUPS-Reject-Jobs>
17 AuthType Default
18 Require user <em>varies by OS</em>
19 Order deny,allow
20 &lt;/Limit>
21
22 # Only the owner or an administrator can cancel or
authenticate a job...
16 &lt;Limit Cancel-Job CUPS-Authenticate-Job>
17 Require user @OWNER @SYSTEM
18 Order deny,allow
19 &lt;/Limit>
20
21 &lt;Limit All>
22 Order deny,allow
23 &lt;/Limit>
24 &lt;/Policy>
23 &lt;Limit Cancel-Job CUPS-Authenticate-Job>
24 Require user @OWNER @SYSTEM
25 Order deny,allow
26 &lt;/Limit>
27
28 &lt;Limit All>
29 Order deny,allow
30 &lt;/Limit>
31 &lt;/Policy>
</PRE>
<H3>The Default CUPS Operation Policy</H3>
@@ -139,18 +147,26 @@ however, <em>do</em> use the <TT>AuthType</TT> directive, and so
administrative operations need to be authenticated:</P>
<PRE CLASS="command">
9 &lt;Limit Pause-Printer Resume-Printer
9 &lt;Limit CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class
CUPS-Delete-Class CUPS-Set-Default>
10 AuthType Default
11 Require user @SYSTEM
12 Order deny,allow
13 &lt;/Limit>
14
15 # All printer operations require a printer operator
to authenticate...
16 &lt;Limit Pause-Printer Resume-Printer
Set-Printer-Attributes Enable-Printer Disable-Printer
Pause-Printer-After-Current-Job Hold-New-Jobs
Release-Held-New-Jobs Deactivate-Printer Activate-Printer
Restart-Printer Shutdown-Printer Startup-Printer
Promote-Job Schedule-Job-After CUPS-Add-Printer
CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class
CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
10 AuthType Basic
11 Require user @SYSTEM
12 Order deny,allow
13 &lt;/Limit>
Promote-Job Schedule-Job-After CUPS-Accept-Jobs
CUPS-Reject-Jobs>
17 AuthType Default
18 Require user <em>varies by OS</em>
19 Order deny,allow
20 &lt;/Limit>
</PRE>
<P>The "Order deny,allow" line at the end of both <TT>Limit</TT>
@@ -602,7 +618,7 @@ management operations.</P>
1 &lt;Policy lab999>
2 # Job- and subscription-related operations must be done
by the owner, a lab technician, or an adminstrator...
by the owner, a lab technician, or an administrator...
3 &lt;Limit Send-Document Send-URI Hold-Job Release-Job
Restart-Job Purge-Jobs Set-Job-Attributes
Create-Job-Subscription Renew-Subscription
@@ -615,7 +631,7 @@ management operations.</P>
7 &lt;/Limit>
8
9 # All administration operations require a lab technician
or an adminstrator to authenticate...
or an administrator to authenticate...
10 &lt;Limit Pause-Printer Resume-Printer
Set-Printer-Attributes Enable-Printer Disable-Printer
Pause-Printer-After-Current-Job Hold-New-Jobs
@@ -623,7 +639,7 @@ management operations.</P>
Restart-Printer Shutdown-Printer Startup-Printer
Promote-Job Schedule-Job-After CUPS-Accept-Jobs
CUPS-Reject-Jobs CUPS-Set-Default>
11 AuthType Basic
11 AuthType Default
12 Require user @lab999 @SYSTEM
13 Order allow,deny
14 Allow from 10.0.2.0/24
+3 -4
Ver Arquivo
@@ -8,7 +8,7 @@
</head>
<body>
<!--
"$Id: spec-ppd.html 6646 2007-07-10 22:56:04Z mike $"
"$Id: spec-ppd.html 6726 2007-07-25 20:50:26Z mike $"
CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
@@ -95,8 +95,7 @@ for this printer driver.</p>
<p>This boolean attribute notifies the RIP filters that the
destination printer does not require the top and bottom margins
of the <tt>ImageableArea</tt> swapped for the back page. The
default is <tt>true</tt> when <tt>cupsFlipDuplex</tt> is
<tt>true</tt> or <tt>cupsBackSide</tt> is <tt>Flipped</tt>
default is <tt>true</tt> when <tt>cupsBackSide</tt> is <tt>Flipped</tt>
and <tt>false</tt> otherwise.</p>
<p>Example:</p>
@@ -228,7 +227,7 @@ specified, <tt>cupsFlipDuplex</tt> will be ignored.</blockquote>
*cupsBackSide: Rotated
</pre>
<p>Also see the related <tt>APDuplexRequiresFlippedMargins</tt>
<p>Also see the related <tt>APDuplexRequiresFlippedMargin</tt>
attribute.</p>
<h3>cupsEvenDuplex</h3>
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 527 B

Depois

Largura:  |  Altura:  |  Tamanho: 442 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 484 B

Depois

Largura:  |  Altura:  |  Tamanho: 387 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 487 B

Depois

Largura:  |  Altura:  |  Tamanho: 401 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 717 B

Depois

Largura:  |  Altura:  |  Tamanho: 624 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 577 B

Depois

Largura:  |  Altura:  |  Tamanho: 477 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 568 B

Depois

Largura:  |  Altura:  |  Tamanho: 450 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 474 B

Depois

Largura:  |  Altura:  |  Tamanho: 377 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 663 B

Depois

Largura:  |  Altura:  |  Tamanho: 568 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 615 B

Depois

Largura:  |  Altura:  |  Tamanho: 521 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 615 B

Depois

Largura:  |  Altura:  |  Tamanho: 503 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 359 B

Depois

Largura:  |  Altura:  |  Tamanho: 279 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 423 B

Depois

Largura:  |  Altura:  |  Tamanho: 345 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 520 B

Depois

Largura:  |  Altura:  |  Tamanho: 406 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 508 B

Depois

Largura:  |  Altura:  |  Tamanho: 412 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 699 B

Depois

Largura:  |  Altura:  |  Tamanho: 562 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 771 B

Depois

Largura:  |  Altura:  |  Tamanho: 648 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 509 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 327 B

Depois

Largura:  |  Altura:  |  Tamanho: 256 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 436 B

Depois

Largura:  |  Altura:  |  Tamanho: 325 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 708 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 619 B

Depois

Largura:  |  Altura:  |  Tamanho: 522 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 556 B

Depois

Largura:  |  Altura:  |  Tamanho: 450 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 610 B

Depois

Largura:  |  Altura:  |  Tamanho: 508 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 599 B

Depois

Largura:  |  Altura:  |  Tamanho: 493 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 559 B

Depois

Largura:  |  Altura:  |  Tamanho: 461 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 559 B

Depois

Largura:  |  Altura:  |  Tamanho: 454 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 463 B

Depois

Largura:  |  Altura:  |  Tamanho: 370 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 574 B

Depois

Largura:  |  Altura:  |  Tamanho: 462 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 674 B

Depois

Largura:  |  Altura:  |  Tamanho: 552 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 564 B

Depois

Largura:  |  Altura:  |  Tamanho: 457 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 550 B

Depois

Largura:  |  Altura:  |  Tamanho: 446 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 509 B

Depois

Largura:  |  Altura:  |  Tamanho: 395 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 536 B

Depois

Largura:  |  Altura:  |  Tamanho: 428 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 493 B

Depois

Largura:  |  Altura:  |  Tamanho: 408 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 580 B

Depois

Largura:  |  Altura:  |  Tamanho: 482 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 410 B

Depois

Largura:  |  Altura:  |  Tamanho: 332 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 673 B

Depois

Largura:  |  Altura:  |  Tamanho: 549 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 585 B

Depois

Largura:  |  Altura:  |  Tamanho: 479 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 649 B

Depois

Largura:  |  Altura:  |  Tamanho: 541 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 662 B

Depois

Largura:  |  Altura:  |  Tamanho: 547 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 570 B

Depois

Largura:  |  Altura:  |  Tamanho: 472 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 764 B

Depois

Largura:  |  Altura:  |  Tamanho: 626 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 514 B

Depois

Largura:  |  Altura:  |  Tamanho: 419 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 582 B

Depois

Largura:  |  Altura:  |  Tamanho: 484 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 699 B

Depois

Largura:  |  Altura:  |  Tamanho: 577 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 723 B

Depois

Largura:  |  Altura:  |  Tamanho: 606 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 498 B

Depois

Largura:  |  Altura:  |  Tamanho: 397 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 500 B

Depois

Largura:  |  Altura:  |  Tamanho: 407 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 500 B

Depois

Largura:  |  Altura:  |  Tamanho: 390 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 501 B

Depois

Largura:  |  Altura:  |  Tamanho: 383 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 594 B

Depois

Largura:  |  Altura:  |  Tamanho: 499 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 864 B

Depois

Largura:  |  Altura:  |  Tamanho: 731 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 638 B

Depois

Largura:  |  Altura:  |  Tamanho: 534 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 554 B

Depois

Largura:  |  Altura:  |  Tamanho: 473 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 590 B

Depois

Largura:  |  Altura:  |  Tamanho: 496 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 743 B

Depois

Largura:  |  Altura:  |  Tamanho: 616 B

+2 -1
Ver Arquivo
@@ -236,12 +236,13 @@ libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
# libcupsimage.2.dylib
#
libcupsimage.2.dylib: $(IMAGEOBJS)
libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
echo Linking $@...
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
-install_name $(libdir)/$@ \
-current_version 2.3.0 \
-compatibility_version 2.0.0 \
-sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \
$(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
$(RM) libcupsimage.dylib
$(LN) $@ libcupsimage.dylib

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