On Thursday 13 February 2003 05:13 pm, Pavel Kankovsky wrote:
> Yes, it would be silly to perform different actions in one plugin.
>
> I talked about a single action having multiple different results.
> Repeating a single test multiple times just to be able to report every
> possible result does not look like a good idea to me. One could create
> one primary "test" plugin putting the result into the KB for multiple
> auxilliary "report" plugins...hmm...some tests do it but is it a good
> general approach?

It has worked well for us over the last few years years, we also constrain 
each plugin to only call the security_* functions once per 
port/host/plugin. It means we have to aggregate the plugin data and 
report it all at the end, but leads to much easier report management. The 
only side effect is the case where a long-running plugin may timeout and 
depends on being able to report as it goes, these are usually fixed by 
adding a long timeout for that plugin.

The approach works well because it doesn't require you to have multiple 
copies of the same code in a ton of different plugins. This makes sense 
when doing network or time-intensive operations, since one plugin doing 
the session setup and the querying multiple pieces of information is much 
faster than multiple plugins all doing the same setup to query them 
individually. Plugin maintenance is also much nicer, since you only have 
to change the code in one place, Renaud's SMB plugins are a great example 
of this kind of development.


-HD

Reply via email to