diff options
-rw-r--r-- | docs/changes.xml | 6 | ||||
-rw-r--r-- | src/nxt_sockaddr.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/docs/changes.xml b/docs/changes.xml index 27fffc4c..85749bff 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -37,6 +37,12 @@ increased the applications' startup timeout. </para> </change> +<change type="change"> +<para> +disallowed abstract Unix domain socket syntax in non-Linux systems. +</para> +</change> + <change type="feature"> <para> supporting abstract UNIX sockets. diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index 8220590e..86c3335e 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -601,8 +601,6 @@ nxt_sockaddr_unix_parse(nxt_mp_t *mp, nxt_str_t *addr) socklen = offsetof(struct sockaddr_un, sun_path) + length + 1; -#if (NXT_LINUX) - /* * Linux unix(7): * @@ -615,9 +613,12 @@ nxt_sockaddr_unix_parse(nxt_mp_t *mp, nxt_str_t *addr) if (path[0] == '@') { path[0] = '\0'; socklen--; - } - +#if !(NXT_LINUX) + nxt_thread_log_error(NXT_LOG_ERR, + "abstract unix domain sockets are not supported"); + return NULL; #endif + } sa = nxt_sockaddr_alloc(mp, socklen, addr->length); |