mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
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:
parent
7340d5adfd
commit
241fd72f75
2 changed files with 2 additions and 2 deletions
2
server.c
2
server.c
|
|
@ -145,7 +145,7 @@ server_create_socket(void)
|
|||
return (-1);
|
||||
|
||||
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);
|
||||
umask(mask);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue