summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-15Update sv keymap to include neighbouring nordic charactersfix/sv-keymap-æøcos
As supported on virtually all other Swedish keyboard keymaps.
2018-07-02Free socket buffers on disconnectHEADmasterPierre Ossman
Otherwise we would leak the memory on every reconnect (and exit).
2018-07-02Always include frame pointers with address sanitizerPierre Ossman
This is needed to get proper stack traces with the sanitizer.
2018-07-02Drain X event queue without any delayPierre Ossman
A 100 ms delay between iterations was still too large for many cases, so try to clear the event queue as fast as possible.
2018-06-29Fixes memleak where unprocessed X11 events builds up on queueHenrik Andersson
There is a limiter used for processing X11 events set to 20 for slicing between processing X11 event and processing data on file descriptors. Before this fix, when waiting for data on filedescriptors, we assumed that there were no pending X11 events left on queue and therefore the select() timeout on 60 seconds. Now we will check the queue and select a timeout depending on whats left to do. Fixes bug #275
2018-06-26Add support for 16bit cursorsHenrik Andersson
Fixes issue #273
2018-06-26Fix crash when freeing already freed null cursor.Henrik Andersson
The fallback cursor should never be destroy when removed from cursor cache. Fixes issue #274
2018-04-27Merge pull request #258 from uglym8/sc_drop_refsAlexander Zakharov
Fix scard logon
2018-04-27Fix TS_SCardEstablishContext/TS_SCardIsValidContextAlexander Zakharov
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.
2018-04-27Enable PnP sc reader notificationsRostislav Kondratenko
2018-04-27Fix scard logonRostislav Kondratenko
2018-04-17Clear password is smart card pin upon redirectHenrik Andersson
Upon a redirection, we have received a cookie that is used for authentication and we should not flag this as a pin code for the smartcard. This solves a problem with incorrect pin code when using smart card authentication and if redirected to a server were a session exists.
2018-03-28Merge branches 'reconnect' and 'redynresize' of ↵Pierre Ossman
https://github.com/CendioOssman/rdesktop
2018-03-28Update requested session size with RDPEDISPPierre Ossman
We need to track the desired session size even if we can resize without a reconnect. Otherwise we will request the wrong size in the event we need to reconnect for another reason (e.g. network problems).
2018-03-28Save and re-use resolved address for given hostnameKarl Mikaelsson
If tcp_connect is called with the same server name, don't look up the address again. This avoids connecting to other servers when using a round-robin RDS farm name, as recommended by Microsoft. This introduces a backwards-incompatible change. If rdesktop was reconnecting because the user was moving between networks and the server is no longer reachable on the same address, the user must re-start rdesktop to reach their server.
2018-03-28Cleanup of reconnect codeHenrik Andersson
We have seen different behaviour between versions of Windows RDP servers how a connection should be closed and rdesktop should exit. Windows 2008 server and earlier versions sets an error info value of 0 and then sends deactivate PDU. Later versions sends a error info of vlaue 12 (User initiated logoff) but does not send deactivate PDU. A work around was added to translate this case for Windows 2008 and earlier to newer aporach to get proper handling. This prevents reconnect loop introduced when hitting ESC or wait for timeout at logon screen against 2008 server or earlier. This commit also fixes a problem where a reconnect loop was triggerd even if no required 'auto-reconnect cookie' is received from the server.
2018-03-23Merge pull request #252 from rdesktop/revert-249-reconnect-related-fixesKarl Mikaelsson
Revert "Reconnect-related fixes"
2018-03-23Revert "Reconnect-related fixes"Karl Mikaelsson
2018-03-23Merge pull request #249 from derfian/reconnect-related-fixesKarl Mikaelsson
* When connecting to a Windows 2008 Server, pressing Cancel or hitting Escape while entering credentials (on the server) would lead to a reconnect if there was a resize pending. * When connecting to a RDS farm name (round robin DNS entry as per MS recommendations), reconnecting could connect you to a different server, leading to a login screen rather than your session. * rdesktop never had any logging that told you which address you were connecting to.
2018-03-22Save and re-use resolved address for given hostnameKarl Mikaelsson
If tcp_connect is called with the same server name, don't look up the address again. This avoids connecting to other servers when using a round-robin RDS farm name, as recommended by Microsoft. This introduces a backwards-incompatible change. If rdesktop was reconnecting because the user was moving between networks and the server is no longer reachable on the same address, the user must re-start rdesktop to reach their server.
2018-03-22Don't check server error codes if the server didn't disconnect usKarl Mikaelsson
When a user presses cancel in the login dialog on a session on Windows 2008 R2 while a resize was pending, the user would be reconnected to the session rather than disconnected. A naive fix for this problem led to problems where reconnecting to resize a session led to the user being disconnected instead. The solution for both of these problems is to only look at the error code sent by the server is if the connection also was deactivated at the time of the disconnect. In just about all other cases, a disconnect/main loop quit when the connection is active should result in a reconnect. The sole exception is if the user closed the rdesktop window, in case rdesktop also should exit.
2018-03-07Prefer online resize over reconnect resizesCendio
We had a case on Windows 2012R2 where any early resizes would be handled by a reconnect rather than an online resize, which led to a bunch of follow-up problems with the session startup. To solve this, we gave the RDPEDISP channel more time to become established. Co-authored-by: Henrik Andersson <hean01@cendio.com> Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
2018-03-01Exit rdesktop if error info is setCendio
This fixes a problem where a connect loop is triggered when a user is closing the session and there is a pending resize triggered. When server sends error info PDU, this means that the client should close and not enter a reconnect due to pending resize or other reason such as network error or redirect... Co-authored-by: Henrik Andersson <hean01@cendio.com> Co-authored-by: Karl Mikaelsson <derfian@cendio.se> Co-authored-by: Thomas Nilefalk <thomas@nilefalk.se>
2018-02-14Fix fullscreen toggle when dynamic session resize is disabledCendio
When dynamic session resize is disabled, leaving fullscreen should result in a window that matches the session size. Co-authored-by: Henrik Andersson <hean01@cendio.com> Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
2018-02-14Add check if we can use dynamic session resizeCendio
When the server does not comply with our initial session size request, we disable the dynamic session resize feature. Co-authored-by: Henrik Andersson <hean01@cendio.com> Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
2018-02-13Fullscreen windows should not be resized to match the session sizeCendio
Given that a fullscreen window should have the same size as the screen, when the server tells us a session size, then we can't resize the fullscreen window. Co-authored-by: Henrik Andersson <hean01@cendio.com> Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
2018-02-09Merge pull request #238 from uglym8/pcsc_v2_part10Alexander Zakharov
Fix scard handling of PCSCv2 Part 10.
2018-02-09Fix scard handling of PCSCv2 Part 10.Alexander Zakharov
We must not modify any features codes before sending them off to Windows.
2018-02-02Fix Fast-Path PDU decryption regressionKarl Mikaelsson
This solves a problem where rdesktop would get really confused about the data read from the server and crash in random places just after connecting.
2018-02-01Merge pull request #245 from derfian/implicit-fallthroughHenrik Andersson
Remove implicit fall-throughs from bitmap.c and parallel.c
2018-02-01Merge pull request #236 from hean01-cendio/fastpath_cleanupKarl Mikaelsson
Refactoring of slow and fastpath handling and rdp_recv()
2018-02-01Cleanup of rdp_loop() and rdp_recv() for clarityHenrik Andersson
2018-02-01Refactoring of slow and fastpath handlingHenrik Andersson
This changes clarifies a chunk of code related to receiving data and handle slow and fast path pdus.
2018-01-31Remove implicit fall-throughs from bitmap.c and parallel.cKarl Mikaelsson
2018-01-31Fix reconnect-loop going from initial fullscreen on UnityCendio
Moving responsibility for actual resize to process_pending_resize() Cleaning up duplicated calculation of session size Removing handling of percentage of screen for now Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Karl Mikaelsson <derfian@cendio.se> Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31Add lots of protocol debug loggingCendio
Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-31Flush stdout for proper order of log messagesCendio
Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Karl Mikaelsson <derfian@cendio.se> Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31Defer pending resize until after autoreconnect cookie is receivedCendio
Resize session using disconnect/reconnect sequence should not be performed before we have received an auto-reconnect cookie which is used for reconnecting to the session. There is a race when trying to reconnect at this point so a defer timer is used to delay this further from the point where the auto-reconnect cookie is received. Fixes a problem where a login prompt is shown upon reconnect even if the auto-reconnect cookie is available and used. Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-31Use proper user-initiated disconnect sequenceCendio
A correct user initated disconnect sequence should send a MCS Disconnect Provider Ultimatum PDU defined in T.128 upon a disconnect. This commit adds the implementation the mentioned PDU and the actual write of the packet. Signed-off-by: Henrik Andersson <hean01@cendio.com>
2018-01-31Use hex constants for data pdu (pdutype2) enumerationCendio
This matches how they're described in MS-RDPBCGR. Also add the proper constant name as comments. Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31Added ber_out_sequence() util for writing ASN.1 sequencesCendio
Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31Add test for Conference Join Request packet creationCendio
Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-30Merge pull request #237 from shweew/patch-1Alexander Zakharov
Update 'ru' keymap to correct CapsLock handling.
2018-01-30Merge pull request #241 from kekePower/gcc730compilationfixAlexander Zakharov
Fix compile issue for "-Werror=format-security" option (e.g. gcc 7.3.0)
2018-01-29Fix to compile with GCC 7.3.0 and possibly fix a security issuekekePower
Did a google search and found this. https://stackoverflow.com/questions/4419293/warning-format-not-a-string-literal-and-no-format-arguments/4419319#4419319 With this little fix, rdesktop compiled again using gcc 7.3.0.
2018-01-29Merge pull request #240 from rdesktop/fix_issue228Henrik Andersson
Clear g_exit_mainloop before new connection
2018-01-29Clear g_exit_mainloop before new connectionCendio
Reuse of g_exit_mainloop can occur at various situations such as on redirection, when a new connection is initialized. If you call rdp_loop with this flag set, things will not work as you'd expect. Fixes issue #228 Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-27Update ruDmitriy Shweew
2018-01-25Merge pull request #212 from derfian/rdp-rename-client-and-error-info-pdusKarl Mikaelsson
Rename functions that send Client Info PDU and handle Set Error Info PDU
2018-01-25Improve handling/code of Set Error Info PDUKarl Mikaelsson
Renamed to function to match the PDU it was processing. Removed the function from proto.h and made it static - there's nothing calling this from outside of rdp.c. Fixed the logging output to output the error code instead of the pointer value.