cupsext password callback doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
The cupsext routines don't set the CUPS user until after a response is received. This means that if we are running as a non-system user on the local machine, connecting over a UNIX Domain Socket (which we do, by default) so that PeerCred is used for authentication, the response will be client-
If you only set the CUPS user in the password callback, you're doing it too late. You only get to respond with the password for the current user at that stage.
Symptom: running hp-setup as a normal user fails.
hp-setup[24849]: debug: Found match: drv:///
hp-setup[24849]: debug: [('drv:
hp-setup[24849]: debug: One match found.
hp-setup[24849]: debug: addPrinter(
hp-setup[24849]: debug: addPrinter() returned (0, client-
hp-setup[24849]: debug: Device URI ipp://192.
hp-setup[24849]: debug: Exception: 4 (Unknown/invalid device-uri field)
hp-setup[24849]: debug: Device URI ipp://192.
hp-setup[24849]: debug: Exception: 4 (Unknown/invalid device-uri field)
hp-setup[24849]: debug: Device URI ipp://192.
hp-setup[24849]: debug: Exception: 4 (Unknown/invalid device-uri field)
hp-setup[24849]: debug: Device URI usb://EPSON/
hp-setup[24849]: debug: Exception: 4 (Unknown/invalid device-uri field)
hp-setup[24849]: debug: Device URI ipp://192.
hp-setup[24849]: debug: Exception: 4 (Unknown/invalid device-uri field)
hp-setup[24849]: debug: Device URI ipp://192.
hp-setup[24849]: debug: Exception: 4 (Unknown/invalid device-uri field)
hp-setup[24849]: debug: {}
error: Printer queue setup failed. Please restart CUPS and try again.
Done.
Original bug report:
https:/
Changed in hplip: | |
status: | Fix Released → New |
Example fix, just for addPrinter