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 1063488

Summary: After smartcard reader is removed coolkey returns a spurious error from C_GetTokenEvent().
Product: Red Hat Enterprise Linux 7 Reporter: Roshni <rpattath>
Component: coolkeyAssignee: Bob Relyea <rrelyea>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: aakkiang, mclasen, rmainz, rrelyea, rstrode
Target Milestone: rcKeywords: Regression
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: coolkey-1.1.0-28.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 11:12:09 UTC Type: Bug
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: 1113520    
Attachments:
Description Flags
content of /var/log/messages
none
output of /usr/libexec/gnome-settings-daemon --debug
none
Comment none

Description Roshni 2014-02-10 20:47:37 UTC
Description of problem:
Unable to login after smartcard reader is removed when "Require smartcard for login" and "Lock screen on smartcard removal" are enabled

Version-Release number of selected component (if applicable):
gnome-shell-3.8.4-22.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Enroll a smartcard with an ldap user
2. Under Sundry -> authentication -> Advanced options enable "Require smartcard for login" and "Card Removal Action - Lock"
3. Remove the smartcard reader

Actual results:
Screen is locked, unable to login after providing the smartcard pin. No error message

Expected results:
Should prompt for smartcard pin and on providing smartcard pin login should be successful

Additional info:
I have filed this bug under gnome-shell component because I am seeing this issue at the time of login and I am not sure which component is actually causing this issue.

Comment 2 Bob Relyea 2014-02-21 23:59:50 UTC
Roshni, Just to be clear, after step 3, you replace the smart card reader and card, correct? Otherwise you are getting exactly what we expect (removing the reader is exactly the same as removing the smart card).

bob

Comment 3 Roshni 2014-02-24 14:54:32 UTC
After Step 3, I re-insert the smartcard reader into the usb slot with the same card that locked the screen. It does not detect the card and prompt for the pin and login fails if I provide the smartcard pin.

Comment 4 Roshni 2014-02-27 23:51:10 UTC
Testcase for the bug https://tcms.engineering.redhat.com/case/339222/?from_plan=11622

Comment 6 Ray Strode [halfline] 2014-03-12 18:32:59 UTC
So this is readily reproducible. You don't even need to force smartcard.  It looks like the problem is this code:

+        this._smartcardManager.connect('smartcard-inserted',•
+                                       Lang.bind(this, function(token) {•
+                                           if (this._isLocked && token.UsedToLogin)•
+                                               this._liftShield(true, 0);•
+                                       }));•

the problem is function should have two parametrs (so it should be function(manager, token) not just function(token)).  Since we were neglecting the manager parameter, a manager object was getting stuffed into the token parameter.  UsedToLogin was thus always evaulating to undefined.

I don't know how this bug snuck past my initial testing of the code.  I can only guess I refactored things before landing the final patch and forgot to retest that particular code path.  Anyway, will build fix now.

Comment 8 Roshni 2014-03-17 21:33:08 UTC
Created attachment 915870 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 9 Matthias Clasen 2014-03-18 13:37:48 UTC
For that amount of data, an attachment would be preferred.

Comment 10 Roshni 2014-03-18 13:44:54 UTC
Created attachment 875944 [details]
content of /var/log/messages

/var/log/messages is added as an attachment to the bug

Comment 11 Roshni 2014-03-18 15:21:04 UTC
Created attachment 876003 [details]
output of /usr/libexec/gnome-settings-daemon --debug

Comment 12 Ray Strode [halfline] 2014-03-18 15:43:30 UTC
So this line is interesting:

(gnome-settings-daemon:4798): smartcard-plugin-WARNING **: smartcard event function failed.

It means the smartcard driver is returning an error unexpectedly.  I added a bit of code to gnome-settings-daemon-3.8.6.1-8.el7 to try to cope with this sort of scenario.  Please try upgrading gnome-settings-daemon.

See bug 1061785 for more details.

Comment 13 Roshni 2014-03-19 15:23:53 UTC
Does not see the issue with gnome-settings-daemon-3.8.6.1-8.el7, because of the warning message in comment 12, changing the component to coolkey.

Comment 15 Bob Relyea 2014-03-20 00:04:06 UTC
Roshni, do you mean you no longer see the issue? Is this still a blocker?

If we have a spurious error from coolkey that isn't causing an issue we should just move it to 7.1.

bob

Comment 16 Bob Relyea 2014-03-20 00:05:24 UTC
r+ dev ack for 7.1 (Asha's change and my comment collided.

Comment 17 Roshni 2014-03-20 11:23:01 UTC
Bob,

I do not see the issue after updating to gnome-settings-daemon-3.8.6.1-8.el7

Comment 18 Bob Relyea 2014-03-20 16:24:19 UTC
Thanks Roshni, I've updated the comment to match the current problem this bug describes.

Comment 20 Bob Relyea 2014-09-26 22:56:58 UTC
fixed in coolkey-1.1.0-28.el7

Comment 22 Roshni 2014-10-31 20:43:20 UTC
Verified on coolkey-1.1.0-28.el7 by executing the steps in comment 0

Comment 24 errata-xmlrpc 2015-03-05 11:12:09 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-2015-0504.html