GUACAMOLE-194: Free SSH user for VNC+SFTP and RDP+SFTP only within client free.

This commit is contained in:
Michael Jumper 2017-02-26 15:02:48 -08:00
parent f23133043b
commit fb8a2766da
2 changed files with 0 additions and 8 deletions

View File

@ -956,7 +956,6 @@ void* guac_rdp_client_thread(void* data) {
if (guac_common_ssh_user_import_key(rdp_client->sftp_user, if (guac_common_ssh_user_import_key(rdp_client->sftp_user,
settings->sftp_private_key, settings->sftp_private_key,
settings->sftp_passphrase)) { settings->sftp_passphrase)) {
guac_common_ssh_destroy_user(rdp_client->sftp_user);
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR, guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR,
"Private key unreadable."); "Private key unreadable.");
return NULL; return NULL;
@ -983,7 +982,6 @@ void* guac_rdp_client_thread(void* data) {
/* Fail if SSH connection does not succeed */ /* Fail if SSH connection does not succeed */
if (rdp_client->sftp_session == NULL) { if (rdp_client->sftp_session == NULL) {
/* Already aborted within guac_common_ssh_create_session() */ /* Already aborted within guac_common_ssh_create_session() */
guac_common_ssh_destroy_user(rdp_client->sftp_user);
return NULL; return NULL;
} }
@ -999,8 +997,6 @@ void* guac_rdp_client_thread(void* data) {
/* Abort if SFTP connection fails */ /* Abort if SFTP connection fails */
if (rdp_client->sftp_filesystem == NULL) { if (rdp_client->sftp_filesystem == NULL) {
guac_common_ssh_destroy_session(rdp_client->sftp_session);
guac_common_ssh_destroy_user(rdp_client->sftp_user);
guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_UNAVAILABLE, guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_UNAVAILABLE,
"SFTP connection failed."); "SFTP connection failed.");
return NULL; return NULL;

View File

@ -243,7 +243,6 @@ void* guac_vnc_client_thread(void* data) {
if (guac_common_ssh_user_import_key(vnc_client->sftp_user, if (guac_common_ssh_user_import_key(vnc_client->sftp_user,
settings->sftp_private_key, settings->sftp_private_key,
settings->sftp_passphrase)) { settings->sftp_passphrase)) {
guac_common_ssh_destroy_user(vnc_client->sftp_user);
guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR, guac_client_abort(client, GUAC_PROTOCOL_STATUS_SERVER_ERROR,
"Private key unreadable."); "Private key unreadable.");
return NULL; return NULL;
@ -267,7 +266,6 @@ void* guac_vnc_client_thread(void* data) {
/* Fail if SSH connection does not succeed */ /* Fail if SSH connection does not succeed */
if (vnc_client->sftp_session == NULL) { if (vnc_client->sftp_session == NULL) {
/* Already aborted within guac_common_ssh_create_session() */ /* Already aborted within guac_common_ssh_create_session() */
guac_common_ssh_destroy_user(vnc_client->sftp_user);
return NULL; return NULL;
} }
@ -283,8 +281,6 @@ void* guac_vnc_client_thread(void* data) {
/* Abort if SFTP connection fails */ /* Abort if SFTP connection fails */
if (vnc_client->sftp_filesystem == NULL) { if (vnc_client->sftp_filesystem == NULL) {
guac_common_ssh_destroy_session(vnc_client->sftp_session);
guac_common_ssh_destroy_user(vnc_client->sftp_user);
guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR,
"SFTP connection failed."); "SFTP connection failed.");
return NULL; return NULL;