From: msweet Date: Sun, 1 Feb 2015 02:46:20 +0000 (+0000) Subject: The ippfind and ipptool programs now correctly match hostnames with trailing X-Git-Tag: v2.2b1~363 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9f9e650dafabb2bb57b064dda87a4f4a79a7935;p=thirdparty%2Fcups.git The ippfind and ipptool programs now correctly match hostnames with trailing dots (STR #4563) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12464 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-2.0.txt b/CHANGES-2.0.txt index 0a58c8a560..2202d75451 100644 --- a/CHANGES-2.0.txt +++ b/CHANGES-2.0.txt @@ -11,8 +11,8 @@ CHANGES IN CUPS V2.0.2 printers.conf file after a restart () - CUPS did not compile with older versions of GNU TLS (STR #4527) - CUPS did not compile without Avahi or mDNSResponder (STR #4523) - - ippLength() did not return the correct length for IPP_TAG_CONST string - values. + - ippLength() did not return the correct length for IPP_TAG_CONST + string values. - The scheduler incorrectly aborted jobs after a job was restarted () - The cups-files.conf file contained the old ServerCertificate/Key @@ -34,6 +34,8 @@ CHANGES IN CUPS V2.0.2 - Added a USB quirk rule for Intermec printers (STR #4553) - The scheduler did not always log which configuration file had the error (STR #4559) + - The ippfind and ipptool programs now correctly match hostnames with + trailing dots (STR #4563) CHANGES IN CUPS V2.0.1 diff --git a/doc/help/man-cups-files.conf.html b/doc/help/man-cups-files.conf.html index 03a8c0d619..2aa201506f 100644 --- a/doc/help/man-cups-files.conf.html +++ b/doc/help/man-cups-files.conf.html @@ -112,8 +112,7 @@ The default is "remroot".
RequestRoot directory
Specifies the directory that contains print jobs and other HTTP request data. The default is "/var/spool/cups". -
Sandboxing off -
Sandboxing relaxed +
Sandboxing relaxed
Sandboxing strict
Specifies the level of security sandboxing that is applied to print filters, backends, and other child processes of the scheduler. The default is "strict". @@ -154,7 +153,7 @@ The default is "lp". subscriptions.conf(5), CUPS Online Help (http://localhost:631/help)

Copyright

-Copyright © 2007-2014 by Apple Inc. +Copyright © 2007-2015 by Apple Inc. diff --git a/test/ippfind.c b/test/ippfind.c index 4ee52c345c..bf379f1858 100644 --- a/test/ippfind.c +++ b/test/ippfind.c @@ -5,7 +5,7 @@ * commands such as IPP and Bonjour conformance tests. This tool is * inspired by the UNIX "find" command, thus its name. * - * Copyright 2008-2014 by Apple Inc. + * Copyright 2008-2015 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -2564,6 +2564,10 @@ resolve_callback( service->host = strdup(hostTarget); service->port = ntohs(port); + value = service->host + strlen(service->host) - 1; + if (value >= service->host && *value == '.') + *value = '\0'; + /* * Loop through the TXT key/value pairs and add them to an array... */ @@ -2635,6 +2639,10 @@ resolve_callback( service->host = strdup(hostTarget); service->port = port; + value = service->host + strlen(service->host) - 1; + if (value >= service->host && *value == '.') + *value = '\0'; + /* * Loop through the TXT key/value pairs and add them to an array... */ diff --git a/test/ipptool.c b/test/ipptool.c index ca9f1a7205..b151b89307 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -3,7 +3,7 @@ * * ipptool command for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2015 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -3883,6 +3883,10 @@ get_string(ipp_attribute_t *attr, /* I - IPP attribute */ if (httpSeparateURI(HTTP_URI_CODING_ALL, ptr, scheme, sizeof(scheme), userpass, sizeof(userpass), buffer, (int)bufsize, &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK) buffer[0] = '\0'; + ptr = buffer + strlen(buffer) - 1; + if (ptr >= buffer && *ptr == '.') + *ptr = '\0'; /* Drop trailing "." */ + return (buffer); } else if (flags & _CUPS_WITH_RESOURCE)