Skip to content
Permalink
Browse files Browse the repository at this point in the history
Don't use abstract Unix domain sockets
  • Loading branch information
ueno committed Jun 4, 2014
1 parent da79d28 commit 293d9d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions fep/control.c
Expand Up @@ -97,15 +97,8 @@ _fep_open_control_socket (Fep *fep)
memset (&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;

#ifdef __linux__
sun.sun_path[0] = '\0';
memcpy (sun.sun_path + 1, path, strlen (path));
sun_len = offsetof (struct sockaddr_un, sun_path) + strlen (path) + 1;
remove_control_socket (path);
#else
memcpy (sun.sun_path, path, strlen (path));
sun_len = sizeof (struct sockaddr_un);
#endif

if (bind (fd, (const struct sockaddr *) &sun, sun_len) < 0)
{
Expand Down
6 changes: 0 additions & 6 deletions libfep/client.c
Expand Up @@ -90,14 +90,8 @@ fep_client_open (const char *address)
memset (&sun, 0, sizeof(struct sockaddr_un));
sun.sun_family = AF_UNIX;

#ifdef __linux__
sun.sun_path[0] = '\0';
memcpy (sun.sun_path + 1, address, strlen (address));
sun_len = offsetof (struct sockaddr_un, sun_path) + strlen (address) + 1;
#else
memcpy (sun.sun_path, address, strlen (address));
sun_len = sizeof (struct sockaddr_un);
#endif

client->control = socket (AF_UNIX, SOCK_STREAM, 0);
if (client->control < 0)
Expand Down

0 comments on commit 293d9d3

Please sign in to comment.