Red Hat Bugzilla – Bug 1287585
lpoption wrongly tries to fetch PPD directly from the printer
Last modified: 2016-07-19 16:15:46 EDT
Description of problem:
lpoptions -l should show the available printer options. Instead it fails with 'lpoptions: Unable to get PPD file for Printername: Not Found'. Tracing the network traffic shows that the client tries to fetch the PPD file directly from the printer instead of the print server. Of course the printer does not provide the PPD file so the request fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set up printer server using IPP to access the network printer (i.e.: ipp://X.X.X.X/ipp)
2. Set up the client /etc/cups/client.conf to access 'ServerName printerserver'. Disable local printer server on the client.
3. Run lpoptions -l on the client.
[hawk@iconia ~]$ lpoptions -l
lpoptions: Unable to get PPD file for Canon_PS: Not Found
[hawk@denobula ~]$ lpoptions -l
Opt2CF/Cassette Feeding Unit: False *True
The problem does not seem to be new. This (old) Debian bug report describes the same problem and shows when the problematic code was introduced:
The conclusion from the mentioned report is that due to the use of IPP cups thinks there is another cups server. Of course this works if you run a local cups daemon that needs to fetch the PPD from the 'real' server. In this case it mistakenly thinks it needs to fetch the PPD directly from the printer.
Removing the mentioned code element from cups/util.c makes lpoptions work as expected but I guess will break fetching the right PPD if a local server is running.
Here is the root cause from cups/util.c
if (device_uri &&
(!strncmp(device_uri, "ipp://", 6) ||
!strncmp(device_uri, "ipps://", 7) ||
((strstr(device_uri, "._ipp.") != NULL ||
strstr(device_uri, "._ipps.") != NULL) &&
!strcmp(device_uri + strlen(device_uri) - 5, "/cups"))))
* Statically-configured shared printer.
httpSeparateURI(HTTP_URI_CODING_ALL, _httpResolveURI(device_uri, uri, sizeof(uri), _HTTP_RESOLVE_DEFAULT, NULL, NULL), scheme, sizeof(scheme), username, sizeof(username), host, hostsize, port, resource, resourcesize);
DEBUG_printf(("5cups_get_printer_uri: Resolved to host=\"%s\", port=%d, resource=\"%s\"", host, *port, resource));
I'm wondering if there's a corresponding upstream ticket.
Looks like the Debian maintainer (Didier) once asked on cups-devel list, but I can't find anything in https://cups.org/lists.php
I couldn't find any either.
The patch from http://cups.org/str.php?L4178 introduces the plain ipp:// and ipps:// device-uri selection to the part where Bonjour shared printer URLs are handled.
Instead of disabling the whole code block it is sufficient to remove those two lines.
I've created a CUPS bug report: https://www.cups.org/str.php?L4743
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.