Unverified Commit 26e483d4 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'theqvd-unix_socket_forwarding' into 3.6.x

parents ca8236e7 889de46f
...@@ -209,8 +209,6 @@ ChannelEndPoint::getUnixPath(char **unixPath) const { ...@@ -209,8 +209,6 @@ ChannelEndPoint::getUnixPath(char **unixPath) const {
if (unixPath) if (unixPath)
*unixPath = NULL; *unixPath = NULL;
else
return false;
long p; long p;
char *path = NULL; char *path = NULL;
...@@ -230,7 +228,9 @@ ChannelEndPoint::getUnixPath(char **unixPath) const { ...@@ -230,7 +228,9 @@ ChannelEndPoint::getUnixPath(char **unixPath) const {
return false; return false;
} }
*unixPath = strdup(path); // Only return value wanted
if ( unixPath )
*unixPath = strdup(path);
return true; return true;
} }
......
...@@ -7803,6 +7803,7 @@ int ParseEnvironmentOptions(const char *env, int force) ...@@ -7803,6 +7803,7 @@ int ParseEnvironmentOptions(const char *env, int force)
strcpy(opts, env); strcpy(opts, env);
char *nextOpts = opts; char *nextOpts = opts;
bool nxdisplay_found = false;
// //
// Ensure that DISPLAY environment variable // Ensure that DISPLAY environment variable
...@@ -7824,14 +7825,17 @@ int ParseEnvironmentOptions(const char *env, int force) ...@@ -7824,14 +7825,17 @@ int ParseEnvironmentOptions(const char *env, int force)
else if (strncasecmp(opts, "nx/nx,", 6) == 0) else if (strncasecmp(opts, "nx/nx,", 6) == 0)
{ {
nextOpts += 6; nextOpts += 6;
nxdisplay_found = true;
} }
else if (strncasecmp(opts, "nx,", 3) == 0) else if (strncasecmp(opts, "nx,", 3) == 0)
{ {
nextOpts += 3; nextOpts += 3;
nxdisplay_found = true;
} }
else if (strncasecmp(opts, "nx:", 3) == 0) else if (strncasecmp(opts, "nx:", 3) == 0)
{ {
nextOpts += 3; nextOpts += 3;
nxdisplay_found = true;
} }
else if (force == 0) else if (force == 0)
{ {
...@@ -7860,7 +7864,7 @@ int ParseEnvironmentOptions(const char *env, int force) ...@@ -7860,7 +7864,7 @@ int ParseEnvironmentOptions(const char *env, int force)
value = strrchr(nextOpts, ':'); value = strrchr(nextOpts, ':');
if (value != NULL) if (value != NULL && nxdisplay_found )
{ {
char *check = value + 1; char *check = value + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment