[Netpass-devel] NetPass/www/components/Client BeginScan,1.12,1.13
Brought to you by:
jeffmurphy
From: jeff m. <jef...@us...> - 2006-01-19 21:41:56
|
Update of /cvsroot/netpass/NetPass/www/components/Client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv566/www/components/Client Modified Files: BeginScan Log Message: fixed/features to audit.mhtml web page Index: BeginScan =================================================================== RCS file: /cvsroot/netpass/NetPass/www/components/Client/BeginScan,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- BeginScan 31 Aug 2005 20:09:17 -0000 1.12 +++ BeginScan 19 Jan 2006 21:41:48 -0000 1.13 @@ -109,12 +109,18 @@ _log("ERROR", "$mac $ip couldnt login to nessus server\n"); _log("ERROR", "$mac $ip Nessus login failed code=", $nessus->code, " err=", $nessus->error, "\n"); - $m->comp('/Audit', 'msg' => [ 'end scan (nessus login failed)' ]); - # XXX if nessus is unavailable, we implicitly pass the client. - # XXX use nessus->WHEN_DOWN policy - - $m->session->{'phase'} = 'COMPLETE'; + # if nessus is unavailable, do something appropriate + + if ($np->cfg->nessus(-key => 'WHEN_DOWN') == 0) { + $m->comp('/Audit', 'msg' => [ 'end scan (nessus login failed, client implicitly unquarantined)' ]); + $m->session->{'phase'} = 'COMPLETE'; + } else { + # add the msg:nessus_down result to this client + $m->comp('/Audit', 'msg' => [ 'end scan (nessus login failed, client remains quarantined)' ]); + $np->db->addResult(-type => 'manual', -mac => $mac, -id => 'msg:nessus_down'); + $m->session->{'phase'} = 'REMEDIATE'; + } goto scan_finished; } |