apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.88k stars 460 forks source link

Web interface not functional when the browser language is Turkish #3800

Closed michaelrsweet closed 13 years ago

michaelrsweet commented 13 years ago

Version: 1.5-current CUPS.org User: ozancaglayan

When the Accept-Language HTTP header is set to Turkish, CUPS web interface is unable to substitute the templates (device_uri and title for example) which includes the "iI" characters because of locale-dependent case conversion mechanism.

So the case conversions should be done as a locale independent manner to avoid these kind of issues.

See http://www.mattryall.net/blog/2009/02/the-infamous-turkish-locale-bug for a quick explanation of the problem in general.

michaelrsweet commented 13 years ago

CUPS.org User: ozancaglayan

The attached patch is tested and works correctly but it seems that there are a lot of other places in CUPS which are still using strcasecmp() and and strncasecmp().

michaelrsweet commented 13 years ago

CUPS.org User: mike

Given the scope of the changes required and the limited time remaining for 1.4.x bugs, I am moving this to CUPS 1.5.

Ultimately it looks like we need to provide "safe" implementations of toupper, tolower, strncasecmp, and strcasecmp. We'll also need to do some performance testing/tuning to make sure those implementations do not cause a regression...

michaelrsweet commented 13 years ago

CUPS.org User: mike

Fixed in Subversion repository.

michaelrsweet commented 13 years ago

"strcasecmp.patch":

Index: cups-1.4.6/cups/string.h

--- cups-1.4.6.orig/cups/string.h +++ cups-1.4.6/cups/string.h @@ -127,11 +127,40 @@ _cups_isupper(int ch) /* I - Character { return (ch >= 'A' && ch <= 'Z'); } + +_CUPS_INLINE int +_cups_tolower(int ch) +{

Index: cups-1.4.6/cgi-bin/var.c

--- cups-1.4.6.orig/cgi-bin/var.c +++ cups-1.4.6/cgi-bin/var.c @@ -608,7 +608,7 @@ cgi_compare_variables( const _cgi_var_t v1, / I - First variable _/ const _cgi_vart *v2) / I - Second variable */ {

michaelrsweet commented 13 years ago

"strcasecmp_v2.patch":

Index: cups-1.4.6/cups/string.h

--- cups-1.4.6.orig/cups/string.h +++ cups-1.4.6/cups/string.h @@ -127,11 +127,18 @@ _cups_isupper(int ch) /* I - Character { return (ch >= 'A' && ch <= 'Z'); } + +_CUPSINLINE int /* O - Converted character / +_cupstolower(int ch) / I - Character to convert */ +{

@@ -146,8 +153,8 @@ extern char __cups_strdup(const char *);

define strdup _cups_strdup

endif /_ !HAVE_STRDUP */

-# ifndef HAVE_STRCASECMP extern int _cupsstrcasecmp(const char , const char *); +# ifndef HAVE_STRCASECMP

define strcasecmp _cups_strcasecmp

endif /_ !HAVE_STRCASECMP */

Index: cups-1.4.6/cgi-bin/var.c

--- cups-1.4.6.orig/cgi-bin/var.c +++ cups-1.4.6/cgi-bin/var.c @@ -608,7 +608,7 @@ cgi_compare_variables( const _cgi_var_t v1, / I - First variable _/ const _cgi_vart *v2) / I - Second variable */ {

Index: cups-1.4.6/cups/string.c

--- cups-1.4.6.orig/cups/string.c +++ cups-1.4.6/cups/string.c @@ -637,16 +637,15 @@ _cups_strdup(const char s) / I - Stri

-#ifndef HAVESTRCASECMP int /* O - Result of comparison (-1, 0, or 1) / _cupsstrcasecmp(const char *s, / I - First string / const char *t) / I - Second string _/ { while (_s != '\0' && *t != '\0') {

michaelrsweet commented 13 years ago

"str3800.patch":

Index: notifier/mailto.c

--- notifier/mailto.c (revision 9791) +++ notifier/mailto.c (working copy) @@ -453,21 +453,21 @@ return (0); }

@@ -325,8 +325,8 @@

       if (!best)
    best = device;

@@ -573,12 +573,12 @@ for (device = cupsArrayFind(devices, &key); device; device = cupsArrayNext(devices))

@@ -509,7 +509,7 @@

@@ -534,11 +534,11 @@ make_model[2] = ' '; strlcpy(make_model + 3, mmptr, make_model_size - 3); }

@@ -397,7 +397,7 @@ if ((mfg = cupsGetOption("MANUFACTURER", num_values, values)) == NULL) mfg = cupsGetOption("MFG", num_values, values);

@@ -654,7 +654,7 @@ { if (section == PPD_ORDER_JCL) {

@@ -388,12 +388,12 @@ puts(" Item cupsGetDest cupsGetNamedDest"); puts(" -------------------- -------------------- --------------------");

@@ -2699,7 +2699,7 @@ * Be tolerants of servers that send unknown attribute fields... */

@@ -2303,7 +2303,7 @@ ppd_compare_coptions(ppd_coption_t a, / I - First option _/ ppd_coptiont *b) / I - Second option */ {

@@ -2315,7 +2315,7 @@ ppd_compare_options(ppd_option_t a, / I - First option _/ ppd_optiont *b) / I - Second option */ {

@@ -2549,7 +2549,7 @@

   return (NULL);
 }

- */

-# if defined(WIN32) || defined(EMX) -# define strcasecmp _stricmp -# define strncasecmp _strnicmp

-# endif /* WIN32 || EMX */

-/*

@@ -82,10 +72,6 @@ /*

@@ -146,15 +139,9 @@

define strdup _cups_strdup

endif /* !HAVE_STRDUP */

-# ifndef HAVE_STRCASECMP extern int _cupsstrcasecmp(const char , const char ); -# define strcasecmp _cupsstrcasecmp -# endif / !HAVE_STRCASECMP /

-# ifndef HAVE_STRNCASECMP extern int _cupsstrncasecmp(const char , const char , size_t n); -# define strncasecmp _cupsstrncasecmp -# endif / !HAVE_STRNCASECMP /

ifndef HAVE_STRLCAT

extern size_t _cups_strlcat(char , const char , size_t);

Index: cups/ipp.c

--- cups/ipp.c (revision 9791) +++ cups/ipp.c (working copy) @@ -3,7 +3,7 @@ *

@@ -818,7 +818,7 @@

loc = localeconv();

michaelrsweet commented 13 years ago

@@ -404,12 +404,12 @@ /*

@@ -1346,7 +1346,7 @@ if (temp && (val = cupsGetOption(option->name, temp->num_options, temp->options)) != NULL &&

@@ -1956,7 +1956,7 @@ DEBUG_printf(("9cups_get_dests: linenum=%d line=\"%s\" lineptr=\"%s\"", linenum, line, lineptr));

@@ -2068,7 +2068,7 @@

@@ -679,7 +679,7 @@ */

if (!httpAddrLocalhost(http->hostaddr) &&

@@ -180,7 +180,7 @@ if ((bufptr = strrchr(buffer, ')')) != NULL) *bufptr = '\0'; }

Index: cups/ppd-cache.c

--- cups/ppd-cache.c (revision 9791) +++ cups/ppd-cache.c (working copy) @@ -189,7 +189,7 @@ _cupsSetError(IPP_INTERNALERROR, ("Bad PPD cache file."), 1); goto create_error; }

@@ -1289,7 +1289,7 @@ }

if ((ppd_attr = ppdFindAttr(ppd, "cupsSingleFile", NULL)) != NULL)

@@ -1545,7 +1545,7 @@ int i; /* Looping var */

 for (i = 0; i < pc->num_types; i ++)

@@ -1579,7 +1579,7 @@

for (i = 0; i < pc->num_bins; i ++)

Index: cups/adminutil.c

--- cups/adminutil.c (revision 9791) +++ cups/adminutil.c (working copy) @@ -531,7 +531,7 @@

return (0);
   }

@@ -1008,7 +1008,7 @@ continue; }

@@ -1620,15 +1620,15 @@ cupsFilePuts(temp, "LogLevel " CUPS_DEFAULT_LOG_LEVEL "\n"); } }

@@ -1804,8 +1804,8 @@ else if ((((in_admin_location || in_conf_location || in_root_location) && (remote_admin >= 0 || remote_any > 0)) || (in_root_location && share_printers >= 0)) &&

@@ -302,8 +302,8 @@ else if (group_tag != IPP_TAG_PRINTER) continue;

-#ifndef HAVESTRCASECMP int /* O - Result of comparison (-1, 0, or 1) / _cupsstrcasecmp(const char *s, / I - First string */

-#ifndef HAVESTRNCASECMP int /* O - Result of comparison (-1, 0, or 1) / _cupsstrncasecmp(const char *s, / I - First string / const char *t, / I - Second string _/ @@ -643,9 +640,9 @@ { while (_s != '\0' && *t != '\0' && n > 0) {

@@ -807,7 +807,7 @@ */

unlink(compression ? "testfile.dat.gz" : "testfile.dat");

+ /*

@@ -746,7 +746,7 @@ for (i = ppd->num_groups, installable = ppd->groups; i > 0; i --, installable ++)

michaelrsweet commented 13 years ago

@@ -1046,8 +1046,8 @@ constptr->choice ? constptr->choice->choice : ""));

   if (constptr->choice &&

Index: systemv/lpstat.c

--- systemv/lpstat.c (revision 9791) +++ systemv/lpstat.c (working copy) @@ -3,7 +3,7 @@ *

@@ -1885,9 +1885,9 @@ else { for (i = 0; i < o->num_choices; i ++)

@@ -3075,7 +3075,7 @@ { snprintf(buf, sizeof(buf), "%s.Fullbleed", pwg_media->ppd); if (strcmp(size->name, buf))

@@ -3531,9 +3531,9 @@ break;

   if (j == 0 ||

Index: systemv/lpadmin.c

--- systemv/lpadmin.c (revision 9791) +++ systemv/lpadmin.c (working copy) @@ -443,7 +443,7 @@ cupsSetUser(argv[i]); }

break;

+ case 'u' : /* Allow/deny users */ if (argv[i][2]) val = argv[i] + 2; @@ -462,10 +462,10 @@ val = argv[i]; }

@@ -265,7 +265,7 @@ }

         for (j = 0; j < num_options; j ++)

@@ -1367,17 +1367,17 @@ prefix = "CMD:"; for (i = 0; i < num_formats; i ++) {

@@ -2147,7 +2147,7 @@ regtype, (int)errorCode); return; }

@@ -745,9 +745,9 @@ */

   if (get_token(fp, temp, sizeof(temp), &linenum) &&

@@ -1795,7 +1795,7 @@ goto test_exit; } }

-#define CUPS_SVERSION "CUPS v1.5svn" -#define CUPS_MINIMAL "CUPS/1.5svn" +#define CUPS_SVERSION "CUPS v1.5.0" +#define CUPS_MINIMAL "CUPS/1.5.0"

/ @@ -277,8 +277,6 @@ /

define HAVE_STRDUP 1

-#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 /* #undef HAVESTRLCAT / /_ #undef HAVE_STRLCPY */

Index: standards/rfctohtml.c

--- standards/rfctohtml.c (revision 9791) +++ standards/rfctohtml.c (working copy) @@ -3,7 +3,7 @@ *

@@ -385,7 +385,7 @@

   put_line(outfile, line);

@@ -267,14 +267,14 @@ cupsArrayAdd(banner->images, strdup(imagefile)); } }

@@ -294,41 +294,41 @@ / * Add the value to the show flags... /

@@ -2482,12 +2482,12 @@ * separate-documents-uncollated-copies allows for uncollated copies. */

michaelrsweet commented 13 years ago

@@ -2561,8 +2561,8 @@ else val = cupsGetOption("mirror", num_options, options);

@@ -1148,7 +1148,7 @@ } }

@@ -1181,7 +1181,7 @@ cupsFilePrintf(fp, "*%s.Translation ModelName/%s: \"\"%s", locale->value, locatalog->find_message(a->value->value), lf);

@@ -2659,7 +2659,7 @@ sizes->add(m); } }

@@ -2674,14 +2674,14 @@ po_files->add(cat); } }

@@ -2770,7 +2770,7 @@ d->profiles->add(p); } }

@@ -2819,7 +2819,7 @@ if (isdefault) d->set_default_size(m); }

@@ -2903,21 +2903,21 @@ continue;

   for (i = 0; i < (int)(sizeof(driver_types) / sizeof(driver_types[0])); i ++)

@@ -2932,7 +2932,7 @@ d->filters->add(f); } }

@@ -2984,7 +2984,7 @@ f->release(); else {

@@ -3345,7 +3345,7 @@ d->profiles->add(p); } }

@@ -3368,7 +3368,7 @@ d->constraints->add(con); } }

@@ -215,7 +215,7 @@ cchoice = new ppdcChoice(choice->choice, choice->text, choice->code); coption->add_choice(cchoice);

Index: xcode/CUPS.xcodeproj/project.pbxproj

--- xcode/CUPS.xcodeproj/project.pbxproj (revision 9791) +++ xcode/CUPS.xcodeproj/project.pbxproj (working copy) @@ -1869,9 +1869,9 @@ 72220EB41333050100FCA411 /* libcups */ = { isa = PBXGroup; children = (

-#define CUPS_SVERSION "CUPS v1.5svn" -#define CUPS_MINIMAL "CUPS/1.5svn" +#define CUPS_SVERSION "CUPS v1.5.0" +#define CUPS_MINIMAL "CUPS/1.5.0"

/ @@ -216,8 +216,6 @@ /

define HAVE_STRDUP 1

-#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1

define HAVE_STRLCAT 1

define HAVE_STRLCPY 1

Index: cgi-bin/search.c

--- cgi-bin/search.c (revision 9791) +++ cgi-bin/search.c (working copy) @@ -145,7 +145,7 @@ * Look for logic words: AND, OR */

Index: cgi-bin/template.c

--- cgi-bin/template.c (revision 9791) +++ cgi-bin/template.c (working copy) @@ -3,7 +3,7 @@ *

Index: cgi-bin/makedocset.c

--- cgi-bin/makedocset.c (revision 9791) +++ cgi-bin/makedocset.c (working copy) @@ -3,7 +3,7 @@ *

@@ -183,7 +183,7 @@ compare_sections(_cups_section_t a, / I - First section _/ _cups_sectiont *b) / I - Second section */ {

@@ -201,7 +201,7 @@ if (ret) return (ret); else

@@ -442,7 +442,7 @@ cupsFilePuts(fp, "\n"); subnodes = 1;

}

+ cupsFilePrintf(fp, "<Node id=\"%d\">\n" "Documentation/%s\n" "%s\n"

Index: cgi-bin/help.c

--- cgi-bin/help.c (revision 9791) +++ cgi-bin/help.c (working copy) @@ -342,12 +342,12 @@ { if (inbody) {

Index: cgi-bin/admin.c

--- cgi-bin/admin.c (revision 9791) +++ cgi-bin/admin.c (working copy) @@ -496,7 +496,7 @@

request = ippNewRequest(IPP_CREATE_PRINTER_SUBSCRIPTION);

@@ -2786,8 +2786,8 @@ settings)) == NULL) val = "No";

@@ -3530,9 +3530,9 @@ cparam; cparam = ppdNextCustomParam(coption), m ++) {

@@ -4085,7 +4085,7 @@

 return (NULL);

}

@@ -607,7 +607,7 @@ const _cgi_var_t v1, / I - First variable _/ const _cgi_vart *v2) / I - Second variable */ {

@@ -824,7 +824,7 @@ / \ Copy file data to the temp file...

*/

+ ptr = line;

while ((ch = getchar()) != EOF)

@@ -928,7 +928,7 @@ filename[0] = '\0'; mimetype[0] = '\0'; }

@@ -1234,7 +1234,7 @@ _cupsMD5Init(&md5); _cupsMD5Append(&md5, (unsigned char *)buffer, (int)strlen(buffer));

_cupsMD5Finish(&md5, sum);

+ cgiSetCookie(CUPS_SID, httpMD5String(sum, sid), "/", NULL, 0, 0);

return (cupsGetOption(CUPS_SID, num_cookies, cookies));

Index: cgi-bin/help-index.c

--- cgi-bin/help-index.c (revision 9791) +++ cgi-bin/help-index.c (working copy) @@ -919,7 +919,7 @@ * Look for "", "<A NAME", or "<!-- SECTION:" prefix... */</p> <ul> <li>if (!strncasecmp(line, "<!-- SECTION:", 13))</li> <li>if (!_cups_strncasecmp(line, "<!-- SECTION:", 13)) { /* <ul> <li>Got section line, copy it! @@ -946,7 +946,7 @@ { ptr ++;</li> </ul></li> <li> <pre><code>if (!strncasecmp(ptr, "TITLE>", 6))</code></pre> </li> <li>if (!_cups_strncasecmp(ptr, "TITLE>", 6)) { /<em> \</em> Found the title... @@ -955,7 +955,7 @@ anchor = NULL; ptr += 6; }</li> <li>else if (!strncasecmp(ptr, "A NAME=", 7))</li> <li>else if (!_cups_strncasecmp(ptr, "A NAME=", 7)) { /<em> * Found an anchor... @@ -1192,7 +1192,7 @@ sizeof(help_common_words[0])), sizeof(help_common_words[0]), (int (</em>)(const void <em>, const void </em>))</li> <li>strcasecmp))</li> <li> <pre><code> _cups_strcasecmp)) help_add_word(node, temp);</code></pre> <p>} } @@ -1307,7 +1307,7 @@ (diff = strcmp(n1->section, n2->section)) != 0) return (diff);</p> </li> <li>return (strcasecmp(n1->text, n2->text));</li> <li>return (_cups_strcasecmp(n1->text, n2->text)); }</li> </ul> <p>@@ -1322,7 +1322,7 @@ DEBUG_printf(("help_sort_words(w1=%p(\"%s\"), w2=%p(\"%s\"))\n", w1, w1->text, w2, w2->text));</p> <ul> <li>return (strcasecmp(w1->text, w2->text));</li> <li>return (_cups_strcasecmp(w1->text, w2->text)); }</li> </ul> <h1>Index: cgi-bin/classes.c</h1> <p>--- cgi-bin/classes.c (revision 9791)</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/michaelrsweet"><img src="https://avatars.githubusercontent.com/u/488103?v=4" />michaelrsweet</a> commented <strong> 13 years ago</strong> </div> <div class="markdown-body"> <p>+++ cgi-bin/classes.c (working copy) @@ -171,9 +171,9 @@ do_class_op(http, pclass, CUPS_REJECT<em>JOBS, cgiText(</em>("Reject Jobs"))); else if (!strcmp(op, "purge-jobs")) do_class_op(http, pclass, IPP_PURGE<em>JOBS, cgiText(</em>("Purge Jobs")));</p> <ul> <li>else if (!strcasecmp(op, "print-test-page"))</li> <li>else if (!_cups_strcasecmp(op, "print-test-page")) cgiPrintTestPage(http, pclass);</li> <li>else if (!strcasecmp(op, "move-jobs"))</li> <li> <p>else if (!_cups_strcasecmp(op, "move-jobs")) cgiMoveJobs(http, pclass, 0); else { @@ -381,7 +381,7 @@ cgiSetVariable("TOTAL", val);</p> <p>if ((var = cgiGetVariable("ORDER")) != NULL)</p> </li> <li>ascending = !strcasecmp(var, "asc");</li> <li>ascending = !_cups_strcasecmp(var, "asc"); else ascending = 1;</li> </ul> <h1>Index: scheduler/policy.c</h1> <p>--- scheduler/policy.c (revision 9791) +++ scheduler/policy.c (working copy) @@ -3,7 +3,7 @@ *</p> <ul> <li>Policy routines for the CUPS scheduler. * <ul> <li>* Copyright 2007-2010 by Apple Inc.</li> <li>* Copyright 2007-2011 by Apple Inc.</li> </ul></li> <li>Copyright 1997-2006 by Easy Software Products, all rights reserved. *</li> <li> <p>These coded instructions, statements, and computer programs are the @@ -325,7 +325,7 @@ */</p> <p>if ((name = (char *)cupsArrayFirst(attrs_ptr)) != NULL &&</p> <ul> <li>!strcasecmp(name, "none"))</li> <li>!_cups_strcasecmp(name, "none")) { <h1>ifdef DEBUG</h1> <p>cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: Returning NULL."); @@ -371,7 +371,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: name=%s", name);</p> <h1>endif /* DEBUG */</h1></li> </ul> </li> <li>if (printer && !strcasecmp(name, "@ACL"))</li> <li>if (printer && !_cups_strcasecmp(name, "@ACL")) { char <em>acl; /</em> Current ACL user/group */</li> </ul> <p>@@ -397,12 +397,12 @@ if (cupsdCheckGroup(username, pw, acl)) break; }</p> <ul> <li>else if (!strcasecmp(username, acl))</li> <li>else if (!_cups_strcasecmp(username, acl)) break; } }</li> <li>else if (owner && !strcasecmp(name, "@OWNER") &&</li> <li>!strcasecmp(username, owner))</li> <li>else if (owner && !_cups_strcasecmp(name, "@OWNER") &&</li> <li> <pre><code> !_cups_strcasecmp(username, owner))</code></pre> <p>{</p> <h1>ifdef DEBUG</h1> <p>cupsdLogMessage(CUPSD_LOG_DEBUG2, @@ -411,7 +411,7 @@</p> <p>return (NULL); }</p> </li> <li>else if (!strcasecmp(name, "@SYSTEM"))</li> <li>else if (!_cups_strcasecmp(name, "@SYSTEM")) { int i; /* Looping var */</li> </ul> <p>@@ -438,7 +438,7 @@ return (NULL); } }</p> <ul> <li>else if (!strcasecmp(username, name))</li> <li>else if (!_cups_strcasecmp(username, name)) { <h1>ifdef DEBUG</h1> <p>cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: Returning NULL."); @@ -480,7 +480,7 @@ compare_policies(cupsd_policy_t <em>a, /</em> I - First policy _/ cupsd_policy<em>t *b) /</em> I - Second policy */ {</p></li> <li>return (strcasecmp(a->name, b->name));</li> <li>return (_cups_strcasecmp(a->name, b->name)); }</li> </ul> <h1>Index: scheduler/subscriptions.c</h1> <p>--- scheduler/subscriptions.c (revision 9791) +++ scheduler/subscriptions.c (working copy) @@ -748,7 +748,7 @@</p> <p>while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {</p> <ul> <li>if (!strcasecmp(line, "NextSubscriptionId") && value)</li> <li>if (!_cups_strcasecmp(line, "NextSubscriptionId") && value) { /* <ul> <li>NextSubscriptionId NNN @@ -758,7 +758,7 @@ if (i >= NextSubscriptionId && i > 0) NextSubscriptionId = i; }</li> </ul></li> <li>else if (!strcasecmp(line, "<Subscription"))</li> <li>else if (!_cups_strcasecmp(line, "<Subscription")) { /* <ul> <li><Subscription #> @@ -777,7 +777,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "</Subscription>"))</li> <li>else if (!_cups_strcasecmp(line, "</Subscription>")) { if (!sub) { @@ -799,7 +799,7 @@ "Syntax error on line %d of subscriptions.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Events"))</li> <li>else if (!_cups_strcasecmp(line, "Events")) { /* <ul> <li>Events name @@ -840,7 +840,7 @@ value = valueptr; } }</li> </ul></li> <li>else if (!strcasecmp(line, "Owner"))</li> <li>else if (!_cups_strcasecmp(line, "Owner")) { /* <ul> <li>Owner @@ -856,7 +856,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "Recipient"))</li> <li>else if (!_cups_strcasecmp(line, "Recipient")) { /* <ul> <li>Recipient uri @@ -872,7 +872,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "JobId"))</li> <li>else if (!_cups_strcasecmp(line, "JobId")) { /* <ul> <li>JobId # @@ -896,7 +896,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "PrinterName"))</li> <li>else if (!_cups_strcasecmp(line, "PrinterName")) { /* <ul> <li>PrinterName name @@ -920,7 +920,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "UserData"))</li> <li>else if (!_cups_strcasecmp(line, "UserData")) { /* <ul> <li>UserData encoded-string @@ -982,7 +982,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "LeaseDuration"))</li> <li>else if (!_cups_strcasecmp(line, "LeaseDuration")) { /* <ul> <li>LeaseDuration # @@ -1001,7 +1001,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "Interval"))</li> <li>else if (!_cups_strcasecmp(line, "Interval")) { /* <ul> <li>Interval # @@ -1017,7 +1017,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "ExpirationTime"))</li> <li>else if (!_cups_strcasecmp(line, "ExpirationTime")) { /* <ul> <li>ExpirationTime # @@ -1033,7 +1033,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "NextEventId"))</li> <li>else if (!_cups_strcasecmp(line, "NextEventId")) { /* <ul> <li> <h1>NextEventId # Index: scheduler/quotas.c</h1> <p>--- scheduler/quotas.c (revision 9791) +++ scheduler/quotas.c (working copy) @@ -3,7 +3,7 @@</p> </li> <li> </li> <li>Quota routines for the CUPS scheduler. *</li> </ul></li> <li>* Copyright 2007-2010 by Apple Inc.</li> <li> <ul> <li>Copyright 2007-2011 by Apple Inc.</li> <li>Copyright 1997-2007 by Easy Software Products.</li> <li> </li> <li>These coded instructions, statements, and computer programs are the @@ -146,8 +146,8 @@</li> <li>We only care about the current printer/class and user... */</li> </ul> </li> <li>if (strcasecmp(job->dest, p->name) != 0 ||</li> <li>strcasecmp(job->username, q->username) != 0)</li> <li>if (_cups_strcasecmp(job->dest, p->name) != 0 ||</li> <li> <pre><code> _cups_strcasecmp(job->username, q->username) != 0)</code></pre> <p>continue;</p> <p>/<em> @@ -235,7 +235,7 @@ compare_quotas(const cupsd_quota_t <em>q1, /</em> I - First quota record _/ const cupsd_quota_t </em>q2) /_ I - Second quota record */ {</p> </li> <li>return (strcasecmp(q1->username, q2->username));</li> <li>return (_cups_strcasecmp(q1->username, q2->username)); }</li> </ul> <h1>Index: scheduler/util.c</h1> <p>--- scheduler/util.c (revision 9791) +++ scheduler/util.c (working copy) @@ -36,13 +36,13 @@</p> <h1>ifdef <strong>APPLE</strong></h1> <h1>include <libgen.h></h1> <p>extern char <em><em>environ; -#endif /</em> <strong>APPLE</strong> <em>/ +#endif /</em> <strong>APPLE</strong> </em>/</p> <p>/*</p> <ul> <li>'cupsdCompareNames()' - Compare two names. * <ul> <li>* This function basically does a strcasecmp() of the two strings,</li> <li>* This function basically does a _cups_strcasecmp() of the two strings,</li> </ul></li> <li>but is also aware of numbers so that "a2" < "a100". */</li> </ul> <p>@@ -91,7 +91,7 @@ else if (!isdigit(_s & 255) && isdigit(_t & 255)) return (-1); else if (!isdigit(_s & 255) || !isdigit(_t & 255))</p> <ul> <li>continue; </li> <li> <pre><code> continue;</code></pre> <p>if (<em>s < </em>t) diff = -1;</p> <h1>Index: scheduler/conf.c</h1> <p>--- scheduler/conf.c (revision 9791) +++ scheduler/conf.c (working copy) @@ -759,7 +759,7 @@</p> <p>if ((host = gethostbyname(temp)) != NULL) {</p> </li> <li>if (strcasecmp(temp, host->h_name))</li> <li>if (_cups_strcasecmp(temp, host->h_name)) { cupsdSetString(&ServerName, host->h_name); cupsdAddAlias(ServerAlias, host->h_name); @@ -770,7 +770,7 @@ if (host->h_aliases) { for (i = 0; host->h_aliases[i]; i ++)</li> <li>if (strcasecmp(temp, host->h_aliases[i]))</li> <li>if (_cups_strcasecmp(temp, host->h_aliases[i])) { cupsdAddAlias(ServerAlias, host->h_aliases[i]); cupsdLogMessage(CUPSD_LOG_DEBUG, "Added auto ServerAlias %s", @@ -1078,13 +1078,13 @@ else <h1>endif /* HAVE_LIBPAPER */</h1> <p>if (!DefaultLanguage ||</p></li> <li>!strcasecmp(DefaultLanguage, "C") ||</li> <li>!strcasecmp(DefaultLanguage, "POSIX") ||</li> <li>!strcasecmp(DefaultLanguage, "en") ||</li> <li>!strncasecmp(DefaultLanguage, "en.", 3) ||</li> <li>!strncasecmp(DefaultLanguage, "en_US", 5) ||</li> <li>!strncasecmp(DefaultLanguage, "en_CA", 5) ||</li> <li>!strncasecmp(DefaultLanguage, "fr_CA", 5))</li> <li>!_cups_strcasecmp(DefaultLanguage, "C") ||</li> <li>!_cups_strcasecmp(DefaultLanguage, "POSIX") ||</li> <li>!_cups_strcasecmp(DefaultLanguage, "en") ||</li> <li>!_cups_strncasecmp(DefaultLanguage, "en.", 3) ||</li> <li>!_cups_strncasecmp(DefaultLanguage, "en_US", 5) ||</li> <li>!_cups_strncasecmp(DefaultLanguage, "en_CA", 5) ||</li> <li>!_cups_strncasecmp(DefaultLanguage, "fr_CA", 5)) { /* <ul> <li>These are the only locales that will default to "letter" size... @@ -1100,7 +1100,7 @@</li> <li>Update classification setting as needed... */</li> </ul></li> <li>if (Classification && !strcasecmp(Classification, "none"))</li> <li> <p>if (Classification && !_cups_strcasecmp(Classification, "none")) cupsdClearString(&Classification);</p> <p>if (Classification) @@ -1855,15 +1855,15 @@ mask[4]; /* IP netmask components */</p> </li> <li>if (!strcasecmp(line, "Encryption"))</li> <li>if (!_cups_strcasecmp(line, "Encryption")) { /* <ul> <li>"Encryption xxx" - set required encryption level... */</li> </ul></li> <li>if (!strcasecmp(value, "never"))</li> <li>if (!_cups_strcasecmp(value, "never")) loc->encryption = HTTP_ENCRYPT_NEVER;</li> <li>else if (!strcasecmp(value, "always"))</li> <li> <p>else if (!_cups_strcasecmp(value, "always")) { cupsdLogMessage(CUPSD_LOG_ERROR, "Encryption value \"%s\" on line %d is invalid in this " @@ -1871,9 +1871,9 @@</p> <p>loc->encryption = HTTP_ENCRYPT_REQUIRED; }</p> </li> <li>else if (!strcasecmp(value, "required"))</li> <li>else if (!_cups_strcasecmp(value, "required")) loc->encryption = HTTP_ENCRYPT_REQUIRED;</li> <li>else if (!strcasecmp(value, "ifrequested"))</li> <li>else if (!_cups_strcasecmp(value, "ifrequested")) loc->encryption = HTTP_ENCRYPT_IF_REQUESTED; else { @@ -1882,15 +1882,15 @@ return (0); } }</li> <li>else if (!strcasecmp(line, "Order"))</li> <li>else if (!_cups_strcasecmp(line, "Order")) { /* <ul> <li>"Order Deny,Allow" or "Order Allow,Deny"... */</li> </ul></li> <li>if (!strncasecmp(value, "deny", 4))</li> <li>if (!_cups_strncasecmp(value, "deny", 4)) loc->order_type = CUPSD_AUTH_ALLOW;</li> <li>else if (!strncasecmp(value, "allow", 5))</li> <li>else if (!_cups_strncasecmp(value, "allow", 5)) loc->order_type = CUPSD_AUTH_DENY; else { @@ -1899,7 +1899,7 @@ return (0); } }</li> <li>else if (!strcasecmp(line, "Allow") || !strcasecmp(line, "Deny"))</li> <li> <p>else if (!_cups_strcasecmp(line, "Allow") || !_cups_strcasecmp(line, "Deny")) { /*</p> <ul> <li>Allow [From] host/ip... @@ -1908,7 +1908,7 @@</li> </ul> <p>while (*value) {</p> </li> <li>if (!strncasecmp(value, "from", 4))</li> <li> <pre><code>if (!_cups_strncasecmp(value, "from", 4))</code></pre> <p>{ /*</p> <ul> <li>Strip leading "from"... @@ -1948,24 +1948,24 @@</li> <li>nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm */</li> </ul> </li> <li> <pre><code>if (!strcasecmp(value, "all"))</code></pre> </li> <li> <pre><code>if (!_cups_strcasecmp(value, "all"))</code></pre> <p>{ /*</p> <ul> <li>All hosts... */</li> </ul> </li> <li>if (!strcasecmp(line, "Allow"))</li> <li>if (!_cups_strcasecmp(line, "Allow")) cupsdAddIPMask(&(loc->allow), zeros, zeros); else cupsdAddIPMask(&(loc->deny), zeros, zeros); }</li> <li>else if (!strcasecmp(value, "none"))</li> <li> <pre><code>else if (!_cups_strcasecmp(value, "none"))</code></pre> <p>{ /*</p> <ul> <li>No hosts... */</li> </ul> </li> <li>if (!strcasecmp(line, "Allow"))</li> <li>if (!_cups_strcasecmp(line, "Allow")) cupsdAddIPMask(&(loc->allow), ones, zeros); else cupsdAddIPMask(&(loc->deny), ones, zeros); @@ -1984,7 +1984,7 @@ if (value[0] == '*') value ++;</li> <li>if (!strcasecmp(line, "Allow"))</li> <li>if (!_cups_strcasecmp(line, "Allow")) cupsdAddNameMask(&(loc->allow), value); else cupsdAddNameMask(&(loc->deny), value); @@ -2002,7 +2002,7 @@ return (0); }</li> <li>if (!strcasecmp(line, "Allow"))</li> <li>if (!_cups_strcasecmp(line, "Allow")) cupsdAddIPMask(&(loc->allow), ip, mask); else cupsdAddIPMask(&(loc->deny), ip, mask); @@ -2015,39 +2015,39 @@ value = valptr; } }</li> <li>else if (!strcasecmp(line, "AuthType"))</li> <li>else if (!_cups_strcasecmp(line, "AuthType")) { /* <ul> <li>AuthType {none,basic,digest,basicdigest,negotiate,default} */</li> </ul></li> <li>if (!strcasecmp(value, "none"))</li> <li>if (!_cups_strcasecmp(value, "none")) { loc->type = CUPSD_AUTH_NONE; loc->level = CUPSD_AUTH_ANON; }</li> <li>else if (!strcasecmp(value, "basic"))</li> <li> <p>else if (!_cups_strcasecmp(value, "basic")) { loc->type = CUPSD_AUTH_BASIC;</p> <p>if (loc->level == CUPSD_AUTH_ANON) loc->level = CUPSD_AUTH_USER; }</p> </li> <li>else if (!strcasecmp(value, "digest"))</li> <li> <p>else if (!_cups_strcasecmp(value, "digest")) { loc->type = CUPSD_AUTH_DIGEST;</p> <p>if (loc->level == CUPSD_AUTH_ANON) loc->level = CUPSD_AUTH_USER; }</p> </li> <li>else if (!strcasecmp(value, "basicdigest"))</li> <li> <p>else if (!_cups_strcasecmp(value, "basicdigest")) { loc->type = CUPSD_AUTH_BASICDIGEST;</p> <p>if (loc->level == CUPSD_AUTH_ANON) loc->level = CUPSD_AUTH_USER; }</p> </li> <li>else if (!strcasecmp(value, "default"))</li> <li>else if (!_cups_strcasecmp(value, "default")) { loc->type = CUPSD_AUTH_DEFAULT;</li> </ul> <p>@@ -2055,7 +2055,7 @@ loc->level = CUPSD_AUTH_USER; }</p> <h1>ifdef HAVE_GSSAPI</h1> <ul> <li>else if (!strcasecmp(value, "negotiate"))</li> <li>else if (!_cups_strcasecmp(value, "negotiate")) { loc->type = CUPSD_AUTH_NEGOTIATE;</li> </ul> <p>@@ -2071,13 +2071,13 @@ return (0); } }</p> <ul> <li>else if (!strcasecmp(line, "AuthClass"))</li> <li>else if (!_cups_strcasecmp(line, "AuthClass")) { /* <ul> <li>AuthClass anonymous, user, system, group */</li> </ul></li> <li>if (!strcasecmp(value, "anonymous"))</li> <li>if (!_cups_strcasecmp(value, "anonymous")) { loc->type = CUPSD_AUTH_NONE; loc->level = CUPSD_AUTH_ANON; @@ -2087,7 +2087,7 @@ "it from line %d.", value, linenum); }</li> <li>else if (!strcasecmp(value, "user"))</li> <li>else if (!_cups_strcasecmp(value, "user")) { loc->level = CUPSD_AUTH_USER;</li> </ul> <p>@@ -2096,7 +2096,7 @@ "\"Require valid-user\" on line %d.", value, linenum); }</p> <ul> <li>else if (!strcasecmp(value, "group"))</li> <li>else if (!_cups_strcasecmp(value, "group")) { loc->level = CUPSD_AUTH_GROUP;</li> </ul> <p>@@ -2105,7 +2105,7 @@ "\"Require user @groupname\" on line %d.", value, linenum); }</p> <ul> <li>else if (!strcasecmp(value, "system"))</li> <li>else if (!_cups_strcasecmp(value, "system")) { loc->level = CUPSD_AUTH_GROUP;</li> </ul> <p>@@ -2124,7 +2124,7 @@ return (0); } }</p> <ul> <li>else if (!strcasecmp(line, "AuthGroupName"))</li> <li>else if (!_cups_strcasecmp(line, "AuthGroupName")) { cupsdAddName(loc, value);</li> </ul> <p>@@ -2133,7 +2133,7 @@ "using \"Require user @%s\" on line %d.", value, value, linenum); }</p> <ul> <li>else if (!strcasecmp(line, "Require"))</li> <li>else if (!_cups_strcasecmp(line, "Require")) { /* <ul> <li>Apache synonym for AuthClass and AuthGroupName... @@ -2150,10 +2150,10 @@ if (<em>valptr) </em>valptr++ = '\0';</li> </ul></li> <li>if (!strcasecmp(value, "valid-user") ||</li> <li>!strcasecmp(value, "user"))</li> <li>if (!_cups_strcasecmp(value, "valid-user") ||</li> <li>!_cups_strcasecmp(value, "user")) loc->level = CUPSD_AUTH_USER;</li> <li>else if (!strcasecmp(value, "group"))</li> <li>else if (!_cups_strcasecmp(value, "group")) loc->level = CUPSD_AUTH_GROUP; else { @@ -2212,11 +2212,11 @@ for (value = valptr; _cups_isspace(*value); value ++); } }</li> <li>else if (!strcasecmp(line, "Satisfy"))</li> <li>else if (!_cups_strcasecmp(line, "Satisfy")) {</li> <li>if (!strcasecmp(value, "all"))</li> <li>if (!_cups_strcasecmp(value, "all")) loc->satisfy = CUPSD_AUTH_SATISFY_ALL;</li> <li>else if (!strcasecmp(value, "any"))</li> <li>else if (!_cups_strcasecmp(value, "any")) loc->satisfy = CUPSD_AUTH_SATISFY_ANY; else { @@ -2277,29 +2277,29 @@ <ul> <li>Add the error to the bitmask... */</li> </ul></li> <li>if (!strcasecmp(valstart, "all"))</li> <li>if (!_cups_strcasecmp(valstart, "all")) fatal = CUPSD_FATAL_ALL;</li> <li>else if (!strcasecmp(valstart, "browse"))</li> <li>else if (!_cups_strcasecmp(valstart, "browse")) fatal |= CUPSD_FATAL_BROWSE;</li> <li>else if (!strcasecmp(valstart, "-browse"))</li> <li>else if (!_cups_strcasecmp(valstart, "-browse")) fatal &= ~CUPSD_FATAL_BROWSE;</li> <li>else if (!strcasecmp(valstart, "config"))</li> <li>else if (!_cups_strcasecmp(valstart, "config")) fatal |= CUPSD_FATAL_CONFIG;</li> <li>else if (!strcasecmp(valstart, "-config"))</li> <li>else if (!_cups_strcasecmp(valstart, "-config")) fatal &= ~CUPSD_FATAL_CONFIG;</li> <li>else if (!strcasecmp(valstart, "listen"))</li> <li>else if (!_cups_strcasecmp(valstart, "listen")) fatal |= CUPSD_FATAL_LISTEN;</li> <li>else if (!strcasecmp(valstart, "-listen"))</li> <li>else if (!_cups_strcasecmp(valstart, "-listen")) fatal &= ~CUPSD_FATAL_LISTEN;</li> <li>else if (!strcasecmp(valstart, "log"))</li> <li>else if (!_cups_strcasecmp(valstart, "log")) fatal |= CUPSD_FATAL_LOG;</li> <li>else if (!strcasecmp(valstart, "-log"))</li> <li>else if (!_cups_strcasecmp(valstart, "-log")) fatal &= ~CUPSD_FATAL_LOG;</li> <li>else if (!strcasecmp(valstart, "permissions"))</li> <li>else if (!_cups_strcasecmp(valstart, "permissions")) fatal |= CUPSD_FATAL_PERMISSIONS;</li> <li>else if (!strcasecmp(valstart, "-permissions"))</li> <li>else if (!_cups_strcasecmp(valstart, "-permissions")) fatal &= ~CUPSD_FATAL_PERMISSIONS;</li> <li>else if (strcasecmp(valstart, "none"))</li> <li>else if (_cups_strcasecmp(valstart, "none")) cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown FatalErrors kind \"%s\" ignored.", valstart);</li> </ul> <p>@@ -2432,23 +2432,23 @@ * Add the protocol to the bitmask... */</p> <ul> <li>if (!strcasecmp(valstart, "cups"))</li> <li>if (!_cups_strcasecmp(valstart, "cups")) protocols |= BROWSE_CUPS;</li> <li>else if (!strcasecmp(valstart, "slp"))</li> <li>else if (!_cups_strcasecmp(valstart, "slp")) protocols |= BROWSE_SLP;</li> <li>else if (!strcasecmp(valstart, "ldap"))</li> <li>else if (!_cups_strcasecmp(valstart, "ldap")) protocols |= BROWSE_LDAP;</li> <li>else if (!strcasecmp(valstart, "dnssd") ||</li> <li>!strcasecmp(valstart, "dns-sd") ||</li> <li>!strcasecmp(valstart, "bonjour"))</li> <li>else if (!_cups_strcasecmp(valstart, "dnssd") ||</li> <li>!_cups_strcasecmp(valstart, "dns-sd") ||</li> <li>!_cups_strcasecmp(valstart, "bonjour")) protocols |= BROWSE_DNSSD;</li> <li>else if (!strcasecmp(valstart, "lpd"))</li> <li>else if (!_cups_strcasecmp(valstart, "lpd")) protocols |= BROWSE_LPD;</li> <li>else if (!strcasecmp(valstart, "smb"))</li> <li>else if (!_cups_strcasecmp(valstart, "smb")) protocols |= BROWSE_SMB;</li> <li>else if (!strcasecmp(valstart, "all"))</li> <li>else if (!_cups_strcasecmp(valstart, "all")) protocols |= BROWSE_ALL;</li> <li>else if (strcasecmp(valstart, "none"))</li> <li>else if (_cups_strcasecmp(valstart, "none")) cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown browse protocol \"%s\" ignored.", valstart);</li> </ul> <p>@@ -2503,7 +2503,7 @@ * Decode the directive... */</p> <ul> <li>if (!strcasecmp(line, "Include") && value)</li> <li>if (!_cups_strcasecmp(line, "Include") && value) { /* <ul> <li>Include filename @@ -2524,7 +2524,7 @@ cupsFileClose(incfile); } }</li> </ul></li> <li>else if (!strcasecmp(line, "<Location") && value)</li> <li>else if (!_cups_strcasecmp(line, "<Location") && value) { /* <ul> <li> <Location path> @@ -2534,7 +2534,7 @@ if (linenum == 0) return (0); } </li> </ul></li> <li>else if (!strcasecmp(line, "<Policy") && value)</li> <li>else if (!_cups_strcasecmp(line, "<Policy") && value) { /* <ul> <li> <Policy name> @@ -2544,25 +2544,25 @@ if (linenum == 0) return (0); } </li> </ul></li> <li>else if (!strcasecmp(line, "FatalErrors"))</li> <li>else if (!_cups_strcasecmp(line, "FatalErrors")) FatalErrors = parse_fatal_errors(value);</li> <li>else if (!strcasecmp(line, "FaxRetryInterval") && value)</li> <li>else if (!_cups_strcasecmp(line, "FaxRetryInterval") && value) { JobRetryInterval = atoi(value); cupsdLogMessage(CUPSD_LOG_WARN, "FaxRetryInterval is deprecated; use " "JobRetryInterval on line %d.", linenum); }</li> <li>else if (!strcasecmp(line, "FaxRetryLimit") && value)</li> <li>else if (!_cups_strcasecmp(line, "FaxRetryLimit") && value) { JobRetryLimit = atoi(value); cupsdLogMessage(CUPSD_LOG_WARN, "FaxRetryLimit is deprecated; use " "JobRetryLimit on line %d.", linenum); }</li> <li>else if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")</li> <li>else if (!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen") <h1>ifdef HAVE_SSL</h1></li> <li>|| !strcasecmp(line, "SSLPort") || !strcasecmp(line, "SSLListen")</li> <li> <pre><code> || !_cups_strcasecmp(line, "SSLPort") || !_cups_strcasecmp(line, "SSLListen")</code></pre> <h1>endif /* HAVE_SSL */</h1> <pre><code> )</code></pre> <p>{ @@ -2644,7 +2644,7 @@ lis->fd = -1;</p> <h1>ifdef HAVE_SSL</h1> </li> <li>if (!strcasecmp(line, "SSLPort") || !strcasecmp(line, "SSLListen"))</li> <li>if (!_cups_strcasecmp(line, "SSLPort") || !_cups_strcasecmp(line, "SSLListen")) lis->encryption = HTTP_ENCRYPT_ALWAYS; <h1>endif /* HAVE_SSL */</h1></li> </ul> <p>@@ -2669,7 +2669,7 @@</p> <pre><code> httpAddrFreeList(addrlist); }</code></pre> <ul> <li>else if (!strcasecmp(line, "BrowseAddress") && value)</li> <li> <p>else if (!_cups_strcasecmp(line, "BrowseAddress") && value) { /*</p> <ul> <li>Add a browse address to the list... @@ -2696,7 +2696,7 @@</li> </ul> <p>memset(dira, 0, sizeof(cupsd_dirsvc_addr_t));</p> </li> <li> <pre><code>if (!strcasecmp(value, "@LOCAL"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "@LOCAL")) { /* <ul> <li>Send browse data to all local interfaces... @@ -2705,7 +2705,7 @@ strcpy(dira->iface, "*"); NumBrowsers ++; }</li> </ul></li> <li>else if (!strncasecmp(value, "@IF(", 4))</li> <li>else if (!_cups_strncasecmp(value, "@IF(", 4)) { /* <ul> <li>Send browse data to the named interface... @@ -2750,7 +2750,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Bad BrowseAddress %s at line %d.", value, linenum); }</li> </ul></li> <li>else if (!strcasecmp(line, "BrowseOrder") && value)</li> <li>else if (!_cups_strcasecmp(line, "BrowseOrder") && value) { /* <ul> <li>"BrowseOrder Deny,Allow" or "BrowseOrder Allow,Deny"... @@ -2763,18 +2763,18 @@ if (location == NULL) cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize browse access control list.");</li> </ul></li> <li>else if (!strncasecmp(value, "deny", 4))</li> <li>else if (!_cups_strncasecmp(value, "deny", 4)) location->order_type = CUPSD_AUTH_ALLOW;</li> <li>else if (!strncasecmp(value, "allow", 5))</li> <li>else if (!_cups_strncasecmp(value, "allow", 5)) location->order_type = CUPSD_AUTH_DENY; else cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown BrowseOrder value %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "BrowseProtocols") ||</li> <li>!strcasecmp(line, "BrowseLocalProtocols") ||</li> <li>!strcasecmp(line, "BrowseRemoteProtocols"))</li> <li>else if (!_cups_strcasecmp(line, "BrowseProtocols") ||</li> <li>!_cups_strcasecmp(line, "BrowseLocalProtocols") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "BrowseRemoteProtocols"))</code></pre> <p>{ /*</p> <ul> <li>"BrowseProtocols name [... name]" @@ -2792,13 +2792,13 @@ break; }</li> </ul> </li> <li> <pre><code>if (strcasecmp(line, "BrowseLocalProtocols"))</code></pre> </li> <li>if (_cups_strcasecmp(line, "BrowseLocalProtocols")) BrowseRemoteProtocols = protocols;</li> <li>if (strcasecmp(line, "BrowseRemoteProtocols"))</li> <li>if (_cups_strcasecmp(line, "BrowseRemoteProtocols")) BrowseLocalProtocols = protocols; }</li> <li>else if ((!strcasecmp(line, "BrowseAllow") ||</li> <li>!strcasecmp(line, "BrowseDeny")) && value)</li> <li>else if ((!_cups_strcasecmp(line, "BrowseAllow") ||</li> <li>!_cups_strcasecmp(line, "BrowseDeny")) && value) { /* <ul> <li>BrowseAllow [From] host/ip... @@ -2815,7 +2815,7 @@ "Unable to initialize browse access control list."); else {</li> </ul></li> <li>if (!strncasecmp(value, "from", 4))</li> <li>if (!_cups_strncasecmp(value, "from", 4)) { /* <ul> <li>Skip leading "from"... @@ -2863,24 +2863,24 @@</li> <li>nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "all"))</code></pre> </li> <li> <pre><code>if (!_cups_strcasecmp(value, "all"))</code></pre> <p>{ /<em> * All hosts... </em>/</p> </li> <li> <pre><code>if (!strcasecmp(line, "BrowseAllow"))</code></pre> </li> <li>if (!_cups_strcasecmp(line, "BrowseAllow")) cupsdAddIPMask(&(location->allow), zeros, zeros); else cupsdAddIPMask(&(location->deny), zeros, zeros); }</li> <li>else if (!strcasecmp(value, "none"))</li> <li> <pre><code>else if (!_cups_strcasecmp(value, "none"))</code></pre> <p>{ /<em> * No hosts... </em>/</p> </li> <li> <pre><code>if (!strcasecmp(line, "BrowseAllow"))</code></pre> </li> <li> <pre><code>if (!_cups_strcasecmp(line, "BrowseAllow")) cupsdAddIPMask(&(location->allow), ones, zeros); else cupsdAddIPMask(&(location->deny), ones, zeros);</code></pre> <p>@@ -2897,7 +2897,7 @@ * Host or domain name... */</p> </li> <li> <pre><code>if (!strcasecmp(line, "BrowseAllow"))</code></pre> </li> <li> <pre><code>if (!_cups_strcasecmp(line, "BrowseAllow")) cupsdAddNameMask(&(location->allow), value); else cupsdAddNameMask(&(location->deny), value);</code></pre> <p>@@ -2915,7 +2915,7 @@ break; }</p> </li> <li> <pre><code>if (!strcasecmp(line, "BrowseAllow"))</code></pre> </li> <li>if (!_cups_strcasecmp(line, "BrowseAllow")) cupsdAddIPMask(&(location->allow), ip, mask); else cupsdAddIPMask(&(location->deny), ip, mask); @@ -2929,7 +2929,7 @@ } } }</li> <li>else if (!strcasecmp(line, "BrowseRelay") && value)</li> <li> <p>else if (!_cups_strcasecmp(line, "BrowseRelay") && value) { /*</p> <ul> <li>BrowseRelay [from] source [to] destination @@ -2953,7 +2953,7 @@</li> </ul> <p>memset(relay, 0, sizeof(cupsd_dirsvc_relay_t));</p> </li> <li> <pre><code>if (!strncasecmp(value, "from ", 5))</code></pre> </li> <li> <pre><code>if (!_cups_strncasecmp(value, "from ", 5))</code></pre> <p>{ /*</p> <ul> <li>Skip leading "from"... @@ -3039,7 +3039,7 @@</li> <li>Get "to" address and port... */</li> </ul> </li> <li> <pre><code>if (!strncasecmp(valueptr, "to ", 3))</code></pre> </li> <li>if (!_cups_strncasecmp(valueptr, "to ", 3)) { /<em> \</em> Strip leading "to"... @@ -3092,7 +3092,7 @@ valueptr, linenum); } }</li> <li>else if (!strcasecmp(line, "BrowsePoll") && value)</li> <li>else if (!_cups_strcasecmp(line, "BrowsePoll") && value) { /* <ul> <li>BrowsePoll address[:port] @@ -3154,22 +3154,22 @@ cupsdLogMessage(CUPSD_LOG_INFO, "Polling %s:%d", pollp->hostname, pollp->port); }</li> </ul></li> <li>else if (!strcasecmp(line, "DefaultAuthType") && value)</li> <li>else if (!_cups_strcasecmp(line, "DefaultAuthType") && value) { /* <ul> <li>DefaultAuthType {basic,digest,basicdigest,negotiate} */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "none"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "none")) DefaultAuthType = CUPSD_AUTH_NONE;</li> <li>else if (!strcasecmp(value, "basic"))</li> <li>else if (!_cups_strcasecmp(value, "basic")) DefaultAuthType = CUPSD_AUTH_BASIC;</li> <li>else if (!strcasecmp(value, "digest"))</li> <li>else if (!_cups_strcasecmp(value, "digest")) DefaultAuthType = CUPSD_AUTH_DIGEST;</li> <li>else if (!strcasecmp(value, "basicdigest"))</li> <li>else if (!_cups_strcasecmp(value, "basicdigest")) DefaultAuthType = CUPSD_AUTH_BASICDIGEST; <h1>ifdef HAVE_GSSAPI</h1></li> <li>else if (!strcasecmp(value, "negotiate"))</li> <li>else if (!_cups_strcasecmp(value, "negotiate")) DefaultAuthType = CUPSD_AUTH_NEGOTIATE; <h1>endif /* HAVE_GSSAPI */</h1> <p>else @@ -3182,17 +3182,17 @@ } }</p> <h1>ifdef HAVE_SSL</h1></li> <li>else if (!strcasecmp(line, "DefaultEncryption"))</li> <li>else if (!_cups_strcasecmp(line, "DefaultEncryption")) { /* <ul> <li>DefaultEncryption {Never,IfRequested,Required} */</li> </ul></li> <li> <pre><code>if (!value || !strcasecmp(value, "never"))</code></pre> </li> <li>if (!value || !_cups_strcasecmp(value, "never")) DefaultEncryption = HTTP_ENCRYPT_NEVER;</li> <li>else if (!strcasecmp(value, "required"))</li> <li>else if (!_cups_strcasecmp(value, "required")) DefaultEncryption = HTTP_ENCRYPT_REQUIRED;</li> <li>else if (!strcasecmp(value, "ifrequested"))</li> <li>else if (!_cups_strcasecmp(value, "ifrequested")) DefaultEncryption = HTTP_ENCRYPT_IF_REQUESTED; else { @@ -3204,7 +3204,7 @@ } } <h1>endif /* HAVE_SSL */</h1></li> <li>else if (!strcasecmp(line, "User") && value)</li> <li>else if (!_cups_strcasecmp(line, "User") && value) { /* <ul> <li>User ID to run as... @@ -3247,7 +3247,7 @@ value, linenum); } }</li> </ul></li> <li>else if (!strcasecmp(line, "Group") && value)</li> <li>else if (!_cups_strcasecmp(line, "Group") && value) { /* <ul> <li>Group ID to run as... @@ -3268,7 +3268,7 @@ value, linenum); } }</li> </ul></li> <li>else if (!strcasecmp(line, "SystemGroup") && value)</li> <li>else if (!_cups_strcasecmp(line, "SystemGroup") && value) { /* <ul> <li>SystemGroup (admin) group(s)... @@ -3279,101 +3279,101 @@ "Unknown SystemGroup \"%s\" on line %d, ignoring.", value, linenum); }</li> </ul></li> <li>else if (!strcasecmp(line, "HostNameLookups") && value)</li> <li>else if (!_cups_strcasecmp(line, "HostNameLookups") && value) { /* <ul> <li>Do hostname lookups? */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "off") || !strcasecmp(value, "no") ||</code></pre> </li> <li>!strcasecmp(value, "false"))</li> <li>if (!_cups_strcasecmp(value, "off") || !_cups_strcasecmp(value, "no") ||</li> <li>!_cups_strcasecmp(value, "false")) HostNameLookups = 0;</li> <li>else if (!strcasecmp(value, "on") || !strcasecmp(value, "yes") ||</li> <li>!strcasecmp(value, "true"))</li> <li>else if (!_cups_strcasecmp(value, "on") || !_cups_strcasecmp(value, "yes") ||</li> <li>!_cups_strcasecmp(value, "true")) HostNameLookups = 1;</li> <li>else if (!strcasecmp(value, "double"))</li> <li>else if (!_cups_strcasecmp(value, "double")) HostNameLookups = 2; else cupsdLogMessage(CUPSD_LOG_WARN, "Unknown HostNameLookups %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "AccessLogLevel") && value)</li> <li>else if (!_cups_strcasecmp(line, "AccessLogLevel") && value) { /* <ul> <li>Amount of logging to do to access log... */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "all"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "all")) AccessLogLevel = CUPSD_ACCESSLOG_ALL;</li> <li>else if (!strcasecmp(value, "actions"))</li> <li>else if (!_cups_strcasecmp(value, "actions")) AccessLogLevel = CUPSD_ACCESSLOG_ACTIONS;</li> <li>else if (!strcasecmp(value, "config"))</li> <li>else if (!_cups_strcasecmp(value, "config")) AccessLogLevel = CUPSD_ACCESSLOG_CONFIG; else cupsdLogMessage(CUPSD_LOG_WARN, "Unknown AccessLogLevel %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "LogLevel") && value)</li> <li>else if (!_cups_strcasecmp(line, "LogLevel") && value) { /* <ul> <li>Amount of logging to do to error log... */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "debug2"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "debug2")) LogLevel = CUPSD_LOG_DEBUG2;</li> <li>else if (!strcasecmp(value, "debug"))</li> <li>else if (!_cups_strcasecmp(value, "debug")) LogLevel = CUPSD_LOG_DEBUG;</li> <li>else if (!strcasecmp(value, "info"))</li> <li>else if (!_cups_strcasecmp(value, "info")) LogLevel = CUPSD_LOG_INFO;</li> <li>else if (!strcasecmp(value, "notice"))</li> <li>else if (!_cups_strcasecmp(value, "notice")) LogLevel = CUPSD_LOG_NOTICE;</li> <li>else if (!strcasecmp(value, "warn"))</li> <li>else if (!_cups_strcasecmp(value, "warn")) LogLevel = CUPSD_LOG_WARN;</li> <li>else if (!strcasecmp(value, "error"))</li> <li>else if (!_cups_strcasecmp(value, "error")) LogLevel = CUPSD_LOG_ERROR;</li> <li>else if (!strcasecmp(value, "crit"))</li> <li>else if (!_cups_strcasecmp(value, "crit")) LogLevel = CUPSD_LOG_CRIT;</li> <li>else if (!strcasecmp(value, "alert"))</li> <li>else if (!_cups_strcasecmp(value, "alert")) LogLevel = CUPSD_LOG_ALERT;</li> <li>else if (!strcasecmp(value, "emerg"))</li> <li>else if (!_cups_strcasecmp(value, "emerg")) LogLevel = CUPSD_LOG_EMERG;</li> <li>else if (!strcasecmp(value, "none"))</li> <li>else if (!_cups_strcasecmp(value, "none")) LogLevel = CUPSD_LOG_NONE; else cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogLevel %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "LogTimeFormat") && value)</li> <li>else if (!_cups_strcasecmp(line, "LogTimeFormat") && value) { /* <ul> <li>Amount of logging to do to error log... */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "standard"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "standard")) LogTimeFormat = CUPSD_TIME_STANDARD;</li> <li>else if (!strcasecmp(value, "usecs"))</li> <li>else if (!_cups_strcasecmp(value, "usecs")) LogTimeFormat = CUPSD_TIME_USECS; else cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "PrintcapFormat") && value)</li> <li>else if (!_cups_strcasecmp(line, "PrintcapFormat") && value) { /* <ul> <li>Format of printcap file? */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "bsd"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "bsd")) PrintcapFormat = PRINTCAP_BSD;</li> <li>else if (!strcasecmp(value, "plist"))</li> <li>else if (!_cups_strcasecmp(value, "plist")) PrintcapFormat = PRINTCAP_PLIST;</li> <li>else if (!strcasecmp(value, "solaris"))</li> <li>else if (!_cups_strcasecmp(value, "solaris")) PrintcapFormat = PRINTCAP_SOLARIS; else cupsdLogMessage(CUPSD_LOG_WARN, "Unknown PrintcapFormat %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "ServerTokens") && value)</li> <li> <p>else if (!_cups_strcasecmp(line, "ServerTokens") && value) { /*</p> <ul> <li>Set the string used for the Server header... @@ -3384,26 +3384,26 @@</li> </ul> <p>uname(&plat);</p> </li> <li> <pre><code>if (!strcasecmp(value, "ProductOnly"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "ProductOnly")) cupsdSetString(&ServerHeader, "CUPS");</li> <li>else if (!strcasecmp(value, "Major"))</li> <li>else if (!_cups_strcasecmp(value, "Major")) cupsdSetString(&ServerHeader, "CUPS/1");</li> <li>else if (!strcasecmp(value, "Minor"))</li> <li>else if (!_cups_strcasecmp(value, "Minor")) cupsdSetString(&ServerHeader, "CUPS/1.4");</li> <li>else if (!strcasecmp(value, "Minimal"))</li> <li>else if (!_cups_strcasecmp(value, "Minimal")) cupsdSetString(&ServerHeader, CUPS_MINIMAL);</li> <li>else if (!strcasecmp(value, "OS"))</li> <li>else if (!_cups_strcasecmp(value, "OS")) cupsdSetStringf(&ServerHeader, CUPS_MINIMAL " (%s)", plat.sysname);</li> <li>else if (!strcasecmp(value, "Full"))</li> <li>else if (!_cups_strcasecmp(value, "Full")) cupsdSetStringf(&ServerHeader, CUPS_MINIMAL " (%s) IPP/1.1", plat.sysname);</li> <li>else if (!strcasecmp(value, "None"))</li> <li>else if (!_cups_strcasecmp(value, "None")) cupsdClearString(&ServerHeader); else cupsdLogMessage(CUPSD_LOG_WARN, "Unknown ServerTokens %s on line %d.", value, linenum); }</li> <li>else if (!strcasecmp(line, "PassEnv") && value)</li> <li>else if (!_cups_strcasecmp(line, "PassEnv") && value) { /* <ul> <li>PassEnv variable [... variable] @@ -3428,7 +3428,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "ServerAlias") && value)</li> <li>else if (!_cups_strcasecmp(line, "ServerAlias") && value) { /* <ul> <li>ServerAlias name [... name] @@ -3456,7 +3456,7 @@ break; } }</li> </ul></li> <li>else if (!strcasecmp(line, "SetEnv") && value)</li> <li>else if (!_cups_strcasecmp(line, "SetEnv") && value) { /* <ul> <li>SetEnv variable value @@ -3481,15 +3481,15 @@ linenum); } <h1>ifdef HAVE_SSL</h1></li> </ul></li> <li>else if (!strcasecmp(line, "SSLOptions"))</li> <li>else if (!_cups_strcasecmp(line, "SSLOptions")) { /* <ul> <li>SSLOptions options */</li> </ul></li> <li> <pre><code>if (!value || !strcasecmp(value, "none"))</code></pre> </li> <li>if (!value || !_cups_strcasecmp(value, "none")) SSLOptions = CUPSD_SSL_NONE;</li> <li>else if (!strcasecmp(value, "noemptyfragments"))</li> <li> <pre><code>else if (!_cups_strcasecmp(value, "noemptyfragments")) SSLOptions = CUPSD_SSL_NOEMPTY;</code></pre> <p>else cupsdLogMessage(CUPSD_LOG_ERROR, @@ -3504,7 +3504,7 @@ */</p> <p>for (i = NUM_VARS, var = variables; i > 0; i --, var ++)</p> </li> <li>if (!strcasecmp(line, var->name))</li> <li> <pre><code> if (!_cups_strcasecmp(line, var->name))</code></pre> <p>break;</p> <p>if (i == 0) @@ -3563,17 +3563,17 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Missing boolean value for %s on line %d.", line, linenum);</p> </li> <li>else if (!strcasecmp(value, "true") ||</li> <li>!strcasecmp(value, "on") ||</li> <li>!strcasecmp(value, "enabled") ||</li> <li>!strcasecmp(value, "yes") ||</li> <li>else if (!_cups_strcasecmp(value, "true") ||</li> <li>!_cups_strcasecmp(value, "on") ||</li> <li>!_cups_strcasecmp(value, "enabled") ||</li> <li>!_cups_strcasecmp(value, "yes") || atoi(value) != 0) <em>((int </em>)var->ptr) = TRUE;</li> <li>else if (!strcasecmp(value, "false") ||</li> <li>!strcasecmp(value, "off") ||</li> <li>!strcasecmp(value, "disabled") ||</li> <li>!strcasecmp(value, "no") ||</li> <li>!strcasecmp(value, "0"))</li> <li>else if (!_cups_strcasecmp(value, "false") ||</li> <li>!_cups_strcasecmp(value, "off") ||</li> <li>!_cups_strcasecmp(value, "disabled") ||</li> <li>!_cups_strcasecmp(value, "no") ||</li> <li> <pre><code> !_cups_strcasecmp(value, "0")) *((int *)var->ptr) = FALSE; else cupsdLogMessage(CUPSD_LOG_ERROR,</code></pre> <p>@@ -3651,10 +3651,10 @@</p> <ul> <li>Decode the directive... */</li> </ul> </li> <li>if (!strcasecmp(line, "</Location>"))</li> <li>if (!_cups_strcasecmp(line, "</Location>")) return (linenum);</li> <li>else if (!strcasecmp(line, "<Limit") ||</li> <li>!strcasecmp(line, "<LimitExcept"))</li> <li>else if (!_cups_strcasecmp(line, "<Limit") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "<LimitExcept"))</code></pre> <p>{ if (!value) { @@ -3699,13 +3699,13 @@ for (value = valptr; isspace(*value & 255); value ++); }</p> </li> <li> <pre><code>if (!strcasecmp(line, "<LimitExcept"))</code></pre> </li> <li> <pre><code>if (!_cups_strcasecmp(line, "<LimitExcept")) loc->limit = CUPSD_AUTH_LIMIT_ALL ^ loc->limit;</code></pre> <p>parent->limit &= ~loc->limit; }</p> </li> <li>else if (!strcasecmp(line, "</Limit>") ||</li> <li>!strcasecmp(line, "</LimitExcept>"))</li> <li>else if (!_cups_strcasecmp(line, "</Limit>") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "</LimitExcept>"))</code></pre> <p>loc = parent; else if (!parse_aaa(loc, line, value, linenum)) { @@ -3768,7 +3768,7 @@</p> <ul> <li>Decode the directive... */</li> </ul> </li> <li>if (!strcasecmp(line, "</Policy>"))</li> <li> <p>if (!_cups_strcasecmp(line, "</Policy>")) { if (op) cupsdLogMessage(CUPSD_LOG_WARN, @@ -3779,7 +3779,7 @@</p> <p>return (linenum); }</p> </li> <li>else if (!strcasecmp(line, "<Limit") && !op)</li> <li> <p>else if (!_cups_strcasecmp(line, "<Limit") && !op) { if (!value) { @@ -3805,7 +3805,7 @@</p> <pre><code>if (num_ops < (int)(sizeof(ops) / sizeof(ops[0])))</code></pre> <p>{</p> </li> <li>if (!strcasecmp(value, "All"))</li> <li> <pre><code>if (!_cups_strcasecmp(value, "All")) ops[num_ops] = IPP_ANY_OPERATION;</code></pre> <p>else if ((ops[num_ops] = ippOpValue(value)) == IPP_BAD_OPERATION) cupsdLogMessage(CUPSD_LOG_ERROR, @@ -3838,7 +3838,7 @@</p> <p>op = cupsdAddPolicyOp(pol, NULL, ops[0]); }</p> </li> <li>else if (!strcasecmp(line, "</Limit>") && op)</li> <li> <p>else if (!_cups_strcasecmp(line, "</Limit>") && op) { /*</p> <ul> <li>Finish the current operation limit... @@ -3856,10 +3856,10 @@</li> </ul> <p>op = NULL; }</p> </li> <li>else if (!strcasecmp(line, "JobPrivateAccess") ||</li> <li>!strcasecmp(line, "JobPrivateValues") ||</li> <li>!strcasecmp(line, "SubscriptionPrivateAccess") ||</li> <li>!strcasecmp(line, "SubscriptionPrivateValues"))</li> <li>else if (!_cups_strcasecmp(line, "JobPrivateAccess") ||</li> <li>!_cups_strcasecmp(line, "JobPrivateValues") ||</li> <li>!_cups_strcasecmp(line, "SubscriptionPrivateAccess") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "SubscriptionPrivateValues"))</code></pre> <p>{ if (op) { @@ -3890,13 +3890,13 @@</p> <ul> <li>Save it appropriately... */</li> </ul> </li> <li> <pre><code>if (!strcasecmp(line, "JobPrivateAccess"))</code></pre> </li> <li> <pre><code>if (!_cups_strcasecmp(line, "JobPrivateAccess"))</code></pre> <p>{ /<em> * JobPrivateAccess {all|default|user/group list|@@ACL} </em>/</p> </li> <li> <pre><code> if (!strcasecmp(value, "default"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "default")) { cupsdAddString(&(pol->job_access), "@OWNER"); cupsdAddString(&(pol->job_access), "@SYSTEM"); @@ -3904,13 +3904,13 @@ else cupsdAddString(&(pol->job_access), value); }</li> <li>else if (!strcasecmp(line, "JobPrivateValues"))</li> <li> <pre><code>else if (!_cups_strcasecmp(line, "JobPrivateValues"))</code></pre> <p>{ /<em> * JobPrivateValues {all|none|default|attribute list} </em>/</p> </li> <li> <pre><code>if (!strcasecmp(value, "default"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "default")) { cupsdAddString(&(pol->job_attrs), "job-name"); cupsdAddString(&(pol->job_attrs), "job-originating-host-name"); @@ -3919,13 +3919,13 @@ else cupsdAddString(&(pol->job_attrs), value); }</li> <li>else if (!strcasecmp(line, "SubscriptionPrivateAccess"))</li> <li> <pre><code>else if (!_cups_strcasecmp(line, "SubscriptionPrivateAccess"))</code></pre> <p>{ /<em> * SubscriptionPrivateAccess {all|default|user/group list|@@ACL} </em>/</p> </li> <li> <pre><code> if (!strcasecmp(value, "default"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "default")) { cupsdAddString(&(pol->sub_access), "@OWNER"); cupsdAddString(&(pol->sub_access), "@SYSTEM"); @@ -3933,13 +3933,13 @@ else cupsdAddString(&(pol->sub_access), value); }</li> <li>else /* if (!strcasecmp(line, "SubscriptionPrivateValues")) */</li> <li> <pre><code>else /* if (!_cups_strcasecmp(line, "SubscriptionPrivateValues")) */</code></pre> <p>{ /<em> * SubscriptionPrivateValues {all|none|default|attribute list} </em>/</p> </li> <li> <pre><code>if (!strcasecmp(value, "default"))</code></pre> </li> <li> <h1>if (!_cups_strcasecmp(value, "default")) { cupsdAddString(&(pol->sub_attrs), "notify-events"); cupsdAddString(&(pol->sub_attrs), "notify-pull-method"); Index: scheduler/testmime.c</h1> <p>--- scheduler/testmime.c (revision 9791) +++ scheduler/testmime.c (working copy) @@ -3,7 +3,7 @@ *</p> <ul> <li>MIME test program for CUPS.</li> <li> </li> </ul> </li> <li>* Copyright 2007-2010 by Apple Inc.</li> <li>* Copyright 2007-2011 by Apple Inc. <ul> <li>Copyright 1997-2006 by Easy Software Products, all rights reserved.</li> <li> </li> <li>These coded instructions, statements, and computer programs are the @@ -286,9 +286,9 @@ for (temptype = mimeFirstType(mime); temptype; temptype = mimeNextType(mime))</li> </ul></li> <li>if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||</li> <li>!strcasecmp(temptype->super, super)) &&</li> <li>(type[0] == '*' || !strcasecmp(temptype->type, type)))</li> <li>if (((super[0] == '*' && _cups_strcasecmp(temptype->super, "printer")) ||</li> <li>!_cups_strcasecmp(temptype->super, super)) &&</li> <li> <pre><code> (type[0] == '*' || !_cups_strcasecmp(temptype->type, type)))</code></pre> <p>{ if (desttype != filtertype) {</p> <h1>Index: scheduler/cups-driverd.cxx</h1> <p>--- scheduler/cups-driverd.cxx (revision 9791) +++ scheduler/cups-driverd.cxx (working copy) @@ -101,7 +101,7 @@ make_and<em>model[128], /* NickName/ModelName </em>/ device<em>id[256], /</em> IEEE 1284 Device ID <em>/ scheme[128]; /</em> PPD scheme */ -} ppd_rec_t; +} ppd_rec_t;</p> <p>typedef struct /<strong><em>\</em> In-memory record **</strong>/ { @@ -284,7 +284,7 @@ const char <em>datadir; // CUPS_DATADIR env var ppdcSource </em>src; // PPD source file data ppdcDriver *d; // Current driver</p> </li> <li>cups_file_t *out; // Stdout via CUPS file API </li> <li>cups_file_t *out; // Stdout via CUPS file API char message[2048], // status-message filename[1024], // Full path to .drv file(s) scheme[32], // URI scheme ("drv") @@ -745,7 +745,7 @@ <ul> <li>First compare manufacturers... */</li> </ul></li> <li>if ((diff = strcasecmp(p0->record.make, p1->record.make)) != 0)</li> <li>if ((diff = _cups_strcasecmp(p0->record.make, p1->record.make)) != 0) return (diff); else if ((diff = cupsdCompareNames(p0->record.make_and_model, p1->record.make_and_model)) != 0) @@ -1160,7 +1160,7 @@ } }</li> <li> <pre><code>if (make && !strcasecmp(ppd->record.make, make))</code></pre> </li> <li> <pre><code>if (make && !_cups_strcasecmp(ppd->record.make, make)) ppd->matches ++;</code></pre> <p>if (make_and_model_re && @@ -1188,7 +1188,7 @@ for (i = 0; i < PPD_MAX_PROD; i ++) if (!ppd->record.products[i][0]) break;</p> </li> <li>else if (!strcasecmp(ppd->record.products[i], product))</li> <li>else if (!_cups_strcasecmp(ppd->record.products[i], product)) { ppd->matches += 3; break; @@ -1200,7 +1200,7 @@ for (i = 0; i < PPD_MAX_VERS; i ++) if (!ppd->record.psversions[i][0]) break;</li> <li>else if (!strcasecmp(ppd->record.psversions[i], psversion))</li> <li>else if (!_cups_strcasecmp(ppd->record.psversions[i], psversion)) { ppd->matches ++; break; @@ -1342,7 +1342,7 @@ ppd = (ppd_info_t <em>)cupsArrayNext(matches); ppd; ppd = (ppd_info_t </em>)cupsArrayNext(matches))</li> <li>if (strcasecmp(this_make, ppd->record.make))</li> <li> <p>if (_cups_strcasecmp(this_make, ppd->record.make)) break;</p> <p>cupsArrayPrev(matches); @@ -1431,7 +1431,7 @@</p> <p>if (nick_name) strlcpy(make_model, nick_name->value->value, sizeof(make_model));</p> </li> <li>else if (strncasecmp(d->model_name->value, d->manufacturer->value,</li> <li> <p>else if (_cups_strncasecmp(d->model_name->value, d->manufacturer->value, strlen(d->manufacturer->value))) snprintf(make_model, sizeof(make_model), "%s %s, %s", d->manufacturer->value, d->model_name->value, @@ -1441,7 +1441,7 @@ d->version->value);</p> <p>if ((cups_fax = d->find_attr("cupsFax", NULL)) != NULL &&</p> </li> <li>!strcasecmp(cups_fax->value->value, "true"))</li> <li>!_cups_strcasecmp(cups_fax->value->value, "true")) type = PPD_TYPE_FAX; else if (d->type == PPDC_DRIVER_PS) type = PPD_TYPE_POSTSCRIPT; @@ -1453,9 +1453,9 @@ type = PPD_TYPE_POSTSCRIPT; filter; filter = (ppdcFilter *)d->filters->next())</li> <li>if (strcasecmp(filter->mime_type->value, "application/vnd.cups-raster"))</li> <li>if (_cups_strcasecmp(filter->mime_type->value, "application/vnd.cups-raster")) type = PPD_TYPE_RASTER;</li> <li>else if (strcasecmp(filter->mime_type->value,</li> <li>else if (_cups_strcasecmp(filter->mime_type->value, "application/vnd.cups-pdf")) type = PPD_TYPE<em>PDF; } @@ -2003,7 +2003,7 @@ sscanf(line, "%</em>[^:]:%63s", lang_version); else if (!strncmp(line, "_NickName:", 10)) sscanf(line, "%*[^\"]\"%255[^\"]", nick_name);</li> <li>else if (!strncasecmp(line, "*1284DeviceID:", 14))</li> <li>else if (!_cups_strncasecmp(line, "<em>1284DeviceID:", 14)) { sscanf(line, "%</em>[^\"]\"%255[^\"]", device_id);</li> </ul> <p>@@ -2071,7 +2071,7 @@ { for (ptr = line + 9; isspace(*ptr & 255); ptr ++);</p> <ul> <li>if (!strncasecmp(ptr, "true", 4))</li> <li>if (!_cups_strncasecmp(ptr, "true", 4)) type = PPD_TYPE_FAX; } else if (!strncmp(line, "*cupsFilter:", 12) && type == PPD_TYPE_POSTSCRIPT) @@ -2149,7 +2149,7 @@ while (isspace(manufacturer[0] & 255)) _cups_strcpy(manufacturer, manufacturer + 1);</li> <li>if (!strncasecmp(make_model, manufacturer, strlen(manufacturer)))</li> <li>if (!_cups_strncasecmp(make_model, manufacturer, strlen(manufacturer))) strlcpy(temp, make_model, sizeof(temp)); else snprintf(temp, sizeof(temp), "%s %s", manufacturer, make_model); @@ -2182,10 +2182,10 @@ else strcpy(manufacturer, "Other"); }</li> <li>else if (!strncasecmp(manufacturer, "LHAG", 4) ||</li> <li>!strncasecmp(manufacturer, "linotype", 8))</li> <li>else if (!_cups_strncasecmp(manufacturer, "LHAG", 4) ||</li> <li>!_cups_strncasecmp(manufacturer, "linotype", 8)) strcpy(manufacturer, "LHAG");</li> <li>else if (!strncasecmp(manufacturer, "Hewlett", 7))</li> <li> <p>else if (!_cups_strncasecmp(manufacturer, "Hewlett", 7)) strcpy(manufacturer, "HP");</p> <p>/* @@ -2216,7 +2216,7 @@ }</p> <p>for (i = 0; i < (int)(sizeof(languages) / sizeof(languages[0])); i ++)</p> </li> <li>if (!strcasecmp(languages[i].version, lang_version))</li> <li> <pre><code>if (!_cups_strcasecmp(languages[i].version, lang_version)) break;</code></pre> <p>if (i < (int)(sizeof(languages) / sizeof(languages[0]))) @@ -2434,14 +2434,14 @@</p> <p>while (*device_id && ptr < (res + sizeof(res) - 6)) {</p> </li> <li>cmd = !strncasecmp(device_id, "COMMAND SET:", 12) ||</li> <li>!strncasecmp(device_id, "CMD:", 4);</li> <li>cmd = !_cups_strncasecmp(device_id, "COMMAND SET:", 12) ||</li> <li> <pre><code> !_cups_strncasecmp(device_id, "CMD:", 4);</code></pre> </li> <li>if (cmd || !strncasecmp(device_id, "MANUFACTURER:", 13) ||</li> <li>!strncasecmp(device_id, "MFG:", 4) ||</li> <li>!strncasecmp(device_id, "MFR:", 4) ||</li> <li>!strncasecmp(device_id, "MODEL:", 6) ||</li> <li>!strncasecmp(device_id, "MDL:", 4))</li> <li>if (cmd || !_cups_strncasecmp(device_id, "MANUFACTURER:", 13) ||</li> <li>!_cups_strncasecmp(device_id, "MFG:", 4) ||</li> <li>!_cups_strncasecmp(device_id, "MFR:", 4) ||</li> <li>!_cups_strncasecmp(device_id, "MODEL:", 6) ||</li> <li> <pre><code> !_cups_strncasecmp(device_id, "MDL:", 4))</code></pre> <p>{ if (ptr > res) {</p> <h1>Index: scheduler/ipp.c</h1> <p>--- scheduler/ipp.c (revision 9792) +++ scheduler/ipp.c (working copy) @@ -412,8 +412,8 @@ "attributes-natural-language", NULL, DefaultLanguage);</p> <p>if (charset &&</p> </li> <li>strcasecmp(charset->values[0].string.text, "us-ascii") &&</li> <li>strcasecmp(charset->values[0].string.text, "utf-8"))</li> <li>_cups_strcasecmp(charset->values[0].string.text, "us-ascii") &&</li> <li> <pre><code> _cups_strcasecmp(charset->values[0].string.text, "utf-8"))</code></pre> <p>{ /<em> * Bad character set... @@ -502,7 +502,7 @@ </em>/</p> <p>if (!strcmp(username->values[0].string.text, "root") &&</p> </li> <li>strcasecmp(con->http.hostname, "localhost") &&</li> <li> <pre><code> _cups_strcasecmp(con->http.hostname, "localhost") && strcmp(con->username, "root"))</code></pre> <p>{ /<em> @@ -1377,8 +1377,8 @@ </em>/</p> <p>if (!printer->shared &&</p> </li> <li>strcasecmp(con->http.hostname, "localhost") &&</li> <li>strcasecmp(con->http.hostname, ServerName))</li> <li>_cups_strcasecmp(con->http.hostname, "localhost") &&</li> <li>_cups_strcasecmp(con->http.hostname, ServerName)) { send_ipp_status(con, IPP_NOT<em>AUTHORIZED, </em>("The printer or class is not shared.")); @@ -4353,7 +4353,7 @@ for (i = 0; i < job_ids->num_values; i ++) { if ((job = cupsdFindJob(job_ids->values[i].integer)) == NULL ||</li> <li>strcasecmp(job->dest, printer->name))</li> <li>_cups_strcasecmp(job->dest, printer->name)) break; }</li> </ul> <p>@@ -4463,7 +4463,7 @@ job; job = (cupsd_job_t *)cupsArrayNext(ActiveJobs)) if (job->state_value <= IPP_JOB_PROCESSING &&</p> <ul> <li>!strcasecmp(job->dest, printer->name))</li> <li> <pre><code>!_cups_strcasecmp(job->dest, printer->name))</code></pre> <p>break;</p> <p>if (job) @@ -4478,7 +4478,7 @@ job; job = (cupsd_job_t *)cupsArrayNext(ActiveJobs)) if (job->state_value == IPP_JOB_STOPPED &&</p> </li> <li>!strcasecmp(job->dest, printer->name))</li> <li> <pre><code> !_cups_strcasecmp(job->dest, printer->name)) break;</code></pre> <p>if (job) @@ -4884,7 +4884,7 @@ break; }</p> <h1>else</h1> </li> <li>else if (!strcasecmp(username, name))</li> <li>else if (!_cups_strcasecmp(username, name)) break; <h1>endif /* HAVE_MBR_UID_TO_UUID */</h1></li> </ul> <p>@@ -5533,7 +5533,7 @@ case IPP_TAG_KEYWORD : case IPP_TAG_CHARSET : case IPP_TAG_LANGUAGE :</p> <ul> <li>if (!strcasecmp(banner->filetype->type, "postscript"))</li> <li> <pre><code> if (!_cups_strcasecmp(banner->filetype->type, "postscript")) { /* * Need to quote strings for PS banners...</code></pre> <p>@@ -7798,7 +7798,7 @@ continue; }</p> </li> <li> <pre><code>if (username[0] && strcasecmp(username, job->username))</code></pre> </li> <li> <pre><code>if (username[0] && _cups_strcasecmp(username, job->username))</code></pre> <p>continue;</p> <p>if (count > 0) @@ -8506,7 +8506,7 @@ if ((!type || (printer->type & CUPS_PRINTER_CLASS) == type) && (printer->type & printer_mask) == printer_type && (!location ||</p> </li> <li>(printer->location && !strcasecmp(printer->location, location))))</li> <li>(printer->location && !_cups_strcasecmp(printer->location, location)))) { /* <ul> <li>If HideImplicitMembers is enabled, see if this printer or class @@ -8746,7 +8746,7 @@ sub; sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions)) if ((!printer || sub->dest == printer) && (!job || sub->job == job) &&</li> </ul></li> <li>(!username[0] || !strcasecmp(username, sub->owner)))</li> <li>(!username[0] || !_cups_strcasecmp(username, sub->owner))) { ippAddSeparator(con->response);</li> </ul> <p>@@ -9198,7 +9198,7 @@ * completed... */</p> <ul> <li>if (strcasecmp(job->dest, src) ||</li> <li>if (_cups_strcasecmp(job->dest, src) || job->state_value > IPP_JOB_STOPPED) continue;</li> </ul> <p>@@ -9497,9 +9497,9 @@</p> <ul> <li>Read any embedded job ticket info from PS files... */</li> <li>if (!strcasecmp(filetype->super, "application") &&</li> <li>(!strcasecmp(filetype->type, "postscript") ||</li> <li>!strcasecmp(filetype->type, "pdf")))</li> <li>if (!_cups_strcasecmp(filetype->super, "application") &&</li> <li>(!_cups_strcasecmp(filetype->type, "postscript") ||</li> <li> <pre><code>!_cups_strcasecmp(filetype->type, "pdf")))</code></pre> <p>read_job_ticket(con);</p> <p>/* @@ -12044,7 +12044,7 @@ if (cupsdCheckGroup(username, pw, name)) break; }</p> </li> <li>else if (!strcasecmp(username, name))</li> <li>else if (!_cups_strcasecmp(username, name)) break; }</li> </ul> <h1>Index: scheduler/cert.c</h1> <p>--- scheduler/cert.c (revision 9791) +++ scheduler/cert.c (working copy) @@ -3,7 +3,7 @@ *</p> <ul> <li>Authentication certificate routines for the CUPS scheduler. * <ul> <li>* Copyright 2007-2010 by Apple Inc.</li> <li>* Copyright 2007-2011 by Apple Inc.</li> </ul></li> <li>Copyright 1997-2006 by Easy Software Products. *</li> <li>These coded instructions, statements, and computer programs are the @@ -368,7 +368,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindCert(certificate=%s)", certificate); for (cert = Certs; cert != NULL; cert = cert->next) <ul> <li>if (!strcasecmp(certificate, cert->certificate))</li> <li> <h1>if (!_cups_strcasecmp(certificate, cert->certificate)) { cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindCert: Returning %s...", cert->username); Index: scheduler/auth.c</h1> <p>--- scheduler/auth.c (revision 9791) +++ scheduler/auth.c (working copy) @@ -252,7 +252,7 @@ "cupsdAddNameMask(masks=%p(%p), name=\"%s\")", masks, *masks, name);</p> </li> </ul></li> <li>if (!strcasecmp(name, "@LOCAL"))</li> <li>if (!_cups_strcasecmp(name, "@LOCAL")) { /* <ul> <li>Deny <em>interface</em>... @@ -261,7 +261,7 @@ temp.type = CUPSD_AUTH<em>INTERFACE; temp.mask.name.name = (char </em>)"_"; }</li> </ul></li> <li>else if (!strncasecmp(name, "@IF(", 4))</li> <li>else if (!_cups_strncasecmp(name, "@IF(", 4)) { /* <ul> <li>Deny <em>interface</em>... @@ -405,7 +405,7 @@ } <h1>ifdef HAVE_AUTHORIZATION_H</h1> <p>else if (!strncmp(authorization, "AuthRef ", 8) &&</p></li> </ul></li> <li>!strcasecmp(con->http.hostname, "localhost"))</li> <li>!_cups<em>strcasecmp(con->http.hostname, "localhost")) { OSStatus status; /* Status </em>/ int authlen; /_ Auth string length <em>/ @@ -510,7 +510,7 @@ for (name = (char </em>)cupsArrayFirst(con->best->names); name; name = (char *)cupsArrayNext(con->best->names))</li> <li>if (!strncasecmp(name, "@AUTHKEY(", 9) || !strcasecmp(name, "@SYSTEM"))</li> <li>if (!_cups_strncasecmp(name, "@AUTHKEY(", 9) || !_cups_strcasecmp(name, "@SYSTEM")) { cupsdLogMessage(CUPSD_LOG_ERROR, "PeerCred authentication not allowed for resource."); @@ -571,7 +571,7 @@ } <h1>endif /* SO_PEERCRED && AF_LOCAL */</h1> <p>else if (!strncmp(authorization, "Local", 5) &&</p></li> <li>!strcasecmp(con->http.hostname, "localhost"))</li> <li> <pre><code> !_cups_strcasecmp(con->http.hostname, "localhost"))</code></pre> <p>{ /*</p> <ul> <li>Get Local certificate authentication data... @@ -1193,7 +1193,7 @@ int allow; /* 1 if allowed, 0 otherwise */</li> </ul> </li> <li>if (!strcasecmp(name, "localhost"))</li> <li>if (!_cups_strcasecmp(name, "localhost")) { /* <ul> <li>Access from localhost (127.0.0.1 or ::1) is always allowed... @@ -1386,7 +1386,7 @@</li> <li>Check for exact name match... */</li> </ul></li> <li> <pre><code> if (!strcasecmp(name, mask->mask.name.name))</code></pre> </li> <li> <pre><code> if (!_cups_strcasecmp(name, mask->mask.name.name)) return (1); /*</code></pre> <p>@@ -1395,7 +1395,7 @@</p> <p>if (name_len >= mask->mask.name.length && mask->mask.name.name[0] == '.' &&</p> </li> <li>!strcasecmp(name + name_len - mask->mask.name.length,</li> <li> <pre><code> !_cups_strcasecmp(name + name_len - mask->mask.name.length, mask->mask.name.name)) return (1); break;</code></pre> <p>@@ -1465,7 +1465,7 @@ */</p> <p>for (i = 0; group->gr_mem[i]; i ++)</p> </li> <li>if (!strcasecmp(username, group->gr_mem[i]))</li> <li>if (!_cups_strcasecmp(username, group->gr_mem[i])) return (1); }</li> </ul> <p>@@ -1714,7 +1714,7 @@ */</p> <pre><code> if (loc->length > bestlen && loc->location &&</code></pre> <ul> <li>!strncasecmp(uri, loc->location, loc->length) &&</li> <li> <pre><code> !_cups_strncasecmp(uri, loc->location, loc->length) &&</code></pre> <p>loc->location[0] == '/' && (limit & loc->limit) != 0) { @@ -1904,7 +1904,7 @@ */</p> <p>if ((best->encryption >= HTTP_ENCRYPT_REQUIRED && !con->http.tls &&</p> </li> <li>strcasecmp(con->http.hostname, "localhost") &&</li> <li>_cups_strcasecmp(con->http.hostname, "localhost") && best->satisfy == CUPSD_AUTH_SATISFY_ALL) && !(type == CUPSD_AUTH_NEGOTIATE || (type == CUPSD_AUTH_NONE && DefaultAuthType == CUPSD_AUTH_NEGOTIATE))) @@ -2045,9 +2045,9 @@ name; name = (char *)cupsArrayNext(best->names)) {</li> <li>if (!strncasecmp(name, "@AUTHKEY(", 9) && check_authref(con, name + 9))</li> <li>if (!_cups_strncasecmp(name, "@AUTHKEY(", 9) && check_authref(con, name + 9)) return (HTTP_OK);</li> <li>else if (!strcasecmp(name, "@SYSTEM") && SystemGroupAuthKey &&</li> <li>else if (!_cups_strcasecmp(name, "@SYSTEM") && SystemGroupAuthKey && check_authref(con, SystemGroupAuthKey)) return (HTTP_OK); } @@ -2060,10 +2060,10 @@ name; name = (char *)cupsArrayNext(best->names)) {</li> <li>if (!strcasecmp(name, "@OWNER") && owner &&</li> <li>!strcasecmp(username, ownername))</li> <li>if (!_cups_strcasecmp(name, "@OWNER") && owner &&</li> <li>!_cups_strcasecmp(username, ownername)) return (HTTP_OK);</li> <li>else if (!strcasecmp(name, "@SYSTEM"))</li> <li>else if (!_cups_strcasecmp(name, "@SYSTEM")) { for (i = 0; i < NumSystemGroups; i ++) if (cupsdCheckGroup(username, pw, SystemGroups[i])) @@ -2074,7 +2074,7 @@ if (cupsdCheckGroup(username, pw, name + 1)) return (HTTP_OK); }</li> <li>else if (!strcasecmp(username, name))</li> <li>else if (!_cups_strcasecmp(username, name)) return (HTTP_OK); }</li> </ul> <p>@@ -2100,7 +2100,7 @@ "cupsdIsAuthorized: Checking group \"%s\" membership...", name);</p> <ul> <li>if (!strcasecmp(name, "@SYSTEM"))</li> <li> <p>if (!_cups_strcasecmp(name, "@SYSTEM")) { for (i = 0; i < NumSystemGroups; i ++) if (cupsdCheckGroup(username, pw, SystemGroups[i]))</p> <h1>Index: scheduler/printers.c</h1> <p>--- scheduler/printers.c (revision 9791) +++ scheduler/printers.c (working copy) @@ -971,8 +971,8 @@</p> <ul> <li>Decode the directive... */</li> </ul> </li> <li>if (!strcasecmp(line, "<Printer") ||</li> <li>!strcasecmp(line, "<DefaultPrinter"))</li> <li>if (!_cups_strcasecmp(line, "<Printer") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "<DefaultPrinter"))</code></pre> <p>{ /*</p> <ul> <li> <Printer name> or <DefaultPrinter name> @@ -994,14 +994,14 @@ </li> <li>Set the default printer as needed... */</li> </ul> </li> <li> <pre><code> if (!strcasecmp(line, "<DefaultPrinter"))</code></pre> </li> <li>if (!_cups_strcasecmp(line, "<DefaultPrinter")) DefaultPrinter = p; } else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "</Printer>"))</li> <li>else if (!_cups_strcasecmp(line, "</Printer>")) { if (p != NULL) { @@ -1047,7 +1047,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "UUID"))</li> <li>else if (!_cups_strcasecmp(line, "UUID")) { if (value && !strncmp(value, "urn:uuid:", 9)) cupsdSetString(&(p->uuid), value); @@ -1055,29 +1055,29 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Bad UUID on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "AuthInfoRequired"))</li> <li>else if (!_cups_strcasecmp(line, "AuthInfoRequired")) { if (!cupsdSetAuthInfoRequired(p, value, NULL)) cupsdLogMessage(CUPSD_LOG_ERROR, "Bad AuthInfoRequired on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Info"))</li> <li>else if (!_cups_strcasecmp(line, "Info")) { if (value) cupsdSetString(&p->info, value); }</li> <li>else if (!strcasecmp(line, "MakeModel"))</li> <li>else if (!_cups_strcasecmp(line, "MakeModel")) { if (value) cupsdSetString(&p->make_model, value); }</li> <li>else if (!strcasecmp(line, "Location"))</li> <li>else if (!_cups_strcasecmp(line, "Location")) { if (value) cupsdSetString(&p->location, value); }</li> <li>else if (!strcasecmp(line, "DeviceURI"))</li> <li>else if (!_cups_strcasecmp(line, "DeviceURI")) { if (value) cupsdSetDeviceURI(p, value); @@ -1085,7 +1085,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Option") && value)</li> <li>else if (!_cups_strcasecmp(line, "Option") && value) { /* <ul> <li>Option name value @@ -1104,7 +1104,7 @@ &(p->options)); } }</li> </ul></li> <li>else if (!strcasecmp(line, "PortMonitor"))</li> <li>else if (!_cups_strcasecmp(line, "PortMonitor")) { if (value && strcmp(value, "none")) cupsdSetString(&p->port_monitor, value); @@ -1114,7 +1114,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Reason"))</li> <li>else if (!_cups_strcasecmp(line, "Reason")) { if (value && strcmp(value, "connecting-to-device") && @@ -1136,15 +1136,15 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum);</li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/michaelrsweet"><img src="https://avatars.githubusercontent.com/u/488103?v=4" />michaelrsweet</a> commented <strong> 13 years ago</strong> </div> <div class="markdown-body"> <pre><code> }</code></pre> <ul> <li>else if (!strcasecmp(line, "State"))</li> <li>else if (!_cups_strcasecmp(line, "State")) { /* <ul> <li>Set the initial queue state... */</li> </ul></li> <li> <pre><code>if (value && !strcasecmp(value, "idle"))</code></pre> </li> <li>if (value && !_cups_strcasecmp(value, "idle")) p->state = IPP_PRINTER_IDLE;</li> <li>else if (value && !strcasecmp(value, "stopped"))</li> <li>else if (value && !_cups_strcasecmp(value, "stopped")) { p->state = IPP_PRINTER_STOPPED;</li> </ul> <p>@@ -1163,7 +1163,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</p> <ul> <li>else if (!strcasecmp(line, "StateMessage"))</li> <li>else if (!_cups_strcasecmp(line, "StateMessage")) { /* <ul> <li>Set the initial queue state message... @@ -1172,7 +1172,7 @@ if (value) strlcpy(p->state_message, value, sizeof(p->state_message)); }</li> </ul></li> <li>else if (!strcasecmp(line, "StateTime"))</li> <li>else if (!_cups_strcasecmp(line, "StateTime")) { /* <ul> <li>Set the state time... @@ -1181,27 +1181,27 @@ if (value) p->state_time = atoi(value); }</li> </ul></li> <li>else if (!strcasecmp(line, "Accepting"))</li> <li> <p>else if (!_cups_strcasecmp(line, "Accepting")) { /*</p> <ul> <li>Set the initial accepting state... */</li> </ul> <p>if (value &&</p> </li> <li>(!strcasecmp(value, "yes") ||</li> <li>!strcasecmp(value, "on") ||</li> <li>!strcasecmp(value, "true")))</li> <li>(!_cups_strcasecmp(value, "yes") ||</li> <li>!_cups_strcasecmp(value, "on") ||</li> <li>!_cups_strcasecmp(value, "true"))) p->accepting = 1; else if (value &&</li> <li>(!strcasecmp(value, "no") ||</li> <li>!strcasecmp(value, "off") ||</li> <li>!strcasecmp(value, "false")))</li> <li>(!_cups_strcasecmp(value, "no") ||</li> <li>!_cups_strcasecmp(value, "off") ||</li> <li>!_cups_strcasecmp(value, "false"))) p->accepting = 0; else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Type"))</li> <li>else if (!_cups_strcasecmp(line, "Type")) { if (value) p->type = atoi(value); @@ -1209,27 +1209,27 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Shared"))</li> <li> <p>else if (!_cups_strcasecmp(line, "Shared")) { /*</p> <ul> <li>Set the initial shared state... */</li> </ul> <p>if (value &&</p> </li> <li>(!strcasecmp(value, "yes") ||</li> <li>!strcasecmp(value, "on") ||</li> <li>!strcasecmp(value, "true")))</li> <li>(!_cups_strcasecmp(value, "yes") ||</li> <li>!_cups_strcasecmp(value, "on") ||</li> <li>!_cups_strcasecmp(value, "true"))) p->shared = 1; else if (value &&</li> <li>(!strcasecmp(value, "no") ||</li> <li>!strcasecmp(value, "off") ||</li> <li>!strcasecmp(value, "false")))</li> <li>(!_cups_strcasecmp(value, "no") ||</li> <li>!_cups_strcasecmp(value, "off") ||</li> <li>!_cups_strcasecmp(value, "false"))) p->shared = 0; else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "JobSheets"))</li> <li>else if (!_cups_strcasecmp(line, "JobSheets")) { /* <ul> <li>Set the initial job sheets... @@ -1261,7 +1261,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> </ul></li> <li>else if (!strcasecmp(line, "AllowUser"))</li> <li>else if (!_cups_strcasecmp(line, "AllowUser")) { if (value) { @@ -1272,7 +1272,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "DenyUser"))</li> <li>else if (!_cups_strcasecmp(line, "DenyUser")) { if (value) { @@ -1283,7 +1283,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "QuotaPeriod"))</li> <li>else if (!_cups_strcasecmp(line, "QuotaPeriod")) { if (value) p->quota_period = atoi(value); @@ -1291,7 +1291,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "PageLimit"))</li> <li>else if (!_cups_strcasecmp(line, "PageLimit")) { if (value) p->page_limit = atoi(value); @@ -1299,7 +1299,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "KLimit"))</li> <li>else if (!_cups_strcasecmp(line, "KLimit")) { if (value) p->k_limit = atoi(value); @@ -1307,7 +1307,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "OpPolicy"))</li> <li>else if (!_cups_strcasecmp(line, "OpPolicy")) { if (value) { @@ -1328,7 +1328,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "ErrorPolicy"))</li> <li>else if (!_cups_strcasecmp(line, "ErrorPolicy")) { if (value) cupsdSetString(&p->error_policy, value); @@ -1336,7 +1336,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Attribute") && value)</li> <li>else if (!_cups_strcasecmp(line, "Attribute") && value) { for (valueptr = value; _valueptr && !isspace(_valueptr & 255); valueptr ++);</li> </ul> <p>@@ -1356,9 +1356,9 @@ cupsdSetPrinterAttr(p, value, valueptr); } }</p> <ul> <li>else if (strcasecmp(line, "Filter") &&</li> <li>strcasecmp(line, "Prefilter") &&</li> <li>strcasecmp(line, "Product"))</li> <li>else if (_cups_strcasecmp(line, "Filter") &&</li> <li>_cups_strcasecmp(line, "Prefilter") &&</li> <li> <pre><code> _cups_strcasecmp(line, "Product"))</code></pre> <p>{ /*</p> <ul> <li>Something else we don't understand (and that wasn't used in a prior @@ -3168,12 +3168,12 @@</li> <li>Change localhost to the server name... */</li> </ul> </li> <li>if (!strcasecmp(hostname, "localhost"))</li> <li> <p>if (!_cups_strcasecmp(hostname, "localhost")) strlcpy(hostname, ServerName, sizeof(hostname));</p> <p>strlcpy(localname, hostname, sizeof(localname));</p> </li> <li>if (!strcasecmp(hostname, ServerName))</li> <li> <p>if (!_cups_strcasecmp(hostname, ServerName)) { /*</p> <ul> <li>Localize the hostname... @@ -3190,7 +3190,7 @@</li> </ul> <p>while (lptr != NULL) {</p> </li> <li>if (!strcasecmp(lptr, sptr))</li> <li>if (!_cups_strcasecmp(lptr, sptr)) { <em>lptr = '\0'; break; @@ -3210,8 +3210,8 @@ for (p = (cupsd_printer_t </em>)cupsArrayFirst(Printers); p; p = (cupsd_printer_t *)cupsArrayNext(Printers))</li> <li>if (!strcasecmp(p->hostname, localname) &&</li> <li>!strcasecmp(p->name, rptr))</li> <li>if (!_cups_strcasecmp(p->hostname, localname) &&</li> <li>!_cups_strcasecmp(p->name, rptr)) { if (printer) *printer = p; @@ -3632,9 +3632,9 @@ for (temptype = mimeFirstType(MimeDatabase); temptype; temptype = mimeNextType(MimeDatabase))</li> <li>if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||</li> <li>!strcasecmp(temptype->super, super)) &&</li> <li>(type[0] == '*' || !strcasecmp(temptype->type, type)))</li> <li>if (((super[0] == '*' && _cups_strcasecmp(temptype->super, "printer")) ||</li> <li>!_cups_strcasecmp(temptype->super, super)) &&</li> <li>(type[0] == '*' || !_cups_strcasecmp(temptype->type, type))) { if (desttype != filtertype) { @@ -3717,7 +3717,7 @@ type; type = mimeNextType(MimeDatabase)) {</li> <li>if (!strcasecmp(type->super, "printer"))</li> <li> <p>if (!_cups_strcasecmp(type->super, "printer")) continue;</p> <p>snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type); @@ -3800,20 +3800,20 @@ type; type = (mime_type_t *)cupsArrayNext(p->filetypes)) {</p> </li> <li>if (!strcasecmp(type->super, "application"))</li> <li>if (!_cups_strcasecmp(type->super, "application")) {</li> <li>if (!strcasecmp(type->type, "pdf"))</li> <li>if (!_cups_strcasecmp(type->type, "pdf")) strlcat(pdl, "application/pdf,", sizeof(pdl));</li> <li>else if (!strcasecmp(type->type, "postscript"))</li> <li>else if (!_cups_strcasecmp(type->type, "postscript")) strlcat(pdl, "application/postscript,", sizeof(pdl)); }</li> <li>else if (!strcasecmp(type->super, "image"))</li> <li>else if (!_cups_strcasecmp(type->super, "image")) {</li> <li>if (!strcasecmp(type->type, "jpeg"))</li> <li>if (!_cups_strcasecmp(type->type, "jpeg")) strlcat(pdl, "image/jpeg,", sizeof(pdl));</li> <li>else if (!strcasecmp(type->type, "png"))</li> <li>else if (!_cups_strcasecmp(type->type, "png")) strlcat(pdl, "image/png,", sizeof(pdl));</li> <li>else if (!strcasecmp(type->type, "pwg-raster"))</li> <li>else if (!_cups_strcasecmp(type->type, "pwg-raster")) strlcat(pdl, "image/pwg-raster,", sizeof(pdl)); } } @@ -3838,7 +3838,7 @@ { (void)data;</li> <li>return (strcasecmp(((cupsd_printer_t *)first)->name,</li> <li>return (_cups_strcasecmp(((cupsd_printer_t <em>)first)->name, ((cupsd_printer_t </em>)second)->name)); }</li> </ul> <p>@@ -4031,7 +4031,7 @@ if (!ppd->manual_copies) p->type |= CUPS_PRINTER_COPIES; if ((ppd_attr = ppdFindAttr(ppd, "cupsFax", NULL)) != NULL)</p> <ul> <li>if (ppd_attr->value && !strcasecmp(ppd_attr->value, "true"))</li> <li> <pre><code>if (ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true"))</code></pre> <p>p->type |= CUPS_PRINTER_FAX;</p> <p>ippAddBoolean(p->ppd_attrs, IPP_TAG_PRINTER, "color-supported", @@ -4452,10 +4452,10 @@ } else if (((ppd_attr = ppdFindAttr(ppd, "DefaultOutputOrder", NULL)) != NULL &&</p> </li> <li>!strcasecmp(ppd_attr->value, "Reverse")) ||</li> <li>!_cups_strcasecmp(ppd_attr->value, "Reverse")) || (!ppd_attr && ppd->manufacturer && /* "Compatibility heuristic" */</li> <li>(!strcasecmp(ppd->manufacturer, "epson") ||</li> <li>!strcasecmp(ppd->manufacturer, "lexmark"))))</li> <li>(!_cups_strcasecmp(ppd->manufacturer, "epson") ||</li> <li> <pre><code> !_cups_strcasecmp(ppd->manufacturer, "lexmark"))))</code></pre> <p>{ /*</p> <ul> <li>Report that this printer has a single output bin that leaves pages face @@ -4621,10 +4621,10 @@ ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "sides-supported", 3, NULL, sides);</li> </ul> </li> <li> <pre><code>if (!strcasecmp(duplex->defchoice, "DuplexTumble"))</code></pre> </li> <li>if (!_cups_strcasecmp(duplex->defchoice, "DuplexTumble")) ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "sides-default", NULL, "two-sided-short-edge");</li> <li>else if (!strcasecmp(duplex->defchoice, "DuplexNoTumble"))</li> <li> <pre><code>else if (!_cups_strcasecmp(duplex->defchoice, "DuplexNoTumble"))</code></pre> <p>ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "sides-default", NULL, "two-sided-long-edge"); else @@ -4663,10 +4663,10 @@ p->type |= CUPS_PRINTER_SMALL;</p> <p>if ((ppd_attr = ppdFindAttr(ppd, "APICADriver", NULL)) != NULL &&</p> </li> <li>ppd_attr->value && !strcasecmp(ppd_attr->value, "true"))</li> <li>ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true")) { if ((ppd_attr = ppdFindAttr(ppd, "APScannerOnly", NULL)) != NULL &&</li> <li>ppd_attr->value && !strcasecmp(ppd_attr->value, "true"))</li> <li>ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true")) p->type |= CUPS_PRINTER_SCANNER; else p->type |= CUPS_PRINTER_MFP; @@ -4682,7 +4682,7 @@ filter; filter = (const char *)cupsArrayNext(p->pc->filters)) {</li> <li>if (!strncasecmp(filter, "application/vnd.cups-command", 28) &&</li> <li> <h1>if (!_cups_strncasecmp(filter, "application/vnd.cups-command", 28) && _cups_isspace(filter[28])) { p->type |= CUPS_PRINTER_COMMANDS; Index: scheduler/job.c</h1> <p>--- scheduler/job.c (revision 9791) +++ scheduler/job.c (working copy) @@ -745,11 +745,11 @@ banner_page = 0; else if (job->job_sheets == NULL) banner_page = 0;</p> </li> <li>else if (strcasecmp(job->job_sheets->values[0].string.text, "none") != 0 &&</li> <li>else if (_cups_strcasecmp(job->job_sheets->values[0].string.text, "none") != 0 && job->current_file == 0) banner_page = 1; else if (job->job_sheets->num_values > 1 &&</li> <li>strcasecmp(job->job_sheets->values[1].string.text, "none") != 0 &&</li> <li>_cups_strcasecmp(job->job_sheets->values[1].string.text, "none") != 0 && job->current_file == (job->num_files - 1)) banner_page = 1; else @@ -1428,7 +1428,7 @@ for (job = (cupsd_job_t <em>)cupsArrayFirst(ActiveJobs), count = 0; job; job = (cupsd_job_t </em>)cupsArrayNext(ActiveJobs))</li> <li>if (job->dest && !strcasecmp(job->dest, dest))</li> <li> <p>if (job->dest && !_cups_strcasecmp(job->dest, dest)) count ++;</p> <p>return (count); @@ -1451,7 +1451,7 @@ for (job = (cupsd_job_t <em>)cupsArrayFirst(ActiveJobs), count = 0; job; job = (cupsd_job_t </em>)cupsArrayNext(ActiveJobs))</p> </li> <li>if (!strcasecmp(job->username, username))</li> <li> <p>if (!_cups_strcasecmp(job->username, username)) count ++;</p> <p>return (count); @@ -3436,11 +3436,11 @@ !strncmp(attr->name, "number-up", 9) || !strcmp(attr->name, "page-ranges") || !strcmp(attr->name, "page-set") ||</p> </li> <li>!strcasecmp(attr->name, "AP_FIRSTPAGE_InputSlot") ||</li> <li>!strcasecmp(attr->name, "AP_FIRSTPAGE_ManualFeed") ||</li> <li>!strcasecmp(attr->name, "com.apple.print.PrintSettings."</li> <li>!_cups_strcasecmp(attr->name, "AP_FIRSTPAGE_InputSlot") ||</li> <li>!_cups_strcasecmp(attr->name, "AP_FIRSTPAGE_ManualFeed") ||</li> <li>!_cups_strcasecmp(attr->name, "com.apple.print.PrintSettings." "PMTotalSidesImaged..n.") ||</li> <li>!strcasecmp(attr->name, "com.apple.print.PrintSettings."</li> <li> <pre><code>!_cups_strcasecmp(attr->name, "com.apple.print.PrintSettings." "PMTotalBeginPages..n.")) &&</code></pre> <p>banner_page) continue; @@ -3708,12 +3708,12 @@</p> <p>while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {</p> </li> <li>if (!strcasecmp(line, "NextJobId"))</li> <li>if (!_cups_strcasecmp(line, "NextJobId")) { if (value) NextJobId = atoi(value); }</li> <li>else if (!strcasecmp(line, "<Job"))</li> <li>else if (!_cups_strcasecmp(line, "<Job")) { if (job) { @@ -3776,7 +3776,7 @@ "Missing <Job #> directive on line %d!", linenum); continue; }</li> <li>else if (!strcasecmp(line, "</Job>"))</li> <li>else if (!_cups_strcasecmp(line, "</Job>")) { cupsArrayAdd(Jobs, job);</li> </ul> <p>@@ -3790,7 +3790,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d!", linenum); continue; }</p> <ul> <li>else if (!strcasecmp(line, "State"))</li> <li>else if (!_cups_strcasecmp(line, "State")) { job->state_value = (ipp_jstate_t)atoi(value);</li> </ul> <p>@@ -3799,27 +3799,27 @@ else if (job->state_value > IPP_JOB_COMPLETED) job->state_value = IPP_JOB_COMPLETED; }</p> <ul> <li>else if (!strcasecmp(line, "HoldUntil"))</li> <li>else if (!_cups_strcasecmp(line, "HoldUntil")) { job->hold_until = atoi(value); }</li> <li>else if (!strcasecmp(line, "Priority"))</li> <li>else if (!_cups_strcasecmp(line, "Priority")) { job->priority = atoi(value); }</li> <li>else if (!strcasecmp(line, "Username"))</li> <li>else if (!_cups_strcasecmp(line, "Username")) { cupsdSetString(&job->username, value); }</li> <li>else if (!strcasecmp(line, "Destination"))</li> <li>else if (!_cups_strcasecmp(line, "Destination")) { cupsdSetString(&job->dest, value); }</li> <li>else if (!strcasecmp(line, "DestType"))</li> <li>else if (!_cups_strcasecmp(line, "DestType")) { job->dtype = (cups_ptype_t)atoi(value); }</li> <li>else if (!strcasecmp(line, "NumFiles"))</li> <li>else if (!_cups_strcasecmp(line, "NumFiles")) { job->num_files = atoi(value);</li> </ul> <p>@@ -3855,7 +3855,7 @@ } } }</p> <ul> <li>else if (!strcasecmp(line, "File"))</li> <li> <p>else if (!_cups<em>strcasecmp(line, "File")) { int number, /* File number </em>/ compression; /_ Compression value */ @@ -3951,7 +3951,7 @@</p> <p>while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {</p> </li> <li>if (!strcasecmp(line, "NextJobId"))</li> <li> <p>if (!_cups_strcasecmp(line, "NextJobId")) { if (value) { @@ -4342,7 +4342,7 @@</p> <p>if (job->sheets) {</p> </li> <li>if (!strncasecmp(message, "total ", 6))</li> <li> <pre><code> if (!_cups_strncasecmp(message, "total ", 6))</code></pre> <p>{ /*</p> <ul> <li> <h1>Got a total count of pages from a backend or filter... Index: scheduler/cups-deviced.c</h1> <p>--- scheduler/cups-deviced.c (revision 9791) +++ scheduler/cups-deviced.c (working copy) @@ -457,10 +457,10 @@</p> </li> </ul> <p>if ((diff = cupsdCompareNames(d0->device_info, d1->device_info)) != 0) return (diff);</p> </li> <li>else if ((diff = strcasecmp(d0->device_class, d1->device_class)) != 0)</li> <li>else if ((diff = _cups_strcasecmp(d0->device_class, d1->device_class)) != 0) return (diff); else</li> <li>return (strcasecmp(d0->device_uri, d1->device_uri));</li> <li>return (_cups_strcasecmp(d0->device_uri, d1->device_uri)); }</li> </ul> <h1>Index: scheduler/cups-lpd.c</h1> <p>--- scheduler/cups-lpd.c (revision 9791) +++ scheduler/cups-lpd.c (working copy) @@ -3,7 +3,7 @@ *</p> <ul> <li>Line Printer Daemon interface for CUPS. * <ul> <li>* Copyright 2007-2010 by Apple Inc.</li> <li>* Copyright 2007-2011 by Apple Inc.</li> </ul></li> <li>Copyright 1997-2006 by Easy Software Products, all rights reserved. *</li> <li> <p>These coded instructions, statements, and computer programs are the @@ -574,7 +574,7 @@ }</p> <p>if (info_attr && name_attr &&</p> <ul> <li>!strcasecmp(name, info_attr->values[0].string.text))</li> <li>!_cups_strcasecmp(name, info_attr->values[0].string.text)) { /*</li> <li>Found a match, use this one! @@ -669,7 +669,7 @@</li> <li>Make sure we have "Dest name options" or "Default name options"... */</li> </ul> </li> <li>if ((strcasecmp(line, "Dest") && strcasecmp(line, "Default")) || !value)</li> <li> <p>if ((_cups_strcasecmp(line, "Dest") && _cups_strcasecmp(line, "Default")) || !value) continue;</p> <pre><code>/*</code></pre> <p>@@ -686,7 +686,7 @@</p> <ul> <li>the loop - we're done! */</li> </ul> </li> <li>if (!strcasecmp(value, name))</li> <li> <p>if (!_cups_strcasecmp(value, name)) { num_options = cupsParseOptions(optptr, num_options, options); break;</p> <h1>Index: scheduler/client.c</h1> <p>--- scheduler/client.c (revision 9791) +++ scheduler/client.c (working copy) @@ -918,8 +918,8 @@ */</p> <p>if (strcmp(scheme, "file") &&</p> </li> <li>strcasecmp(hostname, ServerName) &&</li> <li>strcasecmp(hostname, "localhost") &&</li> <li>_cups_strcasecmp(hostname, ServerName) &&</li> <li> <pre><code> _cups_strcasecmp(hostname, "localhost") && !isdigit(hostname[0]) && hostname[0] != '[')</code></pre> <p>{ /* @@ -1076,10 +1076,10 @@</p> <p>cupsdAuthorize(con);</p> </li> <li>if (!strncasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Keep-Alive",</li> <li>if (!_cups_strncasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Keep-Alive", 10) && KeepAlive) con->http.keep_alive = HTTP_KEEPALIVE_ON;</li> <li>else if (!strncasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "close", 5))</li> <li> <p>else if (!_cups_strncasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "close", 5)) con->http.keep_alive = HTTP_KEEPALIVE_OFF;</p> <p>if (!con->http.fields[HTTP_FIELD_HOST][0] && @@ -1128,7 +1128,7 @@ } }</p> </li> <li> <pre><code>if (!strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") &&</code></pre> </li> <li>if (!_cups_strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") && con->http.tls == NULL) { <h1>ifdef HAVE_SSL</h1> <p>@@ -1200,7 +1200,7 @@ } else {</p></li> <li>if (!strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") &&</li> <li> <pre><code>if (!_cups_strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") &&</code></pre> <p>con->http.tls == NULL) {</p> <h1>ifdef HAVE_SSL</h1> <p>@@ -2372,7 +2372,7 @@</p> <p>if (code == HTTP_UNAUTHORIZED && DefaultEncryption == HTTP_ENCRYPT_REQUIRED &&</p> </li> <li>strcasecmp(con->http.hostname, "localhost") &&</li> <li> <pre><code>_cups_strcasecmp(con->http.hostname, "localhost") &&</code></pre> <p>!con->http.tls) { code = HTTP_UPGRADE_REQUIRED; @@ -2600,7 +2600,7 @@</p> <h1>endif /* HAVE_GSSAPI */</h1> <p>if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE &&</p> </li> <li>!strcasecmp(con->http.hostname, "localhost"))</li> <li>!_cups_strcasecmp(con->http.hostname, "localhost")) { /* <ul> <li>Add a "trc" (try root certification) parameter for local non-Kerberos @@ -2623,7 +2623,7 @@ name = (char *)cupsArrayNext(con->best->names)) { <h1>ifdef HAVE_AUTHORIZATION_H</h1></li> </ul></li> <li>if (!strncasecmp(name, "@AUTHKEY(", 9))</li> <li>if (!_cups_strncasecmp(name, "@AUTHKEY(", 9)) { snprintf(auth_key, auth<em>size, ", authkey=\"%s\"", name + 9); /* end parenthesis is stripped in conf.c </em>/ @@ -2631,7 +2631,7 @@ } else <h1>endif /_ HAVE_AUTHORIZATION_H */</h1></li> <li>if (!strcasecmp(name, "@SYSTEM"))</li> <li>if (!_cups_strcasecmp(name, "@SYSTEM")) { <h1>ifdef HAVE_AUTHORIZATION_H</h1> <p>if (SystemGroupAuthKey) @@ -2813,7 +2813,7 @@ * Handle redirection and CGI status codes... */</p></li> <li> <pre><code> if (!strncasecmp(con->header, "Location:", 9))</code></pre> </li> <li>if (!_cups_strncasecmp(con->header, "Location:", 9)) { if (!cupsdSendHeader(con, HTTP_SEE_OTHER, NULL, CUPSD_AUTH_NONE)) { @@ -2826,7 +2826,7 @@ if (httpPrintf(HTTP(con), "Content-Length: 0\r\n") < 0) return; }</li> <li>else if (!strncasecmp(con->header, "Status:", 7))</li> <li> <pre><code>else if (!_cups_strncasecmp(con->header, "Status:", 7)) { cupsdSendError(con, (http_status_t)atoi(con->header + 7), CUPSD_AUTH_NONE);</code></pre> <p>@@ -2850,7 +2850,7 @@ } }</p> </li> <li> <pre><code>if (strncasecmp(con->header, "Status:", 7))</code></pre> </li> <li> <pre><code>if (_cups_strncasecmp(con->header, "Status:", 7)) httpPrintf(HTTP(con), "%s\r\n", con->header); /*</code></pre> <p>@@ -3035,7 +3035,7 @@ while (isspace(<em>ptr) || </em>ptr == ';') ptr ++;</p> </li> <li>if (strncasecmp(ptr, "length=", 7) == 0)</li> <li>if (_cups_strncasecmp(ptr, "length=", 7) == 0) { ptr += 7; size = strtoll(ptr, NULL, 10); @@ -3937,7 +3937,7 @@ <ul> <li>Check for known types... */</li> </ul></li> <li>if (!type || strcasecmp(type->super, "application"))</li> <li>if (!type || _cups_strcasecmp(type->super, "application")) { cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " @@ -3947,7 +3947,7 @@ return (0); }</li> <li>if (!strcasecmp(type->type, "x-httpd-cgi") &&</li> <li>if (!_cups_strcasecmp(type->type, "x-httpd-cgi") && (filestats->st_mode & 0111)) { /* @@ -3966,7 +3966,7 @@ return (1); } <h1>ifdef HAVE_JAVA</h1></li> <li>else if (!strcasecmp(type->type, "x-httpd-java"))</li> <li>else if (!_cups_strcasecmp(type->type, "x-httpd-java")) { /* <ul> <li>"application/x-httpd-java" is a Java servlet. @@ -3987,7 +3987,7 @@ } <h1>endif /* HAVE_JAVA */</h1> <h1>ifdef HAVE_PERL</h1></li> </ul></li> <li>else if (!strcasecmp(type->type, "x-httpd-perl"))</li> <li>else if (!_cups_strcasecmp(type->type, "x-httpd-perl")) { /* <ul> <li>"application/x-httpd-perl" is a Perl page. @@ -4008,7 +4008,7 @@ } <h1>endif /* HAVE_PERL */</h1> <h1>ifdef HAVE_PHP</h1></li> </ul></li> <li>else if (!strcasecmp(type->type, "x-httpd-php"))</li> <li>else if (!_cups_strcasecmp(type->type, "x-httpd-php")) { /* <ul> <li>"application/x-httpd-php" is a PHP page. @@ -4029,7 +4029,7 @@ } <h1>endif /* HAVE_PHP */</h1> <h1>ifdef HAVE_PYTHON</h1></li> </ul></li> <li>else if (!strcasecmp(type->type, "x-httpd-python"))</li> <li>else if (!_cups_strcasecmp(type->type, "x-httpd-python")) { /* <ul> <li>"application/x-httpd-python" is a Python page. @@ -4973,13 +4973,13 @@</li> <li>addresses when accessing CUPS via the loopback interface... */</li> </ul></li> <li>return (!strcasecmp(host, "localhost") ||</li> <li>!strncasecmp(host, "localhost:", 10) ||</li> <li>!strcasecmp(host, "localhost.") ||</li> <li>!strncasecmp(host, "localhost.:", 11) ||</li> <li>return (!_cups_strcasecmp(host, "localhost") ||</li> <li>!_cups_strncasecmp(host, "localhost:", 10) ||</li> <li>!_cups_strcasecmp(host, "localhost.") ||</li> <li>!_cups_strncasecmp(host, "localhost.:", 11) || <h1>ifdef __linux</h1></li> <li>!strcasecmp(host, "localhost.localdomain") ||</li> <li>!strncasecmp(host, "localhost.localdomain:", 22) ||</li> <li>!_cups_strcasecmp(host, "localhost.localdomain") ||</li> <li> <pre><code> !_cups_strncasecmp(host, "localhost.localdomain:", 22) ||</code></pre> <h1>endif /* __linux */</h1> <pre><code> !strcmp(host, "127.0.0.1") || !strncmp(host, "127.0.0.1:", 10) ||</code></pre> <p>@@ -4993,8 +4993,8 @@ */</p> <p>if ((end = strrchr(host, '.')) != NULL &&</p> </li> <li>(!strcasecmp(end, ".local") || !strncasecmp(end, ".local:", 7) ||</li> <li>!strcasecmp(end, ".local.") || !strncasecmp(end, ".local.:", 8)))</li> <li>(!_cups_strcasecmp(end, ".local") || !_cups_strncasecmp(end, ".local:", 7) ||</li> <li>!_cups_strcasecmp(end, ".local.") || !_cups_strncasecmp(end, ".local.:", 8))) return (1); <h1>endif /* HAVE_DNSSD */</h1></li> </ul> <p>@@ -5043,7 +5043,7 @@ if (!strcmp(a->name, "*")) return (1);</p> <ul> <li>if (!strncasecmp(host, a->name, a->namelen))</li> <li>if (!_cups_strncasecmp(host, a->name, a->namelen)) { /* <ul> <li>Prefix matches; check the character at the end - it must be ":", ".", @@ -5069,7 +5069,7 @@ if (!strcmp(a->name, "*")) return (1);</li> </ul></li> <li>if (!strncasecmp(host, a->name, a->namelen))</li> <li>if (!_cups_strncasecmp(host, a->name, a->namelen)) { /* <ul> <li>Prefix matches; check the character at the end - it must be ":", ".", @@ -5092,7 +5092,7 @@ netif; netif = (cupsd_netif_t *)cupsArrayNext(NetIFList)) {</li> </ul></li> <li>if (!strncasecmp(host, netif->hostname, netif->hostlen))</li> <li> <p>if (!_cups_strncasecmp(host, netif->hostname, netif->hostlen)) { /*</p> <ul> <li> <h1>Prefix matches; check the character at the end - it must be ":", ".", Index: scheduler/cupsfilter.c</h1> <p>--- scheduler/cupsfilter.c (revision 9791) +++ scheduler/cupsfilter.c (working copy) @@ -46,7 +46,7 @@</p> <h1>include <sys/wait.h></h1> <h1>if defined(<strong>APPLE</strong>)</h1> <h1>include <libgen.h></h1> <p>-#endif /* <strong>APPLE</strong> <em>/ +#endif /</em> <strong>APPLE</strong> */</p> </li> </ul> <p>/* @@ -435,7 +435,7 @@ }</p> <p>sscanf(dsttype, "%15[^/]/%255s", super, type);</p> </li> <li>if (!strcasecmp(super, "printer"))</li> <li>if (!_cups_strcasecmp(super, "printer")) dst = printer_type; else if ((dst = mimeType(mime, super, type)) == NULL) { @@ -623,9 +623,9 @@ for (temptype = mimeFirstType(mime); temptype; temptype = mimeNextType(mime))</li> <li>if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||</li> <li>!strcasecmp(temptype->super, super)) &&</li> <li>(type[0] == '*' || !strcasecmp(temptype->type, type)))</li> <li>if (((super[0] == '*' && _cups_strcasecmp(temptype->super, "printer")) ||</li> <li>!_cups_strcasecmp(temptype->super, super)) &&</li> <li> <pre><code> (type[0] == '*' || !_cups_strcasecmp(temptype->type, type)))</code></pre> <p>{ if (desttype != filtertype) { @@ -818,7 +818,7 @@</p> <p>/*</p> </li> <li>* Add special voodoo magic for MacOS X - this allows MacOS X </li> <li>* Add special voodoo magic for MacOS X - this allows MacOS X <ul> <li>programs to access their bundle resources properly... */</li> </ul></li> </ul> <p>@@ -1362,15 +1362,15 @@</p> <pre><code> while (cupsFileGetConf(fp, line, sizeof(line), &ptr, &linenum)) {</code></pre> <ul> <li>if (!strcasecmp(line, "DataDir"))</li> <li>if (!_cups_strcasecmp(line, "DataDir")) set_string(&DataDir, ptr);</li> <li>else if (!strcasecmp(line, "FontPath"))</li> <li>else if (!_cups_strcasecmp(line, "FontPath")) set_string(&FontPath, ptr);</li> <li>else if (!strcasecmp(line, "RIPCache"))</li> <li>else if (!_cups_strcasecmp(line, "RIPCache")) set_string(&RIPCache, ptr);</li> <li>else if (!strcasecmp(line, "ServerBin"))</li> <li>else if (!_cups_strcasecmp(line, "ServerBin")) set_string(&ServerBin, ptr);</li> <li>else if (!strcasecmp(line, "ServerRoot"))</li> <li>else if (!_cups_strcasecmp(line, "ServerRoot")) set_string(&ServerRoot, ptr); }</li> </ul> <h1>Index: scheduler/type.c</h1> <p>--- scheduler/type.c (revision 9791) +++ scheduler/type.c (working copy) @@ -715,8 +715,8 @@ int i; /* Result of comparison */</p> <ul> <li>if ((i = strcasecmp(t0->super, t1->super)) == 0)</li> <li>i = strcasecmp(t0->type, t1->type);</li> <li>if ((i = _cups_strcasecmp(t0->super, t1->super)) == 0)</li> <li> <p>i = _cups_strcasecmp(t0->type, t1->type);</p> <p>return (i); } @@ -917,7 +917,7 @@ if ((rules->offset + rules->length) > (fb->offset + fb->length)) result = 0; else</p> </li> <li>result = (strncasecmp((char *)fb->buffer + rules->offset -</li> <li> <h1>result = (_cups_strncasecmp((char *)fb->buffer + rules->offset - fb->offset, rules->value.stringv, rules->length) == 0); break; Index: scheduler/banners.c</h1> <p>--- scheduler/banners.c (revision 9791) +++ scheduler/banners.c (working copy) @@ -3,7 +3,7 @@ *</p> <ul> <li>Banner routines for the CUPS scheduler.</li> <li> </li> </ul> </li> <li>* Copyright 2007-2010 by Apple Inc.</li> <li>* Copyright 2007-2011 by Apple Inc. <ul> <li>Copyright 1997-2006 by Easy Software Products.</li> <li> </li> <li>These coded instructions, statements, and computer programs are the @@ -192,7 +192,7 @@ const cupsd_banner_t <em>b0, /</em> I - First banner _/ const cupsd_banner<em>t *b1) /</em> I - Second banner */ {</li> </ul></li> <li>return (strcasecmp(b0->name, b1->name));</li> <li>return (_cups_strcasecmp(b0->name, b1->name)); }</li> </ul> <h1>Index: scheduler/dirsvc.c</h1> <p>--- scheduler/dirsvc.c (revision 9791) +++ scheduler/dirsvc.c (working copy) @@ -171,7 +171,7 @@ static char <em>dnssdPackTxtRecord(int </em>txt_len, char *keyvalue[][2], int count); static void dnssdRegisterCallback(DNSServiceRef sdRef,</p> <ul> <li>DNSServiceFlags flags, </li> <li>DNSServiceFlags flags, DNSServiceErrorType errorCode, const char _name, const char <em>regtype, const char </em>domain, void *context); @@ -192,7 +192,7 @@ }; <h1>endif /_ HAVE_LDAP */</h1></li> </ul> <p>-#ifdef HAVE_LIBSLP +#ifdef HAVE_LIBSLP /*</p> <ul> <li>SLP definitions... */ @@ -205,7 +205,7 @@ <h1>define SLP_CUPS_SRVLEN 15</h1></li> </ul> <p>-/* +/*</p> <ul> <li>Printer service URL structure */</li> </ul> <p>@@ -235,7 +235,7 @@</p> <p>/*</p> <ul> <li>* 'cupsdDeregisterPrinter()' - Stop sending broadcast information for a </li> <li> <ul> <li>'cupsdDeregisterPrinter()' - Stop sending broadcast information for a</li> <li>local printer and remove any pending</li> <li>references to remote printers. */ @@ -347,8 +347,8 @@</li> <li>Decode the directive... */</li> </ul> </li> <li>if (!strcasecmp(line, "<Printer") ||</li> <li>!strcasecmp(line, "<DefaultPrinter"))</li> <li>if (!_cups_strcasecmp(line, "<Printer") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "<DefaultPrinter"))</code></pre> <p>{ /*</p> <ul> <li> <Printer name> or <DefaultPrinter name> @@ -388,7 +388,7 @@ </li> <li>Set the default printer as needed... */</li> </ul> </li> <li> <pre><code> if (!strcasecmp(line, "<DefaultPrinter"))</code></pre> </li> <li>if (!_cups_strcasecmp(line, "<DefaultPrinter")) DefaultPrinter = p; } else @@ -398,8 +398,8 @@ break; } }</li> <li>else if (!strcasecmp(line, "<Class") ||</li> <li>!strcasecmp(line, "<DefaultClass"))</li> <li>else if (!_cups_strcasecmp(line, "<Class") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "<DefaultClass"))</code></pre> <p>{ /*</p> <ul> <li> <Class name> or <DefaultClass name> @@ -429,7 +429,7 @@ </li> <li>Set the default printer as needed... */</li> </ul> </li> <li> <pre><code> if (!strcasecmp(line, "<DefaultClass"))</code></pre> </li> <li>if (!_cups_strcasecmp(line, "<DefaultClass")) DefaultPrinter = p; } else @@ -439,8 +439,8 @@ break; } }</li> <li>else if (!strcasecmp(line, "</Printer>") ||</li> <li>!strcasecmp(line, "</Class>"))</li> <li>else if (!_cups_strcasecmp(line, "</Printer>") ||</li> <li>!_cups_strcasecmp(line, "</Class>")) { if (p != NULL) { @@ -461,7 +461,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "UUID"))</li> <li>else if (!_cups_strcasecmp(line, "UUID")) { if (value && !strncmp(value, "urn:uuid:", 9)) cupsdSetString(&(p->uuid), value); @@ -469,22 +469,22 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Bad UUID on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "Info"))</li> <li>else if (!_cups_strcasecmp(line, "Info")) { if (value) cupsdSetString(&p->info, value); }</li> <li>else if (!strcasecmp(line, "MakeModel"))</li> <li>else if (!_cups_strcasecmp(line, "MakeModel")) { if (value) cupsdSetString(&p->make_model, value); }</li> <li>else if (!strcasecmp(line, "Location"))</li> <li>else if (!_cups_strcasecmp(line, "Location")) { if (value) cupsdSetString(&p->location, value); }</li> <li>else if (!strcasecmp(line, "DeviceURI"))</li> <li>else if (!_cups_strcasecmp(line, "DeviceURI")) { if (value) { @@ -500,7 +500,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "Option") && value)</li> <li>else if (!_cups_strcasecmp(line, "Option") && value) { /* <ul> <li>Option name value @@ -519,7 +519,7 @@ &(p->options)); } }</li> </ul></li> <li>else if (!strcasecmp(line, "Reason"))</li> <li>else if (!_cups_strcasecmp(line, "Reason")) { if (value) { @@ -538,15 +538,15 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "State"))</li> <li>else if (!_cups_strcasecmp(line, "State")) { /* <ul> <li>Set the initial queue state... */</li> </ul></li> <li> <pre><code>if (value && !strcasecmp(value, "idle"))</code></pre> </li> <li>if (value && !_cups_strcasecmp(value, "idle")) p->state = IPP_PRINTER_IDLE;</li> <li>else if (value && !strcasecmp(value, "stopped"))</li> <li>else if (value && !_cups_strcasecmp(value, "stopped")) { p->state = IPP_PRINTER_STOPPED; cupsdSetPrinterReasons(p, "+paused"); @@ -555,7 +555,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "StateMessage"))</li> <li>else if (!_cups_strcasecmp(line, "StateMessage")) { /* <ul> <li>Set the initial queue state message... @@ -564,27 +564,27 @@ if (value) strlcpy(p->state_message, value, sizeof(p->state_message)); }</li> </ul></li> <li>else if (!strcasecmp(line, "Accepting"))</li> <li> <p>else if (!_cups_strcasecmp(line, "Accepting")) { /*</p> <ul> <li>Set the initial accepting state... */</li> </ul> <p>if (value &&</p> </li> <li>(!strcasecmp(value, "yes") ||</li> <li>!strcasecmp(value, "on") ||</li> <li>!strcasecmp(value, "true")))</li> <li>(!_cups_strcasecmp(value, "yes") ||</li> <li>!_cups_strcasecmp(value, "on") ||</li> <li>!_cups_strcasecmp(value, "true"))) p->accepting = 1; else if (value &&</li> <li>(!strcasecmp(value, "no") ||</li> <li>!strcasecmp(value, "off") ||</li> <li>!strcasecmp(value, "false")))</li> <li>(!_cups_strcasecmp(value, "no") ||</li> <li>!_cups_strcasecmp(value, "off") ||</li> <li>!_cups_strcasecmp(value, "false"))) p->accepting = 0; else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "Type"))</li> <li>else if (!_cups_strcasecmp(line, "Type")) { if (value) p->type = atoi(value); @@ -592,7 +592,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "BrowseTime"))</li> <li>else if (!_cups_strcasecmp(line, "BrowseTime")) { if (value) { @@ -605,7 +605,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "JobSheets"))</li> <li>else if (!_cups_strcasecmp(line, "JobSheets")) { /* <ul> <li>Set the initial job sheets... @@ -637,7 +637,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> </ul></li> <li>else if (!strcasecmp(line, "AllowUser"))</li> <li>else if (!_cups_strcasecmp(line, "AllowUser")) { if (value) { @@ -648,7 +648,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of remote.cache.", linenum); }</li> <li>else if (!strcasecmp(line, "DenyUser"))</li> <li>else if (!_cups_strcasecmp(line, "DenyUser")) { if (value) { @@ -1142,9 +1142,9 @@ <ul> <li>LDAP stuff currently only supports ldapi EXTERNAL SASL binds... */</li> </ul></li> <li>if (!BrowseLDAPServer || !strcasecmp(BrowseLDAPServer, "localhost")) </li> <li>if (!BrowseLDAPServer || !_cups_strcasecmp(BrowseLDAPServer, "localhost")) rc = ldap_initialize(&TempBrowseLDAPHandle, "ldapi:///");</li> <li>else </li> <li> <p>else rc = ldap_initialize(&TempBrowseLDAPHandle, BrowseLDAPServer);</p> <h1>else /* HAVE_OPENLDAP */</h1> <p>@@ -1323,7 +1323,7 @@ bval.bv_val = BrowseLDAPPassword; bval.bv_len = (BrowseLDAPPassword == NULL) ? 0 : strlen(BrowseLDAPPassword);</p> </li> <li>if (!BrowseLDAPServer || !strcasecmp(BrowseLDAPServer, "localhost"))</li> <li>if (!BrowseLDAPServer || !_cups_strcasecmp(BrowseLDAPServer, "localhost")) rc = ldap_sasl_bind_s(TempBrowseLDAPHandle, NULL, "EXTERNAL", &bv, NULL, NULL, NULL); else @@ -1613,7 +1613,7 @@ <h1>ifdef HAVE_LIBSLP</h1> <p>if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) {</p></li> <li>/* </li> <li>/* <ul> <li>Open SLP handle... */</li> </ul></li> </ul> <p>@@ -1843,7 +1843,7 @@ if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) && BrowseSLPHandle) {</p> <ul> <li>/* </li> <li>/* <ul> <li>Close SLP handle... */</li> </ul></li> </ul> <p>@@ -2106,7 +2106,7 @@</p> <ul> <li>and temporary disable LDAP updates... */</li> <li>if (rc != LDAP_SUCCESS) </li> <li>if (rc != LDAP_SUCCESS) { if (BrowseLDAPUpdate && ((rc == LDAP_SERVER_DOWN) || (rc == LDAP_CONNECT_ERROR))) { @@ -2189,7 +2189,7 @@ <h1>endif /* HAVE_LDAP */</h1></li> </ul> <p>-#ifdef HAVE_LIBSLP +#ifdef HAVE_LIBSLP /*</p> <ul> <li> <p>'cupsdUpdateSLPBrowse()' - Get browsing information via SLP. */ @@ -2211,7 +2211,7 @@</p> <p>BrowseSLPRefresh = time(NULL) + BrowseInterval;</p> </li> <li>/* </li> <li>/* <ul> <li>Poll for remote printers using SLP... */</li> </ul></li> </ul> <p>@@ -2232,7 +2232,7 @@</p> <pre><code> next = s->next;</code></pre> <ul> <li>/* </li> <li>/* <ul> <li>Load a cupsd_printer_t structure with the SLP service attributes... */</li> </ul></li> </ul> <p>@@ -2264,7 +2264,7 @@ cupsdClearString(&p.make_model);</p> <pre><code> free(s);</code></pre> <ul> <li>} </li> <li>} } <h1>endif /* HAVE_LIBSLP */</h1></li> </ul> <p>@@ -2373,7 +2373,7 @@ if (for_lpd) strlcpy(rp_str, p->name, sizeof(rp_str)); else</p> <ul> <li>snprintf(rp_str, sizeof(rp_str), "%s/%s", </li> <li> <p>snprintf(rp_str, sizeof(rp_str), "%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);</p> <p>keyvalue[i ][0] = "ty"; @@ -2474,7 +2474,7 @@ dnssdComparePrinters(cupsd_printer_t <em>a,/</em> I - First printer _/ cupsd_printer<em>t *b)/</em> I - Second printer */ {</p> </li> <li>return (strcasecmp(a->reg_name, b->reg_name));</li> <li>return (_cups_strcasecmp(a->reg_name, b->reg_name)); }</li> </ul> <p>@@ -2560,7 +2560,7 @@ return (NULL);</p> <p>for (length = i = 0; i < count; i++)</p> <ul> <li>length += 1 + strlen(keyvalue[i][0]) + </li> <li> <p>length += 1 + strlen(keyvalue[i][0]) + (keyvalue[i][1] ? 1 + strlen(keyvalue[i][1]) : 0);</p> <p>/* @@ -2628,11 +2628,11 @@</p> <p>if (errorCode) {</p> </li> <li>cupsdLogMessage(CUPSD_LOG_ERROR, </li> <li>cupsdLogMessage(CUPSD_LOG_ERROR, "DNSServiceRegister failed with error %d", (int)errorCode); return; }</li> <li>else if (p && (!p->reg_name || strcasecmp(name, p->reg_name)))</li> <li>else if (p && (!p->reg_name || _cups_strcasecmp(name, p->reg_name))) { cupsdLogMessage(CUPSD_LOG_INFO, "Using service name \"%s\" for \"%s\"", name, p->name); @@ -2651,7 +2651,7 @@ <ul> <li>or update the broadcast contents. */</li> </ul></li> </ul> <p>-static void +static void dnssdRegisterPrinter(cupsd_printer_t <em>p)/</em> I - Printer <em>/ { DNSServiceErrorType se; /</em> dnssd errors */ @@ -2756,7 +2756,7 @@</p> <pre><code> regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" : DNSSDRegType;</code></pre> <ul> <li>cupsdLogMessage(CUPSD_LOG_DEBUG, </li> <li>cupsdLogMessage(CUPSD_LOG_DEBUG, "Registering DNS-SD printer %s with name \"%s\" and " "type \"%s\"", p->name, name, regtype);</li> </ul> <p>@@ -2853,14 +2853,14 @@ p->printer_ref = NULL; }</p> <h2>}</h2> <p>+ if (!p->printer_ref) { /<em> * Initial registration... </em>/</p> <ul> <li>cupsdLogMessage(CUPSD_LOG_DEBUG, </li> <li>cupsdLogMessage(CUPSD_LOG_DEBUG, "Registering DNS-SD printer %s with name \"%s\" and " "type \"_printer._tcp\"", p->name, name);</li> </ul> <p>@@ -3066,13 +3066,13 @@</p> <pre><code> *ptr++ = '\0';</code></pre> <ul> <li>if (!strcasecmp(line, name))</li> <li> <pre><code>if (!_cups_strcasecmp(line, name))</code></pre> <p>{ /<em> * Found the service, see if it is set to "-NO-"... </em>/</p> </li> <li>if (!strncasecmp(ptr, "-NO-", 4))</li> <li>if (!_cups_strncasecmp(ptr, "-NO-", 4)) state = 0; break; } @@ -3118,7 +3118,7 @@ <ul> <li>Check for local server addresses... */</li> </ul></li> <li>if (!strcasecmp(host, ServerName) && port == LocalPort)</li> <li> <p>if (!_cups_strcasecmp(host, ServerName) && port == LocalPort) return (1);</p> <p>cupsdNetIFUpdate(); @@ -3126,7 +3126,7 @@ for (iface = (cupsd_netif_t <em>)cupsArrayFirst(NetIFList); iface; iface = (cupsd_netif_t </em>)cupsArrayNext(NetIFList))</p> </li> <li>if (!strcasecmp(host, iface->hostname) && port == iface->port)</li> <li> <p>if (!_cups_strcasecmp(host, iface->hostname) && port == iface->port) return (1);</p> <p>/* @@ -3266,7 +3266,7 @@</p> <p>while (hptr != NULL) {</p> </li> <li>if (!strcasecmp(hptr, sptr))</li> <li> <pre><code>if (!_cups_strcasecmp(hptr, sptr))</code></pre> <p>{ *hptr = '\0'; break; @@ -3337,7 +3337,7 @@</p> <p>if (p->type & CUPS_PRINTER_IMPLICIT) p = NULL; /* Don't replace implicit classes */</p> </li> <li>else if (p->hostname && strcasecmp(p->hostname, host))</li> <li> <pre><code>else if (p->hostname && _cups_strcasecmp(p->hostname, host))</code></pre> <p>{ /*</p> <ul> <li>Short name exists but is for a different host. If this is a remote @@ -3548,7 +3548,7 @@ is_class ? "Class" : "Printer", p->name);</li> </ul> <p>cupsdExpireSubscriptions(p, NULL);</p> </li> <li> <p>+ cupsdDeletePrinter(p, 1); cupsdUpdateImplicitClasses(); cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP | CUPSD_DIRTY_REMOTE); @@ -3637,7 +3637,7 @@ cupsArraySave(Printers);</p> <p>if (len > 0 &&</p> </li> <li>!strncasecmp(p->name, name + offset, len) &&</li> <li>!_cups_strncasecmp(p->name, name + offset, len) && (p->name[len] == '\0' || p->name[len] == '@')) { /* @@ -3645,7 +3645,7 @@ <ul> <li>we have a class, and if this printer is a member... */</li> </ul></li> <li> <pre><code>if (pclass && strcasecmp(pclass->name, name))</code></pre> </li> <li>if (pclass && _cups_strcasecmp(pclass->name, name)) { if (update) cupsdSetPrinterAttrs(pclass); @@ -4203,7 +4203,7 @@ ou_value[1] = NULL; desc[0] = descstring; desc[1] = NULL;</li> <li> <p>+ mods[0].mod_type = "ou"; mods[0].mod_values = ou_value; mods[1].mod_type = "description"; @@ -4541,7 +4541,7 @@ } } }</p> </li> <li>else </li> <li> <p>else { /*</p> <ul> <li>No LDAP entry exists for the printer. Printer has never been registered, @@ -4741,7 +4741,7 @@ p->name);</li> </ul> <p>/*</p> </li> <li>* Make the SLP service URL that conforms to the IANA </li> <li>* Make the SLP service URL that conforms to the IANA <ul> <li>'printer:' template. */</li> </ul></li> </ul> <p>@@ -4896,7 +4896,7 @@</p> <p>/*</p> <ul> <li>* 'slp_attr_callback()' - SLP attribute callback </li> <li> <ul> <li>'slp_attr_callback()' - SLP attribute callback */</li> </ul> <p>static SLPBoolean /* O - SLP_TRUE for success */ @@ -4947,7 +4947,7 @@</p> <ul> <li>'slp_dereg_printer()' - SLPDereg() the specified printer */</li> </ul> </li> </ul> <p>-static void +static void slp_dereg_printer(cupsd_printer_t <em>p) /</em> I - Printer _/ { char srvurl[HTTP_MAX<em>URI]; /</em> Printer service URI _/ @@ -4958,7 +4958,7 @@ if (!(p->type & CUPS_PRINTER<em>REMOTE)) { /</em></p> <ul> <li>* Make the SLP service URL that conforms to the IANA </li> <li>* Make the SLP service URL that conforms to the IANA <ul> <li>'printer:' template. */</li> </ul></li> </ul> <p>@@ -5083,7 +5083,7 @@</p> <p>strlcpy(s->url, srvurl, sizeof(s->url));</p> <ul> <li>/* </li> <li>/* <ul> <li>Link the SLP service URL into the head of the list */</li> </ul></li> </ul> <p>@@ -5131,7 +5131,7 @@ */</p> <p>srclen = sizeof(srcaddr);</p> <ul> <li>if ((bytes = recvfrom(BrowseSocket, packet, sizeof(packet) - 1, 0, </li> <li> <p>if ((bytes = recvfrom(BrowseSocket, packet, sizeof(packet) - 1, 0, (struct sockaddr <em>)&srcaddr, &srclen)) < 0) { /</em> @@ -5205,7 +5205,7 @@</p> <p>if (BrowseACL) {</p> </li> <li>if (httpAddrLocalhost(&srcaddr) || !strcasecmp(srcname, "localhost"))</li> <li>if (httpAddrLocalhost(&srcaddr) || !_cups_strcasecmp(srcname, "localhost")) { /* <ul> <li> <h1>Access from localhost (127.0.0.1) is always allowed... Index: scheduler/classes.c</h1> <p>--- scheduler/classes.c (revision 9791) +++ scheduler/classes.c (working copy) @@ -3,7 +3,7 @@</p> </li> <li> </li> <li>Printer class routines for the CUPS scheduler. *</li> </ul></li> <li>* Copyright 2007-2010 by Apple Inc.</li> <li> <ul> <li>Copyright 2007-2011 by Apple Inc.</li> <li>Copyright 1997-2007 by Easy Software Products, all rights reserved.</li> <li> </li> <li>These coded instructions, statements, and computer programs are the @@ -325,8 +325,8 @@</li> <li>Decode the directive... */</li> </ul> </li> <li>if (!strcasecmp(line, "<Class") ||</li> <li>!strcasecmp(line, "<DefaultClass"))</li> <li>if (!_cups_strcasecmp(line, "<Class") ||</li> <li> <pre><code> !_cups_strcasecmp(line, "<DefaultClass"))</code></pre> <p>{ /*</p> <ul> <li> <Class name> or <DefaultClass name> @@ -354,14 +354,14 @@ p->accepting = 1; p->state = IPP_PRINTER_IDLE; </li> </ul> </li> <li> <pre><code> if (!strcasecmp(line, "<DefaultClass"))</code></pre> </li> <li>if (!_cups_strcasecmp(line, "<DefaultClass")) DefaultPrinter = p; } else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "</Class>"))</li> <li>else if (!_cups_strcasecmp(line, "</Class>")) { if (p != NULL) { @@ -377,7 +377,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "UUID"))</li> <li>else if (!_cups_strcasecmp(line, "UUID")) { if (value && !strncmp(value, "urn:uuid:", 9)) cupsdSetString(&(p->uuid), value); @@ -385,24 +385,24 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Bad UUID on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "AuthInfoRequired"))</li> <li>else if (!_cups_strcasecmp(line, "AuthInfoRequired")) { if (!cupsdSetAuthInfoRequired(p, value, NULL)) cupsdLogMessage(CUPSD_LOG_ERROR, "Bad AuthInfoRequired on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Info"))</li> <li>else if (!_cups_strcasecmp(line, "Info")) { if (value) cupsdSetString(&p->info, value); }</li> <li>else if (!strcasecmp(line, "Location"))</li> <li>else if (!_cups_strcasecmp(line, "Location")) { if (value) cupsdSetString(&p->location, value); }</li> <li>else if (!strcasecmp(line, "Option") && value)</li> <li>else if (!_cups_strcasecmp(line, "Option") && value) { /* <ul> <li>Option name value @@ -421,7 +421,7 @@ &(p->options)); } }</li> </ul></li> <li>else if (!strcasecmp(line, "Printer"))</li> <li>else if (!_cups_strcasecmp(line, "Printer")) { if (!value) { @@ -458,15 +458,15 @@ if (temp) cupsdAddPrinterToClass(p, temp); }</li> <li>else if (!strcasecmp(line, "State"))</li> <li>else if (!_cups_strcasecmp(line, "State")) { /* <ul> <li>Set the initial queue state... */</li> </ul></li> <li> <pre><code>if (!strcasecmp(value, "idle"))</code></pre> </li> <li>if (!_cups_strcasecmp(value, "idle")) p->state = IPP_PRINTER_IDLE;</li> <li>else if (!strcasecmp(value, "stopped"))</li> <li>else if (!_cups_strcasecmp(value, "stopped")) { p->state = IPP_PRINTER_STOPPED;</li> </ul> <p>@@ -486,7 +486,7 @@ "Syntax error on line %d of classes.conf.", linenum); }</p> <ul> <li>else if (!strcasecmp(line, "StateMessage"))</li> <li>else if (!_cups_strcasecmp(line, "StateMessage")) { /* <ul> <li>Set the initial queue state message... @@ -495,7 +495,7 @@ if (value) strlcpy(p->state_message, value, sizeof(p->state_message)); }</li> </ul></li> <li>else if (!strcasecmp(line, "StateTime"))</li> <li>else if (!_cups_strcasecmp(line, "StateTime")) { /* <ul> <li>Set the state time... @@ -504,49 +504,49 @@ if (value) p->state_time = atoi(value); }</li> </ul></li> <li>else if (!strcasecmp(line, "Accepting"))</li> <li> <p>else if (!_cups_strcasecmp(line, "Accepting")) { /*</p> <ul> <li>Set the initial accepting state... */</li> </ul> <p>if (value &&</p> </li> <li>(!strcasecmp(value, "yes") ||</li> <li>!strcasecmp(value, "on") ||</li> <li>!strcasecmp(value, "true")))</li> <li>(!_cups_strcasecmp(value, "yes") ||</li> <li>!_cups_strcasecmp(value, "on") ||</li> <li>!_cups_strcasecmp(value, "true"))) p->accepting = 1; else if (value &&</li> <li>(!strcasecmp(value, "no") ||</li> <li>!strcasecmp(value, "off") ||</li> <li>!strcasecmp(value, "false")))</li> <li>(!_cups_strcasecmp(value, "no") ||</li> <li>!_cups_strcasecmp(value, "off") ||</li> <li>!_cups_strcasecmp(value, "false"))) p->accepting = 0; else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "Shared"))</li> <li> <p>else if (!_cups_strcasecmp(line, "Shared")) { /*</p> <ul> <li>Set the initial shared state... */</li> </ul> <p>if (value &&</p> </li> <li>(!strcasecmp(value, "yes") ||</li> <li>!strcasecmp(value, "on") ||</li> <li>!strcasecmp(value, "true")))</li> <li>(!_cups_strcasecmp(value, "yes") ||</li> <li>!_cups_strcasecmp(value, "on") ||</li> <li>!_cups_strcasecmp(value, "true"))) p->shared = 1; else if (value &&</li> <li>(!strcasecmp(value, "no") ||</li> <li>!strcasecmp(value, "off") ||</li> <li>!strcasecmp(value, "false")))</li> <li>(!_cups_strcasecmp(value, "no") ||</li> <li>!_cups_strcasecmp(value, "off") ||</li> <li>!_cups_strcasecmp(value, "false"))) p->shared = 0; else cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "JobSheets"))</li> <li>else if (!_cups_strcasecmp(line, "JobSheets")) { /* <ul> <li>Set the initial job sheets... @@ -582,7 +582,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> </ul></li> <li>else if (!strcasecmp(line, "AllowUser"))</li> <li>else if (!_cups_strcasecmp(line, "AllowUser")) { if (value) { @@ -593,7 +593,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "DenyUser"))</li> <li>else if (!_cups_strcasecmp(line, "DenyUser")) { if (value) { @@ -604,7 +604,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "QuotaPeriod"))</li> <li>else if (!_cups_strcasecmp(line, "QuotaPeriod")) { if (value) p->quota_period = atoi(value); @@ -612,7 +612,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "PageLimit"))</li> <li>else if (!_cups_strcasecmp(line, "PageLimit")) { if (value) p->page_limit = atoi(value); @@ -620,7 +620,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "KLimit"))</li> <li>else if (!_cups_strcasecmp(line, "KLimit")) { if (value) p->k_limit = atoi(value); @@ -628,7 +628,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "OpPolicy"))</li> <li>else if (!_cups_strcasecmp(line, "OpPolicy")) { if (value) { @@ -649,7 +649,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of classes.conf.", linenum); }</li> <li>else if (!strcasecmp(line, "ErrorPolicy"))</li> <li>else if (!_cups_strcasecmp(line, "ErrorPolicy")) { if (value) {</li> </ul> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>