diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-08-01 14:31:38 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-08-01 14:31:38 +0000 |
commit | 8bed2933b6b4772e0f14cc4c6ce743e200532b14 (patch) | |
tree | 89f0fffe87c15c82187d67e06c1d7068e300182e /ulogd/pcap | |
parent | fb4407092c542dacae291aec7eb7bfab48e0adec (diff) |
Marius Tomaschewski (mt@suse.de)
* sqlite3
- added global stmt_siz variable for the allocated size of the stmt buffer
(obsoletes local size variable in _sqlite3_createstmt).
- added guard at the beginning of _sqlite3_output so the output is disabled
if the plugin initialization (db open, ...) fails.
- changed many formats to use %zu for size_t variables, esp. in DEBUGP calls
- changed to use snprintf instead of sprintf in pgsql_output to take care
about the allocated buffer length - using the STMT_ADD macro when the
string has to be appended.
- fixed sqlite3_prepare() call error handling.
- fixed to use ULOGD_MAX_KEYLEN-1 in strncpy.
- added severals sqlite3_close(dbh); dbh = NULL; to reset it propelly.
* pcap
- fixed to use pcapsync_ce.u.value instead of pcapf_ce.u.value for flush
- changed to show pcap file name (so the user can see if the default or the
file specified in the config is used).
* mysql-table
- fixed id field definition in mysql.table.ipaddr-as-string; default value
can't be set when auto_increment is used.
* example configuration file:
- fixed to use an usefull default value for sqlite3 db file...
* user option
- added "user" config option, disabled by default (runs as root).
can be overwritten by the already existing "-u" cmd line option.
without this option, the customers have to edit init script or
source some sysconfig file to pass it via -u ... both not needed.
Diffstat (limited to 'ulogd/pcap')
-rw-r--r-- | ulogd/pcap/ulogd_PCAP.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ulogd/pcap/ulogd_PCAP.c b/ulogd/pcap/ulogd_PCAP.c index 64bfd2a..686fe47 100644 --- a/ulogd/pcap/ulogd_PCAP.c +++ b/ulogd/pcap/ulogd_PCAP.c @@ -158,7 +158,7 @@ static int pcap_output(ulog_iret_t *res) return 1; } - if (pcapf_ce.u.value) + if (pcapsync_ce.u.value) fflush(of); return 0; @@ -217,8 +217,8 @@ void append_create_outfile(void) { if (!exist) { of = fopen(pcapf_ce.u.string, "w"); if (!of) { - ulogd_log(ULOGD_FATAL, "can't open pcap file: %s\n", - strerror(errno)); + ulogd_log(ULOGD_FATAL, "can't open pcap file %s: %s\n", + pcapf_ce.u.string, strerror(errno)); exit(2); } if (!write_pcap_header()) { |