You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/11/12 17:13:56 UTC

[01/12] guacamole-server git commit: GUACAMOLE-422: Support timezone redirection in RDP via TZ variable.

Repository: guacamole-server
Updated Branches:
  refs/heads/master 381c5d1a7 -> 0d435e243


GUACAMOLE-422: Support timezone redirection in RDP via TZ variable.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/ffdc98d0
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/ffdc98d0
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/ffdc98d0

Branch: refs/heads/master
Commit: ffdc98d024e658dc868c6ba52e250e64dc25c6f1
Parents: 381c5d1
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Apr 10 21:31:50 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 14:09:23 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c | 15 +++++++++++++++
 src/protocols/rdp/rdp_settings.h |  5 +++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/ffdc98d0/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index a3bd348..21114d4 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -79,6 +79,7 @@ const char* GUAC_RDP_CLIENT_ARGS[] = {
     "disable-glyph-caching",
     "preconnection-id",
     "preconnection-blob",
+    "timezone",
 
 #ifdef ENABLE_COMMON_SSH
     "enable-sftp",
@@ -356,6 +357,11 @@ enum RDP_ARGS_IDX {
      */
     IDX_PRECONNECTION_BLOB,
 
+    /**
+     * The timezone to pass through to the RDP connection.
+     */
+    IDX_TIMEZONE,
+
 #ifdef ENABLE_COMMON_SSH
     /**
      * "true" if SFTP should be enabled for the RDP connection, "false" or
@@ -840,6 +846,11 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user,
     if (settings->server_layout == NULL)
         settings->server_layout = guac_rdp_keymap_find(GUAC_DEFAULT_KEYMAP);
 
+    /* Timezone if provied by client */
+    settings->timezone =
+        guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv,
+                IDX_TIMEZONE, NULL);
+
 #ifdef ENABLE_COMMON_SSH
     /* SFTP enable/disable */
     settings->enable_sftp =
@@ -1013,6 +1024,7 @@ void guac_rdp_settings_free(guac_rdp_settings* settings) {
     free(settings->remote_app);
     free(settings->remote_app_args);
     free(settings->remote_app_dir);
+    free(settings->timezone);
     free(settings->username);
     free(settings->printer_name);
 
@@ -1265,6 +1277,9 @@ 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);
+
 #ifdef LEGACY_RDPSETTINGS
 #ifdef HAVE_RDPSETTINGS_DEVICEREDIRECTION
     rdp_settings->device_redirection =  guac_settings->audio_enabled

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/ffdc98d0/src/protocols/rdp/rdp_settings.h
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h
index d521a87..ece399d 100644
--- a/src/protocols/rdp/rdp_settings.h
+++ b/src/protocols/rdp/rdp_settings.h
@@ -341,6 +341,11 @@ typedef struct guac_rdp_settings {
      */
     char* preconnection_blob;
 
+    /**
+     * The timezone to pass through to the RDP connection.
+     */
+    char* timezone;
+
 #ifdef ENABLE_COMMON_SSH
     /**
      * Whether SFTP should be enabled for the VNC connection.


[08/12] guacamole-server git commit: GUACAMOLE-422: Fix function declaration for pushing settings.

Posted by mj...@apache.org.
GUACAMOLE-422: Fix function declaration for pushing settings.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/9a944637
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/9a944637
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/9a944637

Branch: refs/heads/master
Commit: 9a944637be73570857034ab492342c54dd742cfd
Parents: 4bd1916
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 11 17:25:12 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 17:25:12 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/9a944637/src/protocols/rdp/rdp_settings.h
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h
index ece399d..6955ed5 100644
--- a/src/protocols/rdp/rdp_settings.h
+++ b/src/protocols/rdp/rdp_settings.h
@@ -552,13 +552,17 @@ extern const char* GUAC_RDP_CLIENT_ARGS[];
 /**
  * Save all given settings to the given freerdp instance.
  *
+ * @param client
+ *     The guac_client object providing the settings.
+ *
  * @param guac_settings
  *     The guac_rdp_settings object to save.
  *
  * @param rdp
  *     The RDP instance to save settings to.
  */
-void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp);
+void guac_rdp_push_settings(guac_client* client,
+        guac_rdp_settings* guac_settings, freerdp* rdp);
 
 /**
  * Returns the width of the RDP session display.


[06/12] guacamole-server git commit: GUACAMOLE-422: Revert addition of logging for setting TZ variable.

Posted by mj...@apache.org.
GUACAMOLE-422: Revert addition of logging for setting TZ variable.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/b3be9eb8
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/b3be9eb8
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/b3be9eb8

Branch: refs/heads/master
Commit: b3be9eb8692e6c1c4516f0905cb7e113d18dd190
Parents: 0b71559
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 11 16:07:20 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 16:07:20 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/b3be9eb8/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index 27553e3..e9b81c2 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -1281,15 +1281,8 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
 #endif
 
     /* Device redirection */
-    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);
-        }
-
-    }
+    if (guac_settings->timezone)
+        setenv("TZ", guac_settings->timezone, 1)
 
 #ifdef LEGACY_RDPSETTINGS
 #ifdef HAVE_RDPSETTINGS_DEVICEREDIRECTION


[05/12] guacamole-server git commit: GUACAMOLE-422: Add errno header.

Posted by mj...@apache.org.
GUACAMOLE-422: Add errno header.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/0b715590
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/0b715590
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/0b715590

Branch: refs/heads/master
Commit: 0b715590170139a17c33b931d4d10ee2ce9fb163
Parents: e2b4de9
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 11 15:48:02 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 15:48:02 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0b715590/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index 78e9707..27553e3 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -35,6 +35,7 @@
 #include "compat/winpr-wtypes.h"
 #endif
 
+#include <errno.h>
 #include <stddef.h>
 #include <string.h>
 


[11/12] guacamole-server git commit: GUACAMOLE-422: Fix spelling mistake.

Posted by mj...@apache.org.
GUACAMOLE-422: Fix spelling mistake.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/7b1ba3f2
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/7b1ba3f2
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/7b1ba3f2

Branch: refs/heads/master
Commit: 7b1ba3f2699de9a59d7819b6edc6992e02117e27
Parents: d1b3695
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Nov 12 12:09:51 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Nov 12 12:09:51 2018 -0500

----------------------------------------------------------------------
 src/protocols/ssh/ssh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/7b1ba3f2/src/protocols/ssh/ssh.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index 22ba960..9db545b 100644
--- a/src/protocols/ssh/ssh.c
+++ b/src/protocols/ssh/ssh.c
@@ -261,7 +261,7 @@ void* ssh_client_thread(void* data) {
         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 "
+                    "Unable to set the timezone: SSH server "
                     "refused to set \"TZ\" variable.");
         }
     }


[10/12] guacamole-server git commit: GUACAMOLE-422: Fix type in strerror()

Posted by mj...@apache.org.
GUACAMOLE-422: Fix type in strerror()


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/d1b36952
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/d1b36952
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/d1b36952

Branch: refs/heads/master
Commit: d1b369528288be97f79786bbf517fef185f6d4e0
Parents: f61539c
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Nov 12 11:56:57 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Nov 12 11:56:57 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/d1b36952/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index 810253d..88d9bc7 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -1286,7 +1286,7 @@ void guac_rdp_push_settings(guac_client* client,
         if (setenv("TZ", guac_settings->timezone, 1)) {
             guac_client_log(client, GUAC_LOG_WARNING,
                 "Unable to forward timezone: TZ environment variable "
-                "could not be set: %s", sterror(errno));
+                "could not be set: %s", strerror(errno));
         }
     }
 


[12/12] guacamole-server git commit: GUACAMOLE-422: Merge support for specifying the timezone of RDP and SSH sessions.

Posted by mj...@apache.org.
GUACAMOLE-422: Merge support for specifying the timezone of RDP and SSH sessions.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/0d435e24
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/0d435e24
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/0d435e24

Branch: refs/heads/master
Commit: 0d435e243579f15c84ddca1d44bbb33c7269e39a
Parents: 381c5d1 7b1ba3f
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Nov 12 09:12:19 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Nov 12 09:12:19 2018 -0800

----------------------------------------------------------------------
 src/protocols/rdp/rdp.c          |  2 +-
 src/protocols/rdp/rdp_settings.c | 28 +++++++++++++++++++++++++++-
 src/protocols/rdp/rdp_settings.h | 11 ++++++++++-
 src/protocols/ssh/settings.c     | 19 +++++++++++++++++++
 src/protocols/ssh/settings.h     |  5 +++++
 src/protocols/ssh/ssh.c          | 11 +++++++++++
 6 files changed, 73 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[02/12] guacamole-server git commit: GUACAMOLE-422: Add support for passing through TZ in SSH.

Posted by mj...@apache.org.
GUACAMOLE-422: Add support for passing through TZ in SSH.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/5536b836
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/5536b836
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/5536b836

Branch: refs/heads/master
Commit: 5536b836addb27dc6c8433b6afef2f9ad24d399d
Parents: ffdc98d
Author: Nick Couchman <vn...@apache.org>
Authored: Sat Jun 2 12:00:22 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 14:11:40 2018 -0500

----------------------------------------------------------------------
 src/protocols/ssh/settings.c | 18 ++++++++++++++++++
 src/protocols/ssh/settings.h |  4 ++++
 src/protocols/ssh/ssh.c      |  4 ++++
 3 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/5536b836/src/protocols/ssh/settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/settings.c b/src/protocols/ssh/settings.c
index 82f7eb2..820da51 100644
--- a/src/protocols/ssh/settings.c
+++ b/src/protocols/ssh/settings.c
@@ -61,6 +61,7 @@ const char* GUAC_SSH_CLIENT_ARGS[] = {
     "terminal-type",
     "scrollback",
     "locale",
+    "timezone",
     NULL
 };
 
@@ -246,6 +247,15 @@ enum SSH_ARGS_IDX {
      * variable to be set.
      */
     IDX_LOCALE,
+     
+    /**
+     * The timezone that is passed from the client system to the
+     * remote server, or null if not specified.  If set, and allowed
+     * by the remote SSH server, the TZ environment variable will be
+     * set on the remote session, causing the session to be localized
+     * to the specified timezone.
+     */
+    IDX_TIMEZONE,
 
     SSH_ARGS_COUNT
 };
@@ -410,6 +420,11 @@ guac_ssh_settings* guac_ssh_parse_args(guac_user* user,
         guac_user_parse_args_string(user, GUAC_SSH_CLIENT_ARGS, argv,
                 IDX_LOCALE, NULL);
 
+    /* Read the client timezone. */
+    settings->timezone =
+        guac_user_parse_args_string(user, GUAC_SSH_CLIENT_ARGS, argv,
+                IDX_TIMEZONE, NULL);
+
     /* Parsing was successful */
     return settings;
 
@@ -452,6 +467,9 @@ void guac_ssh_settings_free(guac_ssh_settings* settings) {
     /* Free locale */
     free(settings->locale);
 
+    /* Free the client timezone. */
+    free(settings->timezone);
+
     /* Free overall structure */
     free(settings);
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/5536b836/src/protocols/ssh/settings.h
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/settings.h b/src/protocols/ssh/settings.h
index 03abd91..e4d99e1 100644
--- a/src/protocols/ssh/settings.h
+++ b/src/protocols/ssh/settings.h
@@ -253,6 +253,10 @@ typedef struct guac_ssh_settings {
      * environment variable.
      */
     char* locale;
+    /** 
+     * The client timezone to pass to the remote system.
+     */
+    char* timezone;
 
 } guac_ssh_settings;
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/5536b836/src/protocols/ssh/ssh.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index 80b84de..9e79454 100644
--- a/src/protocols/ssh/ssh.c
+++ b/src/protocols/ssh/ssh.c
@@ -256,6 +256,10 @@ void* ssh_client_thread(void* data) {
         return NULL;
     }
 
+    /* Set the client timezone */
+    if (settings->timezone != NULL)
+        libssh2_channel_setenv(ssh_client->term_channel, "TZ", settings->timezone);
+
 #ifdef ENABLE_SSH_AGENT
     /* Start SSH agent forwarding, if enabled */
     if (ssh_client->enable_agent) {


[04/12] guacamole-server git commit: GAUCAMOLE-422: Add warning messages when TZ cannot be set.

Posted by mj...@apache.org.
GAUCAMOLE-422: Add warning messages when TZ cannot be set.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/e2b4de9d
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/e2b4de9d
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/e2b4de9d

Branch: refs/heads/master
Commit: e2b4de9d95571609e28c63d4b02583df6e4574a7
Parents: d7ed452
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 11 15:45:24 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 15:45:24 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c | 11 +++++++++--
 src/protocols/ssh/ssh.c          | 11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/e2b4de9d/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index f37c156..78e9707 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

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/e2b4de9d/src/protocols/ssh/ssh.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index 9e79454..22ba960 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 */


[07/12] guacamole-server git commit: GUACAMOLE-422: Add logging for RDP timzeone.

Posted by mj...@apache.org.
GUACAMOLE-422: Add logging for RDP timzeone.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/4bd19160
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/4bd19160
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/4bd19160

Branch: refs/heads/master
Commit: 4bd19160ded3e824fb46ea066b08182eafffdbeb
Parents: b3be9eb
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 11 17:22:03 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 17:22:03 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp.c          |  2 +-
 src/protocols/rdp/rdp_settings.c | 14 ++++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/4bd19160/src/protocols/rdp/rdp.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp.c b/src/protocols/rdp/rdp.c
index 4d48432..042d389 100644
--- a/src/protocols/rdp/rdp.c
+++ b/src/protocols/rdp/rdp.c
@@ -719,7 +719,7 @@ static int guac_rdp_handle_connection(guac_client* client) {
     guac_common_cursor_set_pointer(rdp_client->display->cursor);
 
     /* Push desired settings to FreeRDP */
-    guac_rdp_push_settings(settings, rdp_inst);
+    guac_rdp_push_settings(client, settings, rdp_inst);
 
     /* Connect to RDP server */
     if (!freerdp_connect(rdp_inst)) {

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/4bd19160/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index e9b81c2..ed77bf6 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -1169,7 +1169,8 @@ static char* guac_rdp_strdup(const char* str) {
 
 }
 
-void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
+void guac_rdp_push_settings(guac_client* client,
+        guac_rdp_settings* guac_settings, freerdp* rdp) {
 
     BOOL bitmap_cache = !guac_settings->disable_bitmap_caching;
     rdpSettings* rdp_settings = rdp->settings;
@@ -1280,10 +1281,15 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
 #endif
 #endif
 
-    /* Device redirection */
-    if (guac_settings->timezone)
-        setenv("TZ", guac_settings->timezone, 1)
+    /* Timezone redirection */
+    if (guac_settings->timezone) {
+        if(setenv("TZ", guac_settings->timezone, 1)) {
+            guac_client_log(client, GUAC_LOG_WARNING,
+                "Unable to set TZ variable, error %i", errno);
+        }
+    }
 
+    /* Device redirection */
 #ifdef LEGACY_RDPSETTINGS
 #ifdef HAVE_RDPSETTINGS_DEVICEREDIRECTION
     rdp_settings->device_redirection =  guac_settings->audio_enabled


[03/12] guacamole-server git commit: GUACAMOLE-422: Update comments on timezone settings.

Posted by mj...@apache.org.
GUACAMOLE-422: Update comments on timezone settings.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/d7ed452d
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/d7ed452d
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/d7ed452d

Branch: refs/heads/master
Commit: d7ed452d699f19504a861caff187b72709afcd78
Parents: 5536b83
Author: Nick Couchman <vn...@apache.org>
Authored: Sun Nov 11 15:30:17 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Sun Nov 11 15:30:17 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c |  5 ++++-
 src/protocols/ssh/settings.c     | 11 ++++++-----
 src/protocols/ssh/settings.h     |  1 +
 3 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/d7ed452d/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index 21114d4..f37c156 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -358,7 +358,10 @@ enum RDP_ARGS_IDX {
     IDX_PRECONNECTION_BLOB,
 
     /**
-     * The timezone to pass through to the RDP connection.
+     * The timezone to pass through to the RDP connection, in IANA format, which
+     * will be translated into Windows formats.  See the following page for
+     * information and list of valid values:
+     * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      */
     IDX_TIMEZONE,
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/d7ed452d/src/protocols/ssh/settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/settings.c b/src/protocols/ssh/settings.c
index 820da51..962524c 100644
--- a/src/protocols/ssh/settings.c
+++ b/src/protocols/ssh/settings.c
@@ -249,11 +249,12 @@ enum SSH_ARGS_IDX {
     IDX_LOCALE,
      
     /**
-     * The timezone that is passed from the client system to the
-     * remote server, or null if not specified.  If set, and allowed
-     * by the remote SSH server, the TZ environment variable will be
-     * set on the remote session, causing the session to be localized
-     * to the specified timezone.
+     * The timezone that is to be passed to the remote system, via the
+     * TZ environment variable.  By default, no timezone is forwarded
+     * and the timezone of the remote system will be used.  This
+     * setting will only work if the SSH server allows the TZ variable
+     * to be set.  Timezones should be in standard IANA format, see:
+     * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      */
     IDX_TIMEZONE,
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/d7ed452d/src/protocols/ssh/settings.h
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/settings.h b/src/protocols/ssh/settings.h
index e4d99e1..baa634a 100644
--- a/src/protocols/ssh/settings.h
+++ b/src/protocols/ssh/settings.h
@@ -253,6 +253,7 @@ typedef struct guac_ssh_settings {
      * environment variable.
      */
     char* locale;
+
     /** 
      * The client timezone to pass to the remote system.
      */


[09/12] guacamole-server git commit: GUACAMOLE-422: Quick fixes for style and logging.

Posted by mj...@apache.org.
GUACAMOLE-422: Quick fixes for style and logging.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/f61539c4
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/f61539c4
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/f61539c4

Branch: refs/heads/master
Commit: f61539c4e75c9e55fbfcf3a71a0ed0c3548bbb4e
Parents: 9a94463
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Nov 12 11:55:07 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Nov 12 11:55:07 2018 -0500

----------------------------------------------------------------------
 src/protocols/rdp/rdp_settings.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/f61539c4/src/protocols/rdp/rdp_settings.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c
index ed77bf6..810253d 100644
--- a/src/protocols/rdp/rdp_settings.c
+++ b/src/protocols/rdp/rdp_settings.c
@@ -1283,9 +1283,10 @@ void guac_rdp_push_settings(guac_client* client,
 
     /* Timezone redirection */
     if (guac_settings->timezone) {
-        if(setenv("TZ", guac_settings->timezone, 1)) {
+        if (setenv("TZ", guac_settings->timezone, 1)) {
             guac_client_log(client, GUAC_LOG_WARNING,
-                "Unable to set TZ variable, error %i", errno);
+                "Unable to forward timezone: TZ environment variable "
+                "could not be set: %s", sterror(errno));
         }
     }