Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Default policy in get_job_attrs() function (ipp.c) #3431

Closed

Description

@michaelrsweet

Version: 1.4-current
CUPS.org User: pkun

Hello.

Function get_job_attrs() check policy against DefaultPolicyPtr but not
against policy of job's printer.

if ((status =3D cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) !=3D =
HTTP_OK)

Activity

  1. michaelrsweet commented on Dec 8, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  2. michaelrsweet commented on Dec 8, 2009

    @michaelrsweet
    ContributorAuthor

    "str3431.patch":

    Index: scheduler/ipp.c

    --- scheduler/ipp.c (revision 8906)
    +++ scheduler/ipp.c (working copy)
    @@ -6744,6 +6744,7 @@
    ipp_attribute_t attr; / Current attribute /
    int jobid; /
    Job ID /
    cupsd_job_t *job; /
    Current job */

    • cupsd_printer_t printer; / Current printer /
      char scheme[HTTP_MAX_URI], /
      Method portion of URI /
      username[HTTP_MAX_URI], /
      Username portion of URI /
      host[HTTP_MAX_URI], /
      Host portion of URI */
      @@ -6818,8 +6819,20 @@
    • Check policy...
      */
    • if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK)
    • if ((printer = job->printer) == NULL)
    • printer = cupsdFindDest(job->dest);
    • if (printer)
      {
    • if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con,
    •                               NULL)) != HTTP_OK)
      
    • {
    •  send_http_error(con, status, printer);
      
    •  return;
      
    • }
    • }
    • else if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK)
    • {
      send_http_error(con, status, NULL);
      return;
      }
  3. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions