From: msweet Date: Tue, 14 Jul 2009 23:31:23 +0000 (+0000) Subject: Merge changes from CUPS 1.4.0 (r8756) X-Git-Tag: release-1.6.3~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a4b4f99149e8241247e0116cc18fec762fdb1ea;p=thirdparty%2Fcups.git Merge changes from CUPS 1.4.0 (r8756) git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1613 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index a3f6f7dedd..19e5d889f7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,10 +1,17 @@ -CHANGES.txt - 2009-07-07 +CHANGES.txt - 2009-07-14 ------------------------ CHANGES IN CUPS V1.4.0 - Localization updates (STR #3223, STR #3246, STR #3248, STR #3250) - - Documentation updates (STR #3225, STR #3230, STR #3242) + - Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260) + - The USB backend returned different URIs for some printers than in + CUPS 1.3 (STR #3259) + - The scheduler did not do local job-hold-until processing for remote + queues (STR #3258) + - The scheduler did not try all possible SSL certificates on Mac OS X. + - The scheduler did not always remove a file descriptor when using the + kqueue interface (STR #3256) - The scheduler did not protect against bad job control files in all cases (STR #3253) - The scheduler did not encode "+" in model names (STR #3254) diff --git a/backend/ieee1284.c b/backend/ieee1284.c index edf7efe1b7..dfb9c9c70c 100644 --- a/backend/ieee1284.c +++ b/backend/ieee1284.c @@ -306,6 +306,14 @@ backendGetDeviceID( mfg = temp; } + if (!strncasecmp(mdl, mfg, strlen(mfg))) + { + mdl += strlen(mfg); + + while (isspace(*mdl & 255)) + mdl ++; + } + /* * Generate the device URI from the manufacturer, make_model, and * serial number strings. diff --git a/desktop/cups.desktop.in b/desktop/cups.desktop.in index 947a6852df..d75b3ec17f 100644 --- a/desktop/cups.desktop.in +++ b/desktop/cups.desktop.in @@ -15,6 +15,8 @@ Name[es.UTF-8]=Administrar impresión Comment[es.UTF-8]=Interfaz Web de CUPS Name[et.UTF-8]=Trükkimise haldur Comment[et.UTF-8]=CUPS-i veebiliides +Name[eu.UTF-8]=Kudeatu inprimaketak +Comment[eu.UTF-8]=CUPSen web interfazea Name[fr.UTF-8]=Gestionnaire d'impression Comment[fr.UTF-8]=Interface Web de CUPS Name[he.UTF-8]=נהל הדפסות diff --git a/doc/help/ref-cupsd-conf.html.in b/doc/help/ref-cupsd-conf.html.in index 150fb95fa8..4f880b461d 100644 --- a/doc/help/ref-cupsd-conf.html.in +++ b/doc/help/ref-cupsd-conf.html.in @@ -1104,7 +1104,7 @@ HREF="#Location">Location or Limit section.

-

DirtyCleanInterval

+

CUPS 1.4/Mac OS X 10.6DirtyCleanInterval

Examples

@@ -1117,7 +1117,9 @@ DirtyCleanInterval 0

The DirtyCleanInterval directive specifies the number of seconds to wait before updating configuration and state files for printers, -classes, subscriptions, and jobs. The default is 30 seconds.

+classes, subscriptions, and jobs. The default is 30 seconds. A value of 0 +causes the update to occur as soon as possible, typically within a few +milliseconds.

DocumentRoot

diff --git a/man/cupsd.conf.man.in b/man/cupsd.conf.man.in index 430df4c878..fc36f5db83 100644 --- a/man/cupsd.conf.man.in +++ b/man/cupsd.conf.man.in @@ -12,7 +12,7 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH cupsd.conf 5 "CUPS" "19 April 2009" "Apple Inc." +.TH cupsd.conf 5 "CUPS" "14 July 2009" "Apple Inc." .SH NAME cupsd.conf \- server configuration file for cups .SH DESCRIPTION @@ -307,6 +307,12 @@ Deny @LOCAL .br Denies access to the named host or address. .TP 5 +DirtyCleanInterval seconds +.br +Specifies the delay for updating of configuration and state files. A value of 0 +causes the update to happen as soon as possible, typically within a few +milliseconds. +.TP 5 DocumentRoot directory .br Specifies the root directory for the internal web server documents. diff --git a/scheduler/client.c b/scheduler/client.c index 2c29e3da42..93fbf3419f 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -3339,8 +3339,9 @@ encrypt_client(cupsd_client_t *con) /* I - Client to encrypt */ * 'get_cdsa_certificate()' - Get a SSL/TLS certificate from the System keychain. */ -static CFArrayRef /* O - Array of certificates */ -get_cdsa_certificate(cupsd_client_t *con) /* I - Client connection */ +static CFArrayRef /* O - Array of certificates */ +get_cdsa_certificate( + cupsd_client_t *con) /* I - Client connection */ { OSStatus err; /* Error info */ SecKeychainRef keychain; /* Keychain reference */ @@ -3368,6 +3369,7 @@ get_cdsa_certificate(cupsd_client_t *con) /* I - Client connection */ CSSM_DATA options; /* Policy options */ CSSM_APPLE_TP_SSL_OPTIONS ssl_options; /* SSL Option for hostname */ + char localname[1024];/* Local hostname */ if (SecPolicySearchCreate(CSSM_CERT_X_509v3, &CSSMOID_APPLE_TP_SSL, @@ -3410,6 +3412,35 @@ get_cdsa_certificate(cupsd_client_t *con) /* I - Client connection */ err = SecIdentitySearchCreateWithPolicy(policy, NULL, CSSM_KEYUSE_SIGN, keychain, FALSE, &search); + if (err && DNSSDHostName) + { + /* + * Search for the connection server name failed; try the DNS-SD .local + * hostname instead... + */ + + snprintf(localname, sizeof(localname), "%s.local", DNSSDHostName); + + ssl_options.ServerName = localname; + ssl_options.ServerNameLen = strlen(localname); + + cupsdLogMessage(CUPSD_LOG_DEBUG, + "get_cdsa_certificate: Looking for certs for \"%s\"...", + localname); + + if (SecPolicySetValue(policy, &options)) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "Cannot set policy value to use for searching"); + CFRelease(keychain); + CFRelease(policy_search); + return (NULL); + } + + err = SecIdentitySearchCreateWithPolicy(policy, NULL, CSSM_KEYUSE_SIGN, + keychain, FALSE, &search); + } + # else /* * Assume there is exactly one SecIdentity in the keychain... diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 1251628e9e..caa620b6b2 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -1727,8 +1727,7 @@ add_job(cupsd_client_t *con, /* I - Client connection */ attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-hold-until", NULL, val); } - if (attr && strcmp(attr->values[0].string.text, "no-hold") && - !(printer->type & CUPS_PRINTER_REMOTE)) + if (attr && strcmp(attr->values[0].string.text, "no-hold")) { /* * Hold job until specified time... diff --git a/scheduler/job.c b/scheduler/job.c index 978962421f..43060149f9 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -3032,7 +3032,8 @@ get_options(cupsd_job_t *job, /* I - Job */ attr->value_tag == IPP_TAG_BEGIN_COLLECTION) /* Not yet supported */ continue; - if (!strncmp(attr->name, "time-", 5)) + if (!strncmp(attr->name, "time-", 5) || + !strcmp(attr->name, "job-hold-until")) continue; if (!strncmp(attr->name, "job-", 4) && diff --git a/scheduler/select.c b/scheduler/select.c index 0ac6ce0636..8896388cce 100644 --- a/scheduler/select.c +++ b/scheduler/select.c @@ -750,7 +750,7 @@ cupsdRemoveSelect(int fd) /* I - File descriptor */ { cupsdLogMessage(CUPSD_LOG_EMERG, "kevent() returned %s", strerror(errno)); - return; + goto cleanup; } } @@ -762,11 +762,10 @@ cupsdRemoveSelect(int fd) /* I - File descriptor */ { cupsdLogMessage(CUPSD_LOG_EMERG, "kevent() returned %s", strerror(errno)); - return; + goto cleanup; } } - #elif defined(HAVE_POLL) /* * Update the pollfds array... @@ -781,6 +780,10 @@ cupsdRemoveSelect(int fd) /* I - File descriptor */ FD_CLR(fd, &cupsd_current_output); #endif /* HAVE_EPOLL */ +#ifdef HAVE_KQUEUE + cleanup: +#endif /* HAVE_KQUEUE */ + /* * Remove the file descriptor from the active array and add to the * inactive array (or release, if we don't need the inactive array...)