diff options
Diffstat (limited to 'unix.c')
-rw-r--r-- | unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -12,7 +12,7 @@ sock_perms(int fd) return -1; } // set group on socket - if (fchown(fd, -1, group.gr_gid) == -1) { + if (fchown(fd, -1, group->gr_gid) == -1) { perror("chown"); return -1; } @@ -47,7 +47,7 @@ unix_setup(char sockname[]) struct sockaddr_un name; memset(&name, 0, sizeof name); name.sun_family = AF_UNIX; - strncpy(name.sun_path, SOCKETNAME, (sizeof name.sun_path)-1); + strncpy(name.sun_path, sockname, (sizeof name.sun_path)-1); if (bind(sock, (struct sockaddr *)&name, sizeof name) == -1) { perror("(unix) bind"); return -1; |