summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e29722)
raw | patch | inline | side by side (parent: 5e29722)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 5 Dec 2015 14:16:36 +0000 (15:16 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 5 Dec 2015 20:45:57 +0000 (21:45 +0100) |
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
src/unixsock.c | patch | blob | history |
diff --git a/src/unixsock.c b/src/unixsock.c
index 2c1665fc9fcbbdffc3c91935838a720e4fbf6d6f..8b2f33914eacc3307fbc7d1b28c9c5fe032b3c74 100644 (file)
--- a/src/unixsock.c
+++ b/src/unixsock.c
return (-1);
}
- chmod (sa.sun_path, sock_perms);
+ status = chmod (sa.sun_path, sock_perms);
+ if (status == -1)
+ {
+ char errbuf[1024];
+ ERROR ("unixsock plugin: chmod failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
+ close (sock_fd);
+ sock_fd = -1;
+ return (-1);
+ }
status = listen (sock_fd, 8);
if (status != 0)