Commit Graph

33 Commits

Author SHA1 Message Date
akallabeth
dc76879e0b
[warnings] fix some compiler warnings
* fix compiler warnings found in a lot of places
* add missing enum type for clipboard channel
* mark deallocator for winpr image function
2024-10-30 16:12:20 +01:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
71080e61b0
[warnings] fix a bunch of them
* fix uninitialized variable warnings
 * modivy ndr_context_* functions to utilize WINPR_ATTR_MALLOC
 * build_krbtgt use winpr_asprintf
 * add proper Stream_Write_UINT64_BE
2024-09-14 08:24:28 +02:00
akallabeth
fe6d861a5c
[channels] fix VCAPITYPE for all channel entry points 2024-09-03 17:26:58 +02:00
akallabeth
bb5345c60e [freerdp,api] add FREERDP_ENTRY_POINT
C requires prototypes or compilers will complain about them missing. Our
library entry points do not have such, therefore add the macro
FREERDP_ENTRY_POINT which declares the function prototype automatically
before the function.
2023-08-25 14:36:05 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
c3a82daad6 [channels] simplified client linking 2023-03-01 08:18:34 +01:00
akallabeth
43c5289928 Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
5b163b7918 Add GetRdpContext function pointer for dynamic channels 2022-06-23 07:45:55 +02:00
David Fort
e389210673 client channels: mutualize common types between dynamic channels
Most dynamic channels share the same copied and pasted code for the XXX_CHANNEL_CALLBACK
and XXX_LISTENER_CALLBACK types. This patch introduce GENERIC_CHANNEL_CALLBACK and
GENERIC_LISTENER_CALLBACK that fits for most channels and discard custom type definitions.
2022-06-15 14:04:58 +02:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
Armin Novak
8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Idan Freiberg
2ee8b2cbbd channels: ssh-agnet: cmake: turn off server side channel by default in ChannelsOptions.cmake (#5420)
CMake v3.5.1 throws the following error if this is not set:
```
CMake Error at channels/CMakeLists.txt:48 (if):
  if given arguments:

    "OFF" "OR"

  Unknown arguments specified
Call Stack (most recent call first):
  channels/sshagent/ChannelOptions.cmake:6 (define_channel_options)
  channels/CMakeLists.txt:273 (include)
```
2019-06-03 09:47:35 +02:00
Bernhard Miklautz
9f6abd2701 fix [channels]: remove sshagent server side
The server side channel wasn't tested and does not work this way with
FreeRDP. Rely on the server side channel that come with the RDP
server(s).
2018-12-13 10:17:46 +01:00
Armin Novak
a8a6accc15 Fixed compiler warnings. 2018-10-03 15:16:59 +02:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
feda4e07df Removed linux specific include. 2017-11-20 11:46:09 +01:00
Armin Novak
4ab26a334a Fixed resource cleanup. 2017-11-15 15:56:25 +01:00
Armin Novak
77134d9def Fixed formatting. 2017-11-15 15:56:25 +01:00
Armin Novak
f39346ebe5 Fixed leaks and formatting. 2017-11-15 15:56:25 +01:00
Ben Cohen
8d54945b96 Remove underscores from define in sshagent_main.h 2017-11-10 20:16:00 +00:00
Ben Cohen
6093ec62e0 Fix comments at the start of these files and adjust copyrights 2017-11-10 20:16:00 +00:00
Ben Cohen
badb70174a Add server side plugin [UNTESTED]
This is based on xrdpapi/xrdp-ssh-agent.c from xrdp PR #867.
2017-11-10 20:16:00 +00:00
Ben Cohen
c27541e9ac Add rdpcontext so read thread can report channel error
Also fix copyright dates...
2017-11-10 20:16:00 +00:00
Ben Cohen
639930869a Remove EAGAIN/EWOULDBLOCK from blocking read/write 2017-11-10 20:16:00 +00:00
Ben Cohen
7e262213ca Fix socket fd leak and other changes
1. In connect_to_sshagent() if connect() fails, the socket agent_fd is
   leaked.  It needs to be closed before returning.

2. Fix copyright messages.

3. Make if statement with call to CreateThread() clearer to read.
2017-11-10 20:16:00 +00:00
Ben Cohen
0e90841a18 Forward ssh-agent data between ssh-agent and RDP
Add the sshagent plugin to forward the ssh-agent protocol over an RDP
dynamic virtual channel, just as the normal ssh-agent forwards it over
an SSH channel.  Add the "/ssh-agent" command line option to enable it.
Usage:

Run FreeRDP with the ssh-agent plugin enabled:

   xfreerdp /ssh-agent ...

In the remote desktop session run xrdp-ssh-agent and evaluate the output
in the shell as for ssh-agent to set the required environment variables
(specifically $SSH_AUTH_SOCK):

   eval "$(xrdp-ssh-agent -s)"

This is the same as for the normal ssh-agent.  You would typically do
this in your Xsession or /etc/xrdp/startwm.sh.

Limitations:

1. Error checking and handling could be improved.

2. This is only tested on Linux and will only work on systems where
clients talk to the ssh-agent via Unix domain sockets.  It won't
currently work on Windows but it could be ported.
2017-11-10 20:16:00 +00:00