From: Michael R Sweet Date: Sun, 26 Jul 2026 22:44:47 +0000 (-0400) Subject: Add missing Set-Printer-Attributes policy. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ef876d9a3d7826490e07dc1797f310a049e057d;p=thirdparty%2Fcups.git Add missing Set-Printer-Attributes policy. --- diff --git a/scheduler/conf.c b/scheduler/conf.c index cc00742cba..023bde4995 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -4566,6 +4566,25 @@ set_policy_defaults(cupsd_policy_t *pol)/* I - Policy */ cupsdLogMessage(CUPSD_LOG_WARN, "No limit for Close-Job defined in policy %s and no suitable template found.", pol->name); } + if ((op = cupsdFindPolicyOp(pol, IPP_OP_SET_PRINTER_ATTRIBUTES)) == NULL || + op->op == IPP_ANY_OPERATION) + { + if ((op = cupsdFindPolicyOp(pol, IPP_OP_CUPS_ADD_MODIFY_PRINTER)) != NULL && + op->op != IPP_ANY_OPERATION) + { + /* + * Add a new limit for Set-Printer-Attribures using the + * CUPS-Add-Modify-Printer limit as a template... + */ + + cupsdLogMessage(CUPSD_LOG_WARN, "No limit for Set-Printer-Attributes defined in policy %s - using CUPS-Add-Modify-Printers's policy.", pol->name); + + cupsdAddPolicyOp(pol, op, IPP_OP_SET_PRINTER_ATTRIBUTES); + } + else + cupsdLogMessage(CUPSD_LOG_WARN, "No limit for Set-Printer-Attributes defined in policy %s and no suitable template found.", pol->name); + } + if ((op = cupsdFindPolicyOp(pol, IPP_OP_CUPS_GET_DOCUMENT)) == NULL || op->op == IPP_ANY_OPERATION) {