From: Jérémie Galarneau Date: Wed, 31 Aug 2016 04:18:29 +0000 (-0400) Subject: Fix: check for sizeof sa_family to save sa_family in accept and connect X-Git-Tag: v2.9.0-rc1~22 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=5a561ac39cd77ecda3fbdb2bfaafac56b174225c;hp=5a561ac39cd77ecda3fbdb2bfaafac56b174225c;p=lttng-modules.git Fix: check for sizeof sa_family to save sa_family in accept and connect The check of addrlen >= sizeof(struct sockaddr) is too restrictive and causes sa_family to not be saved in the case of AF_UNIX sockets as the addrlen returned by the syscall may be only sizeof(short). Individual checks per socket family are performed anyhow in the switch case, making this safe. Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers ---