Commit Graph

3938 Commits

Author SHA1 Message Date
Kentaro Hayashi
1d6d80d14f Block inbound clipboard text/image/file respectively
Disable clipboard_event_selection_request call is overkill for
blocking text/image/file purpose.
For example, it breaks existing behavior (slow response from gedit,
gimp as a side effects)

Instead, in clipboard_event_selection_request, these media format will
be blocked respectively which depends on the following configurations
in sesman.ini [Security] section.

  * RestrictInboundClipboard=text
  * RestrictInboundClipboard=file
  * RestrictInboundClipboard=image

You can also set comma separated list.

  * RestrictInboundClipboard=text,file,image
2022-01-14 10:17:02 +09:00
Kentaro Hayashi
fb1c4ec945 Block outbound clipboard text/image/file respectively
RestrictOutboundClipboard kills all of test/file/image
transfer via clipboard.

For controlling each content type behavior,
clipboard_xevent is not appropriate place to block respectively.

Instead, in clipboard_event_selection_notify, these media type
will be blocked which depends on the following configurations in
sesman.ini [Security] section.

  * RestrictOutboundClipboard=text
  * RestrictOutboundClipboard=file
  * RestrictOutboundClipboard=image

You can also set comma separated list

  * RestrictOutboundClipboard=text, file, image
2022-01-14 10:17:02 +09:00
Kentaro Hayashi
bd82084505 Extend In/Outbound text,file,image restriction respectively
It supports the extended configurations for sesman.ini:

Before:

  [Security]
  RestrictOutboundClipboard=true or false

After:

  [Security]
  RestrictInboundClipboard=[true or false | text or file or image | comma separated list]
  RestrictOutboundClipboard=[true or false | text or file or image | comma separated list]

Above configuration is disabled by default (false)
And it can be specified comma separated list like this:.

  RestrictInboundClipboard=file, image
  RestrictOutboundClipboard=text, file, image

Note that if RestrictOutboundClipboard=true,file is set,
file is ignored and it is treated as RestrictOutboundClipboard=true

It is same for RestrictInboundClipboard.
2022-01-14 10:17:02 +09:00
Kentaro Hayashi
69ea406440 Add g_str_to_bitmask utility function
It should be used for comma separated configuration to bitmask.

e.g. RestrictOutboundClipboard = text, file, image
2022-01-14 10:17:02 +09:00
matt335672
d27e5472dd
Merge pull request #2118 from matt335672/rhel7_imlib2
Support imlib2 on RHEL 7
2022-01-13 10:23:14 +00:00
matt335672
3de1e966b4 Support imlib2 on RHEL 7 2022-01-12 11:41:26 +00:00
metalefty
d76732b342
Merge pull request #2109 from metalefty/release
Release v0.9.18
2022-01-11 09:19:22 +09:00
Koichiro IWAO
1ce2215aac Bump version to v0.9.18 2022-01-11 09:00:27 +09:00
Koichiro IWAO
137b76d329 Update NEWS for v0.9.18 2022-01-11 09:00:27 +09:00
matt335672
453ae8c700
Merge pull request #2110 from matt335672/rfxcodec_016
Bump librfxcodec version to v0.1.6
2022-01-07 12:14:44 +00:00
matt335672
f826e55eda Bump librfxcodec version to v0.1.6 2022-01-07 11:57:11 +00:00
matt335672
96a92d4e32
Merge pull request #2106 from matt335672/update_librfxcodec
Merge in librfxcodec #49
2022-01-05 11:27:51 +00:00
matt335672
7be27ef8b0 Merge in librfxcodec #49 2022-01-05 11:12:48 +00:00
matt335672
ab0e141fa9
Merge pull request #2011 from matt335672/unify_scpv0_code
Unify scpv0 code #2011
2022-01-05 11:06:42 +00:00
matt335672
15b8578b54
Merge pull request #1932 from Nexarian/add_monitor_processing_unit_tests
Add monitor processing unit tests for existing xrdp_sec function
2022-01-05 10:23:55 +00:00
matt335672
ec44055139
Merge pull request #2087 from matt335672/issue2064
RFX : Support large screens
2022-01-05 10:22:46 +00:00
matt335672
63c4d1f793
Merge pull request #2098 from matt335672/remove_func_declaration
Remove unused declaration for xrdp_wm_drdynvc_up
2022-01-05 09:25:05 +00:00
matt335672
e80a8bbe3f
Merge pull request #2105 from matt335672/gcc11_warning
Fix gcc11.1 uninitialised var warning
2022-01-05 09:23:24 +00:00
matt335672
67bf23feee Fix gcc11.1 uninitialised var warning 2022-01-04 10:09:33 +00:00
matt335672
f07412839a Remove unused declaration for xrdp_wm_drdynvc_up 2021-12-27 13:02:41 +00:00
metalefty
a8375d68b5
Merge pull request #2088 from kenhys/use-log
Use LOG instead of LOG_DEVEL
2021-12-23 14:22:18 +09:00
Kentaro Hayashi
53027ad5af Use LOG instead of LOG_DEVEL
According to https://github.com/neutrinolabs/xrdp/wiki/Logging,
it may be better to emit this log message because this log is
useful for system administrator to know whether RestrictOutboundClipboard
configuration works or not

And raise log level to info because it is informative for system
administrator.
2021-12-23 12:58:35 +09:00
matt335672
0d1cdb8d48 RFX: librfxcodec changes for message splitting 2021-12-22 11:10:25 +00:00
matt335672
c9f1346fcc Fix over-allocation in rfx encoder setup 2021-12-22 11:09:16 +00:00
matt335672
73b66c21be RFX: Separate over-log RFX updates (Tristan Hume) 2021-12-22 11:08:46 +00:00
matt335672
9140737a6e Add calculate_multifragmentupdate_len() 2021-12-15 10:08:28 +00:00
matt335672
5a11b698ef
Merge pull request #2080 from matt335672/log_startup_errors
Log startup errors #2080
2021-12-13 10:07:09 +00:00
matt335672
0d584c1954
Merge pull request #1988 from metalefty/file-4GiB
tests: add test on g_file_get_size() #1988
2021-12-13 10:04:52 +00:00
matt335672
737139b00f Fixed a few exit statuses 2021-12-10 11:49:55 +00:00
matt335672
b292febd86 Replace stdout writes for errors with LOG() calls 2021-12-10 11:45:53 +00:00
matt335672
3f0af85588
Merge pull request #2078 from metalefty/do-not-spit-on-the-console
xrdp: don’t spit on the console when starting
2021-12-10 11:32:28 +00:00
Koichiro IWAO
ab558213b7 tests: skip some tests until g_file_get_size() fixed 2021-12-10 17:08:44 +09:00
Koichiro IWAO
a57d8491c0 tests: add g_file_get_size() tests for files larger than 2GiB 2021-12-10 16:24:34 +09:00
Koichiro IWAO
c24b6d95dd tests: create sparse file for g_file_get_size() tests 2021-12-10 16:24:34 +09:00
Koichiro IWAO
8e4ea49532 tests: add test on g_file_get_size() 2021-12-10 16:24:34 +09:00
Christopher Pitstick
0a2562d33d Initial cut at a unit test for xrdp_sec_process_mcs_data_monitors 2021-12-08 01:41:07 -05:00
Koichiro IWAO
3c10abd1be
xrdp: don’t spit on the console when starting
Picked from Debian's local patch [1].

We have worked on reducing Debian's local patches in #1762 #1765.
This is the last one left and helps to  remove shutup-daemon.diff
completely. I don't think this log to stdout is necessary.

[1] https://salsa.debian.org/debian-remote-team/xrdp/-/blob/debian/0.9.17-2/debian/patches/shutup-daemon.diff
2021-12-08 15:22:18 +09:00
matt335672
a266d67fdf
Merge pull request #2070 from matt335672/dev_fix
Fix buffer size check #2070
2021-12-06 10:36:05 +00:00
matt335672
53c9bcc976
Merge pull request #2074 from kenhys/fix-atom2-debug-message
Fix wrong debug level log message for g_file_atom2 #2074
2021-12-06 10:06:04 +00:00
Kentaro Hayashi
23906383b6 clipboard: Fix wrong debug level log message for g_file_atom2
As g_file_atom2 is x-special/gnome-copied-files
(See g_file_atom2 definition in sesman/chansrv/clipboard.c),
it should be "x-special/gnome-copied-files" in this context.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
2021-12-06 12:40:41 +09:00
matt335672
c39bb18469 Fix buffer size check 2021-12-02 13:47:09 +00:00
matt335672
b557de4888
Merge pull request #2066 from matt335672/devel_fix
Set stream size correctly for TS_SURFCMD_STREAM_SURF_BITS header (#2066)
2021-12-02 11:18:13 +00:00
matt335672
c02dcd0f13
Merge pull request #2069 from matt335672/devel
Replace `which` with `command -v` in submodules
2021-12-02 11:17:14 +00:00
matt335672
1c7b471231 Updates to libpainter and librfxcodec bootstrap scripts 2021-12-02 10:29:42 +00:00
matt335672
13568dea2b
Merge pull request #2067 from metalefty/which
Replace `which` with `command -v`
2021-12-01 15:52:42 +00:00
Koichiro IWAO
ab62ea5e9d
Replace which here, too 2021-12-01 22:37:29 +09:00
matt335672
54fbae2593
Merge pull request #2065 from matt335672/shm_logging
Log error on failure to attach to shared memory #2065
2021-12-01 09:23:00 +00:00
Koichiro IWAO
a3d8761e20
Replace which with command -v
as well as neutrinolabs/xorgxrdp#204.

Reported by: @drwilly
2021-12-01 17:06:25 +09:00
matt335672
f64c824a78 Set stream size correctly before adding TS_SURFCMD_STREAM_SURF_BITS header 2021-11-30 11:04:57 +00:00
matt335672
dc5ec83df9 Log error on failure to attach to shared memory 2021-11-30 10:55:03 +00:00