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

2023 dec upstream #10

Merged
merged 79 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
1d0b421
GUACAMOLE-600: Add support for setting the Telnet connection timeout.
necouchman Feb 16, 2023
9859a72
GUACAMOLE-1802: Switch memory allocation back to _aligned_malloc due …
necouchman Jun 7, 2023
5a08aea
GUACAMOLE-1802: Merge replacement of _aligned_recalloc() with _aligne…
mike-jumper Jun 7, 2023
48ac067
Merge 1.5.3 changes back to master.
mike-jumper Jun 7, 2023
162a75f
GUACAMOLE-1804: Support mac style paste shortcut.
jmuehlner Jun 7, 2023
98f9221
GUACAMOLE-1804: Merge support for pasting in terminal via Mac-style "…
mike-jumper Jun 8, 2023
c73c37b
GUACAMOLE-1805: Ignore unhandled copy shortcuts in terminal to avoid …
jmuehlner Jun 8, 2023
1aeba8b
GUACAMOLE-1805: Merge ignore unhandled copy shortcuts in terminal to …
necouchman Jun 8, 2023
b43b2d9
GUACAMOLE-1113: Support right hand modifiers in terminal.
jmuehlner Jun 8, 2023
e94b0a9
GUACAMOLE-1113: Merge support for right hand modifiers in terminal em…
mike-jumper Jun 13, 2023
1f14982
GUACAMOLE-1473: Disable AltGr handling for RDP keyboard layouts that …
jmuehlner Jun 14, 2023
1e9777a
GUACAMOLE-1473: Merge removal of AltGr from RDP keyboard layouts that…
mike-jumper Jun 16, 2023
f2b9aaf
GUACAMOLE-1290: Add support for ssh certificate authentication
Tejaswikandula Jun 28, 2023
691deb2
GUACAMOLE-1816: Bump server versions to 1.5.3.
necouchman Jul 3, 2023
1f2ecdf
GUACAMOLE-1816: Merge version bump to 1.5.3.
mike-jumper Jul 4, 2023
870cc5f
Merge 1.5.3 changes back to master.
mike-jumper Jul 4, 2023
766b9f6
GUACAMOLE-1290: Minor changes to comments
Tejaswikandula Jul 11, 2023
80598ae
GUACAMOLE-1290: Merge support for ssh public certificate authentication
necouchman Aug 1, 2023
a31bde1
GUACAMOLE-1850: Add locking around cursor to ensure cairo display is …
jmuehlner Aug 29, 2023
2cb75e8
GUACAMOLE-1846: Synchronize new users with the connection state in ba…
jmuehlner Aug 11, 2023
a7443a5
GUACAMOLE-1846: Fix __write_all() to return length as documented.
jmuehlner Aug 22, 2023
317e733
GUACAMOLE-1846: Sync data to all pending users using broadcast socket.
jmuehlner Aug 22, 2023
8824f2c
GUACAMOLE-1846: Migrate away from unsupported atomic state for pendin…
jmuehlner Aug 23, 2023
b02abfd
GUACAMOLE-1846: Add error handling support to join pending handler.
jmuehlner Aug 24, 2023
826cb78
GUACAMOLE-1846: Ensure that stuck child processes are nonetheless cle…
jmuehlner Aug 24, 2023
6fda990
GUACAMOLE-1846: Merge batching of joining users / correction to user …
mike-jumper Aug 29, 2023
5e0fb22
GUACAMOLE-1850: Merge additional locking around guac_common_cursor.
mike-jumper Aug 29, 2023
eae2428
Merge 1.5.4 changes back to master.
mike-jumper Aug 29, 2023
3b7495d
GUACAMOLE-1846: Ensure successful builds on older GCC.
jmuehlner Aug 29, 2023
2769e5f
GUACAMOLE-1846: Clean up rwlock code for public consumption.
jmuehlner Aug 30, 2023
171219c
GUACAMOLE-1846: Merge correction to build failures on older GCC (incl…
mike-jumper Aug 30, 2023
d44815d
Merge 1.5.4 changes back to master.
mike-jumper Aug 30, 2023
d7ad603
GUACAMOLE-377: Correct guac_common_display_dup() for compatibility wi…
mike-jumper Aug 30, 2023
fe24e2d
GUACAMOLE-377: Merge correct guac_common_display_dup() for compatibil…
necouchman Aug 30, 2023
694b3fc
GUACAMOLE-600: Merge support for setting the Telnet connection timeout.
mike-jumper Sep 6, 2023
fa4209c
GUACAMOLE-1332: Add support for certificate fingerprints and auto-acc…
necouchman Jul 20, 2023
d592106
GUACAMOLE-1332: Merge support for RDP certificate fingerprints and au…
mike-jumper Sep 11, 2023
96a20ac
GUACAMOLE-1846: Skip user promotion entirely if there are no pending …
jmuehlner Sep 12, 2023
2dbd1f7
GUACAMOLE-1846: Merge correction ensuring join_pending_handler is onl…
mike-jumper Sep 13, 2023
125e33c
Merge 1.5.4 changes back to master.
mike-jumper Sep 13, 2023
13e22c6
GUACAMOLE-1846: Check for NULLs before attempting to sync state in jo…
jmuehlner Sep 29, 2023
4e1983a
GUACAMOLE-1846: Merge check for NULLs before attempting to sync state…
necouchman Sep 30, 2023
9787017
Merge 1.5.4 changes back to master.
necouchman Sep 30, 2023
a01b7d3
GUACAMOLE-1867: Add convenience functions and macros for memory manag…
mike-jumper Oct 13, 2023
b6d9947
GUACAMOLE-1867: Exclude PRIV_* symbols and private headers from publi…
mike-jumper Oct 18, 2023
0fdc06a
GUACAMOLE-1867: Migrate libguac to new memory management functions.
mike-jumper Oct 14, 2023
afba548
GUACAMOLE-1867: Migrate guacd to new memory management functions.
mike-jumper Oct 20, 2023
e4057c2
GUACAMOLE-1867: Migrate common convenience library to new memory mana…
mike-jumper Oct 20, 2023
dfb7084
GUACAMOLE-1867: Migrate VNC to new memory management functions.
mike-jumper Oct 14, 2023
f081157
GUACAMOLE-1867: Migrate RDP to new memory management functions.
mike-jumper Oct 15, 2023
0c538b0
GUACAMOLE-1867: Migrate terminal emulator to new memory management fu…
mike-jumper Oct 16, 2023
9447181
GUACAMOLE-1867: Migrate SSH to new memory management functions.
mike-jumper Oct 16, 2023
cf10398
GUACAMOLE-1867: Migrate telnet to new memory management functions.
mike-jumper Oct 16, 2023
fc6195c
GUACAMOLE-1867: Migrate Kubernetes to new memory management functions.
mike-jumper Oct 16, 2023
bbf84f4
GUACAMOLE-1867: Migrate PulseAudio convenience library to new memory …
mike-jumper Oct 16, 2023
944370b
GUACAMOLE-1867: Migrate guaclog utility to new memory management func…
mike-jumper Oct 16, 2023
60ae352
GUACAMOLE-1867: Migrate guacenc utility to new memory management func…
mike-jumper Oct 20, 2023
7f6cf20
GUACAMOLE-1867: Add *_or_die() variant of guac_mem_realloc().
mike-jumper Oct 23, 2023
690808d
GUACAMOLE-1867: Merge new libguac memory convenience functions.
jmuehlner Oct 26, 2023
bb14ee9
Merge 1.5.4 changes back to master.
jmuehlner Oct 26, 2023
9f82d98
GUACAMOLE-1867: Explicitly link unit tests requiring libguac.
mike-jumper Oct 26, 2023
5ad2650
GUACAMOLE-1867: Merge explicitly link unit tests requiring libguac.
necouchman Oct 26, 2023
5b2eb7b
Merge 1.5.4 changes back to master.
necouchman Oct 26, 2023
3e5a2ab
GUACAMOLE-1867: Fix typo in memory convenience functions (ssize_t -> …
mike-jumper Oct 26, 2023
db00785
GUACAMOLE-1867: Merge fix typo in memory convenience functions (ssize…
necouchman Oct 26, 2023
8d3414e
Merge 1.5.4 changes back to master.
necouchman Oct 26, 2023
4c467d5
GUACAMOLE-1290: Migrate SSH certificate auth support to new memory ma…
mike-jumper Oct 26, 2023
f339b48
GUACAMOLE-1290: Merge migration of SSH certificate auth support to ne…
jmuehlner Oct 26, 2023
96704c5
GUACAMOLE-1869: Aligned library names
sbluhm Oct 20, 2023
c60f40c
GUACAMOLE-1875: Check return values of WebP API functions.
vrabaud Oct 26, 2023
88ece72
GUACAMOLE-1875: Merge check return values of WebP API functions.
necouchman Nov 7, 2023
8e3d759
GUACAMOLE-1869: Merge aligned library names in ./configure output
necouchman Nov 7, 2023
3a6c33a
GUACAMOLE-1886: Bump version numbers to 1.5.4.
mike-jumper Nov 22, 2023
e582b96
GUACAMOLE-1886: Bump libguac to new soversion (interfaces changed).
mike-jumper Nov 22, 2023
9045071
GUACAMOLE-1886: Bump libguac-terminal soversion to reflect new interf…
mike-jumper Nov 22, 2023
5504d83
GUACAMOLE-1886: Merge bump version numbers for 1.5.4.
necouchman Nov 22, 2023
f0ab665
Merge 1.5.4 changes back to master.
necouchman Nov 22, 2023
994a353
Merge branch 'apache:master' into 2023-dec-upstream
gyorgykt Dec 19, 2023
d6410af
Update Dockerfile
gyorgykt Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ARG ALPINE_BASE_IMAGE=latest
FROM alpine:${ALPINE_BASE_IMAGE} AS builder

# Install build dependencies
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing openssl1.1-compat-dev
RUN apk add --no-cache \
autoconf \
automake \
Expand All @@ -40,7 +41,6 @@ RUN apk add --no-cache \
libtool \
libwebp-dev \
make \
openssl1.1-compat-dev \
pango-dev \
pulseaudio-dev \
util-linux-dev
Expand Down Expand Up @@ -167,6 +167,7 @@ ENV GUACD_LOG_LEVEL=info
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}

# Bring runtime environment up to date and install runtime dependencies
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing libssl1.1 libcrypto1.1
RUN apk add --no-cache \
ca-certificates \
ghostscript \
Expand Down
2 changes: 1 addition & 1 deletion bin/guacctl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ error() {
##
usage() {
cat >&2 <<END
guacctl 1.5.2, Apache Guacamole terminal session control utility.
guacctl 1.5.4, Apache Guacamole terminal session control utility.
Usage: guacctl [OPTION] [FILE or NAME]...

-d, --download download each of the files listed.
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

AC_PREREQ([2.61])
AC_INIT([guacamole-server], [1.5.2])
AC_INIT([guacamole-server], [1.5.4])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AM_SILENT_RULES([yes])
Expand Down Expand Up @@ -1243,7 +1243,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
freerdp2 ............ ${have_freerdp2}
pango ............... ${have_pango}
libavcodec .......... ${have_libavcodec}
libavformat.......... ${have_libavformat}
libavformat ......... ${have_libavformat}
libavutil ........... ${have_libavutil}
libssh2 ............. ${have_libssh2}
libssl .............. ${have_ssl}
Expand Down
3 changes: 2 additions & 1 deletion doc/libguac/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ SHOW_INCLUDE_FILES = NO
#

CASE_SENSE_NAMES = YES
EXCLUDE_SYMBOLS = __* guac_palette*
EXCLUDE_SYMBOLS = __* guac_palette* PRIV_*
EXCLUDE_PATTERNS = **/private/*.h
FILE_PATTERNS = *.h
INPUT = ../../src/libguac/guacamole
JAVADOC_AUTOBRIEF = YES
Expand Down
6 changes: 4 additions & 2 deletions src/common-ssh/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <openssl/bn.h>
#include <openssl/ossl_typ.h>

#include <guacamole/mem.h>

#include <stdint.h>
#include <string.h>
#include <stdlib.h>
Expand Down Expand Up @@ -67,7 +69,7 @@ void guac_common_ssh_buffer_write_bignum(char** buffer, const BIGNUM* value) {

/* Allocate output buffer, add padding byte */
length = BN_num_bytes(value);
bn_buffer = malloc(length);
bn_buffer = guac_mem_alloc(length);

/* Convert BIGNUM */
BN_bn2bin(value, bn_buffer);
Expand All @@ -84,7 +86,7 @@ void guac_common_ssh_buffer_write_bignum(char** buffer, const BIGNUM* value) {
memcpy(*buffer, bn_buffer, length);
*buffer += length;

free(bn_buffer);
guac_mem_free(bn_buffer);

}

Expand Down
2 changes: 1 addition & 1 deletion src/common-ssh/common-ssh/ssh.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
* @return
* A newly-allocated string containing the credentials provided by
* the user, which must be freed by a call to free().
* the user, which must be freed by a call to guac_mem_free().
*/
typedef char* guac_ssh_credential_handler(guac_client* client, char* cred_name);

Expand Down
24 changes: 24 additions & 0 deletions src/common-ssh/common-ssh/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ typedef struct guac_common_ssh_user {
*/
guac_common_ssh_key* private_key;

/**
* The public key which should be used to authenticate this user, if any,
* or NULL if a password or just a private key will be used instead.
*/
char* public_key;

} guac_common_ssh_user;

/**
Expand Down Expand Up @@ -104,5 +110,23 @@ void guac_common_ssh_user_set_password(guac_common_ssh_user* user,
int guac_common_ssh_user_import_key(guac_common_ssh_user* user,
char* private_key, char* passphrase);

/**
* Imports the given public key, associating that key with the given user.
* If the public key is imported successfully, it will be used for
* future authentication attempts.
*
* @param user
* The user to associate with the given private key.
*
* @param public_key
* The base64-encoded public key to import.
*
* @return
* Zero if public key is successfully imported, or non-zero if the
* public key could not be imported due to an error.
*/
int guac_common_ssh_user_import_public_key(guac_common_ssh_user* user,
char* public_key);

#endif

14 changes: 7 additions & 7 deletions src/common-ssh/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "common-ssh/buffer.h"
#include "common-ssh/key.h"

#include <guacamole/mem.h>
#include <guacamole/string.h>

#include <openssl/bio.h>
Expand Down Expand Up @@ -137,13 +138,13 @@ guac_common_ssh_key* guac_common_ssh_key_alloc(char* data, int length,
if (is_passphrase_needed(data, length) && (passphrase == NULL || *passphrase == '\0'))
return NULL;

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

/* Copy private key to structure */
key->private_key_length = length;
key->private_key = malloc(length);
key->private_key = guac_mem_alloc(length);
memcpy(key->private_key, data, length);
key->passphrase = strdup(passphrase);
key->passphrase = guac_strdup(passphrase);

return key;

Expand All @@ -157,10 +158,9 @@ const char* guac_common_ssh_key_error() {
}

void guac_common_ssh_key_free(guac_common_ssh_key* key) {

free(key->private_key);
free(key->passphrase);
free(key);
guac_mem_free(key->private_key);
guac_mem_free(key->passphrase);
guac_mem_free(key);
}

int guac_common_ssh_verify_host_key(LIBSSH2_SESSION* session, guac_client* client,
Expand Down
21 changes: 11 additions & 10 deletions src/common-ssh/sftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "common-ssh/ssh.h"

#include <guacamole/client.h>
#include <guacamole/mem.h>
#include <guacamole/object.h>
#include <guacamole/protocol.h>
#include <guacamole/socket.h>
Expand Down Expand Up @@ -622,7 +623,7 @@ static int guac_common_ssh_sftp_ls_ack_handler(guac_user* user,
if (status != GUAC_PROTOCOL_STATUS_SUCCESS) {
libssh2_sftp_closedir(list_state->directory);
guac_user_free_stream(user, stream);
free(list_state);
guac_mem_free(list_state);
return 0;
}

Expand Down Expand Up @@ -674,7 +675,7 @@ static int guac_common_ssh_sftp_ls_ack_handler(guac_user* user,

/* Clean up resources */
libssh2_sftp_closedir(list_state->directory);
free(list_state);
guac_mem_free(list_state);

/* Signal of stream */
guac_protocol_send_end(user->socket, stream);
Expand Down Expand Up @@ -774,7 +775,7 @@ static int guac_common_ssh_sftp_get_handler(guac_user* user,

/* Init directory listing state */
guac_common_ssh_sftp_ls_state* list_state =
malloc(sizeof(guac_common_ssh_sftp_ls_state));
guac_mem_alloc(sizeof(guac_common_ssh_sftp_ls_state));

list_state->directory = dir;
list_state->filesystem = filesystem;
Expand All @@ -786,7 +787,7 @@ static int guac_common_ssh_sftp_get_handler(guac_user* user,
if (length >= sizeof(list_state->directory_name)) {
guac_user_log(user, GUAC_LOG_INFO, "Unable to read directory "
"\"%s\": Path too long", fullpath);
free(list_state);
guac_mem_free(list_state);
return 0;
}

Expand Down Expand Up @@ -969,7 +970,7 @@ guac_common_ssh_sftp_filesystem* guac_common_ssh_create_sftp_filesystem(

/* Allocate data for SFTP session */
guac_common_ssh_sftp_filesystem* filesystem =
malloc(sizeof(guac_common_ssh_sftp_filesystem));
guac_mem_alloc(sizeof(guac_common_ssh_sftp_filesystem));

/* Associate SSH session with SFTP data and user */
filesystem->ssh_session = session;
Expand All @@ -984,15 +985,15 @@ guac_common_ssh_sftp_filesystem* guac_common_ssh_create_sftp_filesystem(
root_path)) {
guac_client_log(session->client, GUAC_LOG_WARNING, "Cannot create "
"SFTP filesystem - \"%s\" is not a valid path.", root_path);
free(filesystem);
guac_mem_free(filesystem);
return NULL;
}

/* Generate filesystem name from root path if no name is provided */
if (name != NULL)
filesystem->name = strdup(name);
filesystem->name = guac_strdup(name);
else
filesystem->name = strdup(filesystem->root_path);
filesystem->name = guac_strdup(filesystem->root_path);

/* Initially upload files to current directory */
strcpy(filesystem->upload_path, ".");
Expand All @@ -1009,8 +1010,8 @@ void guac_common_ssh_destroy_sftp_filesystem(
libssh2_sftp_shutdown(filesystem->sftp_session);

/* Free associated memory */
free(filesystem->name);
free(filesystem);
guac_mem_free(filesystem->name);
guac_mem_free(filesystem);

}

28 changes: 17 additions & 11 deletions src/common-ssh/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <guacamole/client.h>
#include <guacamole/fips.h>
#include <guacamole/mem.h>
#include <guacamole/string.h>
#include <libssh2.h>

#ifdef LIBSSH2_USES_GCRYPT
Expand Down Expand Up @@ -120,7 +122,7 @@ static void guac_common_ssh_openssl_init_locks(int count) {

/* Allocate required number of locks */
guac_common_ssh_openssl_locks =
malloc(sizeof(pthread_mutex_t) * count);
guac_mem_alloc(sizeof(pthread_mutex_t), count);

/* Initialize each lock */
for (i=0; i < count; i++)
Expand All @@ -147,7 +149,7 @@ static void guac_common_ssh_openssl_free_locks(int count) {
pthread_mutex_destroy(&(guac_common_ssh_openssl_locks[i]));

/* Free lock array */
free(guac_common_ssh_openssl_locks);
guac_mem_free(guac_common_ssh_openssl_locks);

}
#endif
Expand Down Expand Up @@ -251,7 +253,7 @@ static void guac_common_ssh_kbd_callback(const char *name, int name_len,
/* Send password if only one prompt */
if (num_prompts == 1) {
char* password = common_session->user->password;
responses[0].text = strdup(password);
responses[0].text = guac_strdup(password);
responses[0].length = strlen(password);
}

Expand Down Expand Up @@ -284,6 +286,8 @@ static int guac_common_ssh_authenticate(guac_common_ssh_session* common_session)
/* Get user credentials */
guac_common_ssh_key* key = user->private_key;

char* public_key = user->public_key;

/* Validate username provided */
if (user->username == NULL) {
guac_client_abort(client, GUAC_PROTOCOL_STATUS_CLIENT_UNAUTHORIZED,
Expand Down Expand Up @@ -317,9 +321,11 @@ static int guac_common_ssh_authenticate(guac_common_ssh_session* common_session)
return 1;
}

int public_key_length = public_key == NULL ? 0 : strlen(public_key);

/* Attempt public key auth */
if (libssh2_userauth_publickey_frommemory(session, user->username,
username_len, NULL, 0, key->private_key,
username_len, public_key, public_key_length, key->private_key,
key->private_key_length, key->passphrase)) {

/* Abort on failure */
Expand Down Expand Up @@ -488,15 +494,15 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client,

/* Allocate new session */
guac_common_ssh_session* common_session =
malloc(sizeof(guac_common_ssh_session));
guac_mem_alloc(sizeof(guac_common_ssh_session));

/* Open SSH session */
LIBSSH2_SESSION* session = libssh2_session_init_ex(NULL, NULL,
NULL, common_session);
if (session == NULL) {
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR,
"Session allocation failed.");
free(common_session);
guac_mem_free(common_session);
close(fd);
return NULL;
}
Expand All @@ -516,7 +522,7 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client,
if (libssh2_session_handshake(session, fd)) {
guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR,
"SSH handshake failed.");
free(common_session);
guac_mem_free(common_session);
close(fd);
return NULL;
}
Expand All @@ -529,7 +535,7 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client,
if (!remote_hostkey) {
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR,
"Failed to get host key for %s", hostname);
free(common_session);
guac_mem_free(common_session);
close(fd);
return NULL;
}
Expand All @@ -552,7 +558,7 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client,
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR,
"Host key did not match any provided known host keys. %s", err_msg);

free(common_session);
guac_mem_free(common_session);
close(fd);
return NULL;
}
Expand All @@ -566,7 +572,7 @@ guac_common_ssh_session* guac_common_ssh_create_session(guac_client* client,

/* Attempt authentication */
if (guac_common_ssh_authenticate(common_session)) {
free(common_session);
guac_mem_free(common_session);
close(fd);
return NULL;
}
Expand Down Expand Up @@ -597,6 +603,6 @@ void guac_common_ssh_destroy_session(guac_common_ssh_session* session) {
libssh2_session_free(session->session);

/* Free all other data */
free(session);
guac_mem_free(session);

}
3 changes: 2 additions & 1 deletion src/common-ssh/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ test_common_ssh_CFLAGS = \
test_common_ssh_LDADD = \
@CUNIT_LIBS@ \
@COMMON_SSH_LTLIB@ \
@COMMON_LTLIB@
@COMMON_LTLIB@ \
@LIBGUAC_LTLIB@

#
# Autogenerate test runner
Expand Down
Loading