Bug 280593 - System-config-printer-kde STILL doesn't request root when opened directly
Summary: System-config-printer-kde STILL doesn't request root when opened directly
Alias: None
Product: system-config-printer-kde
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Riddell
Depends on:
Reported: 2011-08-22 19:50 UTC by Eric Griffith
Modified: 2013-05-19 22:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Eric Griffith 2011-08-22 19:50:12 UTC
Version:           unspecified (using KDE 4.6.5) 
OS:                Linux

If someone searches 'printer' directly from the menu, system-config-printer-kde does not request Root when it opens, as it should. If you go into Printer Configuration through System Settings, however, it does correctly request root access. Root access is required to edit and configure settings, if root is not given, it errors out. Erroring out is perfectly fine and the error given (client-error-forbidden) makes sense if someone typed the root password wrong, but if the user was not prompt for root (such as through the menu) then the error makes no sense and is nothing short of confusing.

This behaviour is (presumably) incorrect and gives the user an inconsistent experience and makes KDE's Quality Control look bad, the fix itself should be a fairly simple one depending on how system-config-printer-kde is written

Reproducible: Always

Steps to Reproduce:
Open Kickoff menu, search 'print' Printer Configuration opens. New Printer > New Network Printer > Error "CUPS SERVER ERROR: There was an error during the CUPS operation: 'client-error-forbidden' "

Actual Results:  
KDE Errors out and nothing happens

Expected Results:  
System-config-printer-kde should request root whether it was called from System Settings, or through the menu directly.
Comment 1 Jonathan Riddell 2012-01-24 14:38:18 UTC
This is probably distro specific, root access is generally not needed in ubuntu to change cups settings through the cups interface used by s-c-p-k.  What distro do you use?
Comment 2 Kevin Kofler 2012-01-24 20:16:15 UTC
The fact that root access is needed in the first place is indeed a bug.

The problem is that the system-config-printer-kde code doesn't properly implement the authentication classes, the implementation is still stubbed out. So it can't set anything as non-root. It needs to call the cups-pk-helper like the GTK+ system-config-printer does, then we can do away with running the stuff as root.
Comment 4 Kevin Kofler 2012-01-24 20:33:05 UTC
(On Fedora, you need to authenticate to PolicyKit with the root password to be able to change printer settings from a s-c-p-kde as non-root.)
Comment 5 Rex Dieter 2012-01-24 20:37:45 UTC
fwiw, marking confirmed
Comment 6 Eric Griffith 2013-05-19 06:56:06 UTC
The new printer module that got added in either 4.9 or 4.10 fixes this issue, apparently the code was refactored enough to properly request root when needed-- even when called from the menu directly instead of through System Settings. Marking as fixed.
Comment 7 Kevin Kofler 2013-05-19 22:52:29 UTC
The new code is completely different, it got rewritten from scratch in C++ rather than Python.