logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: No logging to mysql in snort 2.4.x: msg#00001

security.ids.snort.devel

Subject: Re: No logging to mysql in snort 2.4.x

Hi Martin,

> On Fri, 3 Feb 2006, Dirk Geschke wrote:
> >> My question is why snort 2.4 doesn't work when there's no problems with
> >> 2.3.
> > are you really sure about this? If the connection to the database is
> > interrupted you have to re-connect. This is never done in the database
> > output plugin. The connect to the dabase is done on startup of snort,
> > never ever later again.
>
> Yes I'm sure. You must remember things incorrectly.

No, the database output plugin never tries a reconnect, it is the client
library of MySQL.

Maybe you are using different mysql libraries for your tests?

In 5.0 you can read:

* The `reconnect' flag in the `MYSQL' structure is set to 0 by
`mysql_real_connect()'. Only those client programs which did not
explicitly set this flag to 0 or 1 after `mysql_real_connect()'
experience a change. Having automatic reconnection enabled by
default was considered too dangerous (due to the fact that table
locks, temporary tables, user variables, and session variables are
lost after reconnection).

Earlier versions (4.1 and earlier) did reconnect within the library:

If the `mysql' client loses its connection to the server while sending
a query, it immediately and automatically tries to reconnect once to
the server and send the query again. However, even if `mysql' succeeds
in reconnecting, your first connection has ended and all your previous
session objects and settings are lost: temporary tables, the autocommit
mode, and user-defined and session variables.

So maybe this is the explanation for the "strange" behaviour?

> Why is the automatic reconnect function removed from snort v2.4?
> Can you please put it back?

Because it was never part of snort. The Library did the reconnect and
the default for the library changed from automatically reconntect to
not reconnect. But you can change this easily within the mysql_real_connect
call within snort-2.4.x/src/output-plugins/spo_database.c

But then you may silently loose some alerts...

Best regards

Dirk



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation