Commit Graph

4636 Commits

Author SHA1 Message Date
matt335672
6ff99cc4b5 Load channel config in xrdp_wm_create()
This commit moves the '[Channels]' parsing code for xrdp.ini
from xrdp_wm_init() to an earlier location in xrdp_wm_create().

libxrdp can now check that drdynvc is not disabled before starting it,
and xrdp_wm can disable GFX if virtual channels are not available.
2024-03-11 14:13:44 +00:00
matt335672
697dcbb24d Start the drdynvc channel within xrdp_wm
The responsibility for starting the drdynvc channel is moved out of
libxrdp into the application. This will make it easier to allow the
application to check the channel is enabled before starting it.
2024-03-11 11:00:53 +00:00
metalefty
0187daeb59
Merge pull request #2976 from rowlap/patch-2
Remove duplicate DEBUG output
2024-03-06 17:18:52 +09:00
rowlap
bf81557cdc
Remove duplicate DEBUG output
allow_multimon and new_cursors are printed twice
2024-03-05 11:59:20 +00:00
metalefty
b6d4e9df4f
Merge pull request #2969 from matt335672/increase_gfx_buffer
Increase GFX output buffer size
2024-03-03 09:36:43 +09:00
metalefty
5ccabaf706
Merge pull request #2972 from metalefty/logs
Suppress some logs when no errors
2024-03-01 00:01:32 +09:00
Koichiro Iwao
0b4150ff48 Suppress some logs when no errors
This outputs per-frame logs when using VNC backend and on login screen.
2024-02-29 15:03:48 +09:00
metalefty
a2c0d39c1e
Merge pull request #2970 from rowlap/patch-1
Remove tcutils channel from xrdp.ini
2024-02-27 22:30:08 +09:00
matt335672
90e4aca26a Increase GFX output buffer size
Size the GFX output buffer pessimistically based on the largest monitor
in the configuration.
2024-02-27 10:03:33 +00:00
matt335672
5845ce7c16
Merge pull request #2967 from derekschrock/ipv6
Fall back to IPv4 if IPv6 capable but don't have an IPv6 address set
2024-02-26 09:28:57 +00:00
Derek Schrock
5afbca4954 Fall back to IPv4 if IPv6 capable but don't have an IPv6 address set
When xrdp is built with IPv6 support it will only fall back to IPv4 if
IPv6 is not supported (EAFNOSUPPORT).  However, if the system is IPv6
capable but doesn't have an IPv6 address set (at least inside a FreeBSD
jail) EPROTONOSUPPORT is returned from socket().
2024-02-25 17:53:44 -05:00
matt335672
b79a7690fa
Merge pull request #2962 from matt335672/fix_egfx_disconnect
GFX: Fix disconnect on resize of busy windows
2024-02-23 15:34:01 +00:00
matt335672
3430b8898c GFX: Fix disconnect on resize of busy windows
When a resize is underway on a busy X server, it is possible for a
queued EGFX cmd (order #62) to be processed after the decoder has been
deleted. This causes a client disconnect with no useful error message.
2024-02-22 14:30:53 +00:00
rowlap
2a0c2a612f
Remove tcutils channel from xrdp.ini
According to #1943 tcutils was removed, so update the channel section to match.
2024-02-21 18:32:18 +00:00
matt335672
b2c0c506e8
Merge pull request #2745 from matt335672/wtmp
Add utmp/wtmp support
2024-02-21 14:22:16 +00:00
metalefty
b6b9283df1
Merge pull request #2956 from metalefty/copyright
Bump copyright year and make easier to bump
2024-02-21 21:29:31 +09:00
matt335672
9bc706f412
Merge pull request #2955 from matt335672/github_ci_update_actions
Migrate github actions to Node 20
2024-02-21 12:28:06 +00:00
metalefty
82bbf7ef03
Merge pull request #2954 from metalefty/gfx_log
GFX: Relegate some logs to LOG_LEVEL_DEBUG
2024-02-21 19:11:52 +09:00
Koichiro Iwao
ae249c6755 Bump copyright year and make easier to bump 2024-02-21 19:09:34 +09:00
matt335672
4ba026be38 Migrate github actions to Node 20
Github actions are transitioning to Node 20 ans Node 16 is EOL.

https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20
2024-02-21 09:36:53 +00:00
matt335672
8cea9b03ab Replace g_strncpy() with str2memcpy()
g_strncpy() is the wrong function for copying strings in struct utmp[x]
as it always terminates strings.

strncpy() itself would be a good choice, but is marked by many compilers
as being unsafe to use.

str2memcpy() is taken from util-linux, and is exactly right for this
application.
2024-02-21 09:24:48 +00:00
matt335672
b53c683edf Allow some utmpx fields to be optional
POSIX.1 doesn't define ut_host in struct utmpx. Also, Linux has support
for an exit status value in ut_exit. This commit adds conditional code
for both ut_host and ut_exit to maximise portability.
2024-02-21 09:24:48 +00:00
matt335672
04c67a5039 Set ut_id field
The utmp record is generally looked up by the ut_id field. Setting
this field means we can use a blank username and host when the
session exits
2024-02-21 09:24:48 +00:00
matt335672
98d6545566 Don't use DEAD_PROCESS/USER_PROCESS for add_xtmp_entry
If we're not compiling with USE_UTMP, these defines will not
be available
2024-02-21 09:24:48 +00:00
matt335672
3b6c9bcba3 Add --enable-utmp to configure.ac 2024-02-21 09:24:48 +00:00
matt335672
bf53a76ea1 Remove wtmp updating code 2024-02-21 09:24:48 +00:00
matt335672
bc9b35c38c Rename struct exit_status in os_calls
This conflicts with struct exit_status in <utmp.h>
2024-02-21 09:24:48 +00:00
Koichiro Iwao
7e305f9e24 GFX: Relegate some logs to LOG_LEVEL_DEBUG 2024-02-21 14:28:37 +09:00
matt335672
49f60fc64f Remove AC_GNU_SOURCE
AC_GNU_SOURCE is replaced with AC_USE_SYSTEM_EXTENSIONS (available
from autoconf 2.6.0)
2024-02-20 17:37:11 +00:00
BLINDAUER Emmanuel
da0f3cefd7 Move some definitions, and small fixes 2024-02-20 17:37:11 +00:00
BLINDAUER Emmanuel
22f17ad123 More g_* functions usage
Follow coding standard
2024-02-20 17:37:11 +00:00
BLINDAUER Emmanuel
58b3989655 don't forget a free
use g_*
2024-02-20 17:37:11 +00:00
Blindauer Emmanuel
547388ddce Add support for FreeBSD 2024-02-20 17:37:11 +00:00
BLINDAUER Emmanuel
2af2e032c3 Add the loginuid pam module, as we are starting a session.
So /proc/<uid>/loginuid will be filled by the uid of the user.
This will fix entries in 'last' with "gone - no logout" instead of
'still logged in'
2024-02-20 17:37:11 +00:00
Koichiro IWAO
eaffeaf53f cosmetic changes 2024-02-20 17:37:10 +00:00
Koichiro IWAO
e32671cd79 Include sys/time.h to use gettimeofday() 2024-02-20 17:37:10 +00:00
BLINDAUER Emmanuel
d3a751cff8 Add GNU_SOURCE to configure.ac: it allow usage f more GNU functions,
like updwtmpx
2024-02-20 17:37:10 +00:00
BLINDAUER Emmanuel
bacda80492 WIP utmp/wtmp
- renamed the two files, including the header was conflicting with official headers
- configure look for utmp/utmpx headers, wo we know which struct to use
- reworked the usage for linux, works mostly (last still showing 'gone' for loggued users)
2024-02-20 17:37:10 +00:00
Koichiro IWAO
56eec32b7e os_calls.h needs to be included to use g_snprintf() 2024-02-20 17:37:10 +00:00
Koichiro IWAO
3ea306249b don't forget include utmp.h 2024-02-20 17:37:10 +00:00
Koichiro IWAO
c103d2308b sesman: add utmp files to makefile 2024-02-20 17:37:10 +00:00
Koichiro IWAO
42388ca009 remove trailing space 2024-02-20 17:37:10 +00:00
BLINDAUER Emmanuel
895fe28961 Initial support for utmp/wtmp on linux 2024-02-20 17:37:10 +00:00
metalefty
2849dce105
Merge pull request #2942 from matt335672/fix_monitor_hotplug
Fixes some problems with monitor hotplug
2024-02-20 23:37:23 +09:00
matt335672
09715f4cf4 GFX: Prevent MM screen being written to the client
In GFX mode, if we're using xorgxrdp, frame updates are send directly
from the client, bypassing the screen buffer in xrdp_mm.

This commit only allows the xrdp_mm screen buffer to be invalidated
if the painter has drawn into it since the module was loaded. This
prevents the unused (and invalid) frame buffer being pushed to the client
in GFX mode with xorgxrdp.
2024-02-19 16:26:04 +00:00
matt335672
c21521f80d Clear memory allocated to resized bitmaps
This prevents valgrind errors when resizing the screen to
a larger size on GFX systems.
2024-02-17 17:41:51 +00:00
matt335672
3ca3bd197f Prevent EGFX drawing while channel is down
Clear egfx_up as soon as the channel starts to close so that
xrdp_mm_draw_dirty() doesn't send data to a closed channel.
2024-02-15 16:48:13 +00:00
matt335672
f3fe06a0c7 EGFX: Ignore incoming messages after close sent 2024-02-15 16:48:13 +00:00
matt335672
bc70a86de6 Rework xrdp to support new module resize interface
This commit compiles.
2024-02-15 16:48:13 +00:00
matt335672
dd37720188 Change to the XUP module for the new resizing interface
Input message 300 to xorgxrdp which communicated a screen size
has been replaced with message 302 which sends a list of monitors
to xorgxrdp. This simplifies the initialisation and resize logic
somewhat, but a compatible version of xorgxrdp must be used
2024-02-15 16:48:13 +00:00