aboutsummaryrefslogtreecommitdiff
path: root/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix.c b/unix.c
index bbb663d..3228a0b 100644
--- a/unix.c
+++ b/unix.c
@@ -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;