From a4be1b89ff0929b6b801efa9afd996010d7dd075 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 12:41:28 +0100 Subject: nxcomp/Loop.cpp: Ignore, options= nx/nx parameter, if file options path starts with /dev/, /proc/, or /sys/. Partially resolved ArcticaProject/nx-libs#51. --- nxcomp/Loop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nxcomp') diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index 86c951a06..b795c62af 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -9138,7 +9138,7 @@ int ParseEnvironmentOptions(const char *env, int force) << env << "'.\n" << logofs_flush; #endif - if (*fileOptions != '\0') + if ((*fileOptions != '\0') && (strncmp(fileOptions, "/dev/", 5) != 0) && (strncmp(fileOptions, "/proc/", 6) != 0) && (strncmp(fileOptions, "/sys/", 5) != 0)) { if (strcmp(fileOptions, optionsFileName) != 0) { -- cgit v1.2.3 From ce037f4e3c15c7cbc50adb02f6027a4d37c0ab90 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 5 Feb 2017 12:47:57 +0100 Subject: nxcomp/Loop.cpp: Allow nx/nx: as DISPLAY variable (i.e. an empty nx/nx options string. --- nxcomp/Loop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nxcomp') diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index b795c62af..3710b6414 100644 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -4069,7 +4069,8 @@ int SetupDisplaySocket(int &xServerAddrFamily, sockaddr *&xServerAddr, } else if (strncasecmp(display, "nx/nx,", 6) == 0 || strncasecmp(display, "nx,", 3) == 0 || - strncasecmp(display, "nx:", 3) == 0) + strncasecmp(display, "nx/nx:", 6) == 0 || + strncasecmp(display, "nx:", 3) == 0) { #ifdef PANIC *logofs << "Loop: PANIC! NX transport on host X server '" -- cgit v1.2.3