Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 784817

Summary: Segfault when moving / removing printer from class
Product: Red Hat Enterprise Linux 6 Reporter: Petr Sklenar <psklenar>
Component: system-config-printerAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: jpopelka, thozza, zdohnal
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 10:45:50 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: 1356054, 1373253    

Description Petr Sklenar 2012-01-26 10:52:01 UTC
Description of problem:
Segfault when move/removing printer from class

Version-Release number of selected component (if applicable):
system-config-printer-1.1.16-23.el6.i686
cups-1.4.2-44.el6.i686
--
not a regression, can see the same on system-config-printer-1.1.16-22.el6.i686

How reproducible:
deterministic

Steps to Reproduce:
1. as a root: open system-config-printer and add new printer, then close s-c-printer
2. as a user:  open system-config-printer add new printer

3, now you have one printer created by user and one created by root

4. create 'new class' and add that printer created by user
4. open properties for previously 'new class'(right click and properties) > members try to add or remove printer created by root
  
Actual results:
system-config-printer --debug
Authentication pass: 1
Authentication: password callback set
Authentication pass: 1
Authentication: password callback set
PolicyKit call to ClassDeletePrinter did not work: PolicyKit communication issue
Segmentation fault (core dumped)


Expected results:
no segfault, It asks for password or printer is removed from class

Additional info:

Comment 4 Tim Waugh 2012-01-31 16:14:21 UTC
See also bug #673468.

Investigating why that happens in the first place.

Comment 5 Tim Waugh 2012-01-31 16:38:57 UTC
I can't reproduce this here.  Is it completely repeatable for you?  What does 'rpm -q cups-pk-helper' say?

I don't see the "PolicyKit communication issue" line, and the core dump suggests that the CUPS IPP response contained a member-names attribute but no member-uris attributes -- and I don't see that either.  I tried removing cups-pk-helper to make sure that system-config-printer was using pycups to talk to CUPS directly, as seems to have been the case here.

So I have a work-around, but won't be able to understand what the root cause is until I can reproduce it locally.

Comment 8 Tim Waugh 2012-02-01 12:52:04 UTC
Having observed this first-hand on the original machine, I can say that this is really a cups problem of some sort -- however, defensive coding against it would be advisable in pycups, as in bug #673468.

Querying cups for the attributes for the class, there was indeed a member-names attribute but no member-uris attribute.  /etc/cups/classes.conf defined a class with no printers.  lpstat -c showed that it actually had two printers.

Not sure how this situation occurred, but pycups ought not to assume anything at all in its dealings with cups.  In this instance, it was assuming that the presence of a member-names attribute meant there must also be a member-uris attribute.

Upstream commit 4952f2b320c5c64891c5ec4b818ff52eb42bb061 (in pycups) is the patch to handle this more gracefully.

Comment 10 RHEL Program Management 2012-09-07 05:02:46 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 16 Petr Sklenar 2016-09-02 11:37:52 UTC
FYI
I was able to reproduce this bug using latest rhel68:

[test@localhost Desktop]$ system-config-printer
Segmentation fault (core dumped)
[test@localhost Desktop]$ rpm -q system-config-printer
system-config-printer-1.1.16-25.el6.x86_64
[test@localhost Desktop]$ date
Fri Sep  2 07:33:40 EDT 2016


---
between step 4 and 5:
have a class with two printer (root's one and user's one)
if not segfault:
   close s-c-printer
   like a user: open s-c-printer try to move with root's printer

---
it asks for root password but I could see segfault

Comment 22 errata-xmlrpc 2017-03-21 10:45:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0693.html