GAUCAMOLE-422: Add warning messages when TZ cannot be set.
This commit is contained in:
parent
d7ed452d69
commit
e2b4de9d95
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user