Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from TigerVNC:master #78

Open
wants to merge 171 commits into
base: master
Choose a base branch
from
Open

[pull] master from TigerVNC:master #78

wants to merge 171 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 10, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

62832 and others added 2 commits March 15, 2024 22:00
That extra add_fd() only set the read notification, overwriting any
write notification set up in the lines just above.
@pull pull bot added the ⤵️ pull label Apr 10, 2024
CendioOssman and others added 27 commits April 10, 2024 12:40
FLTK can send events with fl_xevent pointing to random memory, which
means that we cannot trust that structure. XQueryPointer() can give us
what we need, at the cost of an extra round trip.
They must belong to the rfb namespace, not to the SConnection class.

Also add an AccessNone constant, since it's better to use a mnemonic
symbol rather than zero to initialize the accessRights members.

Signed-off-by: Carlos Santos <[email protected]>
Make it easier to work iteratively by not having to remove the output
file each time.
The norm is that the install target is read only from the point of view
of the source and build directory, so avoid accidentally triggering any
build.
Move these RFB specific things to rfb::VNCServer, for clarity.

Signed-off-by: Pierre Ossman <[email protected]>
Signed-off-by: Carlos Santos <[email protected]>
Specifies that the server must ignore all keyboard or mouse events sent
by the client.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2180903
Signed-off-by: Carlos Santos <[email protected]>
Allow for alternative user config locations, deprecate `~/.vnc` in favour of XDG Base Directory Specification paths
It's perfectly fine to give a NULL pointer if the length has explicitly
been specified as zero.
There is too much variation between distributions for us to have a good
PAM configuration that works everywhere. Try to make this more obvious
by having a comment at the top of the file.
E.g. pam_env.so might modify this variable, so we should see what we get
out of PAM when building a log file path.
The syslog file descriptor will be closed when we are cleaning up in
preparation for running the vncserver script, so we need to explicitly
reopen things in case we need to log errors.

At the same time, try to be polite and explicitly close the log when
appropriate.
This is only needed because of an historical type change of the legacy
directory, so avoid doing it anywhere else.
This is an often changed database, so it is better suited for
$XDG_STATE_HOME rather than the more static $XDG_DATA_HOME.
Avoid duplicating this complexity in too many places.

At the same time make the interface more identical to regular mkdir(),
for familiarity.
Repeating a timer can be done in two ways:

 * Returning true from the handler
 * Calling start() again in the handler

The latter is useful if you want to change the timer interval.

If both are used, then it becomes ambiguous when the timer should fire
again.

Detect this case and warn about it. Current implementation will respect
the new interval given to start(), rather than the interval set before
running the handler.
This should have been done in a4308c9.
It is much more sane to treat "0" as "a timer is ready NOW", so let's
change to using -1 as the invalid timeout value.
It currently won't ever be called with an empty list of timers, but it
is a public function so that might happen in the future. Make sure this
case is handled without crashes.
They were badly formatted, way longer than the normal 72 columns.
One-shot timers are more common, so let's change the API a bit to make
that use case simpler. This API also makes it more clear what is
happening.
CendioOssman and others added 30 commits August 29, 2024 17:23
Although rare, there are cases where we might fail to determine our base
directories. Make sure the code can handle it.
Problems with the original code: A process can only establish one connection.
After modification, multiple connections can be supported.
Read just the first password and ignore anything else in the password
file. This allows you to reuse a password file from the server that also
includes a view-only password.

This fixes a regression introduced in b99daad.
Cursor data has a depth of 32 bits and hence cannot use CPIXELs.

This is a regression from baca73d.
There were more unclear usage of this exception class, and since nothing
catches it it is very unclear what the purpose is. Go ahead and just
remove it.

Follow-up to bcaaea7.
This is the user actively rejecting the connection, and should be
signalled as such for correct behaviour.
These functions return a GnuTLS status, so we should use the correct
exception for that so we get the proper error messages.
Prefer this exception for failures involving errno as it gives a better
error description.
This happens if you've connected to a server using a Unix socket.
We don't need random access to the entries, so a list fits just as well.
It also has better accessors we need.
It's easier for the user if the most recently used entries are at the
top.
A server can be specified in many different ways, so it is easy to get
multiple entries in the history for the same thing.

Get rid of these by parsing each entry and comparing with existing
entries.
They are not automatically cleaned up with the window on Windows, and we
might want to reconnect so we cannot rely on the process cleanup either.
Only the client that currently has buttons pressed should actually send
a release event as the client might not be currently in control of the
pointer state. This is most clearly seen in a client that hasn't event
authenticated properly yet.

Approximate this from the server by using the last known server cursor
position. It should hopefully not differ much from the last client
provided position.

Follow-up to 986280b.
FLTK has support for both image and plain text clipboard data, we don't.
This means we only send plain text clipboard from the viewer to the
server. Some applications can get confused when we announce that
clipboard is available and later don't send anything. An example of such
an application is QGIS, in the remote session it froze when an image was
copied on the client side.

This fix means we only call announceClipboard() when the clipboard
contains plain text. That means TigerVNC is now more robust and doesn't
trigger freezes in buggy applications.
Commit 8a80c90 added a check to prevent
announcing clipboard when it's not plain text data. When this check
triggers and we want to ignore the non-plain text clipboard, we should
reset the state by no longer indicating pending clipboard, and by asking
the server to clear its clipboard. This ensures we don't end up in a
state where the server thinks the viewer has useful clipboard data, but
it doesn't.
Socket APIs are used in more places than the abstraction in
common/network. Make it easier to use this exception class by putting
it in a more common place.
The behaviour is not consistent as Windows doesn't use errno for socket
errors, but Unix systems do. Always use the same exception to keep
things somewhat sane.
Windows has (at least) two error namespaces, both errno and
GetLastResult(). These overlap, so it is important we keep track of
which one we are dealing with.

To make things extra problematic, the BSD socket API normally uses
errno, but on Windows it has been mapped in to the GetLastResult()
namespace.

Try to keep better control of this by using separate classes for the
namespaces.
Fixed so config variables can pass an empty argument.

Solves issue #1791.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.