Pierre Ossman [Thu, 21 May 2020 19:10:38 +0000 (21:10 +0200)]
Properly store certificate exceptions
The previous method stored the certificates as authorities, meaning that
the owner of that certificate could impersonate any server it wanted
after a client had added an exception.
Handle this more properly by only storing exceptions for specific
hostname/certificate combinations, the same way browsers or SSH does
things.
Pierre Ossman [Thu, 14 May 2020 16:49:39 +0000 (18:49 +0200)]
Change streams to be asynchronous
Major restructuring of how streams work. Neither input nor output
streams are now blocking. This avoids stalling the rest of the client or
server when a peer is slow or unresponsive.
Note that this puts an extra burden on users of streams to make sure
they are allowed to do their work once the underlying transports are
ready (e.g. monitoring fds).
Pierre Ossman [Thu, 21 May 2020 09:31:40 +0000 (11:31 +0200)]
Improved bandwidth monitoring
Now measures over an entire update, which should hopefully give us more
stable values. They are still small values for fast networks though so
increase precision in the values we keep.
Pierre Ossman [Fri, 23 Nov 2018 17:17:53 +0000 (18:17 +0100)]
Make sure TLS is allowed to terminate gracefully
Some systems (like TLS) need to send some final data before closing
a connection. Make sure this is properly handled by cleaning up the
security object before closing the underlying network socket.
Pierre Ossman [Mon, 18 May 2020 16:53:43 +0000 (18:53 +0200)]
Support calling methods from timers
We can't safely use the normal timers in base classes as we cannot
guarantee that subclasses will call the base class' handleTimeout()
properly if the subclass overrides it.
Lukas Vrabec [Wed, 6 May 2020 08:55:29 +0000 (10:55 +0200)]
[SELinux] Allow vnc_session_t type execute itself
vncsession-start is running in SELinux vnc_session_t domain because of
"SELinuxContext=system_u:system_r:vnc_session_t:s0" option in systemd
vncserver@.service unit file. vncsession-start executing binary
vncsession with SELinux label/type vnc_session_t. This access was not
allowed in vncsession policy.
Pierre Ossman [Mon, 20 Apr 2020 06:55:13 +0000 (08:55 +0200)]
Handle empty changes for every operation
It seems like many of the X11 operations can end up with no pixels
actually changing. So instead of discovering and adding workarounds for
each individually we'll just check very region added if it's empty.
Alex Tanskanen [Tue, 10 Mar 2020 12:33:01 +0000 (13:33 +0100)]
Throw GAIException() for getaddrinfo errors
Created a new subclass of Exception called GAIException() that will
handle error messages from getaddrinfo() instead of letting Exception()
handle it. GAIException() will make use of gai_strerror() to map the
error code to text. On Windows, gai_strerrorW() must be used if the text
is encoded with UTF-8.
Alex Tanskanen [Wed, 4 Mar 2020 09:27:02 +0000 (10:27 +0100)]
Make system error messeges in Windows 10 use UTF-8
The previous error messages did not support Unicode characters. This
commit will use UTF-8 encoding to be able to display error messages in
every language.
Pierre Ossman [Thu, 19 Jul 2018 14:04:23 +0000 (16:04 +0200)]
Add SELinux policy file for vncsession
Running as a service on a SELinux system requires rules so we can
transition to our own context. We also need the proper permissions
to start new user sessions.
Pierre Ossman [Mon, 16 Jul 2018 13:58:06 +0000 (15:58 +0200)]
Start sessions via PAM
This sets up a more correct session as there are key tasks that
need to be performed by PAM. E.g. systemd will allocate cgroups
and start base services.
In order to easily handle this as a system service the mapping of
displays is now done via a configuration file.
Pierre Ossman [Wed, 23 Jan 2019 14:29:41 +0000 (15:29 +0100)]
Make vncserver always run in the foreground
We need to be started as a system service for things to work correctly
anyway, so delegate the work of starting and stopping things to the
system service manager (e.g. systemd).
Linus Heckemann [Sat, 1 Feb 2020 10:08:26 +0000 (11:08 +0100)]
xserver: add no-op input thread init function
This allows Xvnc to build with xorg-server 1.20.7, which requires OS
layers to implement a ddxInputThreadInit function when configured with
--enable-input-thread (the default).
Pierre Ossman [Fri, 3 Jan 2020 12:10:20 +0000 (13:10 +0100)]
Clean up initialization of DIBSectionBuffer
We had an unintentional conflict with PixelBuffer::setSize() here.
But we can simplify this further as this initialization is only used
by the subclass DeviceFrameBuffer, and only once.
Pierre Ossman [Mon, 30 Dec 2019 09:50:52 +0000 (10:50 +0100)]
Provide correct dimensions for XShm setup
Since 53f913a we initialize the underlying PixelBuffer with 0x0
dimensions, which means we need to keep more explicit track of what
we are trying to allocate in the setup methods.