d = rb_dirname(filename);
dirname = LOCAL_COPY(d);
rb_free(d);
-
+
if(access(dirname, F_OK) == -1)
{
rb_snprintf(buf, sizeof(buf), "WARNING: Unable to access logfile %s - parent directory %s does not exist", filename, dirname);
{
if(access(dirname, W_OK) == -1)
{
- rb_snprintf(buf, sizeof(buf), "WARNING: Unable to access logfile %s - access to parent directory %s failed: %s",
+ rb_snprintf(buf, sizeof(buf), "WARNING: Unable to access logfile %s - access to parent directory %s failed: %s",
filename, dirname, strerror(errno));
if(testing_conf || server_state_foreground)
fprintf(stderr, "%s\n", buf);
}
return;
}
-
+
if(access(filename, W_OK) == -1)
{
rb_snprintf(buf, sizeof(buf), "WARNING: Access denied for logfile %s: %s", filename, strerror(errno));
if(testing_conf || server_state_foreground)
- fprintf(stderr, "%s\n", buf);
+ fprintf(stderr, "%s\n", buf);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", buf);
return;
}
*log_table[i].logfile = fopen(*log_table[i].name, "a");
}
}
-}
+}
void
close_logfiles(void)