Unverified Commit 81569ad6 authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/sun-path-is-104-on-debian-kfreebsd' into 3.6.x

Attributes GH PR #508: https://github.com/ArcticaProject/nx-libs/pull/508 Fixes: ArcticaProject/nx-libs#507
parents d3f97cea 96ba6190
......@@ -3810,7 +3810,15 @@ int SetupAuthInstance()
launchdAddrUnix.sun_family = AF_UNIX;
#ifdef __linux__
const int launchdAddrNameLength = 108;
#else
/* POSIX/SUS does not specify a length.
* BSD derivatives generally support 104 bytes, other systems may be more constrained.
* If you happen to run into such systems, extend this section with the appropriate limit.
*/
const int launchdAddrNameLength = 104;
#endif
int success = -1;
......
......@@ -6294,7 +6294,15 @@ int Proxy::handleNewGenericConnectionFromProxyUnix(int channelId, T_channel_type
serverAddrUnix.sun_family = AF_UNIX;
#ifdef __linux__
const int serverAddrNameLength = 108;
#else
/* POSIX/SUS does not specify a length.
* BSD derivatives generally support 104 bytes, other systems may be more constrained.
* If you happen to run into such systems, extend this section with the appropriate limit.
*/
const int serverAddrNameLength = 104;
#endif
strncpy(serverAddrUnix.sun_path, path, serverAddrNameLength);
......
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