Bug 526442

Summary: add-printer method fails when using ppd-name and not device-uri
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: cups-pk-helperAssignee: Marek Kašík <mkasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: mkasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.0.4-5.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 543006 (view as bug list) Environment:
Last Closed: 2009-10-21 00:40:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 543006    
Attachments:
Description Flags
cups-pk-helper-ppd-name.patch none

Description Tim Waugh 2009-09-30 09:49:31 UTC
Description of problem:
The device-uri attribute is not mandatory when using CUPS-Add-Printer, but cups-pk-helper-mechanism always fills in that field even when blank.  This causes the IPP request to fail.

Version-Release number of selected component (if applicable):
cups-pk-helper-0.0.4-7.fc12.x86_64

How reproducible:
100%

Steps to Reproduce:
1.cd /usr/share/system-config-printer
2.python
import authconn
authconn.set_debugging(True)
c=authconn.Connection()
c.addPrinter("foo", ppdname="raw")
3.Provide root password when asked by polkit authentication agent

Actual results:
An IPP authentication window is presented, and this debugging output can be seen in the terminal:

Connected as user twaugh
Authentication pass: 1
Authentication: password callback set
PolicyKit call to PrinterAdd did not work: client-error-not-possible
Authentication pass: 2
Forbidden: True
Authentication: Try as root
Connected as user root
PolicyKit call to PrinterAdd did not work: client-error-not-possible
Got password callback
Authentication pass: 3
Forbidden: False
cancelled
PolicyKit call to PrinterAdd did not work: client-error-not-possible

Comment 1 Tim Waugh 2009-09-30 10:30:27 UTC
Created attachment 363169 [details]
cups-pk-helper-ppd-name.patch

This patch fixes it for me.

Comment 2 Tim Waugh 2009-09-30 10:31:03 UTC
This affects F-11, F-12 and devel.

Comment 3 Marek Kašík 2009-10-02 07:38:01 UTC
Hi Tim,

thank you for the patch. I committed it to F-11, F-12 and devel.

Marek

Comment 4 Fedora Update System 2009-10-02 14:40:48 UTC
cups-pk-helper-0.0.4-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/cups-pk-helper-0.0.4-5.fc11

Comment 5 Fedora Update System 2009-10-03 19:11:28 UTC
cups-pk-helper-0.0.4-5.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups-pk-helper'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10230

Comment 6 Tim Waugh 2009-10-05 11:47:29 UTC
Works for me.  Thanks.

Comment 7 Fedora Update System 2009-10-21 00:40:41 UTC
cups-pk-helper-0.0.4-5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.