Commit Graph

4447 Commits

Author SHA1 Message Date
matt335672
ae43cee4b3
Merge pull request #2737 from matt335672/bump_cppcheck_to_2_11
Bump cppcheck to v2.11
2023-06-23 15:41:23 +01:00
matt335672
1ac6206af6 Use all available CPUs to build cppcheck 2023-06-23 15:30:24 +01:00
matt335672
d77b0b3b9d Bump cppcheck to v2.11
This fixes the following errors:-

sesman/tools/authtest.c:64:14: error: syntax error [syntaxError]
    g_printf("xrdp auth module tester v" PACKAGE_VERSION "\n");
             ^
sesman/tools/sesrun.c:165:14: error: syntax error [syntaxError]
    g_printf("xrdp session starter v" PACKAGE_VERSION "\n");
             ^
vrplayer/decoder.h:35:12: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    public slots:
           ^
vrplayer/playaudio.h:45:12: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    public slots:
           ^
vrplayer/dlgabout.h:22:13: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    private slots:
            ^
vrplayer/playvideo.h:49:12: error: There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it. [unknownMacro]
    public slots:
           ^
Additionally, cppcheck now makes use of all available CPUs
2023-06-23 15:12:51 +01:00
metalefty
14b224f7ae
Merge pull request #2727 from metalefty/issue-template
Introduce Issue template
2023-06-13 19:15:33 +09:00
Koichiro IWAO
6e192995cb Tip is not allowed here anymore
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
2023-06-13 09:50:25 +09:00
Koichiro IWAO
416615bfb5 Add field for desktop environment, backend, VM and anything else
in bug report template
2023-06-13 09:38:54 +09:00
Koichiro IWAO
afb34f23a4 Reword descriptions for the link to Q&A 2023-06-10 00:26:20 +09:00
Koichiro IWAO
07797866e3 Update bug report template 2023-06-10 00:07:01 +09:00
Koichiro IWAO
650dc032ce Add bug report template 2023-06-09 23:52:59 +09:00
Koichiro IWAO
5a02a3b3d9 Add issue template: links 2023-06-09 19:20:00 +09:00
matt335672
a2798fe9e9
Merge pull request #2715 from matt335672/c7_compile_error
Fix compile errors detected by the older gcc 4.8.5 compiler:-
2023-06-08 11:36:51 +01:00
matt335672
7cf9101407 Fix compile errors detected by the older gcc 4.8.5 compiler:-
sesexec.c: In function ‘main’:
sesexec.c:521:1: error: control reaches end of non-void function [-Werror=return-type]

sound.c: In function ‘process_pcm_message’:
sound.c:1123:21: error: ‘for’ loop initial declarations are only allowed in C99 mode
                     for (int i = 0; i < send_silence_times; i++)
                     ^
sound.c:1123:21: note: use option -std=c99 or -std=gnu99 to compile your code

These fixes are in line with our coding standard and have no functional change.
2023-06-07 20:21:54 +01:00
matt335672
3c98420517
Merge pull request #2713 from CynCeyd/devel
Included os_calls.h first in unit tests
2023-06-05 11:11:41 +01:00
CynCeyd
f4210a20ae Switched os_calls.h and test_common.h include order since HAVE_STDINT_H would get undefined by check.h. 2023-06-04 12:05:33 +02:00
jsorg71
dab1443e87
Merge pull request #2686 from matt335672/update_fifo_code
Re-work FIFO code
2023-06-01 22:29:59 -07:00
matt335672
07ac4c3eca
Merge pull request #2711 from matt335672/allow_long_strings_in_pam_env
Remove size limit for PAM environment variables
2023-06-01 15:33:44 +01:00
matt335672
c0f9c55de6 Remove size limit for PAM environment variables
The current logic in auth_set_env() for PAM environments only allows
environment variables to be around 256 characters in length.
2023-05-31 16:39:42 +01:00
metalefty
73b7bd5ebc
Merge pull request #2704 from neutrinolabs/security
Update SECURITY.md
2023-05-29 09:47:42 +09:00
metalefty
6853048a0c
Update SECURITY.md
Now vulnerability report form is open. Anyone who use GitHub can report vulnerabilities privately the form.
2023-05-28 23:45:56 +09:00
matt335672
05d1733950 Change chansrv to use common fifo code 2023-05-22 14:43:22 +01:00
matt335672
3d87d40d0a Modify xrdp encoder for new fifo interface 2023-05-22 14:43:22 +01:00
matt335672
d5684e0633 Add module tests for new fifo module 2023-05-22 14:43:22 +01:00
matt335672
ac65538a48 Re-implement fifo code
Following informal option testing, a more performant fifo
implementation has been chosen which makes fewer, larger
allocations, but which does not have bad edge-case performance

Clearing the contents of a fifo is a common operation which generally
involves freeing memory. Support has been added to the fifo interface
for doing this.
2023-05-22 14:43:22 +01:00
matt335672
8535f8e08c
Merge pull request #2675 from matt335672/fix_chansrv_signal_handling
Fix signal handling in chansrv.c
2023-05-22 10:03:02 +01:00
matt335672
2fa92be379
Merge pull request #2672 from iskunk/new-2
Simplify interaction with systemd
2023-05-17 11:05:53 +01:00
jsorg71
24d115824d
Merge pull request #2670 from jsorg71/large_cursor_posix
add large cursor support, posix shm
2023-05-16 22:41:36 -07:00
Jay Sorg
c250529e8e add large cursor support, posix shm 2023-05-16 10:20:24 -07:00
matt335672
544ead05e7
Merge pull request #2265 from iskunk/apparmor-harden
Hardening xrdp with AppArmor
2023-05-16 09:57:09 +01:00
Daniel Richard G
fdfe47668b Add XorgNoNewPrivileges configuration option
This allows Linux's no_new_privs restriction to be disabled when starting
the X server, which may be desirable if xrdp is running inside a kernel
confinement framework such as AppArmor or SELinux.
2023-05-15 17:40:46 -04:00
Daniel Richard G
b191d87e33 Move Linux's no_new_privs call into os_calls
This helps keep the application code free of platform-specific cruft.
Also remove a needless #include<sys/prctl.h> from sesman/session_list.c.
2023-05-15 17:40:46 -04:00
Daniel Richard G
1c0c923ad1 Split g_file_open() into _ro() and _rw() variants
Rename g_file_open() to g_file_open_rw(), and add a new g_file_open_ro()
call that wraps the common g_file_open_ex(file, 1, 0, 0, 0) idiom. This
will make the file access mode more explicit in the code.

Change all calls to g_file_open() to the _ro() or _rw() variant as
appropriate, and replace g_file_open_ex(file, 1, 0, 0, 0) with the _ro()
call.

Lastly, add tests for the two new calls to test_os_calls.c (code
courteously provided by matt335672).
2023-05-15 17:38:31 -04:00
Daniel Richard G
e199dba32f Simplify interaction with systemd 2023-05-15 11:05:35 -04:00
matt335672
0a44594f51 Fix signal handling in chansrv.c
Signal handlers now only use signal-safe code

See signal-safety(7) on Linux
2023-05-15 14:16:29 +01:00
matt335672
4b37e1a508
Merge pull request #2674 from matt335672/ci_fix
Fix (again) broken 32-bit CI
2023-05-15 11:27:37 +01:00
matt335672
41ae2f4efa Fix (again) broken 32-bit CI 2023-05-15 11:17:14 +01:00
matt335672
f57e0b959f
Merge pull request #2667 from iskunk/new-1
Use config_ac.h consistently and correctly
2023-05-13 10:17:32 +01:00
Daniel Richard G
42d32e7496 Use config_ac.h consistently and correctly 2023-05-12 13:49:53 -04:00
matt335672
7fe7ce9434
Merge pull request #2644 from matt335672/split_session_driver
Split sesman into sesman and sesexec
2023-05-09 10:23:51 +01:00
matt335672
8853b1c4ee New files for sesexec 2023-05-02 11:55:23 +01:00
matt335672
ae94891ab7 Add sesexec to .gitignore 2023-05-02 11:55:23 +01:00
matt335672
4dcaa84fbe Changes to autotools stuff for sesexec 2023-05-02 11:55:23 +01:00
matt335672
c5971b535d sesexec: Changes to existing files from sesman
env.c : The value of XRDP_SESSION in the environment is now set to the
        PID of the sesexec process, which ties up the session with the
        output of "xrdp-sesadmin -c=list".

        Later versions of xrdp-sesadmin can use this value to get
        information about the current process.
2023-05-02 11:55:23 +01:00
matt335672
74cd7d1837 Rework sesman with new files 2023-05-02 11:55:23 +01:00
matt335672
3895954b75 Add libipm interfaces to sesman
Add modules to sesman to handle incoming EICP and ERCP messages
2023-05-02 11:55:22 +01:00
matt335672
9c2c43693c Move files from sesman to sesexec directory 2023-05-02 11:55:22 +01:00
matt335672
8e291846d5 Create pre-session list
This is made from the old sesman_con structure. It describes
a connection to sesman which is not yet running a session.
2023-05-02 11:55:22 +01:00
matt335672
dadb393443 Add sesexec control module
This module provides a secure way for sesman to start the sesexec program
and establish a private communications channel with it.
2023-05-02 11:55:22 +01:00
matt335672
3d95954d87 Move session_list to struct list *
This commit now uses the standard list module to manage the active
session list, rather than having special code to do this.
2023-05-02 11:55:22 +01:00
matt335672
1a9d15bef0 Remove explicit auth_stop_session() call
Now that authentication/authorization and session creation are
happening in the same process, there is no need for a separate call
to finish an auth session. This change prevents the upper software
layers from needing to track whether auth_start_session() has been
called or not.
2023-05-02 11:55:22 +01:00
matt335672
82ede29388 libsesman: Make x11_display_offset and max_sessions unsigned 2023-05-02 11:55:22 +01:00