Commit Graph

1161 Commits

Author SHA1 Message Date
matt335672 e0a1339b34 chansrv FUSE fixes
1) [Regression] If the specified mountpoint is not immediately below an
   existing directory, the directory is not created.
2) The message to ask the user to unmount an existing mounted directory
   has been moved to the right place.
2024-05-21 12:33:17 +01:00
sefler 4599ac7bf6 apply patch generated by matt 2024-05-05 10:44:19 +08:00
seflerZ c42a09709e fix a bug in returning the init result. 2024-05-05 10:44:19 +08:00
matt335672 1e78b42022 Fix CI errors using C++ compiler 2024-05-05 10:44:19 +08:00
matt335672 a2064e51c1 Some changes to Unicode input processing
- xrdp is not now built with XRDP_IBUS to allow other input
  methods to be more easily supported.
- chansrv is only aked to start an input method if the client
  supports it.
- chansrv sends a status report back to xrdp when asked to start
  and input method.
- ./configure without --enable-ibus now works.
2024-05-05 10:44:19 +08:00
seflerZ b623766503 remote uncessary conditional compilation 2024-05-05 10:44:19 +08:00
seflerZ 8c98ed4a58 add conditional compilation annotations 2024-05-05 10:44:19 +08:00
seflerZ bcd690f037 code refactored 2024-05-05 10:44:19 +08:00
seflerZ 3b1cc551e4 format code 2024-05-05 10:44:19 +08:00
seflerZ d4e2e0a093 It works now 2024-05-05 10:44:19 +08:00
seflerZ bea72150fb change parameter types 2024-05-05 10:44:19 +08:00
seflerZ a8c075e84e refine makefile 2024-05-05 10:44:19 +08:00
seflerZ 97138d5bad add missing code 2024-05-05 10:44:19 +08:00
sefler 7bea1f9d56 compile suscceed 2024-05-05 10:44:19 +08:00
matt335672 20b90c1098 Initial support for ibus input from chansrv 2024-05-05 10:44:19 +08:00
firewave 5eed76f32b fixed `-Wunused-function` compiler warnings 2024-04-23 18:38:20 +02:00
firewave fb9c175b11 enabled and fixed `-Wmissing-prototypes` compiler warnings
Co-authored-by: matt335672 <30179339+matt335672@users.noreply.github.com>
2024-04-23 18:38:20 +02:00
matt335672 200e4d84f4 Fix permissions on user socket directory
The user socket directory needs to be SGID so that they inherit
the group ownnership. Then xrdp can write to them.
2024-03-22 10:44:19 +00:00
matt335672 b2c0c506e8
Merge pull request #2745 from matt335672/wtmp
Add utmp/wtmp support
2024-02-21 14:22:16 +00:00
Koichiro Iwao ae249c6755 Bump copyright year and make easier to bump 2024-02-21 19:09:34 +09: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
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
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 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 45fd497645
Merge pull request #2891 from neutrinolabs/gfx_mainline_merge_work
Gfx mainline merge work
2024-02-08 21:50:16 +09:00
Koichiro Iwao 47d4ab1339 Apply astyle 3.4 code formatter 2024-02-08 15:52:54 +09:00
Nexarian 584a894490 Add 0 as valid g_obj_wait timeout instead of having it be equivalent to -1. 2024-01-31 19:08:29 -05:00
matt335672 b80f07d2a7 Improve portability
- Use clearenv() if it exists
- Don't rely on <limits.h> being pulled in by <sys/param.h>
- Rename the DEFAULT_TYPE macro in sesrun.c.  This name appears to be
  used on Solaris. It's not a good choice.
2024-01-11 11:16:06 +00:00
matt335672 e529a04d26 Fix session_list scanning where some entries were skipped 2023-12-23 13:10:31 +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 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