0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 01:31:55 +00:00

Previous patch reverted. :-(

This commit is contained in:
Ondrej Filip 2008-08-25 12:06:20 +00:00
parent 73e53eb555
commit 97c6fa02e0
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -866,7 +866,7 @@ sk_open_unix(sock *s, char *name)
goto bad;
unlink(name);
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)
ERR("bind");
if (listen(fd, 8))