Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ v2.5b1 - YYYY-MM-DD
(Issue #1201)
- Fixed job cleanup after daemon restart (Issue #1315)
- Fixed unreachable block in IPP backend (Issue #1351)
- Fixed memory leak in _cupsConvertOptions (Issue #1354)
- Fixed memory leak in `_cupsConvertOptions()` (Issue #1354)
- Fixed missing write check in `cupsFileOpen/Fd` (Issue #1360)
- Fixed error recovery when scanning for PPDs in `cups-driverd` (Issue #1416)
- Fixed allowed values for directive `FilterNice`
- Removed hash support for SHA2-512-224 and SHA2-512-256.
- Removed `mantohtml` script for generating html pages (use
`https://www.msweet.org/mantohtml/`)
Expand Down
23 changes: 22 additions & 1 deletion scheduler/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static const cupsd_var_t cupsd_vars[] =
{ "DNSSDHostName", &DNSSDHostName, CUPSD_VARTYPE_STRING },
{ "ErrorPolicy", &ErrorPolicy, CUPSD_VARTYPE_STRING },
{ "FilterLimit", &FilterLimit, CUPSD_VARTYPE_INTEGER },
{ "FilterNice", &FilterNice, CUPSD_VARTYPE_INTEGER },
#ifdef HAVE_GSSAPI
{ "GSSServiceName", &GSSServiceName, CUPSD_VARTYPE_STRING },
#endif /* HAVE_GSSAPI */
Expand Down Expand Up @@ -3489,6 +3488,28 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
break;
}
}
else if (!_cups_strcasecmp(line, "FilterNice") && value)
{
/*
* FilterNice [0-19]
*/

char *end; /* Remaining string if any*/

long n = strtol(value, &end, 10);

if ((end && *end) || n < 0 || n > 19)
{
cupsdLogMessage(CUPSD_LOG_WARN, "The directive FilterNice accepts values 0 to 19.");

if (FatalErrors & CUPSD_FATAL_CONFIG)
return (0);
else
continue;
}

FilterNice = n;
}
else if (!_cups_strcasecmp(line, "AccessLog") ||
!_cups_strcasecmp(line, "CacheDir") ||
!_cups_strcasecmp(line, "ConfigFilePerm") ||
Expand Down
Loading