CHANGES IN CUPS V1.1.21rc1
+ - The HTTP authentication cache was broken (STR #517)
+ - The cupstestppd utility now fails PPD files that have
+ a DefaultOption keyword for a non-existance option
+ name (STR #476)
- Optimized the scanning of new PPD files on scheduler
startup (STR #424)
- The EPM list file did not include the bin, lib, or
/*
- * "$Id: auth.c,v 1.7 2004/02/25 20:14:51 mike Exp $"
+ * "$Id: auth.c,v 1.8 2004/02/26 16:26:28 mike Exp $"
*
* Authentication functions for the Common UNIX Printing System (CUPS).
*
}
/*
- * Nope, see if we should retry the current digest password...
+ * Nope, see if we should retry the current username:password...
*/
- if (strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0 ||
- http->digest_tries > 1 || !http->userpass[0])
+ if (http->digest_tries > 1 || !http->userpass[0])
{
/*
* Nope - get a new password from the user...
snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(),
http->hostname);
- http->digest_tries = 0;
+ http->digest_tries = strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE],
+ "Basic", 5) == 0;
http->userpass[0] = '\0';
if ((password = cupsGetPassword(prompt)) == NULL)
snprintf(http->userpass, sizeof(http->userpass), "%s:%s", cupsUser(),
password);
}
- else
+ else if (http->status == HTTP_UNAUTHORIZED)
http->digest_tries ++;
/*
/*
- * End of "$Id: auth.c,v 1.7 2004/02/25 20:14:51 mike Exp $".
+ * End of "$Id: auth.c,v 1.8 2004/02/26 16:26:28 mike Exp $".
*/
/*
- * "$Id: cupstestppd.c,v 1.29 2004/02/25 20:14:54 mike Exp $"
+ * "$Id: cupstestppd.c,v 1.30 2004/02/26 16:26:28 mike Exp $"
*
* PPD test program for the Common UNIX Printing System (CUPS).
*
}
}
- if (ppdFindAttr(ppd, "DefaultImageableArea", NULL) != NULL)
- {
- if (verbose > 0)
- puts(" PASS DefaultImageableArea");
- }
- else
+ if ((attr = ppdFindAttr(ppd, "DefaultImageableArea", NULL)) == NULL)
{
if (verbose >= 0)
{
errors ++;
}
+ else if (ppdPageSize(ppd, attr->value) == NULL)
+ {
+ if (verbose >= 0)
+ {
+ if (!errors && !verbose)
+ puts(" FAIL");
- if (ppdFindAttr(ppd, "DefaultPaperDimension", NULL) != NULL)
+ printf(" **FAIL** BAD DefaultImageableArea %s!\n", attr->value);
+ puts(" REF: Page 102, section 5.15.");
+ }
+
+ errors ++;
+ }
+ else
{
if (verbose > 0)
- puts(" PASS DefaultPaperDimension");
+ puts(" PASS DefaultImageableArea");
}
- else
+
+ if (ppdFindAttr(ppd, "DefaultPaperDimension", NULL) == NULL)
{
if (verbose >= 0)
{
errors ++;
}
+ else if (ppdPageSize(ppd, attr->value) == NULL)
+ {
+ if (verbose >= 0)
+ {
+ if (!errors && !verbose)
+ puts(" FAIL");
+
+ printf(" **FAIL** BAD DefaultPaperDimension %s!\n", attr->value);
+ puts(" REF: Page 103, section 5.15.");
+ }
+
+ errors ++;
+ }
+ else if (verbose > 0)
+ puts(" PASS DefaultPaperDimension");
for (j = 0, group = ppd->groups; j < ppd->num_groups; j ++, group ++)
for (k = 0, option = group->options; k < group->num_options; k ++, option ++)
if (option->defchoice[0])
{
- if (verbose > 0)
+ if (ppdFindChoice(option, option->defchoice) == NULL)
+ {
+ if (verbose >= 0)
+ {
+ if (!errors && !verbose)
+ puts(" FAIL");
+
+ printf(" **FAIL** BAD Default%s %s\n", option->keyword,
+ option->defchoice);
+ puts(" REF: Page 40, section 4.5.");
+ }
+
+ errors ++;
+ }
+ else if (verbose > 0)
printf(" PASS Default%s\n", option->keyword);
}
else
/*
- * End of "$Id: cupstestppd.c,v 1.29 2004/02/25 20:14:54 mike Exp $".
+ * End of "$Id: cupstestppd.c,v 1.30 2004/02/26 16:26:28 mike Exp $".
*/