I tried to enable the scard code in rdpdr_send_available in rdpdr.c:
out_uint32_le(s, 0x20); /* Device type 0x20 - smart card */
out_uint8p(s, "SCARD", 5);
I hoped to reach the printout
error("IRP for bad device %ld\n", device);
But nothing was printed. And no reader had been registered by PCSC on
the server for my session.
Is there anything else that should be done in order to register a reader?
You don't need to enable this block. All its task is made by the for-loop
before it. But you must specify device.
out_uint32_le(s, 0x20); <--> out_uint32_le(s,
out_uint32_le(s, 0); <--> out_uint32_le(s, i); /*
RDP Device ID */
out_uint8p(s, "SCARD", 5); <--> out_uint8p(s,
out_uint8s(s, 3); <--/
out_uint32(s, 0); <--> the same
We have done next:
1) have written simple "scard.c" where we have described SCARD_DEVICE_FNS
2) have modified "rdpdr.c" to point to SCARD_DEVICE_FNS for Smart Card
3) have modified "rdesktop.c" to call the get_enum_device for Smart Card
We found that the name of Smart Card Device must be "SCARD\0\0\0", only
with this name redirection will work. We don't understand why, but think
that this is a protocol limitation.
We can send this files to you, but them also contain some "printf"
functions for debug purpose.
PS. Do You have ICQ? We can communicate by it, my number 264679502