Commit 97c6fa02 authored by Ondřej Filip's avatar Ondřej Filip

Previous patch reverted. :-(

parent 73e53eb5
......@@ -254,7 +254,7 @@ server_connect(void)
die("Cannot create socket: %m");
bzero(&sa, sizeof(sa));
sa.sun_family = AF_UNIX;
strncpy(sa.sun_path, server_path, sizeof(sa.sun_path));
strcpy(sa.sun_path, server_path);
if (connect(server_fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
die("Unable to connect to server control socket (%s): %m", server_path);
if (fcntl(server_fd, F_SETFL, O_NONBLOCK) < 0)
......@@ -866,7 +866,7 @@ sk_open_unix(sock *s, char *name)
goto bad;
sa.sun_family = AF_UNIX;
strncpy(sa.sun_path, name, sizeof(sa.sun_path));
strcpy(sa.sun_path, name);
if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
if (listen(fd, 8))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment