diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index f37c156e..78e97078 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -1280,8 +1280,15 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) { #endif /* Device redirection */ - if (guac_settings->timezone) - setenv("TZ", guac_settings->timezone, 1); + if (guac_settings->timezone) { + + /* Set the TZ env variable */ + if (setenv("TZ", guac_settings->timezone, 1)) { + guac_user_log(user, GUAC_LOG_WARNING, "Could not set TZ " + "variable. Received error %i", errno); + } + + } #ifdef LEGACY_RDPSETTINGS #ifdef HAVE_RDPSETTINGS_DEVICEREDIRECTION diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c index 9e79454b..22ba960f 100644 --- a/src/protocols/ssh/ssh.c +++ b/src/protocols/ssh/ssh.c @@ -257,8 +257,15 @@ void* ssh_client_thread(void* data) { } /* Set the client timezone */ - if (settings->timezone != NULL) - libssh2_channel_setenv(ssh_client->term_channel, "TZ", settings->timezone); + if (settings->timezone != NULL) { + if (libssh2_channel_setenv(ssh_client->term_channel, "TZ", + settings->timezone)) { + guac_client_log(client, GUAC_LOG_WARNING, + "Unable to set the timzeone: SSH server " + "refused to set \"TZ\" variable."); + } + } + #ifdef ENABLE_SSH_AGENT /* Start SSH agent forwarding, if enabled */