Commit Graph

4698 Commits

Author SHA1 Message Date
metalefty
0579980e44
Merge pull request #3225 from metalefty/v0.10-h264
[v0.10] H264 cherry picks
2024-08-29 23:55:33 +09:00
matt335672
8bf9ed48af Further changes to selectable H.264 support
- Fix CI errors
- tconfig_load_gfx() removes H.264 from the supported codec list
  if significant errors are found loading the H.264 configuration
- tconfig_load_gfx() always produces a usable config, even if the
  specified file can't be loaded

(cherry picked from commit 5351511272)
2024-08-29 22:53:04 +09:00
matt335672
401cd845f8 Rework codec order in tconfig
Replaced codec idx values with a list of codecs from the
config file.

Added some logging for debugging

(cherry picked from commit 1ac216da1d)
2024-08-29 22:52:59 +09:00
Koichiro Iwao
5bbeb03848 GFX: use the preferred codec preferred in the config (H264 or RFX)
(cherry picked from commit 2c2585cc90)
2024-08-29 22:52:51 +09:00
Koichiro Iwao
689a2620d3 Introduce XRDP_H264 macro to indicate any H264 encoder enabled
(cherry picked from commit 7238f8f99d)
2024-08-29 22:52:44 +09:00
Koichiro Iwao
d56396b771 tconfig: add config which to prefer H264 vs RFX
(cherry picked from commit 07e4e23c7b)
2024-08-29 22:52:37 +09:00
Koichiro Iwao
89277e5aea x264: add CI test
(cherry picked from commit 72ede776ed)
2024-08-27 13:57:56 +09:00
Koichiro Iwao
abb5714f8f tconfig: refine logging
(cherry picked from commit b9d593bc11)
2024-08-27 13:14:02 +09:00
Koichiro Iwao
6b98637bac tconfig: set proper default value for fps_den
(cherry picked from commit 16ef3dc3a8)
2024-08-27 13:14:02 +09:00
Koichiro Iwao
1fcde20682 x264: Update x264 encoding parameters
(cherry picked from commit 6aeb364c8d)
2024-08-27 13:14:02 +09:00
Koichiro Iwao
12c9e79dee x264: apply encoding parameters per connection type
(cherry picked from commit 010b6a3dbf)
2024-08-27 13:14:02 +09:00
Koichiro Iwao
d083920824 tconfig: Makefile changes
(cherry picked from commit d50c2fd4e4)
2024-08-27 13:13:58 +09:00
Koichiro Iwao
427f501862 tconfig: add new toml config parser for gfx.toml
(cherry picked from commit b3513ba8df)
2024-08-27 09:58:16 +09:00
Jay Sorg
be3e3a3d0a rename old_capture_code to mark unused
(cherry picked from commit 2bed4f6b9b)
2024-08-07 23:17:43 +09:00
Jay Sorg
3c7b416375 change capture_code to enum
(cherry picked from commit 112a534f4c)
2024-08-07 23:16:58 +09:00
Jay Sorg
3a2e0eb8cd remove some unnecessary code
(cherry picked from commit 4dcf59c8f4)
2024-08-07 22:48:23 +09:00
Jay Sorg
099575056e fix for odd width, height
(cherry picked from commit 485e64ee76)
2024-08-07 22:31:51 +09:00
Jay Sorg
48a6cd4060 multimon fixes
(cherry picked from commit 96ff6fdba8)
2024-08-07 22:28:49 +09:00
Jay Sorg
9cb2afa052 format
(cherry picked from commit 57ed8e9d52)
2024-08-07 22:28:37 +09:00
Jay Sorg
565977bc81 xrdp_encoder.c changes for x264
(cherry picked from commit b583a8d510)
2024-08-07 22:28:28 +09:00
Jay Sorg
1d52a418ad add xrdp_encoder_x264.c/h
(cherry picked from commit ab97002c22)
2024-08-07 22:13:52 +09:00
Jay Sorg
2a02056346 add x264 to configure.ac
(cherry picked from commit e5e56a2ed9)
2024-08-07 22:13:34 +09:00
matt335672
82bec9d1dc
Merge pull request #3194 from matt335672/v0_10_chansrv_clip_fixes
[V0.10] chansrv clip fixes
2024-08-06 10:37:38 +01:00
matt335672
ace386d072 clipboard: Allow a file read to return 0 for EOF
When used with a FreeRDP client on Linux, a file copy operation from
the clipboard detects end-of-file by a read returning 0 bytes. This is
currently marked as an error.

It is assumed that mstsc.exe detects end-of-file in another way, which
is why this has not been found before.

(cherry picked from commit 0f6e731524)
2024-08-05 09:54:37 +01:00
matt335672
e59dc16be6 Remove unnecessary copy from clipboard_get_files()
The routine clipboard_get_files() parses a potentially long string,
and copies portions of it into a temporary buffer. This buffer is then
passed to clipboard_get_file() as pointer + length;

The buffer is inadequately sized for very long filenames which may
approach XFS_MAXFILENAMELEN in length. This can cause chansrv to fail
when the user copies such filenames.

It turns out the buffer is unnecessary, as the filenames can be
passed directly into clipboard_get_file() from the source string,
using pointer + length. This avoids the length limitation entirely.

(cherry picked from commit 34b5582460)
2024-08-05 09:54:26 +01:00
matt335672
f3070aef15 Allow for longer filenames from the redirector.
This commit ensures that filenames up to the maximum size supported
by our xfs can be supported.

(cherry picked from commit c3f7eec4f5)
2024-08-05 09:54:07 +01:00
matt335672
6c9d56efc2 Remove hard-coded filename limit for clipboard file lists
The limit of 256 characters for clipboard files is limiting for
many Asian locales, particularly as '%xx' notation is used to
communicate bytes with bit 7 set.

(cherry picked from commit a90228241d)
2024-08-05 09:53:55 +01:00
matt335672
f4153a493d Dynamically allocate XFS filesystem names
Replace the 256 byte buffer used for names in the XFS filesystem with a
dynamically allocated buffer.

The define XFS_MAXFILENAMELEN which used to be 255 has been retained,
but bumped to 1023. This value is no longer used for long-lived
allocations, but is used in chansrv_fuse.c for maintaining state
information for in-fligh I/O requests.

(cherry picked from commit d8b5435710)
2024-08-05 09:53:44 +01:00
metalefty
72892c1453
Merge pull request #3188 from metalefty/v0.10-tarball
[v0.10] Include {xrdp,sesman}.ini.in instead of substituted .ini in tarball
2024-08-01 20:58:59 +09:00
Koichiro Iwao
19bacc6e49 Include {xrdp,sesman}.ini.in instead of substituted .ini in tarball
These config files are intended to be substituted during the build
process. The substituted .ini files should not be included in release
tarballs.

Fixes:  #3187
2024-08-01 20:39:03 +09:00
metalefty
1c33f3d9af
Merge pull request #3185 from metalefty/v0.10-release
Release v0.10.1
2024-07-31 21:51:24 +09:00
metalefty
54932b55ef
Merge pull request #3183 from metalefty/v0.10-cherry-picks
[v0.10] cherry-picks
2024-07-31 21:48:28 +09:00
Koichiro Iwao
00b8b41344 Bump version to v0.10.1 2024-07-31 21:09:43 +09:00
Koichiro Iwao
4d9e9f91fa Update NEWS 2024-07-31 21:07:04 +09:00
matt335672
b343ca27b1 Replace binary blob with specified data
This commit changes the license response PDU to be constructed rather
than simply being contained as a binary blob.

Some constants in common/ms-rdpbcgr.h are renamed with the values
from the specification.

(cherry picked from commit 52dd88b576)
2024-07-30 10:46:12 +09:00
matt335672
3108a85e86 Remove Licensing exchange
Replaces the existing licensing exchange with a single PDU
saying the user will not issue a license.

This is necessary for clients on FIPS-compliant systems, as these
are unable to decode the licensing exchange packets, due to outdated
cyphers.

(cherry picked from commit cc4a4c95f2)
2024-07-30 10:46:03 +09:00
Koichiro Iwao
4d4ecdcaa4 GFX: selectable lossy compression levels
(cherry picked from commit e3c83c544c)
2024-07-30 10:45:41 +09:00
matt335672
da34d1e69d
Merge pull request #3175 from matt335672/v0_10_fix_potential_name_overflow
[V0.10] Fix potential name buffer overflows in redirector
2024-07-24 12:11:28 +01:00
matt335672
5223672437 Fix potential name buffer overflows in redirector
The state buffers used by the following structs in chansrv_fuse.c
are one byte too small for filenames of length XFS_MAXFILENAMELEN:-
- struct state_lookup
- struct state_create
- struct state_rename

In practice, there is no runtime danger, as XFS_MAXFILENAMELEN is 255,
and these buffers will be followed by non-byte aligned data. Nevertheless
this should be fixed to prevent problems if the value is changed.

(cherry picked from commit c9e84dc16c)
2024-07-23 12:29:43 +01:00
matt335672
2938c3d7b3
Merge pull request #3171 from matt335672/v0_10_fix_missing_pre_session_ipaddr
[V0.10] sesman: Copy IP address to pre_session_item struct
2024-07-22 09:46:30 +01:00
matt335672
4a90879555 sesman: Copy IP address to pre_session_item struct
struct pre_session_item has an entry for the start_ip_addr which is not
being filled in. This is not normally needed, as the IP address of the
session is passed into the session another way, but it is needed if the
session selection Policy contains the 'I' selector.

(cherry picked from commit a4f57572e6)
2024-07-19 12:01:47 +01:00
metalefty
a7d583a46d
Merge pull request from GHSA-7w22-h4w7-8j5j
Enforce no login screen if require_credentials is set
2024-07-11 09:37:12 +09:00
metalefty
d6fce2f173
Merge pull request #3152 from metalefty/v0.10-submodule
[v0.10] Support screens larger than 4096 pixels (update submodule)
2024-07-09 11:48:14 +09:00
Koichiro Iwao
2546bfa842 Support screens larger than 4096 pixels (update submodule)
Fixes:  #3083
2024-07-09 08:15:37 +09:00
metalefty
1d30c81323
Merge pull request #3150 from metalefty/v0.10-makedist
docs: always include docs/man/xrdp-mkfv1.8.in to dist tarball
2024-07-08 21:27:08 +09:00
Koichiro Iwao
e83dcc52eb docs: always include docs/man/xrdp-mkfv1.8.in to dist tarball
Files included in distribution tarball must always be enumerated,
not be enumerated conditionally.

Resolves:   #3149
2024-07-08 16:34:23 +09:00
matt335672
61b509f1d5 Enforce no login screen if require_credentials is set
If the setting require_credentials is true, there should be no way
for the user to get to a login screen.

This commit makes the following changes if this flag is active:-
- Makes the checks around TS_INFO_PACKET more explicit.
- Closes the connection if the first login attempt fails.

(cherry picked from commit 8ac2f6db34)
2024-06-27 11:55:26 +01:00
matt335672
8ddbe77e7c
Merge pull request #3127 from matt335672/v0_10_investigate_gfx_min_max_issue
[v0.10] Fix min/max monitor placing issue
2024-06-21 09:49:39 +01:00
matt335672
029059ef3d Fix min/max monitor placing issue
when a multi-monitor session has the top-left vertex of the primary
monitor at a desktop location other than (0,0), minimising and maximising
the session results in the (0,0) co-ordinate of the entire desktop being
placed at the top-left of the primary monitor.

The implementation seems to be at odds with [MS-RDPEGFX] 2.2.2.14 which
suggests the monitorDefArray of the RDPGFX_RESET_GRAPHICS_PDU should be
the same as that in the Monitor Layout PDU ([MS-RDPBCGR] 2.2.12.1)

(cherry picked from commit 095f0d0e4c)
2024-06-19 09:12:19 +01:00
matt335672
9a21e37f1f
Merge pull request #3122 from matt335672/v0_10_fix_server_24bpp_gfx
[v0.10] Don't use GFX if server max_bpp is <32
2024-06-19 09:02:55 +01:00