FreeBSD 5.3 ports security/nessus broken?

Oliver Leitner Shadow333 at gmx.at
Mon Feb 14 21:01:40 PST 2005


i just stumbled across an error in the compile, and couldnt quite figure out 
why...

i have nessus installed and i havent used or configured it yet, since there 
was a portupgrade out i issued it:

portupgrade -v security/nessus

after the download, and the config, they both went well, i had the following 
output at compiletime:

cc  auth.o  comm.o  sighand.o  xstuff.o  cli.o  parser.o  plugin_infos.o  
preferences.o  families.o  attack.o  report.o  report_ng.o  report_save.o  
report_utils.o  nsr_output.o   nbe_output.o  html_output.o  latex_output.o  
text_output.o  xml_output.o  xml_output_ng.o  html_graph_output.o  
error_dialog.o  password_dialog.o  monitor_dialog.o  backend.o  data_mining.o 
 prefs_dialog.o  prefs_dialog_misc.o  prefs_dialog_scan_opt.o  
prefs_dialog_user.o  prefs_dialog_auth.o  prefs_dialog_plugins_prefs.o  
prefs_plugins.o  prefs_target.o  prefs_about.o  prefs_kb.o  netmap.o  
detached_index.o  read_target_file.o  gdchart0.94b/gdc.o  
gdchart0.94b/price_conv.o  gdchart0.94b/gdc_pie.o  gdchart0.94b/gdchart.o  
regex.o  filter.o  dirutils.o  sslui.o  nessus.o   -o nessus 
`/usr/local/bin/nessus-config --libs` -L/usr/X11R6/lib -I/usr/X11R6/include 
-Wl,--export-dynamic -L/usr/local/lib -L/usr/X11R6/lib -lgtk-x11-2.0 
-lgdk-x11-2.0 -lXrandr -lXi -lXinerama -lXcursor -latk-1.0 -lgdk_pixbuf-2.0 
-lpangoxft-1.0 -lXft -lfreetype -lz -lXrender -lXext -lfontconfig 
-lpangox-1.0 -lX11 -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 
-liconv     gdchart0.94b/gd1.3/libgd.a -lm
test -d /usr/ports/security/nessus/work/nessus-core/bin || mkdir 
/usr/ports/security/nessus/work/nessus-core/bin
cp nessus /usr/ports/security/nessus/work/nessus-core/bin
cd nessusd && make
cc -O -pipe `sh ./cflags` -c auth.c
cc -O -pipe `sh ./cflags` -c attack.c
attack.c: In function `launch_plugin':
attack.c:185: error: `LAUNCH_DISABLED' undeclared (first use in this function)
attack.c:185: error: (Each undeclared identifier is reported only once
attack.c:185: error: for each function it appears in.)
*** Error code 1

Stop in /usr/ports/security/nessus/work/nessus-core/nessusd.
*** Error code 1

Stop in /usr/ports/security/nessus/work/nessus-core.
*** Error code 1

Stop in /usr/ports/security/nessus.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade55714.0 
make
** Fix the problem and try again.
--->  Build of security/nessus ended at: Tue, 15 Feb 2005 05:32:55 +0100 
(consumed 00:01:27)
--->  Upgrade of security/nessus ended at: Tue, 15 Feb 2005 05:32:55 +0100 
(consumed 00:01:27)
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
	! security/nessus (nessus-gtk2-2.2.2a)	(compiler error)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Tue, 15 Feb 2005 05:32:56 +0100 (consumed 00:01:30)

-- 

i took a look on the attack.c file and its corresponding code part:

<185>  if(plug_get_launch(args) != LAUNCH_DISABLED ||
<186>     category == ACT_INIT ||
<187>    (category == ACT_SETTINGS)) /* can we launch it ? */
<188> {

a subfunction of the name plug_get_launch gets called.

a search through files including this function shows:

bash-2.05b# grep 'plug_get_launch' *
attack.c:  if(plug_get_launch(args) != LAUNCH_DISABLED || 
pluginlaunch.c: processes[p].launch_status = 
plug_get_launch(plugin->arglist->value);
pluginscheduler.c: status = plug_get_launch(plugin);
pluginscheduler.c:   if(plug_get_launch(arg->value) != LAUNCH_DISABLED)
pluginscheduler.c:   if(plug_get_launch(l->plugin->arglist->value) == 
LAUNCH_DISABLED)
utils.c:    if(plug_get_launch(plugins->value) != LAUNCH_DISABLED )num++;

the most interresting piece of code hereby it looks comes from the 
pluginscheduler.c file:

/*---------------------------------------------------------------------------*/

/*
 * Enables a plugin and its dependencies
 */
static void enable_plugin_and_dependencies(plugins_scheduler_t shed, struct 
arglist * plugin, char * name, int silent)
{
 char ** deps;
 int i;
 int status;

 deps = hash_get_deps(shed->hash, name);
   
 status = plug_get_launch(plugin);
 if ( status == LAUNCH_DISABLED )
 {
  if ( silent == 0 )
   plug_set_launch(plugin, LAUNCH_RUN);
  else
   plug_set_launch(plugin, LAUNCH_SILENT);
 }

 if(deps != NULL)
 {
   for(i=0;deps[i] != NULL;i++)
    {
     struct scheduler_plugin * p;
     p = hash_get(shed->hash, deps[i]);
     if( p != NULL )
       enable_plugin_and_dependencies(shed, p->arglist->value, 
p->arglist->name, silent);
     else
       log_write("'%s' depends on '%s' which could not be found\n", name, 
deps[i]);
    }   
 }
}

/*---------------------------------------------------------------------------*/

im not quite good with coding, so my view through ends somewhere here:/

however, i strongly believe im doing something wrong, just if not, i hope 
this helps you further.

Greetings
Oliver Leitner
Technical Staff
http://www.shells.at

By reading this mail you agree to the following:

using or giving out the email address and any 
other info of the author of this email is strictly forbidden.
By acting against this agreement the author of this mail 
will take possible legal actions against the abuse.


More information about the freebsd-ports mailing list