On Sun, Nov 04, 2012 at 09:34:05PM +0100, Jan-Oliver Wagner wrote:
> Hello Hani,
> 

Hello Jan,

> On Friday 02 November 2012 11:40:24 Hani Benhabiles wrote:
> > I am attaching a set of patches that add scap synchronization feature to
> > the Greenbone Security Assistant.
> 
> very nice!
> 
> 
> > ov-mgr-scap-sync.patch: Adds --describe and --feedversion support for
> > openvas-scapdata-sync script.
> 
> this patch looks OK. I've just comitted a analog patch for the
> greenbone-scap-sync.
> 
> So, please go ahead and commit this file. Don't forget to update the
> ChangeLog together.
> 
> 
> > ov-adm-scap-sync.patch: Adds the possibility to specify scap-script option
> > for openvasad (defaulting to openvas-scapdata-sync). sync_scap and
> > describe_scap commands were also added. The patch also includes an
> > interface change. Now, openvas_sync_feed() and
> > openvas_get_sync_script_identification() take a 3rd argument to specify
> > whether the wanted synchronization is for NVT or SCAP (other
> > synchronizations types would be easier to add in the future) to profit from
> > some code reusing.
> > All the necessary modifications for this change were applied and all
> > relevant documentation was updated.
> 
> looks very good. I noticed that you used some <tab> in the code.
> For OpenVAS we have the rule to not use an <tab> in the code.

My bad, I will fix them and make sure none slip by in the future.

> 
> I tried to run the sync via GSA, but so this in the openvasad.log:
> ad  admin:WARNING:2012-11-03 19h42.31 CET:11988: greenbone-scapdata-sync is 
> not a NVT synchronization script.
> 

The message should read: "...is not a valid synchronization script."
as the code is shared now. I will fix this one.

> I checked the code and found that this is send from 
> openvas_get_sync_script_identification() which is using feed_type.
> AFAICS, feed_type will never be called with something else than
> NVT_FEED.
> 

Another possible value for feed_type is SCAP_FEED.

> What do I need to get this to work for the greenbone-scap-sync script?
> 

greenbone-scapdata-sync is not run because it has no support for --identify
option unlike greenbone-nvt-sync. To be able to run it, just add the same
modifications that were lacking from openvas-scapdata-sync i.e

--identify)
  init_sync
  echo "SCAPSYNC|$SCRIPT_NAME|$VERSION|$FEED_NAME|$RESTRICTED|SCAPSYNC"
  exit 0
  ;;

as well as values for variables FEED_NAME, SCRIPT_NAME and RESTRICTED. I don't
have a valid subscription file to be able to provied a tested patch but it
shouldn't be an issue to make the same modifications as for
openvas-scapdata-sync.

> Best
> 
> Jan
> 

Regards,
Hani.
_______________________________________________
Openvas-devel mailing list
Openvas-devel@wald.intevation.org
http://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-devel

Reply via email to