summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <patrick.f.mooney@gmail.com>2015-07-31 19:45:26 +0000
committerPatrick Mooney <patrick.f.mooney@gmail.com>2015-07-31 20:03:45 +0000
commit2a4baf9fe8cd0e7d7ba626c12c42f3afedc59e1b (patch)
tree6caf8a2e9b538f99d1cf177bda457b7494caf820
parent937e6301c8e823473aa63e100d23183c244c9707 (diff)
downloadillumos-joyent-2a4baf9fe8cd0e7d7ba626c12c42f3afedc59e1b.tar.gz
OS-4586 lxbrand cannot bind to /dev/log with namelen of 0xA
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r--usr/src/uts/common/brand/lx/syscall/lx_socket.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_socket.c b/usr/src/uts/common/brand/lx/syscall/lx_socket.c
index 15a7bebbda..57d2b8ec4c 100644
--- a/usr/src/uts/common/brand/lx/syscall/lx_socket.c
+++ b/usr/src/uts/common/brand/lx/syscall/lx_socket.c
@@ -362,8 +362,10 @@ ltos_sockaddr_ux(const struct sockaddr *inaddr, const socklen_t inlen,
if (sun_type != NULL) {
*sun_type = LX_SUN_ABSTRACT;
}
- } else if (len > LX_DEV_LOG_LEN &&
- strcmp(inaddr->sa_data, LX_DEV_LOG) == 0) {
+ } else if ((len == LX_DEV_LOG_LEN &&
+ strncmp(inaddr->sa_data, LX_DEV_LOG, LX_DEV_LOG_LEN) == 0) ||
+ (len > LX_DEV_LOG_LEN &&
+ strcmp(inaddr->sa_data, LX_DEV_LOG) == 0)) {
/*
* In order to support /dev/log -- a Unix domain socket used
* for logging that has had its path hard-coded far and wide --