[Oval-commits] r276 - trunk/oval-server

Pavel Vinogradov blaze-guest at alioth.debian.org
Fri Oct 5 17:55:18 UTC 2007


Author: blaze-guest
Date: 2007-10-05 17:55:18 +0000 (Fri, 05 Oct 2007)
New Revision: 276

Modified:
   trunk/oval-server/oval-monitor.py
   trunk/oval-server/oval-server.py
Log:
Merge my local changes into trunk

Modified: trunk/oval-server/oval-monitor.py
===================================================================
--- trunk/oval-server/oval-monitor.py	2007-10-05 17:47:09 UTC (rev 275)
+++ trunk/oval-server/oval-monitor.py	2007-10-05 17:55:18 UTC (rev 276)
@@ -1,9 +1,10 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 # -*- coding: utf-8 -*-
 #                                                                                                   # Written by Pavel Vinogradov
 # Licensed under the GNU General Public License version 2.
 
 from ConfigParser import SafeConfigParser
+from oval.dba.dba import dba, dbaNotAccesible
 import os, sys, time, getopt
 import traceback, exceptions
 sys.path = ['/usr/share/oval-server'] + sys.path
@@ -100,10 +101,17 @@
 				count += 1
 		print '\tNot affected to %d DSA' % count
 
-		print '\t--------------------------'
-		dsas = self.getAgentNottestedVuln (agentID)
+		print '--------------------------'
+		cursor.execute ("""SELECT vulnerabilities.vulnDSA FROM vulnerabilities 
+			OUTER JOIN affected
+			ON vulnerabilities.vulnDSA = affected.vulnDSA
+			WHERE affected.agentID = %d AND vulnerabilities.vulnTimestamp > affected.vulnTimestamp OR affected.vulnTimestamp IS NULL;""" % agentID)
+
+		dsas = cursor.fetchall()
+		count = 0
 		for dsa in dsas:
-			print '\tNot tested again DSA ID %s' %dsa[0]
+			print 'Not tested again DSA ID %s' %dsa[0]
+			count += 1	
 			
 	def reportDSA (self, dsaID):
 		"""Generate report for certain DSA.

Modified: trunk/oval-server/oval-server.py
===================================================================
--- trunk/oval-server/oval-server.py	2007-10-05 17:47:09 UTC (rev 275)
+++ trunk/oval-server/oval-server.py	2007-10-05 17:55:18 UTC (rev 276)
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python
 # -*- coding: utf-8 -*-
 # 
 # Written by Pavel Vinogradov <Pavel.Vinogradov at nixdev.net>




More information about the Oval-commits mailing list