[cups.bugs] [MOD] STR #2782: Satisfy any doesn't work for Print-Job/Create-Job

Richard Fuller rpfuller-cups at cs.york.ac.uk
Thu Apr 3 05:06:35 PDT 2008


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Satisfy any doesn't work for Print-Job or Create-Job. For example, I have
CUPS configured so that Negotiate authentication is required, except from
localhost, as I wish to use cups-lpd to interface with another system.
(Which is fine because users can't run things on the server in question.)

It almost works, but fails at (in CUPS 1.3.7) scheduler/ipp.c:1301

 else if ((printer->type & CUPS_PRINTER_AUTHENTICATED) &&
           !con->username[0] && !auth_info)
  {
    send_http_error(con, HTTP_UNAUTHORIZED, printer);
    return (NULL);
  }

printer->type & CUPS_PRINTER_AUTHENTICATED is true, but there is no
username or auth_info, as I have connected from localhost, where none
should be required. Obviously, in general, authentication is required, so
CUPS_PRINTER_AUTHENTICATED makes sense, but having connected from an IP
address explicity allowed, with a Satisfy any, I should not have to have
an authenticated username or auth info.

As a hack, to test the theory, I added:
&& !httpAddrLocalhost(con->http.hostaddr)

and then it worked fine, happily using the (unauthenticated) username
supplied in the IPP request.

My guess would be it needs to include "has come from an allowed IP address
with satisfy any enabled" as an alternative to con->username[0] and
auth_info.

Do let me know if you would like any more details.

Link: http://www.cups.org/str.php?L2782
Version: 1.3.7





More information about the cups-devel mailing list