Commit Graph

509 Commits

Author SHA1 Message Date
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
81d2c1f057 [clang-tidy] clang-analyzer-core.NullDereference 2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
akallabeth
ba8cf8cf21 [build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
akallabeth
bb42d425ed [gcc,clang] add support for attribute(malloc)
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
akallabeth
4add7836fa [server,shadow] wait for rdpegfx channel ready
we need to wait until the capability messages are exchanged before
starting to issue gfx commands
2024-01-29 19:26:18 +01:00
efferre79
5b731aca4d command line help should not be part of the log info 2024-01-11 09:12:57 +01:00
akallabeth
f6a208f75e [cmake] generate relative pkgconfig path
generate the relative pkgconfig path from the actual install locations.
fixes #9718
2024-01-05 14:19:34 +01:00
Armin Novak
175a3ca09a [cmake] do not append EXECUTABLE_SUFFIX to OUTPUT_NAME 2023-12-22 15:37:56 +01:00
Armin Novak
7d641a67b9 [doc,manpage] name manpages versioned
if WITH_BINARY_VERSIONING is activated also version the manpages to
match the binary names
2023-12-22 10:24:09 +01:00
Armin Novak
b04271ae2d [cmake] add executable versioning
optionally append API version to generated binaries
2023-12-21 18:56:51 +01:00
Armin Novak
3735440166 [server,shadow] force relative mouse disabled
Since we do not implement the required callbacks ensure we do not send
the capability for it to connecting clients.
2023-12-19 21:26:46 +01:00
Armin Novak
736658a2d1 [server,shadow] fix missing set NULL after free 2023-12-15 23:21:37 +01:00
Martin Fleisz
5d40fb34e7 server: Fix compilation on Windows after recent settings changes 2023-11-28 14:45:19 +01:00
akallabeth
1b31852d32 [git] remove .gitignore
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
Armin Novak
9449c8c3df [server,shadow] fix opaque settings build 2023-11-24 18:19:03 +01:00
akallabeth
1f236ade7a [server] make settings opaque 2023-11-24 14:54:56 +01:00
David Fort
061148f856 [nla] initial server-side remote credential guard support
Adds support for server-side remote credential guard in NLA. When enabled that allows
the remote user to connect without shipping credentials in TSCred packets. Instead
it will send his TGT encoded with a TGS from the remote server. This way the server
is able to populate that TGT in a local credential cache without knowing the user's
password.

The patch only treats the NLA part and does not contain the associated RDPEAR channel
that allows to have the complete interaction to retrieve new access tokens.
2023-11-20 16:17:00 +01:00
akallabeth
89429885a0 [cmake] make generated pkg-config files relocatable
* new CMake option PKG_CONFIG_RELOCATABLE (default ON) allows generating
  traditional or relocatable pc files
2023-10-10 19:35:27 +02:00
akallabeth
99f26f1f01 [shadow,mac] remove function pointer casts 2023-09-21 10:57:43 +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
7a71441476 [warnings] fix integer multiplications
Ensure the integer width for size arguments is 64bit in a
multiplication. Leading 64bit constant 1ull expands width, a trailing
one is ignored.
2023-08-22 11:55:00 +02:00
Armin Novak
3cfa4ed6f2 [server,shadow] fix initialization of [MS-RDPEGFX]
the channel was initialized with handling messages in a thread and
handling the channel messages on main thread. fix that.
2023-08-21 16:09:05 +02:00
Armin Novak
dd9757d686 [server] add exerimental and unmaintained warnings 2023-08-21 15:42:10 +02:00
akallabeth
41bd8bd3fb [various] fix integer conversions 2023-08-04 15:07:56 +02:00
Kai Pastor
5ecc011c13 Export interface include directories 2023-08-01 11:12:46 +02:00
Kai Pastor
21cfc456f5 find_dependency for exported cmake config 2023-08-01 08:13:30 +02:00
Armin Novak
f08ed58367 [server,shadow] handle gfx thread in shadow server 2023-07-31 20:18:48 +02:00
Armin Novak
a8b9451807 [server,shadow] unify sending caps confirm 2023-07-31 20:18:48 +02:00
Armin Novak
1caa439a54 [server,shadow] add return checks
add return checks and simplified cleanup for shadow_screen_new
2023-07-31 20:18:48 +02:00
Armin Novak
8ed3f8bf40 [server,shadow] fix loop increment warning 2023-07-31 08:32:43 +02:00
akallabeth
5d3b7ef0c2 [server,peer] server instance must support multimon 2023-07-06 09:16:51 +02:00
Martin Fleisz
622a2a8df0 misc: More int to BOOL conversion fixes
This is a follow up to #9129.

This PR fixes some problematic `int` to `BOOL` conversions that might
cause overflows when checking for bit flags.
2023-07-04 09:45:20 +02:00
Armin Novak
4803ba046c [server,shadow] implement CheckPeerAcceptRestrictions
Implement a (optional) peer limitation check for shadow server.
with the command line option /max-connections:<number> the maximum
number of simultaneous connections can be limited.
2023-06-14 17:15:21 +02:00
Armin Novak
3648c05c56 [shadow,subsystem] refactor builtin loader 2023-06-13 08:02:02 +02:00
akallabeth
a71da162ae [server,shadow] require NLA off if -auth is requested.
* Default to authentication required for shadow server (invert previous
  default)
* force NLA off if authentication is disabled
2023-06-12 15:04:05 +02:00
Armin Novak
c991f73041 [CMake] refactor shadow build scripts
* fix a bug with platform modules not being correctly build
* simplify build, use subdirectory CMakeLists.txt
2023-06-12 15:04:05 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Armin Novak
3e44efc841 [cmake] use FindX11 from CMake 3.13 2023-05-31 11:05:56 +02:00
akallabeth
105f0d2366 [channel,audin] move common code to server channel
* manage channel related callbacks with default implementations
* use dynamic logger for server audin channel
2023-05-17 13:33:35 +02:00
Pascal Nowack
c5278c874f channels/audin: Rework API to be closer to documentation
The current server side channel handling of AUDIO_INPUT is currently
very constrained:

- Server implementations cannot measure the clients uplink, since the
  Incoming Data PDU is currently unhandled and FreeRDPs DSP handling
  delays the callback call of ReceiveSamples
- Servers currently cannot prefer a different protocol version
- Servers currently cannot change the used format

To solve these issues without running into the risk that some
simplifications constraint certain API usage, rework the current channel
handling to be very close to the documentation.
This means, that all documented API calls can be made by server
implementations and all documented PDUs, that the server side is
expected to receive are just parsed inside FreeRDP and then forwarded to
the API implementation.
2023-05-17 13:33:35 +02:00
akallabeth
52786d0f12 [input] update to use new WINPR_KEYBOARD_TYPE*
* Use new enum constants with WINPR_KEYBOARD_* prefix
* Fix mapping of keycodes and scancodes, the offset of 8 is no longer
  required if the proper keyboard type is used.
2023-05-12 09:52:01 +02:00
akallabeth
2b3c8c47a4 [build] fix install with BUILD_SHARED_LIBS=OFF
generate proper CMake targets so static linking works again.
2023-05-12 08:03:56 +02:00
Armin Novak
e0aec72d71 [pkg-config] unify exec_prefix 2023-04-24 22:01:15 +02:00
Armin Novak
f674b209ff [pkg-config] unify libdir 2023-04-24 22:01:15 +02:00
akallabeth
c0dc193a39 [winpr,input] use enum for keyboard types
* move type definition to WinPR as used there too.
* supported keyboard types are defined in
  [MS-RDPBCGR] 2.2.1.3.2 Client Core Data (TS_UD_CS_CORE)]
  use a enum instead of magic numbers to make code more readable.
2023-04-21 12:31:51 +02:00
Pascal Nowack
bb967d1533 winpr/input: Add actual evdev keyboard handling
WinPR provides APIs to convert between keycodes between virtual
keycodes.
These keycodes can currently be evdev keycodes or Apple keycodes.
The evdev handling, however, handles XKB keycodes and not evdev ones.
The main difference between these is that XKB keycodes are shifted by
the value 8, compared to evdev keycodes.

In order to fix this situation, rename the evdev keycodes to XKB ones,
and introduce additionally a new keycode evdev, including its handling
for this keycode type.
2023-04-21 12:31:51 +02:00
Pascal Nowack
8362b3707e pointer: Rename position to hotspot position in Color Pointer Update
The attributes xPos and yPos for a Color Pointer Update are confusing,
as they may be confused with the xPos and yPos of the pointer bitmap on
the actual screen.
Rename these attributes to what they actually represent, and that is the
hotspot position.
xPos and yPos are still members of the hotspot. However, hotSpotX and
hotSpotY are much more clearer.
In addition to that, the Large Pointer Update uses the same names for
the hotspot coordinates.
2023-04-14 08:31:20 +02:00
akallabeth
7739815a90 [codec,h264] add getter/setter for h264 options 2023-04-11 10:58:03 +02:00