Mailing List Archive

[Database-devel] Actual CVS doesn't compile
Hi there,

I wonder if there is a chance to get nessus-core of branch NESSUS_SQL to
compile.

According to the log message of July 1st 2004 "Added latest code
provided by Cory Marsh in April, it's missing some files in order to
compile though." it's a "known feature" ;) especially db_mysql.h is
missing which was introduced with the last commit.

Would it be possible to provide a version to test (which compiles ;),
either updating cvs or a tar.gz file to download?

BTW: I have managed to adapt nessus_db_schema.mysql, nessus-extract.pl
and create-service-proto.pl to work with mysql on my RedHat 9 box which
I could provide if anyone is interested.

Thank you in advance,
Sandro
--
"Linux is like a wigwam: no windows, no gates ... apache inside!"

http://www.lug-burghausen.org/
Re: [Database-devel] Actual CVS doesn't compile [ In reply to ]
Sandro Poppi wrote:

> Hi there,
>
> I wonder if there is a chance to get nessus-core of branch NESSUS_SQL to
> compile.

Yes, this might be fixed along the week.


> According to the log message of July 1st 2004 "Added latest code
> provided by Cory Marsh in April, it's missing some files in order to
> compile though." it's a "known feature" ;) especially db_mysql.h is
> missing which was introduced with the last commit.

Yes, it's a know bug.

> Would it be possible to provide a version to test (which compiles ;),
> either updating cvs or a tar.gz file to download?

I will try to make the CVS work. Stay tuned.

> BTW: I have managed to adapt nessus_db_schema.mysql, nessus-extract.pl
> and create-service-proto.pl to work with mysql on my RedHat 9 box which
> I could provide if anyone is interested.

Send patches my way I promise to take a look at them and commit the
changes that might be relevant. Notice that the .dia file (that
produces the schema available in the .mysql file) is not synched with
the DB code in CVS either, but since the DB code generates the
database for you (if the tables do not exist) it shouldn't be an issue.

Regards

Javier
Re: [Database-devel] Actual CVS doesn't compile [ In reply to ]
Sandro Poppi wrote:


> Hi there,

(...)

> Would it be possible to provide a version to test (which compiles ;),
> either updating cvs or a tar.gz file to download?

The CVS is now updated with a version that compiles just fine. Please
test it out and send me bugs related to it so I can fix them.

>
> BTW: I have managed to adapt nessus_db_schema.mysql, nessus-extract.pl
> and create-service-proto.pl to work with mysql on my RedHat 9 box which
> I could provide if anyone is interested.

I haven't yet made the changes you suggest but will introduce them as
soon as I have some more time to review them. In any case, notice that
the code in CVS will generate the Mysql database if the tablespace is
empty, so you don't really need to use nessus_db_schema.mysql.

Regards

Javier
Re: [Database-devel] Actual CVS doesn't compile [ In reply to ]
Sandro Poppi wrote:
> Hi there,
>
> I wonder if there is a chance to get nessus-core of branch NESSUS_SQL to
> compile.

Just FYI, the code now autoconfigures and compiles fine, I've also
done some testing and it works OK. I would appreciate reports on how
it works for other people.

> BTW: I have managed to adapt nessus_db_schema.mysql, nessus-extract.pl
> and create-service-proto.pl to work with mysql on my RedHat 9 box which
> I could provide if anyone is interested.

I have not yet reviewed all the changes you sent (I have just updated
the mysql file and the documentation). I will review it soon, though.

Regards

Javier
Re: [Database-devel] Actual CVS doesn't compile [ In reply to ]
Javier,

Thanks for the update. I had finally success compiling and running it
but had to do some more changes:

In configure.in I added the test for --with-mysql-library since it
didn't work without out it (see attached file). This is due to the fact
that on my redhat 9.0 system the headers are in /usr/include/mysql while
the library is at /usr/lib/mysql.

If I use e.g. db_host = localhost in nessusd.conf instead of db_host=
localhost the variable name is set to "db_host " instead of "db_host".
This is true for db_host, db_user, db_pass. db_database works either
way! Maybe there is something wrong in preferences.c?

Additionally there is a typo in the dia file which results in a wrong
table name in nessus_db_schema.mysql: knowservice instead of knownservice.

In nessus-extract.pl line 152 is doubled which fires an error when run.

And finally the version still states 2.0.8 but I suppose it should be
2.0.10a, right?

Cheers,
Sandro
>
> Just FYI, the code now autoconfigures and compiles fine, I've also done
> some testing and it works OK. I would appreciate reports on how it works
> for other people.
>
>> BTW: I have managed to adapt nessus_db_schema.mysql, nessus-extract.pl
>> and create-service-proto.pl to work with mysql on my RedHat 9 box
>> which I could provide if anyone is interested.
>
>
> I have not yet reviewed all the changes you sent (I have just updated
> the mysql file and the documentation). I will review it soon, though.
>
> Regards
>
> Javier
>
>

--
"Linux is like a wigwam: no windows, no gates ... apache inside!"

http://www.lug-burghausen.org/
Re: [Database-devel] Actual CVS doesn't compile [ In reply to ]
Sandro Poppi wrote:

> Javier,
>
> Thanks for the update. I had finally success compiling and running it
> but had to do some more changes:
>
> In configure.in I added the test for --with-mysql-library since it
> didn't work without out it (see attached file). This is due to the fact
> that on my redhat 9.0 system the headers are in /usr/include/mysql while
> the library is at /usr/lib/mysql.

I will apply your changes, I just haven't got around to do it.

>
> If I use e.g. db_host = localhost in nessusd.conf instead of db_host=
> localhost the variable name is set to "db_host " instead of "db_host".
> This is true for db_host, db_user, db_pass. db_database works either
> way! Maybe there is something wrong in preferences.c?

Weird, I will check this out. The new code uses preferences.c instead
of trying to read nessusd.conf directly so if there's a bug, it's
probably there.

>
> Additionally there is a typo in the dia file which results in a wrong
> table name in nessus_db_schema.mysql: knowservice instead of knownservice.

I've already replaced the mysql schema with a better one which has not
been generated by the dia file, I still have to update it with the
latest changes the code introduces.

>
> In nessus-extract.pl line 152 is doubled which fires an error when run.

Will fix.

>
> And finally the version still states 2.0.8 but I suppose it should be
> 2.0.10a, right?
>

It's kind of mixed. The nessusd/ directory has been upgraded to
2.0.10a, but not the rest of the code, I don't believe the VERSION
should be updated until the rest of the code is merged with the latest
(probably HEAD) branch.

Regards

Javier