Even though we can detect that the server buffer is too small to
receive the APDU result we don't prevent the actual copy of this result
to allocated buffer which results in overflow.
Current approach for TS_SCardEstablishContext() causes
Windows not to detect scard reader insertion in a case
when rdesktop was lauched without attached reader(s).
Thanks to demansong@gmail.com for the help to pinpoint this issue.
SCARD_AUTOALLOCATE is a define with value -1, which is compared
to an uint32. There was some missassumtion of whenever its -1 or
0xffffffff through the code.
Running rdesktop with smart card redirection could lead to scenarios
where rdesktop keeps producing error messages about the Smart Card
redirection when there isn't really an error. I don't believe that we
should log an error if the underlying PC/SC interface reports
SCARD_E_NO_SERVICE.
The logged information could be useful for developers in debugging
scenarios, so I'm keeping is as Debug rather than removing it
outright.
If proto.h is supposed to be auto-generated it should probably not be
present in the repo at all. Re-running cproto showed that proto.h has
been manually edited for quite some time, so this just makes this the
only workflow.
It also gets rid of a bit of #ifdefs, so that's nice.
Windows smartcard application generally behaves better with polling of smartcard
subsystem availability than when there are no smartcard readers available.
This is a potential workaround for issue #109
This commit will add a logging system to solve the problem that
one actually need to recompile rdesktop from source to enable
different debug logging.
- Same logging api for all kind of logging and messages to
end user.
- Adding -v for verbose output when running rdesktop.
- All messages are logged into a subject and with a type, eg:
logger(Keyboard, Notice, "Autos-electing %s based on locale.", locale);
- Debug logging is enabled trough a environment variable RDEKSTOP_DEBUG,
which specifies subjects of interest, comma separated. There is a special
subject named All which includes all subject for debug loggin. There is also
a simple logic opeartor '!' = NOT which can be used in combination like:
RDESKTOP_DEBUG=All,!Graphics,!Sound
Which would give debug log output for All subject except Graphics and Sound.
redirection were the RDPDR channel is shutdown by server.
The RDPDR channel is shutdown by server when responses from
abdonend iorequests are received on a reinitialized RDPDR
channel. This fix adds epochs for RDPDR channel and tags
iorequest to specific epoch to handle abdonend iorequest.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1836 423420c4-83ab-492f-b58f-81f9feb106b5
for SCardGetStatusChange() behaves just like INFINIT.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1835 423420c4-83ab-492f-b58f-81f9feb106b5
worked by pure luck in some cases, and failed in the rest.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1724 423420c4-83ab-492f-b58f-81f9feb106b5
Thanks goes to Arvo for his findings and provided patch of the
bugs fixed in r1649, r1650 and this commit.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1651 423420c4-83ab-492f-b58f-81f9feb106b5
of rdesktop, this is jsut a hack to fix the problem with
smartcard imlpementation temporarly due the smartcard impl.
really needs to be reimplement for a cleaner code and proper
handling.
- Ripped out the old magic scard handle code to be replaced
with mappings the works on 64bit rdesktop.
- Added a handle map to support mapping between a 64bit handle
and 32bit eg: pcsclite <- 64bit-> rdesktop <- 32bit -> WTS server.
- Added handle mapping for the context handle to which old code didn't
event respected at all eg. 64bit context handled truncated to 32bit.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1646 423420c4-83ab-492f-b58f-81f9feb106b5
breaks compilation, change code to use SCARD_READERSTATE which
is the new name and is also an typedef of the old SCARD_READERSTATE_A
from pcslite <1.9.2 versions.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1643 423420c4-83ab-492f-b58f-81f9feb106b5
system version to return immediately, causing CPU intensive loops.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1594 423420c4-83ab-492f-b58f-81f9feb106b5
when using smart cards in conjunction with RandR.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1561 423420c4-83ab-492f-b58f-81f9feb106b5
warnings on 32 bit platforms, when debugging is not enabled.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1560 423420c4-83ab-492f-b58f-81f9feb106b5
this fixes the smartcard-support on OS X 10.5
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1419 423420c4-83ab-492f-b58f-81f9feb106b5