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 years ago
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 years ago
Pierre Ossman
b00d2fe17e
Make direct stream API a bit safer
Provide some safety checks when directly accessing the underlying
pointer of streams.
4 years ago
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 years ago
Pierre Ossman
f4fdc13f37
Log I/O errors from TLS streams
4 years ago
Pierre Ossman
9f623551a7
Handle clients lost during querying
4 years ago
Pierre Ossman
59f0aeaef2
Separate query and authentication handling
Otherwise we might send duplicate result codes and other weird things.
4 years ago
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 years ago
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 years ago
Pierre Ossman
c2bbdb573d
Don't shuffle input buffer unless actually needed
4 years ago
Pierre Ossman
d7a61c7df3
Generalise corking to all output streams
The principle can be used in a more general fashion than just TCP
streams.
4 years ago
Pierre Ossman
cf40b83e23
Remove unused bufSize argument from streams
4 years ago
Pierre Ossman
0cd533cf7f
Remove special functions from JPEG compressor
We can do what we want with the standard methods.
4 years ago
Pierre Ossman
186819080b
Simplify stream availability handling
Just have a simply number of bytes argument to avoid a lot of
complexity.
4 years ago
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 years ago
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 years ago
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 years ago
Pierre Ossman
5e875ba492
Remove unused stream methods
They were accidentally left unused in fbad8a9
so they haven't been used
in some time.
4 years ago
Pierre Ossman
a61edb1474
Throw more descriptive error on decode error
We need to be able to tell this exception came from a decoder.
4 years ago
Pierre Ossman
b8973c10ab
Use proper constants for socket shutdown()
For readability.
4 years ago
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 years ago
Pierre Ossman
2b53faf942
Use exit_vncviewer() for early errors
Makes things more consistent and avoids surprises.
5 years ago
Samuel Mannehed
3264216c2d
Bump up Windows version from Vista to Windows 7
4 years ago
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 years ago
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 years ago
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 years ago
Pierre Ossman
6e6a221e3d
Get rid of magical assignment to Region
Might as well make these explicit so the cost is apparent.
4 years ago
Stéphane Aulery
3aab38257e
Update French translation
4 years ago
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 years ago
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 years ago
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 years ago
Pierre Ossman
69e202a755
Don't ignore .cmake files
They are new modules and not generated files.
4 years ago
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 years ago
Pierre Ossman
0f4f557396
Stop using legacy region macros
We no longer support such old X servers so start using the current
functions.
4 years ago
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 years ago
Мирослав Николић
9a330f9865
Update Serbian translation
4 years ago
Pierre Ossman
c51bb5a415
Update Ubuntu patches for current code
4 years ago
Pierre Ossman
350fb5dc03
Update apt cache before running builds
Otherwise it might fail if the repositories have changed since the image
was generated.
4 years ago
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 years ago
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 years ago
Pierre Ossman
d923a3421a
Merge branch 'systemd' of https://github.com/CendioOssman/tigervnc
4 years ago
Pierre Ossman
e05ea21e01
Do maximize more properly on macOS
4 years ago
Pierre Ossman
aaeee37f0a
Don't resize viewer window when maximized
Most window managers won't like this, and it tends to provoke bugs in
FLTK, so let's avoid it. It's probably not what the user wants anyway.
4 years ago
Pierre Ossman
6b938e676b
Include error code in getaddrinfo() exceptions
4 years ago
Pierre Ossman
b0875cadc2
Avoid using insecure variable length arrays
4 years ago
Pierre Ossman
8b4be5fd8e
Merge branch 'unicode_translation' of https://github.com/CendioAlex/tigervnc
4 years ago
Alex Tanskanen
e52923415e
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.
4 years ago
Alex Tanskanen
01ca961b0c
Fix typo in SocketException message
4 years ago
Alex Tanskanen
fb8131f7a2
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.
4 years ago
Pierre Ossman
5410f7c57f
Remove support for old Xorg versions
No current distribution ship anything this ancient anyway.
4 years ago