Commit Graph

4582 Commits

Author SHA1 Message Date
Koichiro Iwao
1b8e30ad29 Add FUNDING.yml 2023-12-22 14:28:04 +09:00
matt335672
9fbe0ad18c
Merge pull request #2872 from r-a-sattarov/e2k-initial-support
common/arch.h: added e2k arch definition
2023-12-11 20:46:07 +00:00
r-a-sattarov
aa8c651e38 common/arch.h: added e2k arch definition
Ref: https://en.wikipedia.org/wiki/Elbrus_(computer)
2023-12-11 22:34:17 +03:00
matt335672
04db78f6c6
Merge pull request #2864 from matt335672/neutrinordp-sidebutton-click
Neutrinordp sidebutton click
2023-11-27 16:09:26 +00:00
matt335672
c52a173db0 Use symbolic constants in the modules for WM events 2023-11-27 15:42:24 +00:00
Naruhito
e520ce3a5d Proxy extended mouse button 8, 9 events
https://github.com/neutrinolabs/xrdp/pull/2860#issuecomment-1818705074
2023-11-27 15:12:01 +00:00
matt335672
94b1481270
Merge pull request #2863 from matt335672/update_bug_template
Add markdown asking user to read the FAQ before submitting a bug
2023-11-27 09:56:04 +00:00
matt335672
a679b4ed2b Add markdown asking user to read the FAQ before submitting a bug 2023-11-22 16:06:11 +00:00
matt335672
64b347d7ef
Merge pull request #2855 from matt335672/fix_issue_2853
Allow for empty fields in TS_EXTENDED_INFO_PACKET (regression)
2023-11-13 19:24:23 +00:00
matt335672
cdf574cf6c Allow for empty fields in TS_EXTENDED_INFO_PACKET
Some clients appears to be sending cbClientAddress and/or cbClientDir
as 0 in the TS_EXTENDED_INFO_PACKET. This appears to be at odds with
[MS-RDPBCGR] which requires mandatory terminators for these fields.
2023-11-13 10:26:20 +00:00
matt335672
50cff2eb75
Merge pull request #2794 from matt335672/utf_changes_new
Improve Unicode support
2023-11-02 10:57:39 +00:00
matt335672
76d12c50a8
Merge pull request #2838 from matt335672/fix_devredir_ordering
Fix message ordering in devredir
2023-10-26 15:28:10 +01:00
matt335672
7ceff70c1c Fix message ordering in devredir
The drive redirector is not compliant with the message ordering
in [MS-RDPEFS], causing FreeRDP 2.11.2 ro fail on redirecting drives.
2023-10-26 15:17:17 +01:00
matt335672
736da24dd1
Merge pull request #2731 from matt335672/update_sockdir_security
Update sockdir security
2023-10-24 19:31:05 +01:00
matt335672
c51ec2e8e9 Remove sesmanruntimedir
Now we've made the XRDP_SOCKET_PATH only writeable by root, it's
safe to move the sesman socket back into this directory. We no longer
need a separate sesmanruntimedir
2023-10-23 18:14:46 +01:00
matt335672
675dd77807 Parameterise the sockdir with the UID of the user
The top level socket directory is now called XRDP_SOCKET_ROOT_PATH.
Below that are user-specific directories referred to with the
XRDP_SOCKET_PATH macro - this name is hard-coded into xorgxrdp and
the audio modules as an environment variable.

XRDP_SOCKET_PATH now looks like $XRDP_SOCKET_ROOT_PATH/<uid>

XRDP_SOCKET_PATH is only writeable by the user, and readable by the user
and the xrdp process.
2023-10-23 18:14:46 +01:00
matt335672
63235eaafd Fix typo in error message 2023-10-23 15:51:17 +01:00
matt335672
547c619c2f Move g_mk_socket_path() to sesman
The sockdir is only used when sesman is active. The
call g_mk_socket_path() is removed from os_calls and moved to
sesman.

We also change the permissions on this directory to
0755 rather than 01777 (01000 is the 'sticky bit', S_ISVTX).

The behaviour of g_create_dir() has been modified to not
set S_ISVTX on Linux directories. This is implementation-defined
behaviour according to 1003.1, and is no longer required for the
sockdir.
2023-10-23 15:51:17 +01:00
matt335672
ee328784dc
Merge pull request #2833 from matt335672/remove_unnecessary_assignments
Remove unnecessary assignments
2023-10-23 15:42:32 +01:00
matt335672
8f73f5ba73 Remove unnecessary assignments
As per title. Assigments are made to variables which are immediately
overwritten.
2023-10-23 15:23:07 +01:00
matt335672
f5f67e2e80 Remove g_mbstowcs() and g_wcstombs()
These calls are now replaced with explicit UTF conversion routines in
the common/string_calls.[hc] and common/parse.[hc] modules.

Also removed:-
- The support code in common/os_calls.c to set the locale to use
  these routines.
- The twchar type in arch.h
2023-10-23 14:19:49 +01:00
matt335672
d722ffe357 Update smartcard code to use new UTF-8 calls 2023-10-23 14:19:49 +01:00
matt335672
1b286a0469 Update RAIL code to use new UTF-8 calls 2023-10-23 14:19:49 +01:00
matt335672
8556f83905 Update drive redirection code to use new UTF-8 calls 2023-10-23 14:19:49 +01:00
matt335672
f8e7fd4c2c Update clipboard code to use new UTF-8 calls 2023-10-23 14:15:47 +01:00
matt335672
a50afc6500 Update xrdp font handling to use new UTF-8 calls 2023-10-23 14:15:47 +01:00
matt335672
3a5b8936d1 libxrdp: Replace mbstowcs/wcstombs calls
These calls are replaced with the newer UTF-16 parsing code
withing the parse module
2023-10-23 14:15:47 +01:00
matt335672
36ea4a3f86 Remove mbstowcs/wcstombs from g_strtrim()
Because of the way UTF-8 encoding works, there is no need to
use mbstowcs/wcstombs in the implementation of this function.
2023-10-23 14:15:46 +01:00
matt335672
0758fe03a6 Add UTF-16 LE I/O routines
These are intended to replace UTF-16 uses of mbstowcs() / wcstombs()
2023-10-18 10:07:49 +01:00
matt335672
0463e552dc Add UTF-8 / UTF-32 conversion routines
These are intended to replace non-UTF-16 uses of mbstowcs() / wcstombs()
2023-10-18 10:07:49 +01:00
matt335672
da8fa059cd
Merge pull request #2785 from firewave/cppcheck-inc
updated Cppcheck to 2.12.1 / provide more includes to Cppcheck
2023-10-18 09:09:40 +01:00
firewave
8c214280d3 bumped Cppcheck to 2.12.1
- build Cppcheck with matchcompiler for improved performance
- build Cppcheck with Boost for improved ValueFlow performance
2023-10-17 15:14:36 +02:00
firewave
f687174af1 provide more includes to Cppcheck
- added (temporary) suppression of Cppcheck `shiftTooManyBits` false positives in `libxrdp/xrdp_mppc_enc.c`
- added (temporary) suppression of Cppcheck `uninitMemberVar` true positives in `ulalaca/ulalaca.cpp` until fixes land downstream
- fix Cppcheck `nullPointerRedundantCheck` in `sesman/chansrv/clipboard.c`
- fix Cppcheck `syntaxError` in `fontutils/mkfv1.c` because it doesn't see the `freetype/fterrors.h` header / removed astyle workaround
2023-10-17 15:14:36 +02:00
matt335672
b1fca0100e
Merge pull request #2827 from matt335672/devredir_use_spec
devredir_proc_query_dir_response(): Conform to spec
2023-10-16 13:32:14 +01:00
matt335672
2a287963da devredir_proc_query_dir_response(): Conform to spec
This commit adds more error checking to the above function. The function
now conforms to [MS-FSCC] regarding processing of the NextEntryOffset
field.
2023-10-16 10:28:41 +01:00
matt335672
eb1c3cd4b3
Merge pull request #2810 from matt335672/remove_ss_clipboard_code
Remove client-server shortcut paste code
2023-10-11 10:38:16 +01:00
matt335672
e0ffa11495
Merge pull request #2821 from matt335672/add_waitpid_interrupted_check
Check waitpid is not interrupted by a signal
2023-10-09 21:11:47 +01:00
matt335672
ad5916c5e4 Check waitpid is not interrupted by a signal
Checks that the waitpid() call isn't interrupted by a
signal when the handler for the signal is set to not
interrupt the call
2023-10-09 19:53:16 +01:00
matt335672
93dfc1839e
Merge pull request #2813 from matt335672/remove_signal_call
Remove dependency on signal() function
2023-10-09 14:45:50 +01:00
matt335672
d098214531 Add tests for signal functions in os_calls.c 2023-10-09 14:10:38 +01:00
matt335672
d11617adbe Remove dependency on signal() function
Replaces uses of signal() with sigaction() which should be far
more portable.
2023-10-09 14:05:29 +01:00
matt335672
bce303c3a8
Merge pull request #2815 from matt335672/groups_patch
Improve tsusers/tsadmins group support
2023-10-06 10:48:04 +01:00
matt335672
cf5c2718af Update logging in sesman access control
Improve the built-in access checks for sesman/sesexec:-
- Group existence is checked for at login-time rather than program
  start time
- The name of the group is now included in the message

Also, check for UID == 0 when checking for root, rather than just
checking the name (which might be an alias)
2023-10-05 13:22:49 +01:00
matt335672
5837deae04 access_login_allowed: Remove primary group check
This check is now performed within g_check_user_in_group()
2023-10-05 12:25:40 +01:00
matt335672
cf677da22c Add getgrouplist() support to os_calls
On enterprise systems, using getgrouplist() (if available)
is more efficient than iterating over the members of the group,
and is also more likely to work
2023-10-04 11:02:07 +01:00
matt335672
84a0befd30 Add getgrouplist() detection functionality
Defines the macro HAVE_GETGROUPLIST if getgrouplist() is
available, and defines the type passed to the GID array as
GETGROUPS_T
2023-10-03 10:36:56 +01:00
matt335672
284c17c0b2 Remove client-server shortcut paste code
When significant amounts of data is coming from the client in a
fragmented CLIPRDR_DATA_RESPONSE PDU, this code provides a way to
start copying it to a requesting client before it is all read.

The only advantage of this code is to provide a slight speedup
before a paste is visible on the server.

There are significant problems with this code. Notably, it is
very difficult to parse Unicode text coming through this route. Each
UTF-16 character can occupy up to 4 bytes, and a fragmentation
boundary could occur at any point within a UTF-16 character.
2023-09-29 12:07:19 +01:00
metalefty
89ceaf0c52
Merge pull request #2798 from ziggythehamster/freebsd-vsock
Implement vsock support for FreeBSD
2023-09-28 04:16:48 +09:00
metalefty
73acbe1f79
Merge pull request from GHSA-2hjx-rm4f-r9hw
CVE-2023-42822
2023-09-27 17:37:24 +09:00
matt335672
bc3ea01b3e CVE-2023-42822
- font_items in struct xrdp_font renamed to chars to catch all
  accesses to it. This name is consistent with the type of
  the array elements (struct xrdp_font_char).
- Additional fields added to struct xrdp_font to allow for range
  checking and for a default character to be provided
- Additional checks and logic added to xrdp_font_create()
- New macro XRDP_FONT_GET_CHAR() added to perform checked access
  to chars field in struct xrdp_font
2023-09-26 09:29:56 +01:00