Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2015-10-11 02:01:14 +01:00
commit f69e09a67e
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ retry:
fatal("socket failed"); fatal("socket failed");
log_debug("trying connect"); 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)); log_debug("connect failed: %s", strerror(errno));
if (errno != ECONNREFUSED && errno != ENOENT) if (errno != ECONNREFUSED && errno != ENOENT)
goto failed; goto failed;

View File

@ -144,7 +144,7 @@ server_create_socket(void)
return (-1); return (-1);
mask = umask(S_IXUSR|S_IXGRP|S_IRWXO); mask = umask(S_IXUSR|S_IXGRP|S_IRWXO);
if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) == -1)
return (-1); return (-1);
umask(mask); umask(mask);