Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | output: MYSQL: improve mapping of DB columns to input-keys | Jeremy Sowden | 2021-12-06 | 1 | -7/+7 |
| | | | | | | | | | | | | | | | | | | | | | | Currently, we copy the column-name to a buffer, iterate over it to replace the underscores with full-stops, using `strchr` from the start of the buffer on each iteration, then copy the buffer to the input-key's `name` member. Apart from the inefficiency, `strncpy` is used to do the copies, which leads gcc to complain: ulogd_output_MYSQL.c:149:17: warning: `strncpy` output may be truncated copying 31 bytes from a string of length 31 Furthermore, the buffer is not initialized, which means that there is also a possible buffer overrun if the column-name is too long, since `strncpy` will not append a NUL. Instead, copy the column-name directly to the input-key using `snprintf`, and run `strchr` from the last underscore on each iteration. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||||
* | Replace malloc+memset with calloc | Jeremy Sowden | 2021-11-30 | 1 | -5/+1 |
| | | | | | | | | There are a number of places where we `malloc` some memory and then `memset` it to zero. Use `calloc` instead. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||||
* | Use stdint types everywhere | Felix Janda | 2015-06-26 | 1 | -1/+1 |
| | | | | Signed-off-by: Felix Janda <felix.janda@posteo.de> | ||||
* | mysql: add sanity checking | Eric Leblond | 2013-04-20 | 1 | -1/+3 |
| | | | | Nullify mysql handler at deinit. | ||||
* | Get rid of SVN tag in comment. | Eric Leblond | 2013-01-18 | 1 | -2/+0 |
| | | | | This patch also update some copyright and licence declaration. | ||||
* | src: fix version that -V displays | Pablo Neira Ayuso | 2012-08-03 | 1 | -1/+1 |
| | | | | | | | It was wrong, use VERSION constant which uses the version information available in configure.ac. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||||
* | cleanup: fix warning due to lack of parenthesis | Eric Leblond | 2008-07-31 | 1 | -1/+1 |
| | | | | | | | Fix gcc warning related to the lack of parenthesis. Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||||
* | cleanup: fix gcc warnings | Eric Leblond | 2008-07-29 | 1 | -2/+0 |
| | | | | | | | | | This patch fixes some gcc warnings: * Unused variables * Functions with wrong return (or without return) Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||||
* | From: Pierre Chifflier <chifflier@inl.fr> | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org | 2008-02-03 | 1 | -0/+5 |
| | | | | | Change from procedure to function in mysql schema adds the need to free MySQL result after request. | ||||
* | From: Eric Leblond <eric@inl.fr> | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org | 2008-02-03 | 1 | -0/+14 |
| | | | | MySQL client library does not reconnect automatically since 5.0. | ||||
* | use correct vallue for db_ce (Christian Hentschel) | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2006-01-13 | 1 | -1/+1 |
| | |||||
* | fix mysql output typo (Christian Hentschel) | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2006-01-12 | 1 | -1/+1 |
| | |||||
* | remove strerror function of db helpers and move error printing | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2006-01-07 | 1 | -10/+8 |
| | | | | directly into db plugins | ||||
* | don't "#include" a .c file but rather compile db.c on it's own | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-12-15 | 1 | -7/+6 |
| | |||||
* | convert mysql to new DB api | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-12-08 | 1 | -371/+62 |
| | |||||
* | further cleanup | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-12-08 | 1 | -13/+16 |
| | |||||
* | re-enable the reconnect support | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-12-08 | 1 | -28/+33 |
| | |||||
* | more verbose error reporting | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-12-08 | 1 | -19/+29 |
| | |||||
* | implement reparse/reconnect on sighup | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-12-08 | 1 | -6/+28 |
| | |||||
* | fixes | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-11-29 | 1 | -24/+24 |
| | |||||
* | add missing memset after malloc (Christian Hentschel) | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org | 2005-11-24 | 1 | -0/+3 |
| | |||||
* | we forgot to set num_keys() correctly. | laforge | 2005-11-24 | 1 | -2/+6 |
| | |||||
* | remove bogus comment (code was fixed, comment not removed) | laforge | 2005-11-24 | 1 | -2/+2 |
| | |||||
* | finally fix up MYSQL module to build correctly | laforge | 2005-11-20 | 1 | -18/+18 |
| | |||||
* | some plugins support packet and flow data types | laforge | 2005-11-20 | 1 | -1/+1 |
| | |||||
* | fix dozens of compiler warnings/errors. one step closer to compilation. | laforge | 2005-11-20 | 1 | -87/+99 |
| | |||||
* | introduce version field for plugins, refuse loading plugins with different ↵ | laforge | 2005-11-05 | 1 | -0/+1 |
| | | | | version | ||||
* | semi-complete mysql output plugin port | laforge | 2005-10-15 | 1 | -0/+525 |