| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
This change makes the ZRLEEncoder respect a client's desired
compressionLevel. The ZlibLevel option is marked deprecated and removed
from the manpages.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We user the real, not the effective user ID, to check if the user is
allowed to log in with the "Plain" security types. Otherwise it would be
necessary to log in as root when Xvnc is installed with the set-user-id
bit on.
Signed-off-by: Carlos Santos <casantos@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This permits to enable PAM for the effective user of the Xvnc process by
adding this to ~/.vnc/config or /etc/tigervnc/vncserver-config-defaults:
SecurityTypes=TLSPlain
PlainUsers=%u
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2233204
Signed-off-by: Carlos Santos <casantos@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Don't assume a lack of TCP listeners means the server will be
unreachable. There might be other methods of access, so let the higher
levels do that sanity check instead.
|
| |
| |
| |
| | |
This will not do the correct thing for Unix sockets.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was a poor choice of words to call these keysyms "unknown" as they
are likely perfectly normal keysyms, they just cannot be found in the
currently loaded keyboard layout. This log message has confused users,
so let's get rid of the "unknown" part.
We already use the verb "add" heavily in the other log messages, so
let's keep that rather than switch to some for of "map".
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
We should handle this in the low-level protocol code as much as possible
to avoid mistakes. This way the rest of the code can assume that strings
are always UTF-8 with \n line endings.
|
| |
| |
| |
| | |
Make sure we can actually build without XRandR libraries.
|
| |
| |
| |
| | |
Make sure we can actually build without XFixes libraries.
|
| |
| |
| |
| | |
Make sure we can actually build without XTest libraries.
|
| |
| |
| |
| | |
The need for these must have got lost somewhere in the type cleanup.
|
|/
|
|
|
| |
It is more specific, and it properly sets up propagation when include
directories also need to be used further down a dependency chain.
|
|\ |
|
| |
| |
| |
| | |
It doesn't use any exceptions, so stop including the header for it.
|
| |
| |
| |
| | |
It's just confusing that we have our own variety that isn't compatible.
|
| |
| |
| |
| |
| | |
It has now been replaced, mostly by std::string, so remove the actual
type definition.
|
| |
| |
| |
| |
| | |
Let's use a more common type instead of something homegrown. Should be
more familiar to new developers.
|
| |
| |
| |
| |
| |
| | |
We mostly use classical C strings, but the memory management around them
can get confusing and error prone. Let's use std::string for the cases
where we need to return a newly allocated string.
|
| |
| |
| |
| |
| | |
We know the needed space here, so let's keep it simple with a constant
size string buffer.
|
| |
| |
| |
| |
| | |
It should return a path to the directory itself, just like its sister
function getuserhomedir().
|
| |
| |
| |
| | |
All library functions should be in a proper namespace.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This mimics how some system functions (like inet_ntop()) work, and
avoids complexity around ownership of the returned string buffer.
The downside is that the string must be consumed directly as it will be
overwritten on the next call, but that is not an issue with the current
usage.
|
| |
| |
| |
| |
| | |
We don't need to make extra copies of the string in most cases, so let's
simplify the code and access the string directly when we can.
|
| |
| |
| |
| |
| | |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Addresses the following AVC denial:
type=PROCTITLE msg=audit(01/12/2023 02:58:12.648:696) : proctitle=/usr/sbin/vncsession fedora :1
type=PATH msg=audit(01/12/2023 02:58:12.648:696) : item=1 name=/home/fedora/.vnc nametype=CREATE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(01/12/2023 02:58:12.648:696) : item=0 name=/home/fedora/ inode=262145 dev=fc:02 mode=dir,700 ouid=fedora ogid=fedora rdev=00:00 obj=unconfined_u:object_r:user_home_dir_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(01/12/2023 02:58:12.648:696) : cwd=/home/fedora
type=SYSCALL msg=audit(01/12/2023 02:58:12.648:696) : arch=x86_64 syscall=mkdir success=no exit=EACCES(Permission denied) a0=0x7fff47d52540 a1=0755 a2=0x0 a3=0x0 items=2 ppid=2869 pid=2880 auid=fedora uid=fedora gid=fedora euid=fedora suid=fedora fsuid=fedora egid=fedora sgid=fedora fsgid=fedora tty=(none) ses=8 comm=vncsession exe=/usr/sbin/vncsession subj=system_u:system_r:vnc_session_t:s0 key=(null)
type=AVC msg=audit(01/12/2023 02:58:12.648:696) : avc: denied { create } for pid=2880 comm=vncsession name=.vnc scontext=system_u:system_r:vnc_session_t:s0 tcontext=system_u:object_r:vnc_home_t:s0 tclass=dir permissive=0
Resolves: rhbz#2143704
|
|/
|
|
|
| |
Make sure we don't send a bogus request to the X server in the (common)
case that we don't actually have anything to restore.
|
|
|
|
|
|
| |
These are supported by gcc and clang, and I don't think MSVC works well
with our code anyway, so let's keep things simple and use these
directly.
|
|
|
|
|
| |
These types caused an incorrect signed/unsigned behaviour, so let's make
sure we use the appropriate type.
|
|
|
|
| |
gcc can get upset if they aren't in this order.
|
|
|
|
|
| |
This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
|
|
|
|
|
| |
This makes sure the compiler doesn't complain about problems in those
files.
|
| |
|
| |
|
|
|
|
|
|
| |
Delay startup of VNC sessions until user databases are up and running.
This is the same ordering that GDM imposes to make sure users can
actually log in.
|
|\ \
| | |
| | |
| | | |
https://github.com/grulja/tigervnc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have to check whether we update cursor position/shape only in case
the cursor is on our display, otherwise in zaphod mode, ie. when having
two instances of x0vncserver on screens :0.0 and :0.1 we would be having
the cursor duplicated and actually not funcional (aka ghost cursor) as
it would be actually not present. We also additionally watch EnterNotify
and LeaveNotify events in order to show/hide cursor accordingly.
Change made with help from Olivier Fourdan <ofourdan@redhat.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
We might often fail to find a matching X11 keycode when the client has
a different keyboard layout and end up with no key event. To avoid a
failure we add it as a new keysym/keycode pair so the next time a keysym
from the client that is unknown to the server is send, we will find a
match and proceed with key event. This is same behavior used in Xvnc or
x11vnc, although Xvnc has more advanced mapping from keysym to keycode.
|
| |
| |
| |
| |
| |
| | |
These require a key to have been set up on the server beforehand, so
they do not give a good default experience as clients will be unable to
connect.
|
| |
| |
| |
| |
| | |
The order is important in the servers, so make sure the man pages follow
the code properly.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
The previous commit was incorrect in that it overrides automake's
dependency list, rather than adding to it. So we need to make sure
things are duplicated between Xvnc_DEPENDENCIES and Xvnc_LDADD as
appropriate.
Use the same approach as the Xorg binary to keep things familiar.
|
|
|
|
|
|
| |
These aren't crucial for a clean build, but must be set for Xvnc to be
properly rebuilt if anything in the Xorg tree changes. automake doesn't
properly deduce these automatically from Xvnc_LDADD, unfortunately.
|
|
|
|
|
|
|
| |
We need to get to the point of starting the session script before we
consider things a success. So this can fail in many different ways, not
just the daemonization. Adjust the error message to something more
generic to reflect this.
|
|
|
|
|
|
| |
Instead of HOME_ROOT/.vnc, /root/.vnc should be used
for user root's home to specify default file context
as HOME_ROOT actually means base for home dirs (usually /home).
|
|
|
|
|
|
| |
Avoid duplication, and add logging for some more error conditions so
it's possible to see in the logs why a resize has failed or produced
unexpected results.
|
|
|
|
| |
Otherwise things might be logged under the wrong label.
|
|\ |
|