summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6e46ec6)
raw | patch | inline | side by side (parent: 6e46ec6)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 17 Jun 2008 17:59:14 +0000 (19:59 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 24 Jun 2008 11:22:56 +0000 (13:22 +0200) |
Usually, collectd runs as user root, thus making it an unsafe operation to
unconditionally remove the file even though one should be able to assume
that it "belongs" to collectd.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
unconditionally remove the file even though one should be able to assume
that it "belongs" to collectd.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/email.c | patch | blob | history |
diff --git a/src/email.c b/src/email.c
index b718cf5c9eb184633dc37da18897f6bd4c65b6d7..c78d76146835ab2e55bedac09c8a36f71752e132 100644 (file)
--- a/src/email.c
+++ b/src/email.c
strncpy (addr.sun_path, sock_file, (size_t)(UNIX_PATH_MAX - 1));
addr.sun_path[UNIX_PATH_MAX - 1] = '\0';
- unlink (addr.sun_path);
errno = 0;
if (-1 == bind (connector_socket, (struct sockaddr *)&addr,