Closed itxworks closed 6 months ago
Copied from #2221
The 'SYS' is down to xrdp using a system call it's not allowed to. See https://github.com/neutrinolabs/xrdp/pull/2697
git log -n1
will give us the commit)sudo grep sig=31 /var/log/syslog
commit 8af430e19777a98e85b780b19288408fe08fcef5 (HEAD -> devel, origin/devel, origin/HEAD)
Author: matt335672 <30179339+matt335672@users.noreply.github.com>
Date: Thu Feb 1 00:06:59 2024 +0000
Fix regression in using window message names (#2925)
FreeRDP defines macros WM_LBUTTONUP, WM_LBUTTONDOWN, WM_RBUTTONUP
and WM_RBUTTONDOWN. These conflict with the definitions we have in
xrdp_constants.h. Because the FreeRDP system includes followed the local
includes however, the compiler did not emit a diagnostic for this -
see gcc bug #16358.
This PR rearranges the includes for NeutrinoRDP so the macro
redefinitions are flagged by the compiler.
Feb 5 20:28:01 nfndeterm kernel: [89751.108745] audit: type=1326 audit(1707161281.640:31): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined pid=17863 comm="xrdp" exe="/usr/local/sbin/xrdp" sig=31 arch=c000003e syscall=10 compat=0 ip=0x7f45d56a1f57 code=0x80000000
Feb 5 20:41:22 nfndeterm kernel: [90552.096521] audit: type=1326 audit(1707162082.628:32): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined pid=17908 comm="xrdp" exe="/usr/local/sbin/xrdp" sig=31 arch=c000003e syscall=10 compat=0 ip=0x7fc780f31f57 code=0x80000000
Feb 5 20:55:57 nfndeterm kernel: [91427.252573] audit: type=1326 audit(1707162957.784:33): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined pid=17938 comm="xrdp" exe="/usr/local/sbin/xrdp" sig=31 arch=c000003e syscall=10 compat=0 ip=0x7f3f4a1a8f57 code=0x80000000```
Try applying ccead296e615b92afc17daf67447876fb3c122e0 to /usr/lib/systemd/system/xrdp.service
That was the fix - thank you for your great work @matt335672
[Unit]
Description=xrdp daemon
Documentation=man:xrdp(8) man:xrdp.ini(5)
Requires=xrdp-sesman.service
After=network.target xrdp-sesman.service
[Service]
Type=exec
EnvironmentFile=-/etc/sysconfig/xrdp
EnvironmentFile=-/etc/default/xrdp
ExecStart=/usr/local/sbin/xrdp $XRDP_OPTIONS --nodaemon
SystemCallArchitectures=native
#SystemCallFilter=@basic-io @file-system @io-event @ipc @network-io @process @signal ioctl madvise sysinfo uname
SystemCallFilter=@basic-io @file-system @io-event @ipc @network-io @process @signal @system-service ioctl madvise sysinfo uname
SystemCallErrorNumber=EPERM
[Install]
WantedBy=multi-user.target
● xrdp.service - xrdp daemon
Loaded: loaded (/lib/systemd/system/xrdp.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2024-02-06 14:29:21 CET; 3min 27s ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Main PID: 20197 (xrdp)
Tasks: 2 (limit: 4638)
Memory: 19.4M
CPU: 1.092s
CGroup: /system.slice/xrdp.service
├─20197 /usr/local/sbin/xrdp --nodaemon
└─20206 /usr/local/sbin/xrdp --nodaemon
Feb 06 14:30:23 nfndeterm xrdp[20206]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2295)] xrdp_wm_log_msg: sesman connect ok
Feb 06 14:30:23 nfndeterm xrdp[20206]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2295)] xrdp_wm_log_msg: Performing login request for papm
Feb 06 14:30:23 nfndeterm xrdp[20206]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2295)] xrdp_wm_log_msg: login was successful - creating session
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2295)] xrdp_wm_log_msg: session is available on display 10 for user papm
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2295)] xrdp_wm_log_msg: Connecting to session
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [xrdp_mm_setup_mod1(xrdp_mm.c:360)] loaded module 'libxup.so' ok, interface size 10408, version 4
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [lib_mod_connect(xup.c:180)] lib_mod_connect: connecting via UNIX socket
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [lib_mod_connect(xup.c:207)] lib_mod_connect: connected to Xserver (Xorg) sck 21
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [lib_mod_log_peer(xup.c:76)] lib_mod_log_peer: xrdp_pid=20206 connected to Xorg_pid=20213 Xorg_uid=1000 Xorg_gid=1000 client=192.168.30.59:54766
Feb 06 14:30:24 nfndeterm xrdp[20206]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2295)] xrdp_wm_log_msg: Connecting to chansr
Thank you. 🙏
xrdp version
0.9.80
Detailed xrdp version, build options
Operating system & version
Debian 11
Installation method
other
Which backend do you use?
Xorgrdp
What desktop environment do you use?
GNOME
Environment xrdp running on
VM - Proxmox
What's your client?
Mac, Linux
Area(s) with issue?
Other
Steps to reproduce
✔️ Expected Behavior
XRDP running as systemd service
❌ Actual Behavior
does not run as service - but via "xrdp-sesman -n & xrdp -n &"
Anything else?