Package: ulogd-sqlite3
Version: 1.23-1
Severity: important
Tags: patch

After I installed that package I noticed that my queries within
the sqlite3 shell wasn't return the correct information.

For example 

SELECT raw_mac, oob_prefix FROM ulog

Yeilds

NULL | 00:c0:f0:3b:a4:45:00:09:7b:8e:ec:70:08:00

While I was testing I also had the syslogemu plugin running
to verify the information in the db.  Aside from obvious
issues with sqlite3 dumping unsigned ints as signed ints,
I had also found that if I did this.

SELECT sport, dport

and got the following on the screen

30 | 100

that the following might be in the syslog like file

SPT=57886 DPT=100

To be honest, I'm recompiled from the unstable 
source package on sarge. However, the problems turned out
to be source code level programming bugs.  I've include
a patch
---------------------------------------------------------------


--- ulogd_SQLITE3.orig.c 2005-06-07 17:46:06.000000000 -0500
+++ ulogd_SQLITE3.c      2005-06-07 17:50:48.000000000 -0500
@@ -34,6 +34,7 @@
 #include <ulogd/conffile.h>
 #include <sqlite3.h>
 
+#define DEBUG_SQLITE3
 #ifdef DEBUG_SQLITE3
 #define DEBUGP(x, args...)     fprintf(stderr, x, ## args)
 #else
@@ -96,7 +97,7 @@
        struct in_addr addr;
 #endif
 
-       col_counter = 0;
+       col_counter = 1;
        for (f = fields; f; f = f->next) {
                res = keyh_getres(f->id);
 
@@ -128,7 +129,7 @@
                                
sqlite3_bind_int(p_stmt,col_counter,res->value.ui8);
                                break;
                        case ULOGD_RET_UINT16:
-                               
sqlite3_bind_int(p_stmt,col_counter,res->value.ui8);
+                               
sqlite3_bind_int(p_stmt,col_counter,res->value.ui16);
                                break;
                        case ULOGD_RET_IPADDR:
 #ifdef IP_AS_STRING



-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i586)
Kernel: Linux 2.4.24-pt2
Locale: LANG=C, LC_CTYPE=C

Versions of packages ulogd-sqlite3 depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libsqlite3-0                3.2.1-1      SQLite 3 shared library
ii  ulogd                       1.23-1       The Netfilter Userspace Logging Da

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to