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 680917

Summary: rdesktop fails to connect using SmartCard on x86_64
Product: Red Hat Enterprise Linux 6 Reporter: Olivier Fourdan <ofourdan>
Component: rdesktopAssignee: Søren Sandmann Pedersen <sandmann>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: kem, mhomolov, tpelka
Target Milestone: rcKeywords: OtherQA, Patch
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: rdesktop-1.6.0-10.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 09:09:38 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: 782183    
Attachments:
Description Flags
Proposed patch ofourdan: review?

Description Olivier Fourdan 2011-02-28 13:54:56 UTC
Created attachment 481376 [details]
Proposed patch

Description of problem:

Using rdesktop in x86_64 fails to connect, falsely reporting that the SmartCard has been removed (while it hasn't).

Version-Release number of selected component (if applicable):

rdesktop-1.6.0-8.el6

How reproducible:

Always

Steps to Reproduce:

1. Try to connect to Windows system using the scard option:

   /usr/bin/rdesktop -u <uid> -d <domain> -r sound -k fr -g 1280x940 -a 16 -N -z -x l <server> -r scard 
  
Actual results:

rdesktop reports that the SmartCard has been removed and authentication fails

Expected results:

Authentication succeeds

Additional info:

When using scard debug, the following is seen in the logs:

    SCARD: -> Success (hcard: 0x000092a1 [0x000192a1])
    SCARD: SCardBeginTransaction(hcard: 0x000092a1 [0x000092a1])
    SCARD: SCardDisconnect(context: 0x0103c674, hcard: 0x000092a1, disposition: 0x00000000)

    SCARD: -> Success (hcard: 0x0000177f [0x0001177f])
    SCARD: SCardBeginTransaction(hcard: 0x0000177f [0x0000177f])
    SCARD: SCardDisconnect(context: 0x01037ba1, hcard: 0x0000177f, disposition: 0x00000000)

    etc.

According to this thread upstream:

    http://thread.gmane.org/gmane.network.rdesktop.devel/3052

PC/SC maintainer points out that the conversions functions scHandleToMyPCSC() and scHandleToServer() are not needed and are actually causing handle corruption in PC/SC.

   http://thread.gmane.org/gmane.network.rdesktop.devel/3052

  "[...] The functions are bogus since they corrupt the handles returned by
   pcsc-lite.

   The correction is to completely remove the two functions and use the handles
   directly(without any conversion function)."

The attached patch removes these conversion functions.

Comment 7 RHEL Program Management 2012-07-10 06:14:52 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 8 tvizirov 2012-07-10 11:37:12 UTC
Yes, this have to be included in the next release.

Comment 9 RHEL Program Management 2012-07-11 01:46:16 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 13 Adam Jackson 2012-08-22 21:54:14 UTC
A test package of this fix and others is available here:

http://people.redhat.com/~ajackson/rdesktop-test/

Please test.

Comment 19 errata-xmlrpc 2012-09-17 09:09:38 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.

http://rhn.redhat.com/errata/RHBA-2012-1276.html