From d00449bdc71bb7e97e23fc42579a42855afc9492 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 17 Jun 2008 19:59:14 +0200 Subject: [PATCH] email plugin: Don't unlink the socket file on startup. 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 Signed-off-by: Florian Forster --- src/email.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/email.c b/src/email.c index b718cf5c..c78d7614 100644 --- a/src/email.c +++ b/src/email.c @@ -513,7 +513,6 @@ static void *open_connection (void *arg) 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, -- 2.11.0