[Bug 25820] New: Token Administration Utility for ICBC online banking failed to list USB devices (without wine unofficial USB patches)

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jan 19 11:58:22 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=25820

           Summary: Token Administration Utility for ICBC online banking
                    failed to list USB devices (without wine unofficial
                    USB patches)
           Product: Wine
           Version: 1.3.11
          Platform: All
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: user32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: fracting at gmail.com


Something about G&D USB-Shield: it is required by ICBC persional internet
banking while online trading. Here is the G&D USB-Shield driver for Windows,
safesign_icbc_per.exe : http://goo.gl/LM588 ( from http://goo.gl/Ft4Ub)
 After install the USB-Shield driver,there is a tool called Token
Administration Utility, it allow us manager the usbkey with a client program.
We can see tokenadmin.exe in "Program Files/ICBCEbankTools/G&D/Management
Utility", and that is the Token Administration Utility.

Below is screenshots for tokenadmin.exe in WinXP,both of them has six devices
listing in the tokenadmin window:
Before pluging a usbkey:
http://goo.gl/Wkdon
After pluging a usbkey:
http://goo.gl/BGIbl

scardsvr.exe is needed for running tokenadmin.exe normally,sence
EITHER manually setting the "Start" value of
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SCardSvr from default 2 to
4 OR killing scardsvr.exe with taskmgr will cause errors, however they have a
bit differents.
Screenshot (Register modified, there are only two devices listed in the
tokenadmin window):
http://goo.gl/VNn2N
Screenshot (scardsvr.exe killed, there is no device listed in the tokenadmin
window):
http://goo.gl/UcYxp

Also winscard.dll is important for tokenadmin.exe,below is the steps to show
that.

Step 1
$ rm -rf ~/.wine
$ winetricks -q mfc42 crypt32
#see bug25784 http://goo.gl/1Cm5v for the reason to override crypt32.dll

Step 2
$ wine safesign_icbc_per.exe
#install tokenadmin.exe

see attachment for log

Step 3
$ wine tokenadmin.exe
log:
fixme:winscard:SCardReleaseStartedEvent stub
fixme:winscard:SCardEstablishContext (2,(nil),(nil),0x32f264) stub
fixme:winscard:SCardEstablishContext (2,(nil),(nil),0x658f90) stub


Tokenadmin.exe can't list the usb devices, the result is exactly the same as
that in WinXP while scardsvr.exe is killed ,here is the screenshot (no device
listed):
http://goo.gl/kqPdb
the same as:
Screenshot (WinXP with scardsvr.exe killed, no device listed):
http://goo.gl/UcYxp


However, replace winscard.dll may change something.
Step 3'
override winscard.dll
$ cp winscard.dll ~/.wine/drive_c/windows/system32
$ export WINEDLLOVERRIDES="winscard.dll=n,b"
$ wine tokenadmin.exe

This time both the log and the screenshot changes, there is no fixme:winscard
message, and there are two devices lists in tokenadmin window.

log:
fixme:wtsapi:WTSRegisterSessionNotification Stub 0x40082 0x00000000
fixme:wtsapi:WTSQuerySessionInformationA Stub (nil) 0xffffffff 8 0x32f234
0x32f230
fixme:wtsapi:WTSRegisterSessionNotification Stub 0x40082 0x00000000
fixme:win:RegisterDeviceNotificationA (hwnd=0x10084,
filter=0xe8e9c4,flags=0x00000000) returns a fake device notification handle!
fixme:wtsapi:WTSRegisterSessionNotification Stub 0x40082 0x00000000
fixme:wtsapi:WTSRegisterSessionNotification Stub 0x40082 0x00000000
fixme:wtsapi:WTSRegisterSessionNotification Stub 0x40082 0x00000000
fixme:win:UnregisterDeviceNotification (handle=0xcafecafe), STUB!

screenshot(two devices listed):
http://goo.gl/7gWbt
Looks the same as that in WinXP with Register modified,
Screenshot ( two devices listed ):
http://goo.gl/VNn2N


I also try scard4wine to replace winscard.dll follow its instuction:
http://goo.gl/1Epa5 , there is also something different.
Step 3''
$ /usr/bin/install -c   winscard.dll.so $WINE_PREFIX/lib/wine/winscard.dll.so
$ /usr/bin/install -c  -m 644  libwinscard.def
$WINE_PREFIX/lib/wine/libwinscard.def

then Step 1, Step 2, Step 3.
this time, there is no fixme:winscard message, in fact there is no any log, but
there is also no device listed.Screenshot is the same as http://goo.gl/kqPdb

I also test this issue with wine unofficial USB patches, and posted my result
with title "Fail to use USB-Key/USB-Shield with wine USB patch :cannot start
service 'SCardSvr':win error code:0x00000424" in wine-dev mailling list.

Best wishes!

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list