Commit Graph

8973 Commits

Author SHA1 Message Date
Bernhard Miklautz
a22dc21c15 remdesk,encomps: misc fixes
* only free stream when an error occurs
* ignore unhanded messages instead of throwing an error
* fix memory leak in settings
2015-07-29 17:32:09 +02:00
Bernhard Miklautz
f638ab5615 Update version to 1.4.5 2015-07-28 17:23:16 +02:00
Bernhard Miklautz
9fb6705380 rdpdr/printer: ignore unhanded packetID
Ignore packetIDs PRN_CACHE_DATA and PRN_USING_XPS instead of returning
an error.
2015-07-28 14:05:57 +02:00
Bernhard Miklautz
d9aca506d6 rdpsnd: include win32error.h
If using rdpsnd externally (for example in other projects) WIN32ERROR
needs to be defined otherwise some compilers might create a warning or
error.
2015-07-27 19:24:41 +02:00
Martin Haimberger
f65d15feeb fixed audioserver
if no data could be read, the ERROR_NO_DATA is returend to
indicate a further read.
2015-07-22 03:16:46 -07:00
Martin Haimberger
58ada13dd9 fixed some remakes and compiler errors 2015-07-22 02:36:24 -07:00
MartinHaimberger
08b17b5f64 Merge pull request #2 from bmiklautz/pull/2785
rdpsnd: restore old behavior and fixes
2015-07-20 15:10:55 +02:00
Bernhard Miklautz
f992568432 rdpsnd: restore old behavior and fixes
* oss: fix function signature
* autodetection - if only /sound is given all enabled
  plugins are tried in order and the first successful loaded is used.
	- this restores the previous behavior
* alsa/pulse fix command line parsing - no parameters shouldn't be
  treated as error
2015-07-20 12:28:49 +02:00
Martin Haimberger
e682329eeb fixed compiler errors 2015-07-15 03:17:38 -07:00
Martin Haimberger
6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
Martin Haimberger
b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
MartinHaimberger
b06d83ba80 Merge pull request #2766 from akallabeth/snprintf_to_sprintf_s
Replaced snprintf with sprintf_s
2015-07-15 09:47:43 +02:00
Bernhard Miklautz
c12bc0ec70 Merge pull request #2782 from bmiklautz/order_does_matter
x11: reorder xf_post_disconnect
2015-07-14 15:50:32 +02:00
Bernhard Miklautz
f589d5d6e0 x11: reorder xf_post_disconnect
Channels like EGFX need resources like the main window in order to
work correctly. Before the window, GDI,.. is freed it needs to be
ensured that all channels are stopped properly to prevent them to access
already freed resources. Disconnecting the channels first fixed a
possible race condition/SEGFAULT that could occur with remote initiated
disconnects.
2015-07-14 15:28:55 +02:00
MartinHaimberger
e2b4bf699e Merge pull request #2781 from bmiklautz/fdread
winpr/synch: remove the dependency on winsock.h
2015-07-14 13:02:41 +02:00
Bernhard Miklautz
1a0253ef93 winpr/handle: define WINPR_FD_ on all platforms 2015-07-14 12:21:24 +02:00
Bernhard Miklautz
68e8569110 winpr/synch: remove the dependency on winsock.h
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Bernhard Miklautz
920617e1bc Merge pull request #2778 from akallabeth/cert_store_compare_fix
Fixed comparison bug, cleanup and error handling.
2015-07-13 17:52:18 +02:00
Armin Novak
fc929fbc7f Using lowercase hostname for comparison now.
fixed argument mixup.
2015-07-13 15:52:06 +02:00
Armin Novak
ca7c34ff35 Fixed comparison bug, cleanup and error handling. 2015-07-13 14:16:04 +02:00
Martin Haimberger
d9e2834a70 channel smartcard hardend 2015-07-09 03:00:19 -07:00
MartinHaimberger
ba34ff6096 Merge pull request #1 from hardening/mhchannel
Mhchannel
2015-07-06 16:52:19 +02:00
David FORT
b83ab92776 Hardened urbdrc channel 2015-07-06 16:46:21 +02:00
David FORT
1b7140d84e Fixed some more checks in rdpsnd channel 2015-07-04 00:17:37 +02:00
Armin Novak
cf9f975341 Replaced snprintf with sprintf_s 2015-07-03 13:26:15 +02:00
MartinHaimberger
358289fb51 Merge pull request #2764 from akallabeth/pull_fixes
Pull fixes
2015-07-03 13:04:37 +02:00
Armin Novak
40a7f2c995 Added missing include breaking windows build. 2015-07-03 12:46:28 +02:00
Armin Novak
776f15e135 Fixed inverted bAttached setting.
If bAttached is TRUE, the resources of the event are not
cleaned up on CloseHandle.
2015-07-03 12:42:04 +02:00
MartinHaimberger
282f15795d Merge pull request #2762 from akallabeth/handle_write_event
Add write event support to HANDLE
2015-07-03 11:36:00 +02:00
Armin Novak
c21de0dae6 Fixed pr comments. 2015-07-03 11:13:48 +02:00
MartinHaimberger
83641a3a97 Merge pull request #2761 from akallabeth/sample_server_port_arg
Updated sample server.
2015-07-03 10:44:35 +02:00
Armin Novak
82da97e606 Updated sample server.
* Added new command line argument --port to allow starting the
  sample server on a port different than default 3389.
* Using GetKnownSubPath now to determine location of temporary
  directory for server socket.
* Using distinct server socket files for each port.
2015-07-03 10:04:24 +02:00
Armin Novak
d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
Armin Novak
77204aa6b6 WSAEventSelect: Handle lNetworkEvents == 0
WSAEventSelect did ignore the lNetworkEvents argument.
In case this argument is 0, the non blocking socket must
be set to blocking again to mimic windows behavior.
2015-07-03 09:29:36 +02:00
Armin Novak
6243a9374b Added write event support to handle functions.
Allows the WinPR HANDLE functions WaitForSingleObject and
WaitForMultipleObjects to signal in case of write events.
This is used by CreateFileDescriptor and SetEventFileDescriptor,
which got an API change accomodating for this new feature.
2015-07-03 09:29:18 +02:00
Armin Novak
7dc96c412f Added convenience function winpr_log_backtrace. 2015-07-03 09:22:02 +02:00
Bernhard Miklautz
f24240630d Merge pull request #2759 from bmiklautz/fix/cliprdp
x11/cliprdr: handle empty format names
2015-07-02 16:28:55 +02:00
Bernhard Miklautz
b6a799e5d0 x11/cliprdr: handle empty format names
The recently added strdup checks ignored the fact that format names
can be NULL.
2015-07-02 15:39:35 +02:00
Hardening
c8a71a2695 Merge pull request #2747 from ilammy/egfx-missing-events
Do not discard events when updating EGFX surface mapping
2015-07-02 15:08:31 +02:00
David FORT
ea679b2d8b Hardened TSMF channel
This patch adds some checks for the TSMF channel:

* checks malloc / calloc / strdup / _strdup return value
* checks for available bytew before reading in a stream
2015-07-02 14:32:05 +02:00
Hardening
87c5377f42 Merge pull request #2758 from bmiklautz/fix/CreateProcess
CreateProcess misc fixes
2015-07-02 13:11:06 +02:00
Bernhard Miklautz
c7adb569ff CreateProcess: fix setting of default handler
If SA_SIGINFO isn't set in the flags sa_handler is used
instead of sa_sigaction.

This fixes also the compiler warning:

FreeRDP/winpr/libwinpr/thread/process.c: In function ‘_CreateProcessExA’:
FreeRDP/winpr/libwinpr/thread/process.c:282:20: warning: assignment from
       incompatible pointer type [enabled by default]
2015-07-02 12:25:48 +02:00
Bernhard Miklautz
be53e9e029 CreateProcess: two fixes
* change to lpCurrentDirectory if set even if no token was supplied
* fix wrong check - add missing !

This was part of akallabeth's PR #2714.
2015-07-02 12:05:46 +02:00
Bernhard Miklautz
fedd59816b Merge pull request #2757 from nfedera/nf-fix-createprocess-signals
winpr: fix CreateProcess signal handler issues
2015-07-02 12:02:51 +02:00
Norbert Federa
c84e90bf06 winpr: fix CreateProcess signal handler issues
The calling thread of CreateProcess can be in any library and
can have arbitrary signal masks and handlers.

We now save the caller's mask and  block all signals before forking.
After fork:
- child resets the handlers and unblocks all signals.
- parent restores the caller's original signal mask.
2015-07-02 11:28:06 +02:00
Hardening
873a25621d Merge pull request #2754 from akallabeth/mixed_code
Fixed mixed declarations and code.
2015-07-02 09:27:27 +02:00
Hardening
ac93b26ba8 Merge pull request #2750 from realjiangms/fix_win32_wsaevent
Fix event created for WSAEventSelect
2015-07-02 09:26:13 +02:00
Bernhard Miklautz
b89ea3d902 Merge pull request #2753 from akallabeth/nla_null_auth_fix
nla: Fixed handling of optional TSPasswordCreds field.
2015-07-01 16:23:00 +02:00
Armin Novak
78eeb861d5 Fixed mixed declarations and code. 2015-07-01 16:20:56 +02:00
Armin Novak
3a9db563fd NLA: Fixed length check. 2015-07-01 16:05:11 +02:00