These patches enable 64-bit smartcard support for both
rdesktop 1.4.1 and 1.5.0. They apply against an
rdesktop patched with the scard-20060626 patch (see
patch #1314556 for 1.4.1, make sure you get the latest
one, or patch #1576059 for 1.5.0).
1.4.1 crashes pretty unpredictably when you use these
patches and keep your smartcard inserted throughout the
session; usually within five or ten minutes of
successful login, and sometimes within ten seconds.
1.5.0 seems, based on initial testing, to be much more
stable than 1.4.1 with these patches when using a
The 64bit-translating patch depends on the 64bit-clean
patch, which depends on the scard-20060626 patch.
The first patch, 64bit-clean, gets rid of all the casts
from pointers to unsigned longs and back, resolving
hundreds of compiler warnings and preventing segfaults
The second patch, 64bit-translating, takes care of
translating between the 32-bit smartcard infrastructure
present on all Windows terminal servers I've seen, and
the 64-bit smartcard infrastructure on 64-bit Linux
boxen. There are a few theoretically unsafe casts in
there, but I think the numbers being casted never
exceed 8000 or so. The translation is 32-bit
transparent, so the same code will compile and run
against both 32-bit and 64-bit pcsc-lite libraries.