Re: configure and mySQL Database
William Heinbockel <[email protected]>
| Newsgroups | gmane.comp.security.nessus.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 10 Feb 2003, Javier Fernandez-Sanguino wrote: > William Heinbockel wrote: > > Does anyone here have any experience with making configure scripts? > > I think Renaud uses autoconf, but I have no clue on how to append > > to his stuff to have it check for the mysql.h library. > I do have experience with autoconf scripts. Let me give it a try. > > > > > If the library is there, we might need to check to see if it is > > thread-safe. When the qualifications are met, then nessusd > > needs compiled with USE_MYSQL (or similar). > > > > I have no idea on how to go about doing this. > > If someone could explain to me how to do it, it would be greatly > > appreciated. > > IMHO we should not be making something too mysql-dependant. The use of > the database should be something to be selected the same way some > experimental features are. Thus a --enable-database should plug-in the > code for mysql/postgresql/whatever.. > > The DB code should be generic enough so that users can select whatever > database they want and using #ifdefs include the proper code. We need a > generic open_database function which would call whatever database the > user has configured. > > > Javi > > The best option to incorporate multiple databases is to write libraries that Nessus can use for the database calls. If people want to write database specific code (similar to the code I have for mySQL), it can easily be incorporated into the server code. That is why we need to iron out a common schema so that all of the database calls through Nessus are similar. I agree that the code should be initially compiled with the preprocessor directives, so that only the necessary code and C APIs are compiled in. That's why the stuff needs put into the configure script. The necessary APIs need to be present and their exact location needs to be given to the compiler. Versions and other items might need to be checked to verify that the API will work with the Nessus DB code. Also, it might be useful to put in code to the Preferences and Rules so that an admin can control who can use the database and they could run Nessus without storing the results to the DB. ---------------------- William Heinbockel Information Security Incident Response Assistant Co-op Risk & Safety Management Rochester Institute of Technology E-mail: [email protected]