Userspace doesn't need to use SUN_LEN(): connect() and bind() must accept

sizeof(struct sockaddr_un), so do the simple, portable thing

ok beck@ deraadt@
This commit is contained in:
guenther
2015-10-11 00:26:23 +00:00
parent 7340d5adfd
commit 241fd72f75
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ retry:
fatal("socket failed");
log_debug("trying connect");
if (connect(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) {
if (connect(fd, (struct sockaddr *) &sa, sizeof(sa)) == -1) {
log_debug("connect failed: %s", strerror(errno));
if (errno != ECONNREFUSED && errno != ENOENT)
goto failed;