Code

logfile plugin: Don't use `access' when adding a logfile: It does not work as expected.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 27 Mar 2007 21:00:12 +0000 (23:00 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 27 Mar 2007 21:00:12 +0000 (23:00 +0200)
Of as advertised in the manpage, for that matter.

src/logfile.c

index ceee7b80c10d8aeddb40f2a75d961c64a0927f9c..4563c8924157612e0864e4928d60ad8fe5d9fb87 100644 (file)
@@ -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;