Pierre Ossman
fad215db38
Use smaller, stable, int for history index
The size of size_t depends on the architecture, so we need to have
different conversion to and from strings. But we don't really need that
range, so avoid the issue by using a standard integer size.
11 månader sedan
Pierre Ossman
bc255d2ede
Merge branch 'hostexception' of https://github.com/CendioOssman/tigervnc
11 månader sedan
Pierre Ossman
865219838c
More logging for server cert exceptions
Let's log a bit more details when we need to deal with certificate
exceptions to make it easier to debug things.
11 månader sedan
Pierre Ossman
fc3ff6c84c
Allow exception for cert hostname mismatch
The browsers let you add an exception for this case, so we should as
well.
11 månader sedan
Pierre Ossman
a2be8fbcc0
Improve reporting of certificate errors
GnuTLS can help use translate certificate issues in to user presentable
strings, so let's clean up that reporting.
11 månader sedan
Pierre Ossman
af3dae278c
Allow exception for weak certificate algorithms
The browsers let you add an exception for this case, so we should as
well.
11 månader sedan
Pierre Ossman
59b467ebb9
Remove double expired certificate prompts
This should have been done in 5f46d55
.
11 månader sedan
Pierre Ossman
8e7071b1c9
Allow exception for not yet activated certificates
The browsers let you add an exception for this case, so we should as
well.
11 månader sedan
Pierre Ossman
77e7e2fafe
Make sure we handle all certificate issues
We don't want to proceed unless we've made sure the user has approved
the issues with the certificate. So add an extra check that all status
flags have been dealt with.
11 månader sedan
Pierre Ossman
c43a03a2b2
Handle GNUTLS_CERT_INVALID in TOFU code
GnuTLS should hopefully never set just this flag, but let's be fully
prepared for all scenarios.
11 månader sedan
Pierre Ossman
e453d4d9db
Remove old GnuTLS compatibility code
We've required GnuTLS 3.x for a long time, so this code has been dead
for a while.
11 månader sedan
Pierre Ossman
b59ddd0c8c
Fix WM_CLASS in desktop file
The WM_CLASS we set on all windows is just "vncviewer", so that it
matches the name of the .desktop file, which is what GNOME expects.
11 månader sedan
Pierre Ossman
9ca100d463
Merge branch 'types2' of https://github.com/CendioOssman/tigervnc
11 månader sedan
Pierre Ossman
94d6a693ea
Don't allow surrugate code points in UTF-8
These are not valid outside of UTF-16 so seeing them in a UTF-8 sequence
means that something is wrong with that sequence. Best to filter them
out rather than letting them propagate and have unknown effects.
1 år sedan
Pierre Ossman
c061a78dc1
Clean up string encoding handling
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.
1 år sedan
Pierre Ossman
7b3fe6d283
Emulate corking when TCP_CORK is missing
If we can't rely on the OS to handle corking for us, then we need to
enable our own handling of it.
11 månader sedan
Pierre Ossman
b0319e3e09
Move where -nodefaultlibs is specified
The previous method isn't compatible with CMake's try_compile() as it
will respect CMAKE_EXE_LINKER_FLAGS, but not CMAKE_C_LINK_EXECUTABLE and
friends. This results in the default libraries being completely missing,
and the compile test failing.
11 månader sedan
Pierre Ossman
e93e2e4dff
Drop xorg-x11-font-utils requirement for RHEL 9
They've patched their Xorg sources to no longer require this package.
11 månader sedan
Pierre Ossman
681d543254
Merge branch 'noxtest' of https://github.com/CendioOssman/tigervnc
1 år sedan
Pierre Ossman
7ee2f67bc0
Fix missing XRandR build
Make sure we can actually build without XRandR libraries.
1 år sedan
Pierre Ossman
875fd01181
Fix missing XFixes build
Make sure we can actually build without XFixes libraries.
1 år sedan
Pierre Ossman
057c512379
Fix missing XTest build
Make sure we can actually build without XTest libraries.
1 år sedan
Pierre Ossman
d8482e3bbd
Remove unneeded "using namespace"
The need for these must have got lost somewhere in the type cleanup.
1 år sedan
Pierre Ossman
57cdcedf1b
Avoid wildcards in cmake rules
They are not fully supported and break with some backends, like Ninja.
1 år sedan
Pierre Ossman
787987ef86
Handle REQUIRED in our CMake "find" modules
These are expected to abort if they fail to find the relevant software
and "REQUIRED" is specified.
1 år sedan
Pierre Ossman
640c5503c1
Prefer target_include_directories()
It is more specific, and it properly sets up propagation when include
directories also need to be used further down a dependency chain.
1 år sedan
Pierre Ossman
00dc3c0c8d
Add all common inter-dependencies
This is important in case there are build flags that need to propagate
between libraries for things to build correctly.
1 år sedan
Pierre Ossman
b96e9c1fe6
Include Debian debug files in artefacts
1 år sedan
Pierre Ossman
6267a77131
Raise Debian packaging version
Get in sync with what's recommended these days.
1 år sedan
Pierre Ossman
ae5ac7317a
Don't prompt when installing dependencies
This is fully automated, so we can't let anything wait for user input or
the job will just hang.
1 år sedan
Pierre Ossman
5e4bd974eb
Remove unnecessary ; from build scripts
The newlines aren't stripped, so they are quite sufficient separators
for the commands.
1 år sedan
Pierre Ossman
9b9e2e6192
Limit GitHub action run times
We don't want a broken job to consume our entire quota, so make sure
things are killed if the stray too far from a normal runtime.
1 år sedan
Samuel Mannehed
9e3342baeb
Update copyright year in README
1 år sedan
Pierre Ossman
19df176862
Consistently use uint8_t for data buffers
These will always be byte streams at heart, so let's try to keep them
with a proper type. Should make it clearer how they will be used.
1 år sedan
Pierre Ossman
7a2af97447
Detect leaving window on zaphod systems
The coordinates we get are relative the root window of each screen, so
we can only trust them if we are on the same screen. So let's explicitly
check that we are still getting events from the expected screen by
checking the root window field of the event.
1 år sedan
Pierre Ossman
15a0da6157
Merge branch 'types' of https://github.com/CendioOssman/tigervnc
1 år sedan
Pierre Ossman
cbed625888
Merge branch 'vncsession-create-homedir' of https://github.com/zpytela/tigervnc
1 år sedan
Pierre Ossman
4a482d541c
Merge branch 'master-clipboard-check-state-before-access' of https://github.com/MarkMielke/tigervnc
1 år sedan
Pierre Ossman
6b7a69e807
Throw exception instead on bad access check
An assert will kill the entire server, which is overly harsh when there
is a problem with a single connection. Instead, throw an exception which
will just disconnect that specific client.
1 år sedan
Мирослав Николић
75e6e8e35c
Update Serbian translation
1 år sedan
Zdenek Pytela
717d787de8
SELinux: Allow vncsession create ~/.vnc directory
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
1 år sedan
Mark Mielke
995f443ef7
VNCSConnectionST clipboard functions should check state before access.
Clipboard functions may run on connections that are not yet at
RFBSTATE_NORMAL. Due to recent hardening of the accessCheck() function,
it is important to validate that the state is RFBSTATE_NORMAL before
calling accessCheck().
Fixes #1599 .
1 år sedan
Pierre Ossman
4c9b0ba913
Merge "Pixel" type in to PixelFormat header
It's a type specific to that class, so let's keep them close for
clarity.
1 år sedan
Pierre Ossman
1e3484f201
Sanity check when cleaning up keymap changes
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.
1 år sedan
Pierre Ossman
f55abd7b00
Use operator overloading for comparison
It is much more natural than custom methods for this very common
operation.
1 år sedan
Pierre Ossman
9854463f16
Warn if Point/Rect/Region methods are used wrong
It is easy to get confused if these methods modify the existing object,
or return a new one. So let's mark the return value as critical so the
compiler can help out if someone gets it wrong.
1 år sedan
Pierre Ossman
192a7bec96
Avoid redefining errno
This can have unexpected consequences as some code may rely on it being
a simple variable. Instead to what we do in Socket, which is to define a
unique name for getting socket error numbers.
1 år sedan
Pierre Ossman
03a2057e9e
Remove unneeded header from SDesktop.h
It doesn't use any exceptions, so stop including the header for it.
1 år sedan
Pierre Ossman
5db843ead6
Remove unused rfb/util.h includes
These files don't use anything from this header, so remove the include.
This exposes some missing includes in other places, though. So add an
explicit include in the files that were relying on an indirect
inclusion.
1 år sedan
Pierre Ossman
fd243a8d3a
Remove "str" prefix from string helpers
This matches the naming in STL, which is what we are mostly mimicing now
that we are using std::string for these functions.
1 år sedan