aboutsummaryrefslogtreecommitdiff
path: root/unix.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-10-28 02:17:42 +0100
committerubq323 <ubq323@ubq323.website>2022-10-28 02:17:42 +0100
commit8e7e23110bc483ba647d33d6f46a7fac1302107c (patch)
tree1de0e2b65f9f8d3f13951b8a3d21d8a9e6558884 /unix.c
parentfa433836c643bbd9a60ed8ccdc9451a1edd98418 (diff)
more testing and typo fixes
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;