From: Florian Forster Date: Tue, 27 Mar 2007 21:00:12 +0000 (+0200) Subject: logfile plugin: Don't use `access' when adding a logfile: It does not work as expected. X-Git-Tag: collectd-4.0.0~125 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=55d30cc280696e7f7533c294961a44e246d812f0;p=collectd.git logfile plugin: Don't use `access' when adding a logfile: It does not work as expected. Of as advertised in the manpage, for that matter. --- diff --git a/src/logfile.c b/src/logfile.c index ceee7b80..4563c892 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -66,18 +66,7 @@ static int logfile_config (const char *key, const char *value) } else if (0 == strcasecmp (key, "File")) { sfree (log_file); - - if ((strcasecmp (value, "stdout") == 0) - || (strcasecmp (value, "stderr") == 0) - || (access (value, W_OK) == 0)) - log_file = strdup (value); - else { - char errbuf[1024]; - /* We can't use `ERROR' yet.. */ - fprintf (stderr, "logfile plugin: Access to %s denied: %s\n", - value, sstrerror (errno, errbuf, sizeof (errbuf))); - return 1; - } + log_file = strdup (value); } else { return -1;