logfile plugin: Don't call `access' with `stdout' and `stderr'.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 27 Mar 2007 13:07:23 +0000 (15:07 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 27 Mar 2007 13:07:23 +0000 (15:07 +0200)
src/logfile.c

index d251284..ceee7b8 100644 (file)
@@ -67,7 +67,9 @@ static int logfile_config (const char *key, const char *value)
        else if (0 == strcasecmp (key, "File")) {
                sfree (log_file);
 
-               if (access (value, W_OK) == 0)
+               if ((strcasecmp (value, "stdout") == 0)
+                               || (strcasecmp (value, "stderr") == 0)
+                               || (access (value, W_OK) == 0))
                        log_file = strdup (value);
                else {
                        char errbuf[1024];