summaryrefslogtreecommitdiffstats
path: root/ulogd/mysql/ulogd_MYSQL.c
Commit message (Collapse)AuthorAgeFilesLines
* Marius Tomaschewski <mt@suse.de>/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org2007-06-191-39/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - included inttypes.h and changed to use PRId64/PRIu64 format definitions to use correct number of l's on all platforms (WORDSIZE depending). - added str flag to the struct _field - it is set in the mysql_get_columns function when the IP-Addr columns in the database are non-numeric/string and used to insert proper converted value. See also the --with-mysql-log-ip-as-string configure option and doc dir. - changed to use snprintf instead of sprintf to take care about the allocated buffer length: STMT_ADD macro - added global stmt_siz variable for the allocated size of the stmt buffer (set in mysql_createstmt, used in mysql_output; obsoletes local size variable in mysql_createstmt). - Added guard at the beginning of mysql_output() triggering reconnect if stmt_val == NULL. - Fixed to check in mysql_output() if the buffer contains enough place for mysql_*escape_string calls -- see mysql documentation. - Fixed to close the old db handle before reconnect is initiated on failure of mysql_real_query() in mysql_output. - Increased size of allocated stmt buffer in mysql_createstmt() to +1. - Fixed strncpy calls in mysql_createstmt and mysql_get_columns; use ULOGD_MAX_KEYLEN-1, not ULOGD_MAX_KEYLEN and terminate the buffer explicitelly after (in case the source string was longer / not term.). - Fixed mysql_open_db() to close db handle after connect failure. - Fixed _mysql_init_db() to close db handle after mysql_get_columns failure. - Fixed _mysql_fini to call mysql_close(dbh) only if dbh not NULL and reset it to NULL after.
* Today we have had to reboot our firewall and due to a loose crossoverlaforge2005-08-011-1/+10
| | | | | | | | | | | | | | cable (sigh) between the firewall and the logger machine, ulogd was unable to connect to the mysql server. That resulted effectively a hang in the boot process: being unable to connect mysql_real_connect did not return (or the socket timeout was so long I was unable to wait out), ulogd could not reach the point to fork and init could not start the daemons, processes following ulogd. The attached simple patch adds the connect_timeout parameter to the MYSQL section and calls mysql_option when connect_timeout is set. (Jozsef Kadlecsik)
* add 'reconnect' option in case mysql server goes down at some pointlaforge2005-05-291-18/+83
|
* various --ip-as-string fixeslaforge2005-02-161-1/+1
|
* fix log-ip-as-string on x86_64 (Javi Averbach)laforge2005-02-161-1/+5
|
* fix 'unused variable tmpstr' caselaforge2005-02-091-0/+2
|
* mysql_init is used by libmysqlclient, rename our init function to _mysql_initlaforge2005-02-091-4/+4
|
* port Sven Schuster's patch to add user-specified mysql port numberlaforge2005-02-091-5/+14
|
* - use C99 struct initializerslaforge2004-04-241-15/+29
|
* - add .init and .fini member to output pluginlaforge2004-04-241-14/+29
| | | | | - defer file opens + other initialization until after setuid() was called - cosmetic cleanup (no _ in static functions, use 'static' whenever possible)
* add 'tmpstr' variable declaration again... it is needed for the ↵laforge2004-01-081-2/+3
| | | | --log-ip-as-string option (which I never liked anyway ;))
* add error message in case somebody tries to use 'raw' type with mysql output ↵laforge2003-09-291-2/+7
| | | | plugin. This is to be replaced with support for BLOB, as soon as somebody writes ist ;)
* new configuration file syntax (Magnus Boden)laforge2003-09-281-11/+8
|
* remove unused functions/variables, fix wrong printf paramtypes (-Wall)laforge2003-08-231-21/+7
|
* i _did_ mean to call real_connect. sigh.laforge2003-08-231-3/+3
|
* have to call mysql_init() before mysql_real_connect()laforge2003-08-231-5/+6
|
* use mysql_real_connect for MySQL4 (Joerg Wendland)laforge2003-08-111-3/+3
|
* fixes the boolean case in the mysql plugin to use actual value instead of ↵laforge2003-03-181-3/+3
| | | | forcing "1" (Bob Hockney)
* we only have one ulogd.h, indeedlaforge2003-03-051-3/+2
|
* fix include paths.laforge2002-12-091-4/+4
|
* license correction (explicitly GPLv2)laforge2001-09-011-3/+15
|
* Support for logfile cycling (SIGHUP handler)laforge2001-06-141-3/+3
|
* included --with-log-ip-as-string optionlaforge2001-05-201-3/+29
| | | | | removed ./configure (run autoconf) autoconf now adds -I/usr/src/linux/include to CFLAGS
* Support for old MySQL databases (Alexander Janssen)laforge2001-05-171-3/+11
|
* ULOGD_RET_BOOL was unsupported ! (reported by Diego Torres)laforge2001-02-161-1/+4
|
* mysql autoconf detectionlaforge2000-11-201-0/+298