Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
e788a70c
Unverified
Commit
e788a70c
authored
Nov 04, 2017
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Ionic-bugfix/hardcode-some-socket-paths' into 3.6.x
Attributes GH PR #544:
https://github.com/ArcticaProject/nx-libs/pull/544
parents
e3f498e6
79257eed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
Loop.cpp
nxcomp/src/Loop.cpp
+7
-15
No files found.
nxcomp/src/Loop.cpp
View file @
e788a70c
...
...
@@ -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'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment