diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-11-03 12:57:25 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-11-04 08:05:20 +0100 |
commit | 79257eed051e2a880ed0930cd139bf2f84f75901 (patch) | |
tree | bb82a28f0cb299cd9edcbde141f72fad126b6577 | |
parent | e3f498e6211d8518f10c674ce347ab11d92c0e28 (diff) | |
download | nx-libs-79257eed051e2a880ed0930cd139bf2f84f75901.tar.gz nx-libs-79257eed051e2a880ed0930cd139bf2f84f75901.tar.bz2 nx-libs-79257eed051e2a880ed0930cd139bf2f84f75901.zip |
nxcomp/src/Loop.cpp: hardcode X11 and (legacy/xfs) font UNIX paths.
Fixes: ArcticaProject/nx-libs#536
Allowing overrides via NX_TEMP and TEMP breaks system using
pam_tmpdir.so and most server infrastructure expects the location to be
fixed anyway.
-rw-r--r-- | nxcomp/src/Loop.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index 72e46f773..197167380 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -3750,21 +3750,14 @@ int SetupUnixSocket() // Open UNIX domain socket for display. // - if (!control->TempPath) { - nxfatal << "Loop: PANIC! Temporal path is null.\n" << std::flush; - - cerr << "Error" << ": Temporal path is null.\n"; - HandleCleanup(); - } - - unsigned int required = snprintf(unixSocketName, DEFAULT_STRING_LENGTH, "%s/.X11-unix", control->TempPath); + unsigned int required = snprintf(unixSocketName, DEFAULT_STRING_LENGTH, "/tmp/.X11-unix"); if (required < sizeof(unixSocketName)) { // No need to execute the following actions conditionally mkdir(unixSocketName, (0777 | S_ISVTX)); chmod(unixSocketName, (0777 | S_ISVTX)); - required = snprintf(unixSocketName, DEFAULT_STRING_LENGTH, "%s/.X11-unix/X%d", control->TempPath, proxyPort); + required = snprintf(unixSocketName, DEFAULT_STRING_LENGTH, "/tmp/.X11-unix/X%d", proxyPort); if (required < sizeof(unixSocketName)) { unixFD = ListenConnectionUnix(unixSocketName, "x11"); @@ -3968,8 +3961,7 @@ int SetupDisplaySocket(int &addr_family, sockaddr *&addr, char unixSocketDir[DEFAULT_STRING_LENGTH]; - snprintf(unixSocketDir, DEFAULT_STRING_LENGTH - 1, "%s/.X11-unix", - control -> TempPath); + snprintf(unixSocketDir, DEFAULT_STRING_LENGTH - 1, "/tmp/.X11-unix"); #ifdef __APPLE__ @@ -12778,14 +12770,14 @@ int ParseFontPath(char *path) // // Let's assume that a port specification "unix/:7100" - // corresponds to "$TEMP/.font-unix/fs7100" and a port - // "unix/:-1" corresponds to "$TEMP/.font-unix/fs-1". + // corresponds to "/tmp/.font-unix/fs7100" and a port + // "unix/:-1" corresponds to "/tmp/.font-unix/fs-1". // if (strncmp("unix/:", path, 6) == 0) { - snprintf(path, DEFAULT_STRING_LENGTH - 1, "%s/.font-unix/fs%s", - control -> TempPath, oldPath + 6); + snprintf(path, DEFAULT_STRING_LENGTH - 1, "/tmp/.font-unix/fs%s", + oldPath + 6); *(path + DEFAULT_STRING_LENGTH - 1) = '\0'; |