-CHANGES - 2.3.0 - 2019-07-16
+CHANGES - 2.3.0 - 2019-08-01
============================
- The scheduler now uses both the group's membership list as well as the
various OS-specific membership functions to determine whether a user belongs
to a named group (Issue #5613)
+- Fixed some PPD parser issues (Issue #5623, Issue #5624)
- Fixed an issue with unsupported "sides" values in the IPP backend
(rdar://51775322)
- The scheduler would restart continuously when idle and printers were not
{
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ break;
+
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_POINTS :
{
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ break;
+
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_POINTS :
{
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ break;
+
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_POINTS :
{
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ break;
+
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_POINTS :
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ break;
+
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_REAL :
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ break;
+
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_REAL :
goto error;
}
+ if (cparam->type != PPD_CUSTOM_UNKNOWN)
+ {
+ pg->ppd_status = PPD_BAD_CUSTOM_PARAM;
+
+ goto error;
+ }
+
/*
* Get the parameter data...
*/
}
else if (!strcmp(keyword, "PaperDimension"))
{
+ if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
+ {
+ pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
+
+ goto error;
+ }
+
if ((size = ppdPageSize(ppd, name)) == NULL)
size = ppd_add_size(ppd, name);
}
else if (!strcmp(keyword, "ImageableArea"))
{
+ if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
+ {
+ pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
+
+ goto error;
+ }
+
if ((size = ppdPageSize(ppd, name)) == NULL)
size = ppd_add_size(ppd, name);
{
DEBUG_printf(("2_ppdOpen: group=%p, subgroup=%p", group, subgroup));
+ if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
+ {
+ pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
+
+ goto error;
+ }
+
if (!strcmp(keyword, "PageSize"))
{
/*
if ((cparam = calloc(1, sizeof(ppd_cparam_t))) == NULL)
return (NULL);
+ cparam->type = PPD_CUSTOM_UNKNOWN;
strlcpy(cparam->name, param, sizeof(cparam->name));
strlcpy(cparam->text, text[0] ? text : param, sizeof(cparam->text));
/**** New in CUPS 1.2/macOS 10.5 ****/
typedef enum ppd_cptype_e /**** Custom Parameter Type @deprecated@ ****/
{
+ PPD_CUSTOM_UNKNOWN = -1, /* Unknown type (error) */
PPD_CUSTOM_CURVE, /* Curve value for f(x) = x^value */
PPD_CUSTOM_INT, /* Integer number value */
PPD_CUSTOM_INVCURVE, /* Curve value for f(x) = x^(1/value) */
{
switch (cparam->type)
{
+ case PPD_CUSTOM_UNKNOWN :
+ printf(" %s(%s): PPD_CUSTOM_UNKNOWN (error)\n", cparam->name, cparam->text);
+ break;
+
case PPD_CUSTOM_CURVE :
printf(" %s(%s): PPD_CUSTOM_CURVE (%g to %g)\n",
cparam->name, cparam->text,