Code

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 d251284ba1ed89b22d976002ada5e635c4e09ee3..ceee7b80c10d8aeddb40f2a75d961c64a0927f9c 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];