1 --- firestarter-1.0.3.orig/firestarter.schemas.in 2005-01-29 20:32:09.000000000 +0800
2 +++ firestarter-1.0.3/firestarter.schemas.in 2006-12-20 20:18:02.000000000 +0800
4 <applyto>/apps/firestarter/client/system_log</applyto>
5 <owner>Firestarter</owner>
7 - <default>/var/log/messages</default>
8 + <default>/var/log/iptables.log</default>
10 <short>The system log file</short>
11 <long>The location of the file the system logging daemon writes to.</long>
12 --- firestarter-1.0.3.orig/src/logread.c 2005-01-29 20:32:08.000000000 +0800
13 +++ firestarter-1.0.3/src/logread.c 2008-03-11 21:24:54.000000000 +0800
17 open_logfile (char *logpath) {
18 + /* Check if logpath isn't NULL before proceeding to avoid libgnomevfs-CRITICAL errors */
19 + if (logpath == NULL)
22 GnomeVFSAsyncHandle *handle;
24 gnome_vfs_async_open(&handle, logpath, GNOME_VFS_OPEN_READ, GNOME_VFS_PRIORITY_DEFAULT,
25 --- firestarter-1.0.3.orig/src/util.c 2005-01-29 20:32:08.000000000 +0800
26 +++ firestarter-1.0.3/src/util.c 2006-12-20 20:31:06.000000000 +0800
30 #include "preferences.h"
36 /* User has specified the log file location */
37 path = preferences_get_string (PREFS_SYSLOG_FILE);
39 - if (path && g_file_test (path, G_FILE_TEST_EXISTS)) {
40 + if (path && g_file_test (path, G_FILE_TEST_EXISTS) && parse_log_line (path)->time != "") {
42 - } else { /* Try to guess some default syslog location */
43 - if (g_file_test ("/var/log/messages", G_FILE_TEST_EXISTS))
44 - path = g_strdup ("/var/log/messages");
45 - else if (g_file_test ("/var/log/kernel", G_FILE_TEST_EXISTS))
46 + } else { /* Guess default kernel messages log path: syslog-ng first, then sysklogd and metalog */
47 + if (g_file_test ("/var/log/iptables.log", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/iptables.log")->time != "")
48 + path = g_strdup ("/var/log/iptables.log");
49 + else if (g_file_test ("/var/log/kernel", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/kernel")->time != "")
50 path = g_strdup ("/var/log/kernel");
51 + /* Let's try these just in case */
52 + else if (g_file_test ("/var/log/messages.log", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/messages.log")->time != "")
53 + path = g_strdup ("/var/log/messages.log");
54 + else if (g_file_test ("/var/log/messages", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/messages")->time != "")
55 + path = g_strdup ("/var/log/messages");