Pierre Ossman
ab6a67677b
Remove default config alert
We don't exit here, so it's not a fatal error. It's also a fairly common
scenario, so remove the alert completely.
5 роки тому
Pierre Ossman
e97da59a76
Reject too large screen resize requests
We'll just crash later if we try to use such a large screen, so reject
the request from the client instead and keep the server running.
4 роки тому
Pierre Ossman
11080322a0
Catch errors resizing framebuffer
4 роки тому
Pierre Ossman
f420f1d0de
Add final line break to FatalError() calls
It expects the callers to include this, so make sure we're consistently
providing one.
4 роки тому
Pierre Ossman
b30f10c681
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.
4 роки тому
Andika Triwidada
c75892f344
Update Indonesian translation
4 роки тому
Pierre Ossman
8ddebf6dd2
Better error messages when terminating
Include something more user friendly when we need to fail fatally and
not just the technical error.
4 роки тому
Pierre Ossman
ad0f0618fa
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).
4 роки тому
Pierre Ossman
c0dac220de
Remove readString()/writeString()
These are not universal in the protocol so having functions for them
only obfuscates things.
4 роки тому
Pierre Ossman
5f09e7c662
Don't read invalid TLS auth reason
The specification only states a single result byte and not any reason
after a TLS authentication failure.
4 роки тому
Pierre Ossman
2354ce7404
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.
4 роки тому
Pierre Ossman
b00d2fe17e
Make direct stream API a bit safer
Provide some safety checks when directly accessing the underlying
pointer of streams.
4 роки тому
Pierre Ossman
d6bd230991
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.
5 роки тому
Pierre Ossman
f4fdc13f37
Log I/O errors from TLS streams
4 роки тому
Pierre Ossman
9f623551a7
Handle clients lost during querying
4 роки тому
Pierre Ossman
59f0aeaef2
Separate query and authentication handling
Otherwise we might send duplicate result codes and other weird things.
4 роки тому
Pierre Ossman
1333601844
Check buffer usage with a simply boolean
External callers don't need to know the exact details, only if there is
data that needs to be flushed or not.
4 роки тому
Pierre Ossman
d8b432cf26
Dynamically allocate stream buffers
This allows us to handle peaks in input and output streams gracefully
without having to block processing.
4 роки тому
Pierre Ossman
c2bbdb573d
Don't shuffle input buffer unless actually needed
4 роки тому
Pierre Ossman
d7a61c7df3
Generalise corking to all output streams
The principle can be used in a more general fashion than just TCP
streams.
4 роки тому
Pierre Ossman
cf40b83e23
Remove unused bufSize argument from streams
4 роки тому
Pierre Ossman
0cd533cf7f
Remove special functions from JPEG compressor
We can do what we want with the standard methods.
4 роки тому
Pierre Ossman
186819080b
Simplify stream availability handling
Just have a simply number of bytes argument to avoid a lot of
complexity.
4 роки тому
Pierre Ossman
e9425ac04d
Create common base classes for buffered streams
Most streams are backed by a memory buffer. Create common base classes
for this functionality to avoid code duplication.
4 роки тому
Pierre Ossman
b35ae29f93
Add stream avail() methods
Makes it more readable to write code that needs to know how much
data/space is available in a stream.
4 роки тому
Pierre Ossman
dc38699af8
Remove OutStream::skip()
It might leak data depending on what's in the buffer. Use pad() instead
where blank space is needed.
4 роки тому
Pierre Ossman
5e875ba492
Remove unused stream methods
They were accidentally left unused in fbad8a9
so they haven't been used
in some time.
4 роки тому
Pierre Ossman
a61edb1474
Throw more descriptive error on decode error
We need to be able to tell this exception came from a decoder.
4 роки тому
Pierre Ossman
b8973c10ab
Use proper constants for socket shutdown()
For readability.
4 роки тому
Pierre Ossman
d45082a591
Flush data on close
There might be some final handshake data that is still stuck in the
buffers, so make a best effort attempt at getting it to the client.
4 роки тому
Pierre Ossman
2b53faf942
Use exit_vncviewer() for early errors
Makes things more consistent and avoids surprises.
5 роки тому
Samuel Mannehed
3264216c2d
Bump up Windows version from Vista to Windows 7
4 роки тому
Pierre Ossman
585089797f
Fix connection close log
The socket is closed at this point so we have to rely on a cached
value for the logging.
5 роки тому
Pierre Ossman
4f104264e2
Move auth failure delay to SConnection
It's a generic feature that is better handled as part of SConnection's
state machine.
4 роки тому
Pierre Ossman
bd5ad5e79f
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.
4 роки тому
Pierre Ossman
6e6a221e3d
Get rid of magical assignment to Region
Might as well make these explicit so the cost is apparent.
4 роки тому
Stéphane Aulery
3aab38257e
Update French translation
4 роки тому
Lukas Vrabec
7b691ef81e
[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.
4 роки тому
Pierre Ossman
ecb016fe3f
Switch region code to pixman
This is the current upstream so let's make use of it to get the latest
in features and fixes.
4 роки тому
Pierre Ossman
849bd56728
Also link in math library in static build
It's included by default in dynamic builds so we need to make sure it
isn't lost when switching to static.
4 роки тому
Pierre Ossman
69e202a755
Don't ignore .cmake files
They are new modules and not generated files.
4 роки тому
Pierre Ossman
d4a1074ff7
Avoid using RegionInit() because of empty rects
It creates an invalid region if given an empty rect. Fortunately
RegionInitBoxes() handles that just fine, so use that instead.
4 роки тому
Pierre Ossman
0f4f557396
Stop using legacy region macros
We no longer support such old X servers so start using the current
functions.
4 роки тому
Pierre Ossman
f59e9649b0
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.
4 роки тому
Мирослав Николић
9a330f9865
Update Serbian translation
4 роки тому
Pierre Ossman
c51bb5a415
Update Ubuntu patches for current code
4 роки тому
Pierre Ossman
350fb5dc03
Update apt cache before running builds
Otherwise it might fail if the repositories have changed since the image
was generated.
4 роки тому
Pierre Ossman
6449ce6a5f
Remove legacy Xorg code
We now require at least 1.16, so remove all code that handled older
versions than that.
4 роки тому
Pierre Ossman
e86d8720ba
Remove 8-bit support from documentation
We removed support in the code ages ago, but overlooked this part of the
documentation. Also remove some dead code in Xvnc on the same theme.
4 роки тому
Pierre Ossman
d923a3421a
Merge branch 'systemd' of https://github.com/CendioOssman/tigervnc
4 роки тому