]>
source.dussan.org Git - tigervnc.git/log
Pierre Ossman [Fri, 14 Jul 2023 08:06:49 +0000 (10:06 +0200)]
Fix correct background in Fl_Input_Choice
Work around a bug in Fl_Input_Choice where it forgets to set the proper
"input background" on some parts.
Pierre Ossman [Fri, 14 Jan 2022 18:49:12 +0000 (19:49 +0100)]
Respect selection color in monitor widget
We should have a consistent color set over all widgets.
Pierre Ossman [Thu, 6 Jul 2023 07:17:53 +0000 (09:17 +0200)]
Don't tag up gettext's *wprintf() functions
gcc doesn't support -Wformat for the wide format versions of printf()
and friends yet:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308
Do what glibc does and have some commented out tags to show future
intent.
Pierre Ossman [Wed, 5 Jul 2023 14:23:58 +0000 (16:23 +0200)]
Unbreak -Wformat warnings when gettext is used
gettext replaces all *printf() functions on platforms that don't fully
conform to the POSIX behaviour. Unfortunately, gettext fails to tag
these replacement functions properly so that -Wformat can still do its
thing.
Resolve this by adding a redudant declaration of the relevant functions,
with the attribute tagging in place.
Pierre Ossman [Wed, 5 Jul 2023 14:22:35 +0000 (16:22 +0200)]
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.
Pierre Ossman [Wed, 5 Jul 2023 12:31:02 +0000 (14:31 +0200)]
Merge branch 'hostexception' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Wed, 5 Jul 2023 09:23:33 +0000 (11:23 +0200)]
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.
Pierre Ossman [Wed, 5 Jul 2023 09:19:48 +0000 (11:19 +0200)]
Allow exception for cert hostname mismatch
The browsers let you add an exception for this case, so we should as
well.
Pierre Ossman [Wed, 5 Jul 2023 09:10:08 +0000 (11:10 +0200)]
Improve reporting of certificate errors
GnuTLS can help use translate certificate issues in to user presentable
strings, so let's clean up that reporting.
Pierre Ossman [Wed, 5 Jul 2023 09:07:31 +0000 (11:07 +0200)]
Allow exception for weak certificate algorithms
The browsers let you add an exception for this case, so we should as
well.
Pierre Ossman [Wed, 5 Jul 2023 08:43:47 +0000 (10:43 +0200)]
Remove double expired certificate prompts
This should have been done in
5f46d55 .
Pierre Ossman [Wed, 5 Jul 2023 08:36:02 +0000 (10:36 +0200)]
Allow exception for not yet activated certificates
The browsers let you add an exception for this case, so we should as
well.
Pierre Ossman [Wed, 5 Jul 2023 08:22:42 +0000 (10:22 +0200)]
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.
Pierre Ossman [Wed, 5 Jul 2023 08:21:56 +0000 (10:21 +0200)]
Handle GNUTLS_CERT_INVALID in TOFU code
GnuTLS should hopefully never set just this flag, but let's be fully
prepared for all scenarios.
Pierre Ossman [Wed, 5 Jul 2023 07:32:42 +0000 (09:32 +0200)]
Remove old GnuTLS compatibility code
We've required GnuTLS 3.x for a long time, so this code has been dead
for a while.
Pierre Ossman [Mon, 3 Jul 2023 08:42:39 +0000 (10:42 +0200)]
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.
Pierre Ossman [Fri, 30 Jun 2023 20:33:47 +0000 (22:33 +0200)]
Merge branch 'types2' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Sat, 18 Mar 2023 13:59:27 +0000 (14:59 +0100)]
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.
Pierre Ossman [Sat, 18 Mar 2023 12:53:26 +0000 (13:53 +0100)]
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.
Pierre Ossman [Wed, 28 Jun 2023 14:03:30 +0000 (16:03 +0200)]
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.
Pierre Ossman [Wed, 21 Jun 2023 11:58:57 +0000 (13:58 +0200)]
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.
Pierre Ossman [Tue, 20 Jun 2023 14:29:47 +0000 (16:29 +0200)]
Drop xorg-x11-font-utils requirement for RHEL 9
They've patched their Xorg sources to no longer require this package.
Pierre Ossman [Thu, 15 Jun 2023 07:26:38 +0000 (09:26 +0200)]
Merge branch 'noxtest' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Wed, 14 Jun 2023 15:13:21 +0000 (17:13 +0200)]
Fix missing XRandR build
Make sure we can actually build without XRandR libraries.
Pierre Ossman [Wed, 14 Jun 2023 15:10:44 +0000 (17:10 +0200)]
Fix missing XFixes build
Make sure we can actually build without XFixes libraries.
Pierre Ossman [Wed, 14 Jun 2023 15:07:17 +0000 (17:07 +0200)]
Fix missing XTest build
Make sure we can actually build without XTest libraries.
Pierre Ossman [Tue, 13 Jun 2023 07:37:04 +0000 (09:37 +0200)]
Remove unneeded "using namespace"
The need for these must have got lost somewhere in the type cleanup.
Pierre Ossman [Mon, 17 Apr 2023 14:56:12 +0000 (16:56 +0200)]
Avoid wildcards in cmake rules
They are not fully supported and break with some backends, like Ninja.
Pierre Ossman [Mon, 17 Apr 2023 13:55:17 +0000 (15:55 +0200)]
Handle REQUIRED in our CMake "find" modules
These are expected to abort if they fail to find the relevant software
and "REQUIRED" is specified.
Pierre Ossman [Thu, 30 Mar 2023 19:00:12 +0000 (21:00 +0200)]
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.
Pierre Ossman [Fri, 24 Mar 2023 18:34:27 +0000 (19:34 +0100)]
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.
Pierre Ossman [Thu, 30 Mar 2023 19:25:02 +0000 (21:25 +0200)]
Include Debian debug files in artefacts
Pierre Ossman [Thu, 30 Mar 2023 19:20:22 +0000 (21:20 +0200)]
Raise Debian packaging version
Get in sync with what's recommended these days.
Pierre Ossman [Thu, 30 Mar 2023 12:43:30 +0000 (14:43 +0200)]
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.
Pierre Ossman [Thu, 30 Mar 2023 12:56:46 +0000 (14:56 +0200)]
Remove unnecessary ; from build scripts
The newlines aren't stripped, so they are quite sufficient separators
for the commands.
Pierre Ossman [Sat, 25 Mar 2023 12:12:13 +0000 (13:12 +0100)]
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.
Samuel Mannehed [Fri, 24 Mar 2023 12:16:55 +0000 (13:16 +0100)]
Update copyright year in README
Pierre Ossman [Thu, 2 Mar 2023 13:33:50 +0000 (14:33 +0100)]
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.
Pierre Ossman [Wed, 8 Mar 2023 17:15:33 +0000 (18:15 +0100)]
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.
Pierre Ossman [Thu, 2 Mar 2023 10:09:57 +0000 (11:09 +0100)]
Merge branch 'types' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Tue, 28 Feb 2023 15:08:41 +0000 (16:08 +0100)]
Merge branch 'vncsession-create-homedir' of https://github.com/zpytela/tigervnc
Pierre Ossman [Tue, 28 Feb 2023 15:01:46 +0000 (16:01 +0100)]
Merge branch 'master-clipboard-check-state-before-access' of https://github.com/MarkMielke/tigervnc
Pierre Ossman [Tue, 28 Feb 2023 15:00:15 +0000 (16:00 +0100)]
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.
Мирослав Николић [Sun, 26 Feb 2023 11:27:00 +0000 (12:27 +0100)]
Update Serbian translation
Zdenek Pytela [Mon, 16 Jan 2023 11:35:40 +0000 (12:35 +0100)]
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
Mark Mielke [Mon, 20 Feb 2023 05:38:52 +0000 (00:38 -0500)]
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.
Pierre Ossman [Sat, 18 Feb 2023 14:58:51 +0000 (15:58 +0100)]
Merge "Pixel" type in to PixelFormat header
It's a type specific to that class, so let's keep them close for
clarity.
Pierre Ossman [Thu, 9 Feb 2023 10:30:37 +0000 (11:30 +0100)]
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.
Pierre Ossman [Fri, 6 Jan 2023 14:31:24 +0000 (15:31 +0100)]
Use operator overloading for comparison
It is much more natural than custom methods for this very common
operation.
Pierre Ossman [Thu, 12 Jan 2023 06:58:18 +0000 (07:58 +0100)]
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.
Pierre Ossman [Sun, 20 Nov 2022 12:25:23 +0000 (13:25 +0100)]
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.
Pierre Ossman [Fri, 27 Jan 2023 11:32:02 +0000 (12:32 +0100)]
Remove unneeded header from SDesktop.h
It doesn't use any exceptions, so stop including the header for it.
Pierre Ossman [Fri, 27 Jan 2023 09:52:53 +0000 (10:52 +0100)]
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.
Pierre Ossman [Mon, 23 Jan 2023 19:15:28 +0000 (20:15 +0100)]
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.
Pierre Ossman [Mon, 23 Jan 2023 19:04:15 +0000 (20:04 +0100)]
Use standard C string functions
It's just confusing that we have our own variety that isn't compatible.
Pierre Ossman [Mon, 23 Jan 2023 18:55:20 +0000 (19:55 +0100)]
Remove custom CharArray type
It has now been replaced, mostly by std::string, so remove the actual
type definition.
Pierre Ossman [Tue, 17 Jan 2023 15:38:59 +0000 (16:38 +0100)]
Use std::string for string memory management
Avoids a bit of complexity by delegating that handling to a string
object.
Pierre Ossman [Fri, 13 Jan 2023 11:47:48 +0000 (12:47 +0100)]
Use std::string instead of CharArray
Let's use a more common type instead of something homegrown. Should be
more familiar to new developers.
Pierre Ossman [Sun, 15 Jan 2023 13:01:28 +0000 (14:01 +0100)]
Use std::vector for temporary char arrays
It's more standard and familiar than our custom CharArray type, and it
still gives us automatic freeing of the buffer.
We could probably have used std::unique_ptr instead, but we are
currently targeting older compilers where C++11 isn't standard yet.
Pierre Ossman [Sun, 15 Jan 2023 13:00:12 +0000 (14:00 +0100)]
Free char buffer directly
It's extreme overkill to inherit from CharArray just to get the
automatic freeing of the buffer when the object is destroyed.
Pierre Ossman [Wed, 11 Jan 2023 16:21:56 +0000 (17:21 +0100)]
Make strSplit() simpler and safer
Get rid of all the magical re-allocation and shuffling and instead just
return a new set of strings that is fully splitted. Will consume a bit
more memory, but is a lot safer to use as there is less confusion about
ownership of memory.
Pierre Ossman [Tue, 10 Jan 2023 13:30:37 +0000 (14:30 +0100)]
Return std::string instead of dynamic allocations
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.
Pierre Ossman [Tue, 10 Jan 2023 18:23:50 +0000 (19:23 +0100)]
Specify expected array size in arguments
The compiler doesn't enforce this, but it at least documents the
expected array size.
Pierre Ossman [Sun, 15 Jan 2023 13:41:47 +0000 (14:41 +0100)]
Use fixed size character buffer
We know the needed space here, so let's keep it simple with a constant
size string buffer.
Pierre Ossman [Tue, 17 Jan 2023 18:09:26 +0000 (19:09 +0100)]
Remove trailing slash from getvnchomedir()
It should return a path to the directory itself, just like its sister
function getuserhomedir().
Pierre Ossman [Tue, 17 Jan 2023 18:03:25 +0000 (19:03 +0100)]
Namespace directory functions
All library functions should be in a proper namespace.
Pierre Ossman [Fri, 13 Jan 2023 10:15:36 +0000 (11:15 +0100)]
Better fallback for missing peer address
A blank string might be very confusing, depending on where this will be
used. Let's give something more visible back in the cases where we
cannot get the proper name for the peer.
Pierre Ossman [Fri, 13 Jan 2023 10:14:21 +0000 (11:14 +0100)]
Return static char buffer from some methods
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.
Pierre Ossman [Tue, 17 Jan 2023 17:37:04 +0000 (18:37 +0100)]
Replace tabs with spaces
Use the same indentation we use in all other files.
Pierre Ossman [Mon, 23 Jan 2023 19:08:43 +0000 (20:08 +0100)]
Use string literal instead of dynamic buffer
These don't need to be changed, so let's just keep it simple with a
constant string literal.
Pierre Ossman [Mon, 23 Jan 2023 19:00:49 +0000 (20:00 +0100)]
Remove unneded string duplication
It's unclear why this was initially added. The function takes string
constants, so it is not going to modify these.
Pierre Ossman [Tue, 17 Jan 2023 15:49:01 +0000 (16:49 +0100)]
Remove unneeded CharArray:s
Avoid complicating things by moving things in to a second buffer here as
there is no need for it.
Pierre Ossman [Tue, 10 Jan 2023 18:26:48 +0000 (19:26 +0100)]
Use StringParameters directly
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.
Pierre Ossman [Tue, 10 Jan 2023 20:24:21 +0000 (21:24 +0100)]
Get rid of TCHAR magic
We never use Windows' "UNICODE" mode anyway, so let's get rid of this
complexity.
Pierre Ossman [Sun, 15 Jan 2023 15:55:34 +0000 (16:55 +0100)]
Return std::vector instead of dynamic allocation
This makes memory management more clear and robust when using these
helper functions.
Pierre Ossman [Thu, 5 Jan 2023 17:17:07 +0000 (18:17 +0100)]
Avoid duplicating configuration setting
Let the string helpers call the more fancy setParam(). This makes sure
we can avoid duplicating things.
Pierre Ossman [Sat, 4 Feb 2023 12:07:04 +0000 (13:07 +0100)]
Make sure length is reset on assignment
Otherwise the old length is preserved, which will result in NULL pointer
dereferencing if the parameter is ever accessed.
Pierre Ossman [Thu, 17 Nov 2022 14:32:48 +0000 (15:32 +0100)]
Clean up BinaryParameter typing
This is explicitly a byte sequence, so let's try to keep a consistent
typing.
Pierre Ossman [Thu, 17 Nov 2022 14:04:20 +0000 (15:04 +0100)]
Move hex conversion helpers to util
These are used here and there so let's make them more general rather
than hiding them in the stream classes.
Fabio T [Thu, 2 Feb 2023 21:57:00 +0000 (21:57 +0000)]
Update Friulian translation
Pierre Ossman [Mon, 9 Jan 2023 18:01:35 +0000 (19:01 +0100)]
Use std::vector for basic data arrays
Avoid our own custom types in favour of what's already included with
C++.
Pierre Ossman [Sat, 10 Sep 2022 11:19:41 +0000 (13:19 +0200)]
Use stdint types
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
Pierre Ossman [Sat, 10 Sep 2022 11:48:53 +0000 (13:48 +0200)]
Use templates for optimized code
Avoid preprocessor magic and instead rely on templating to generate
optimized functions for performance critical code.
Pierre Ossman [Mon, 30 Jan 2023 19:23:18 +0000 (20:23 +0100)]
Remove old mingw CMake checks
This should have been removed with the code using these defines in
03ca975 .
Pierre Ossman [Tue, 17 Jan 2023 11:57:07 +0000 (12:57 +0100)]
Fix CRLF line endings
Everything else uses LF line endings, so fix up the few stray ones.
Pierre Ossman [Tue, 10 Jan 2023 19:00:42 +0000 (20:00 +0100)]
Merge branch 'libtool' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Wed, 16 Nov 2022 06:59:55 +0000 (07:59 +0100)]
Create .la files at the end of the cmake run
We might not have all the necessary information, e.g. all targets might
not exist yet, until we're done going through all CMakeLists.
Pierre Ossman [Wed, 16 Nov 2022 06:58:55 +0000 (07:58 +0100)]
Bail on missing libraries
They may be crucial, so refuse to continue if this happens.
Pierre Ossman [Wed, 16 Nov 2022 06:57:44 +0000 (07:57 +0100)]
Fall back to dynamic libraries in .la files
This is what the linker does, so we should do the same for correct
behaviour.
Pierre Ossman [Wed, 16 Nov 2022 06:56:41 +0000 (07:56 +0100)]
Respect library search paths
Things might be in odd places, so make sure we respect where we're told
to look for libraries.
Pierre Ossman [Wed, 16 Nov 2022 06:55:03 +0000 (07:55 +0100)]
Include other targets in .la files
We have internal dependencies that should be respected, as otherwise it
will be up to the user of the .la file to figure out the correct order
of the libraries.
Pierre Ossman [Wed, 16 Nov 2022 14:48:32 +0000 (15:48 +0100)]
Handle alternative library suffixes
I think this only affects macOS at the moment where they also have .tbd
files for linking.
Pierre Ossman [Wed, 16 Nov 2022 06:54:01 +0000 (07:54 +0100)]
Make sure frameworks are included in .la files
We don't really use the .la files for macOS at the moment, but let's try
to be prepared.
Pierre Ossman [Wed, 16 Nov 2022 06:52:02 +0000 (07:52 +0100)]
Remove unnecessary regexp \\
This serves no useful purpose as we have no reason to suspect there will
be a dangerous first character in these variables.
Pierre Ossman [Wed, 16 Nov 2022 06:48:31 +0000 (07:48 +0100)]
Fix static library check regexp
Not sure how the old one ever worked as it incorrectly just tried to
match last character and nothing else.
Pierre Ossman [Wed, 16 Nov 2022 06:46:50 +0000 (07:46 +0100)]
Get target libraries from INTERFACE_LINK_LIBRARIES
<target>_LIB_DEPENDS is an internal variable that contains lots of other
weird stuff.
Pierre Ossman [Wed, 16 Nov 2022 06:45:58 +0000 (07:45 +0100)]
Use correct FATAL_ERROR CMake option
Pierre Ossman [Thu, 5 Jan 2023 15:56:14 +0000 (16:56 +0100)]
Merge branch 'wextra' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Wed, 4 Jan 2023 15:22:13 +0000 (16:22 +0100)]
Use __attribute__:s directly
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.
Pierre Ossman [Wed, 4 Jan 2023 15:35:47 +0000 (16:35 +0100)]
Enable more warnings by default
These are also useful warnings that tend to find real bugs, so let's
enable then.
The downside is they require us to mark certain things so the compiler
knows if they were on purpose or not.