[ rdesktop-Bugs-3017620 ] Revision 1595 breaks current SCard drivers

"SourceForge.net" <[email protected]>
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Bugs item #3017620, was opened at 2010-06-17 16:43
Message generated for change (Settings changed) made by ossman_
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=3017620&group_id=24366

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Internals
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Martin Preuss (aquamaniac)
Assigned to: Nobody/Anonymous (nobody)
Summary: Revision 1595 breaks current SCard drivers

Initial Comment:
SVN revision 1595 introduces a forced check of the dwControlCode and it tries to translate dwControlCodes from the windows world to
the client.
However, this breaks most current pcsc drivers on Linux when using functions from PC/SC part 10 (e.g. Secure Pin Verification etc).
The reason is this: There is a SCardControl retrieving the control codes of some common features like "Secur Pin Verification" etc. 
The control codes reported by this function do of course report codes as they are used on Linux (e.g. 42000000+x). 
As soon as a windows application tries to use those codes it gets an error from rdesktop saying this isn't a real windows code.

So I propose to either revert this revision or to implement a modification of the control codes returned by the GET_FEATURE request.

----------------------------------------------------------------------

>Comment By: Pierre Ossman (ossman_)
Date: 2010-06-22 15:50

Message:
Did this, as well as translation of GET_FEATURE. Also found another bug
that prevented pin pads from working. Seems to do its job now.

----------------------------------------------------------------------

Comment By: Martin Preuss (aquamaniac)
Date: 2010-06-17 16:52

Message:
I propose the following code in TS_ScardControl:

	/* Is this a proper Windows smart card ioctl? */
	if ((dwControlCode & 0xffff0000) == (49 << 16)) {
	    /* Translate to local encoding */
	    dwControlCode = (dwControlCode & 0x3ffc) >> 2;
	    dwControlCode = SCARD_CTL_CODE(dwControlCode);
	}

This transforms only WINDOWS code and leaves codes reported via
GET_FEATURE unchanged.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=3017620&group_id=24366

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.