Skip to content

Commit

Permalink
GUACAMOLE-377: Merge new libguac "guac_display" rendering system.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuehlner authored Sep 29, 2024
2 parents c5702d1 + f5ecb6c commit b754d3f
Show file tree
Hide file tree
Showing 97 changed files with 10,229 additions and 3,306 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ doc/*/doxygen-output

# IDE metadata
nbproject/

# Compilation database, as may be generated by tools like Bear
.cache/
compile_commands.json
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ PKG_PROG_PKG_CONFIG()
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h time.h sys/time.h syslog.h unistd.h cairo/cairo.h pngstruct.h])

# Source characteristics
AC_DEFINE([_GNU_SOURCE], [1], [Uses GNU-specific APIs (if available)])
AC_DEFINE([_XOPEN_SOURCE], [700], [Uses X/Open and POSIX APIs])
AC_DEFINE([__BSD_VISIBLE], [1], [Uses BSD-specific APIs (if available)])

# Check for availability of non-portable sched_getaffinity() function (one of
# several possible routes for determining the number of available processors)
AC_CHECK_FUNCS([sched_getaffinity])

# Check for whether math library is required
AC_CHECK_LIB([m], [cos],
[MATH_LIBS=-lm],
Expand Down
13 changes: 10 additions & 3 deletions src/common-ssh/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,25 @@ guac_common_ssh_key* guac_common_ssh_key_alloc(char* data, int length,
* different key algorithms) we need to perform a heuristic here to check
* if a passphrase is needed. This could allow junk keys through that
* would never be able to auth. libssh2 should display errors to help
* admins track down malformed keys and delete or replace them.
*/
* admins track down malformed keys and delete or replace them. */

if (is_passphrase_needed(data, length) && (passphrase == NULL || *passphrase == '\0'))
return NULL;

guac_common_ssh_key* key = guac_mem_alloc(sizeof(guac_common_ssh_key));

/* NOTE: Older versions of libssh2 will at times ignore the declared key
* length and instead recalculate the length using strlen(). This has since
* been fixed, but as of this writing the fix has not yet been released.
* Below, we add our own null terminator to ensure that such calls to
* strlen() will work without issue. We can remove this workaround once
* copies of libssh2 that use strlen() on key data are not in common use. */

/* Copy private key to structure */
key->private_key_length = length;
key->private_key = guac_mem_alloc(length);
key->private_key = guac_mem_alloc(guac_mem_ckd_add_or_die(length, 1)); /* Extra byte added here for null terminator (see above) */
memcpy(key->private_key, data, length);
key->private_key[length] = '\0'; /* Manually-added null terminator (see above) */
key->passphrase = guac_strdup(passphrase);

return key;
Expand Down
2 changes: 0 additions & 2 deletions src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ noinst_HEADERS = \
common/clipboard.h \
common/cursor.h \
common/defaults.h \
common/display.h \
common/dot_cursor.h \
common/ibar_cursor.h \
common/iconv.h \
Expand All @@ -51,7 +50,6 @@ libguac_common_la_SOURCES = \
blank_cursor.c \
clipboard.c \
cursor.c \
display.c \
dot_cursor.c \
ibar_cursor.c \
iconv.c \
Expand Down
293 changes: 0 additions & 293 deletions src/common/common/display.h

This file was deleted.

Loading

0 comments on commit b754d3f

Please sign in to comment.