[Oval-commits] r104 - in branches/debian: . debian debian/patches

Pavel Vinogradov blaze-guest at alioth.debian.org
Mon Aug 6 19:06:00 UTC 2007


Author: blaze-guest
Date: 2007-08-06 19:06:00 +0000 (Mon, 06 Aug 2007)
New Revision: 104

Added:
   branches/debian/debian/
   branches/debian/debian/README.Debian
   branches/debian/debian/changelog
   branches/debian/debian/compat
   branches/debian/debian/control
   branches/debian/debian/copyright
   branches/debian/debian/dirs
   branches/debian/debian/docs
   branches/debian/debian/files
   branches/debian/debian/install
   branches/debian/debian/oval.substvars
   branches/debian/debian/patches/
   branches/debian/debian/patches/oval.dpkg.patch
   branches/debian/debian/patches/oval.misc.patch
   branches/debian/debian/patches/oval.textfilecontent.patch
   branches/debian/debian/patches/series
   branches/debian/debian/rules
   branches/debian/debian/watch
Log:
Add all Debian related staff

Added: branches/debian/debian/README.Debian
===================================================================
--- branches/debian/debian/README.Debian	                        (rev 0)
+++ branches/debian/debian/README.Debian	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,6 @@
+oval for Debian
+---------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Pavel Vinogradov <Pavel.Vinogradov at nixdev.net>  Fri,  3 Aug 2007 10:13:04 +0500

Added: branches/debian/debian/changelog
===================================================================
--- branches/debian/debian/changelog	                        (rev 0)
+++ branches/debian/debian/changelog	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,6 @@
+oval (5.3-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Pavel Vinogradov <Pavel.Vinogradov at nixdev.net>  Fri,  3 Aug 2007 10:13:04 +0500
+

Added: branches/debian/debian/compat
===================================================================
--- branches/debian/debian/compat	                        (rev 0)
+++ branches/debian/debian/compat	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1 @@
+5

Added: branches/debian/debian/control
===================================================================
--- branches/debian/debian/control	                        (rev 0)
+++ branches/debian/debian/control	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,19 @@
+Source: oval
+Section: admin
+Priority: optional
+Maintainer: Pavel Vinogradov <Pavel.Vinogradov at nixdev.net>
+Build-Depends: debhelper (>= 5), autotools-dev, libpcre3-dev, libxerces27-dev, libxalan110-dev
+Standards-Version: 3.7.2
+
+Package: oval
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Open Vulnerability and Assessment Language references interpretator
+ OVAL is an international, information security, community 
+ standard to promote open and publicly available security 
+ content, and to standardize the transfer of this 
+ information across the entire spectrum of security tools
+ and services.
+ .
+ This package included reference interpretator, which 
+ adapted to use with Debian systems.

Added: branches/debian/debian/copyright
===================================================================
--- branches/debian/debian/copyright	                        (rev 0)
+++ branches/debian/debian/copyright	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,21 @@
+This package was debianized by Pavel Vinogradov <Pavel.Vinogradov at nixdev.net> on
+Fri,  3 Aug 2007 10:57:04 +0500.
+
+It was downloaded from http://oval.mitre.org/ 
+
+Upstream Author: Mitre Corp.
+
+Copyright: <put the year(s) of the copyright, and the names of the
+            copyright holder(s) here>
+
+License:
+
+You are free to distribute this software under the terms of
+the GNU General Public License  either version 2 of the License,
+or (at your option) any later version.
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file `/usr/share/common-licenses/GPL-2'.
+
+
+The Debian packaging is (C) 2007, Pavel Vinogradov <Pavel.Vinogradov at nixdev.net> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

Added: branches/debian/debian/dirs
===================================================================
--- branches/debian/debian/dirs	                        (rev 0)
+++ branches/debian/debian/dirs	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,2 @@
+usr/bin
+usr/man/man1

Added: branches/debian/debian/docs
===================================================================
--- branches/debian/debian/docs	                        (rev 0)
+++ branches/debian/debian/docs	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,5 @@
+docs/build.linux.txt
+docs/build.win32.txt
+docs/README.txt
+docs/terms.txt
+docs/version.txt

Added: branches/debian/debian/files
===================================================================
--- branches/debian/debian/files	                        (rev 0)
+++ branches/debian/debian/files	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1 @@
+oval_5.3-1_i386.deb admin optional

Added: branches/debian/debian/install
===================================================================
--- branches/debian/debian/install	                        (rev 0)
+++ branches/debian/debian/install	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,2 @@
+project/linux/Release/ovaldi usr/bin
+xml usr/share/oval

Added: branches/debian/debian/oval.substvars
===================================================================
--- branches/debian/debian/oval.substvars	                        (rev 0)
+++ branches/debian/debian/oval.substvars	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1 @@
+shlibs:Depends=libapt-pkg-libc6.3-6-3.11, libc6 (>= 2.3.6-6), libgcc1 (>= 1:4.1.1-12), libpcre3 (>= 4.5), libpopt0 (>= 1.10), librpm4 (<< 4.4.2), librpm4 (>= 4.4.0), libstdc++6 (>= 4.1.1-12), libxalan110, libxerces27

Added: branches/debian/debian/patches/oval.dpkg.patch
===================================================================
--- branches/debian/debian/patches/oval.dpkg.patch	                        (rev 0)
+++ branches/debian/debian/patches/oval.dpkg.patch	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,560 @@
+diff -urN oval-ref/oval-ref/src/probes/linux/DPKGInfoProbe.cpp oval-ref-dpkg/oval-ref/src/probes/linux/DPKGInfoProbe.cpp
+--- oval-ref/oval-ref/src/probes/linux/DPKGInfoProbe.cpp	1970-01-01 04:00:00.000000000 +0400
++++ oval-ref-dpkg/oval-ref/src/probes/linux/DPKGInfoProbe.cpp	2007-08-06 16:01:08.000000000 +0500
+@@ -0,0 +1,381 @@
++//
++// $Id: DPKGInfoProbe.cpp 4194 2007-07-10 15:33:35Z blaze $
++//
++//****************************************************************************************//
++// Copyright (c) 2002-2007, The MITRE Corporation
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without modification, are
++// permitted provided that the following conditions are met:
++//
++//     * Redistributions of source code must retain the above copyright notice, this list
++//       of conditions and the following disclaimer.
++//     * Redistributions in binary form must reproduce the above copyright notice, this 
++//       list of conditions and the following disclaimer in the documentation and/or other
++//       materials provided with the distribution.
++//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
++//       used to endorse or promote products derived from this software without specific 
++//       prior written permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
++// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
++// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
++// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
++// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
++// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++//
++//****************************************************************************************//
++
++#include "DPKGInfoProbe.h"
++
++//****************************************************************************************//
++//				DPKGInfoProbe Class					  //	
++//****************************************************************************************//
++DPKGInfoProbe *DPKGInfoProbe::instance = NULL;
++
++DPKGInfoProbe::DPKGInfoProbe() {
++	this->StatusFile = "/var/lib/dpkg/status";
++}
++
++DPKGInfoProbe::~DPKGInfoProbe() {
++
++}
++
++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Public Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
++AbsProbe* DPKGInfoProbe::Instance() {
++
++	// Use lazy initialization
++	if(instance == NULL) 
++		instance = new DPKGInfoProbe();
++
++	return instance;	
++}
++
++//bad
++ItemVector* DPKGInfoProbe::CollectItems(Object* object) {
++
++	ItemVector *collectedItems = new ItemVector();
++
++	ObjectEntity* name = object->GetElementByName("name");
++
++	// check datatypes - only allow string
++	if(name->GetDatatype() != OvalEnum::DATATYPE_STRING) {
++		throw ProbeException("Error: invalid data type specified on name. Found: " + OvalEnum::DatatypeToString(name->GetDatatype()));
++	}
++
++	// check operation - only allow  equals, not equals and pattern match
++	if(name->GetOperation() != OvalEnum::OPERATION_EQUALS && name->GetOperation() != OvalEnum::OPERATION_PATTERN_MATCH && name->GetOperation() != OvalEnum::OPERATION_NOT_EQUAL) {
++		throw ProbeException("Error: invalid operation specified on name. Found: " + OvalEnum::OperationToString(name->GetOperation()));
++	}
++
++	StringVector* names = this->GetDPKGNames(name);
++	if(names->size() > 0) {
++		StringVector::iterator iterator;
++		for(iterator = names->begin(); iterator != names->end(); iterator++) {		
++			this->GetDPKGInfo((*iterator), collectedItems);
++		}
++	} else {
++
++		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
++
++			if(name->GetVarRef() == NULL) {
++
++				Item* item = this->CreateItem();
++				item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
++				item->AppendElement(new ItemEntity("name",  name->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
++				collectedItems->push_back(item);
++
++			} else {
++
++				VariableValueVector::iterator iterator;
++				for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
++
++					Item* item = this->CreateItem();
++					item->SetStatus(OvalEnum::STATUS_DOES_NOT_EXIST);
++					item->AppendElement(new ItemEntity("name",  (*iterator)->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_DOES_NOT_EXIST));
++					collectedItems->push_back(item);
++				}
++			}
++		}
++	}
++	names->clear();
++	delete names;
++
++	return collectedItems;
++}  
++
++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Private Members  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
++Item* DPKGInfoProbe::CreateItem() {
++	// -----------------------------------------------------------------------
++	//
++	//  ABSTRACT
++	//
++	//  Return a new Item created for storing file information
++	//
++	// -----------------------------------------------------------------------
++
++	Item* item = new Item(0, 
++						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux", 
++						"linux-sc", 
++						"http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#linux linux-system-characteristics-schema.xsd", 
++						OvalEnum::STATUS_ERROR, 
++						"dpkginfo_item");
++
++	return item;
++}
++
++StringVector* DPKGInfoProbe::GetDPKGNames(ObjectEntity* name) {
++	// -----------------------------------------------------------------------
++	//
++	//  ABSTRACT
++	//
++	//  Get the set of all rpm names on the system that match the object
++	//
++	// -----------------------------------------------------------------------
++	StringVector* names = NULL;
++
++	// does this name use variables?
++	if(name->GetVarRef() == NULL) {
++		
++		// proceed based on operation
++		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
++			names = new StringVector();
++			// if the name exists add it to the list 
++			if(this->DPKGExists(name->GetValue())) {
++				names->push_back(name->GetValue());
++			}
++
++		} else if(name->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
++			
++			names = this->GetMatchingDPKGNames(name->GetValue(), false);
++
++		} else if(name->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
++			names = this->GetMatchingDPKGNames(name->GetValue(), true);
++		}		
++
++	} else {
++
++		names = new StringVector();
++
++		// Get all names
++		StringVector allNames;
++
++		if(name->GetOperation() == OvalEnum::OPERATION_EQUALS) {
++			// in the case of equals simply loop through all the 
++			// variable values and add them to the set of all names
++			// if they exist on the system
++			VariableValueVector::iterator iterator;
++			for(iterator = name->GetVarRef()->GetValues()->begin(); iterator != name->GetVarRef()->GetValues()->end(); iterator++) {
++				
++				if(this->DPKGExists((*iterator)->GetValue())) {
++					allNames.push_back((*iterator)->GetValue());
++				}
++			}
++
++		} else {
++            		this->GetMatchingDPKGNames(".*", &allNames);
++		}
++	
++		// loop through all names on the system
++		// only keep names that match operation and value and var check
++		ItemEntity* tmp = this->CreateItemEntity(name);
++		StringVector::iterator it;
++		for(it = allNames.begin(); it != allNames.end(); it++) {
++			tmp->SetValue((*it));
++			
++			if(name->Analyze(tmp) == OvalEnum::RESULT_TRUE) {
++				names->push_back((*it));
++			}
++		}
++	}
++
++	return names;
++}
++
++//bad
++StringVector* DPKGInfoProbe::GetMatchingDPKGNames(string pattern, bool isRegex) {
++	// -----------------------------------------------------------------------
++	//
++	//  ABSTRACT
++	//
++	//  Get the set of all rpm names on the system that match the pattern
++	//
++	// -----------------------------------------------------------------------
++	
++	string installed_dpkg_name;
++	string installed_dpkg_status;
++
++	StringVector* names = new StringVector ();
++
++	FileFd Fd(this->StatusFile, FileFd::ReadOnly);
++	pkgTagFile Tags(&Fd);
++
++	if (_error->PendingError() == true)
++		throw ProbeException("Error: (DPKGInfoProbe) Could not read DPKG status file, which is necessary to read the packages status.");
++   
++	pkgTagSection Section;
++		
++	while (Tags.Step(Section) == true)
++   	{
++		/* Fetch the name, auto-detecting if this is a source file or a package file */
++		installed_dpkg_name = readHeaderString (Section, "Package");
++      		installed_dpkg_status = readHeaderString (Section, "Status");
++		if ( installed_dpkg_status.compare ("install ok installed") == 0 ) 
++		{
++			if (this->IsMatch (pattern, installed_dpkg_name, isRegex))
++				names->push_back (installed_dpkg_name);
++		}
++   	}
++	
++   	if (_error->PendingError() == true)
++   		throw ProbeException("Error: (DPKGInfoProbe) Error while walking DPKG database.");
++
++	return names;
++}
++
++bool DPKGInfoProbe::DPKGExists(string name) {
++	// -----------------------------------------------------------------------
++	//
++	//  ABSTRACT
++	//
++	//  return true if the specifeid deb exists
++	//
++	// -----------------------------------------------------------------------
++	bool exist = false;
++	bool found = false;
++	
++	FileFd Fd(this->StatusFile, FileFd::ReadOnly);
++	pkgTagFile Tags(&Fd);
++
++	if (_error->PendingError() == true) {
++		throw ProbeException("Error: (DPKGInfoProbe) Could not read DPKG status file, which is necessary to read the DPKG database.");
++	}
++   
++	pkgTagSection Section;
++	
++	while (Tags.Step(Section) == true && found == false)
++   	{
++    		/* Fetch the name, auto-detecting if this is a source file or a package file */
++      		string installed_dpkg_name = readHeaderString (Section, "Package");
++      		string installed_dpkg_status = readHeaderString (Section, "Status");
++      		
++      		if (installed_dpkg_name.empty() == true)
++      			throw ProbeException("Error: (DPKGInfoProbe) Error while walking DPKG database.");
++      
++      		if ( installed_dpkg_name.compare (name) == 0 ) 
++      		{
++      			if (installed_dpkg_status.compare ("install ok installed") == 0 ) 
++      			{
++      				exist = true;
++	      		}	
++	      		found = true; 
++      		}
++		}
++	
++   	if (_error->PendingError() == true)
++   		throw ProbeException("Error: (DPKGInfoProbe) Error while walking DPKG database.");
++   	
++   	return exist;
++}
++
++//bad
++void DPKGInfoProbe::GetDPKGInfo(string name, ItemVector* items) {
++  //------------------------------------------------------------------------------------//
++  //
++  //  ABSTRACT
++  //
++  //  Get the data for all packages that have the name that matches dpkg_name.  
++  //
++  //------------------------------------------------------------------------------------//
++
++  /* Get the dpkg_name form the data object. */
++  const char *dpkg_name = name.c_str();
++
++  /* Create a tmp data object reference. */
++  Item *item = NULL;
++
++  /* Epoch, version, release and architecture data for output. */
++  string installed_epoch, installed_version, installed_release,installed_architecture, installed_evr;
++  string installedEpochEvr;
++
++    /* Header object for the installed package. */
++  pkgTagSection section;
++
++  /* Read in the DPKG status files */
++  FileFd Fd(this->StatusFile, FileFd::ReadOnly);
++  pkgTagFile Tags(&Fd);
++
++  if (_error->PendingError() == true) {
++	  throw ProbeException("Error: (DPKGInfoProbe) Could not read DPKG status file, which is necessary to read the DPKG database.");
++  }
++
++  while (Tags.Step(section) == true)
++  {
++	  /* Fetch the name, auto-detecting if this is a source file or a package file */
++	  string installed_dpkg_name = readHeaderString (section, "Package");
++	  string installed_dpkg_status = readHeaderString (section, "Status");
++    		
++	  if ( installed_dpkg_name.compare (dpkg_name) == 0 ) 
++	  {
++		  if (installed_dpkg_status.compare ("install ok installed") == 0 ) 
++		  {
++			  /* epoch is an int_32 -- we'll display a string to handle the None case well. */
++			  /*    char intermediate_string[11];
++			      int_32 epoch = readHeaderInt32(header, RPMTAG_EPOCH);
++			  	string installedEpochEvr;
++			  	if (epoch == -1 ) {
++			        installed_epoch = "(none)";
++			  		installedEpochEvr = "0";
++			  	} else {
++			        snprintf(intermediate_string,11,"%d",epoch);
++			        installed_epoch = intermediate_string;
++			  	  installedEpochEvr = installed_epoch;
++			      }
++			*/
++			  	//installed_epoch = "(none)";
++				installed_epoch = "0";
++			  	installedEpochEvr = installed_epoch;
++			  /* the remaining arguments are all normal strings */
++				string version = this->readHeaderString(section, "Version");
++				string::size_type find = version.rfind('-');
++				if (find != string::npos) {
++					installed_version = version.substr(0, find);
++					installed_release = version.substr(find+1, version.length());
++				} else {
++					installed_version = version;
++					installed_release = "0";
++				}
++			    	installed_architecture = this->readHeaderString(section, "Architecture");
++				installed_evr = installedEpochEvr + ":" + installed_version + "-" + installed_release;
++
++			    /* Put the data in a data object. */
++			    item = this->CreateItem();
++			    item->SetStatus(OvalEnum::STATUS_EXISTS);
++				item->AppendElement(new ItemEntity("name",  name, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
++				item->AppendElement(new ItemEntity("arch",  installed_architecture, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
++				item->AppendElement(new ItemEntity("epoch",  installed_epoch, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
++				item->AppendElement(new ItemEntity("release",  installed_release, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
++				item->AppendElement(new ItemEntity("version",  installed_version, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
++				item->AppendElement(new ItemEntity("evr",  installed_evr, OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
++
++			    /* add the new item to the vector. */
++			    items->push_back(item);
++		  }
++	  }
++  }
++}
++
++string DPKGInfoProbe::readHeaderString(pkgTagSection Section, char* sectionName) {
++	string value;
++
++	value = Section.FindS(sectionName);
++
++	return (value);
++}
+diff -urN oval-ref/oval-ref/src/probes/linux/DPKGInfoProbe.h oval-ref-dpkg/oval-ref/src/probes/linux/DPKGInfoProbe.h
+--- oval-ref/oval-ref/src/probes/linux/DPKGInfoProbe.h	1970-01-01 04:00:00.000000000 +0400
++++ oval-ref-dpkg/oval-ref/src/probes/linux/DPKGInfoProbe.h	2007-08-06 16:01:27.000000000 +0500
+@@ -0,0 +1,108 @@
++//
++// $Id: DPKGInfoProbe.h 4194 2007-07-03 15:33:35Z blaze $
++//
++//****************************************************************************************//
++// Copyright (c) 2002-2007, The MITRE Corporation
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without modification, are
++// permitted provided that the following conditions are met:
++//
++//     * Redistributions of source code must retain the above copyright notice, this list
++//       of conditions and the following disclaimer.
++//     * Redistributions in binary form must reproduce the above copyright notice, this 
++//       list of conditions and the following disclaimer in the documentation and/or other
++//       materials provided with the distribution.
++//     * Neither the name of The MITRE Corporation nor the names of its contributors may be
++//       used to endorse or promote products derived from this software without specific 
++//       prior written permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
++// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
++// SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
++// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
++// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
++// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++//
++//****************************************************************************************//
++
++#ifndef DPKGInfoProbe_H
++#define DPKGInfoProbe_H
++
++#include "AbsProbe.h"
++
++#include <apt-pkg/progress.h> 	//OpTextProgress
++#include <apt-pkg/cachefile.h> 	//pkgCacheFile
++#include <apt-pkg/configuration.h> //_config
++#include <apt-pkg/tagfile.h>	//pkgTagFile, pkgTagSection 
++#include <apt-pkg/error.h> 	//_error
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/termios.h>
++#include <sys/wait.h>
++
++#include <fcntl.h>
++
++#include <iostream>
++#include <string>
++#include <vector>
++
++using namespace std;
++/**
++	Data collector for dpkg info test.
++*/
++class DPKGInfoProbe : public AbsProbe {
++public:
++	~DPKGInfoProbe();       
++
++	ItemVector* CollectItems(Object* object);
++	Item* CreateItem();
++
++	/** Ensure that the DPKGInfoProbe is a singleton. */
++	static AbsProbe* Instance();
++
++private:
++	string StatusFile;
++
++	DPKGInfoProbe();
++
++	/**
++		Return the name of all debs on the system that match the specirfied Object entity's criteria.
++		All names that are return have been checked and exist on the system.
++		@param name an ObjectEntity* that represents the objects to collect on the system
++		@return The matching names
++	*/
++	StringVector* GetDPKGNames(ObjectEntity* name);
++
++	/**
++		Get all deb names on the system that match the specified pattern.
++		@param pattern a string used that deb names are compared against.
++		@param isRegex a bool that is indicates how system deb names should be compared against the specifed pattern
++		@return The set of matching names.
++	*/
++	StringVector* GetMatchingDPKGNames(string pattern, bool isRegex);
++
++	/**
++		Return true if the specifeid deb exists on the system.
++		@param name a string that hold the name of the deb to check for.
++		@result The result of checking for the specifed deb on the system.
++	*/
++	bool DPKGExists(string name);
++
++	/**
++		Get all the information for the named deb.
++		@param name a string representing the name of an deb on the system.
++		@param items a vector of items that matched the deb name.
++	*/
++	void GetDPKGInfo(string name, ItemVector* items);
++
++	string readHeaderString(pkgTagSection section, char* sectionName);
++
++	static DPKGInfoProbe *instance;
++};
++
++#endif
+diff -urN oval-ref/project/linux/Makefile oval-ref-dpkg/project/linux/Makefile
+--- oval-ref/project/linux/Makefile	2007-06-26 22:30:31.000000000 +0500
++++ oval-ref-dpkg/project/linux/Makefile	2007-08-06 16:01:55.000000000 +0500
+@@ -54,7 +54,7 @@
+ LIBDIR = -L/usr/lib
+ 
+ # What libraries do we need?
+-LIBS = -lxerces-c -lxalan-c -lpcre -lrpm -lrpmdb -lrpmio -lpopt
++LIBS = -lxerces-c -lxalan-c -lpcre -lrpm -lrpmdb -lrpmio -lpopt -lapt-pkg
+ 
+ # Determine what platform the source is being build on
+ PLATFORM = $(shell uname)
+@@ -132,6 +132,7 @@
+ 	InetListeningServersProbe.obj \
+ 	ProcessProbe.obj \
+ 	RPMInfoProbe.obj \
++	DPKGInfoProbe.obj \
+ 	UnameProbe.obj \
+ 	TextFileContentProbe.obj \
+ 	XmlFileContentProbe.obj \
+@@ -213,6 +214,7 @@
+ 	$(BUILDDIR)/InetListeningServersProbe.obj \
+ 	$(BUILDDIR)/ProcessProbe.obj \
+ 	$(BUILDDIR)/RPMInfoProbe.obj \
++	$(BUILDDIR)/DPKGInfoProbe.obj \
+ 	$(BUILDDIR)/UnameProbe.obj \
+ 	$(BUILDDIR)/TextFileContentProbe.obj \
+ 	$(BUILDDIR)/XmlFileContentProbe.obj \
+diff -urN oval-ref/src/linux/ProbeFactory.cpp oval-ref-dpkg/src/linux/ProbeFactory.cpp
+--- oval-ref/src/linux/ProbeFactory.cpp	2007-01-17 00:20:32.000000000 +0400
++++ oval-ref-dpkg/src/linux/ProbeFactory.cpp	2007-08-06 16:02:18.000000000 +0500
+@@ -82,7 +82,7 @@
+ 
+ // here are the objects defined in the linux schema
+ 	} else if(objectName.compare("dpkginfo_object") == 0) {
+-		// Not currently implemented
++		probe = DPKGInfoProbe::Instance();
+ 	} else if(objectName.compare("inetlisteningservers_object") == 0) {
+ 		probe = InetListeningServersProbe::Instance();
+ 	} else if(objectName.compare("rpminfo_object") == 0) {
+@@ -109,7 +109,10 @@
+ 
+ 	probe = RPMInfoProbe::Instance();
+ 	delete probe;
+-
++	
++	probe = DPKGInfoProbe::Instance();
++	delete probe;
++	
+ 	probe = ProcessProbe::Instance();
+ 	delete probe;
+ 
+diff -urN oval-ref/src/linux/ProbeFactory.h oval-ref-dpkg/src/linux/ProbeFactory.h
+--- oval-ref/src/linux/ProbeFactory.h	2007-01-17 00:09:36.000000000 +0400
++++ oval-ref-dpkg/src/linux/ProbeFactory.h	2007-08-06 16:02:36.000000000 +0500
+@@ -47,6 +47,7 @@
+ #include "FamilyProbe.h"
+ #include "UnameProbe.h"
+ #include "RPMInfoProbe.h"
++#include "DPKGInfoProbe.h"
+ #include "InetListeningServersProbe.h"
+ #include "ProcessProbe.h"
+ //#include "ShadowProbe.h"

Added: branches/debian/debian/patches/oval.misc.patch
===================================================================
--- branches/debian/debian/patches/oval.misc.patch	                        (rev 0)
+++ branches/debian/debian/patches/oval.misc.patch	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,768 @@
+diff -urN oval-ref/src/AbsCriteria.h oval-ref-misc/src/AbsCriteria.h
+--- oval-ref/src/AbsCriteria.h	2007-06-22 19:03:41.000000000 +0500
++++ oval-ref-misc/src/AbsCriteria.h	2007-08-06 16:08:39.000000000 +0500
+@@ -65,7 +65,7 @@
+ class AbsCriteria {
+ 
+ public :
+-	/** Create a compelete AbsCriteria object. 
++	/** Create a complete AbsCriteria object. 
+ 		All paremters are initialized with default values. 
+ 		Default values are: negate = false; result = error
+ 	*/
+diff -urN oval-ref/src/AbsFunctionComponent.cpp oval-ref-misc/src/AbsFunctionComponent.cpp
+--- oval-ref/src/AbsFunctionComponent.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/AbsFunctionComponent.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete AbsFunctionComponent object
++	//	Create a complete AbsFunctionComponent object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/AbsObject.cpp oval-ref-misc/src/AbsObject.cpp
+--- oval-ref/src/AbsObject.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/AbsObject.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Entity object
++	//	Create a complete Entity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/AbsState.cpp oval-ref-misc/src/AbsState.cpp
+--- oval-ref/src/AbsState.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/AbsState.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -53,7 +53,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/AbsVariable.cpp oval-ref-misc/src/AbsVariable.cpp
+--- oval-ref/src/AbsVariable.cpp	2007-06-22 21:36:16.000000000 +0500
++++ oval-ref-misc/src/AbsVariable.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -40,7 +40,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Entity object
++	//	Create a complete Entity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/Behavior.h oval-ref-misc/src/Behavior.h
+--- oval-ref/src/Behavior.h	2007-01-11 22:14:16.000000000 +0400
++++ oval-ref-misc/src/Behavior.h	2007-08-06 16:08:39.000000000 +0500
+@@ -56,12 +56,12 @@
+ typedef vector < Behavior*, allocator<Behavior*> > BehaviorVector;
+ 
+ /**
+-	This class represents a behavior in teh oval definition schema
++	This class represents a behavior in the oval definition schema
+ 	Behaviors are used by objects to refine data collection.
+ */
+ class Behavior {
+ public:
+-	/** Create a compelete Behavior object. */
++	/** Create a complete Behavior object. */
+ 	Behavior(string name = "", string value = "");
+ 	~Behavior();
+ 
+diff -urN oval-ref/src/CollectedObject.cpp oval-ref-misc/src/CollectedObject.cpp
+--- oval-ref/src/CollectedObject.cpp	2007-06-22 19:12:43.000000000 +0500
++++ oval-ref-misc/src/CollectedObject.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -41,7 +41,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete CollectedObject object
++	//	Create a complete CollectedObject object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/ComponentValue.cpp oval-ref-misc/src/ComponentValue.cpp
+--- oval-ref/src/ComponentValue.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/ComponentValue.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ComponentValue object
++	//	Create a complete ComponentValue object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/ConcatFunction.cpp oval-ref-misc/src/ConcatFunction.cpp
+--- oval-ref/src/ConcatFunction.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/ConcatFunction.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -15,7 +15,7 @@
+ //       materials provided with the distribution.
+ //     * Neither the name of The MITRE Corporation nor the names of its contributors may be
+ //       used to endorse or promote products derived from this software without specific 
+-//       prior written permission.
++//       prior written pemission.
+ //
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ConcatFunction object
++	//	Create a complete ConcatFunction object
+ 	//
+ 	// -----------------------------------------------------------------------
+ }
+diff -urN oval-ref/src/ConstantVariable.cpp oval-ref-misc/src/ConstantVariable.cpp
+--- oval-ref/src/ConstantVariable.cpp	2007-06-22 19:12:09.000000000 +0500
++++ oval-ref-misc/src/ConstantVariable.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ConstantVariable
++	//	Create a complete ConstantVariable
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/Criteria.cpp oval-ref-misc/src/Criteria.cpp
+--- oval-ref/src/Criteria.cpp	2007-03-29 23:11:35.000000000 +0500
++++ oval-ref-misc/src/Criteria.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Criteria object
++	//	Create a complete Criteria object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/Criterion.h oval-ref-misc/src/Criterion.h
+--- oval-ref/src/Criterion.h	2007-06-22 19:05:38.000000000 +0500
++++ oval-ref-misc/src/Criterion.h	2007-08-06 16:08:39.000000000 +0500
+@@ -48,7 +48,7 @@
+ class Criterion : public AbsCriteria {
+ 
+ public:
+-	/** Create a compelete Criterion object. */
++	/** Create a complete Criterion object. */
+ 	Criterion(bool negate = false, OvalEnum::ResultEnumeration result = OvalEnum::RESULT_ERROR, Test* testRef = NULL);
+ 	/** Empty destructor. */
+ 	~Criterion();
+diff -urN oval-ref/src/Definition.cpp oval-ref-misc/src/Definition.cpp
+--- oval-ref/src/Definition.cpp	2007-06-22 19:05:38.000000000 +0500
++++ oval-ref-misc/src/Definition.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -41,7 +41,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Definition object
++	//	Create a complete Definition object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -106,7 +106,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the id field's value
++	//	Set the id field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -128,7 +128,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the result field's value
++	//	Set the result field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -150,7 +150,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the variableInstance field's value
++	//	Set the variableInstance field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -172,7 +172,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the version field's value
++	//	Set the version field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -194,7 +194,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the written field's value
++	//	Set the written field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -216,7 +216,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the analyzed field's value
++	//	Set the analyzed field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -255,7 +255,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	clear the cahce of processed defintions
++	//	clear the cache of processed defintions
+ 	// -----------------------------------------------------------------------
+ 
+ 	//Definition* def = NULL;
+diff -urN oval-ref/src/Exception.cpp oval-ref-misc/src/Exception.cpp
+--- oval-ref/src/Exception.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/Exception.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//  ABSTRACT
+ 	//
+-	//  A simple constructor that sets the error message and the severity ot
++	//  A simple constructor that sets the error message and the severity of
+ 	//	this exception to the specified values
+ 	//
+ 	// -----------------------------------------------------------------------
+diff -urN oval-ref/src/ExtendedDefinition.cpp oval-ref-misc/src/ExtendedDefinition.cpp
+--- oval-ref/src/ExtendedDefinition.cpp	2007-03-29 23:15:33.000000000 +0500
++++ oval-ref-misc/src/ExtendedDefinition.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ExtendedDefinition object
++	//	Create a complete ExtendedDefinition object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/ExternalVariable.cpp oval-ref-misc/src/ExternalVariable.cpp
+--- oval-ref/src/ExternalVariable.cpp	2007-06-22 19:12:09.000000000 +0500
++++ oval-ref-misc/src/ExternalVariable.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ExternalVariable
++	//	Create a complete ExternalVariable
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/Filter.cpp oval-ref-misc/src/Filter.cpp
+--- oval-ref/src/Filter.cpp	2007-06-22 19:13:33.000000000 +0500
++++ oval-ref-misc/src/Filter.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -40,7 +40,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -54,7 +54,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -64,7 +64,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -159,7 +159,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Parse the provided state from a defintion file into an Filter object
++	//	Parse the provided state from a definition file into an Filter object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/FilterEntity.cpp oval-ref-misc/src/FilterEntity.cpp
+--- oval-ref/src/FilterEntity.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/FilterEntity.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	//	Abstract
+ 	//
+ 	//	Copy constructor.
+-	//	Create a compelete FilterEntity object based on the specified obj.
++	//	Create a complete FilterEntity object based on the specified obj.
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -59,7 +59,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete FilterEntity object
++	//	Create a complete FilterEntity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -104,7 +104,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return true iff this FilterEntity is equal to the provided FilterEntity
++	//	Return true if this FilterEntity is equal to the provided FilterEntity
+ 	// -----------------------------------------------------------------------
+ 	FilterEntity* filterEntity = (FilterEntity*)entity;
+ 	bool isEqual = false;
+diff -urN oval-ref/src/Item.cpp oval-ref-misc/src/Item.cpp
+--- oval-ref/src/Item.cpp	2007-04-18 19:25:34.000000000 +0500
++++ oval-ref-misc/src/Item.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -42,7 +42,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Entity object
++	//	Create a complete Entity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -155,7 +155,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Set the messages field's value
++	//	Get the messages field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 	return &this->messages;
+diff -urN oval-ref/src/ItemEntity.cpp oval-ref-misc/src/ItemEntity.cpp
+--- oval-ref/src/ItemEntity.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/ItemEntity.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ItemEntity object
++	//	Create a complete ItemEntity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -175,7 +175,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return true iff this ItemEntity is equal to the provided ItemEntity
++	//	Return true if this ItemEntity is equal to the provided ItemEntity
+ 	//	Note: Status is not compared.
+ 	// -----------------------------------------------------------------------
+ 	
+diff -urN oval-ref/src/Item.h oval-ref-misc/src/Item.h
+--- oval-ref/src/Item.h	2007-06-22 19:12:09.000000000 +0500
++++ oval-ref-misc/src/Item.h	2007-08-06 16:08:39.000000000 +0500
+@@ -81,7 +81,7 @@
+ 	This class represents an Item in a sytem characteristics file.
+     Items must be unique. The Item::Equals() method and the caching methods
+ 	provided in this class should be utilized to ensure uniqueness. This class also
+-	provides staticv methods for assigning Item ids.
++	provides static methods for assigning Item ids.
+ */
+ class Item {
+ public:
+diff -urN oval-ref/src/LiteralComponent.cpp oval-ref-misc/src/LiteralComponent.cpp
+--- oval-ref/src/LiteralComponent.cpp	2007-06-22 19:12:09.000000000 +0500
++++ oval-ref-misc/src/LiteralComponent.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete LiteralComponent object
++	//	Create a complete LiteralComponent object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/LocalVariable.cpp oval-ref-misc/src/LocalVariable.cpp
+--- oval-ref/src/LocalVariable.cpp	2007-06-22 19:12:09.000000000 +0500
++++ oval-ref-misc/src/LocalVariable.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete LocalVariable
++	//	Create a complete LocalVariable
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -93,7 +93,7 @@
+ 	// set the error message for this varaible
+ 	this->AppendMessages(value->GetMessages());
+ 
+-	// if flag is compelete or incomplete create VariableValues for each value.
++	// if flag is complete or incomplete create VariableValues for each value.
+ 	if(value->GetFlag() == OvalEnum::FLAG_COMPLETE || value->GetFlag() == OvalEnum::FLAG_INCOMPLETE) {
+ 		StringVector::iterator iterator;
+ 		for(iterator = value->GetValues()->begin(); iterator != value->GetValues()->end(); iterator++) {
+diff -urN oval-ref/src/Main.cpp oval-ref-misc/src/Main.cpp
+--- oval-ref/src/Main.cpp	2007-06-28 21:02:55.000000000 +0500
++++ oval-ref-misc/src/Main.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -685,7 +685,7 @@
+ 	//------------------------------------------------------------------------------------//
+ 
+ 	cout << endl;
+-	cout << "Command Line: >ovaldi [option] MD5Hash" << endl;
++	cout << "Command Line: ovaldi [option] MD5Hash" << endl;
+ 	cout << endl;
+ 	cout << "Options:" << endl;
+ 	cout << "   -h           = show options available from command line" << endl;
+@@ -698,7 +698,7 @@
+ 	cout << "\n";
+ 	cout << "   -i <string>  = use data from input System Characteristics file" << endl;
+ 	cout << "\n";
+-	cout << "   -n           = perform Schematron validation of the oval-defiitions file." << endl;
++	cout << "   -n           = perform Schematron validation of the oval-definitions file." << endl;
+ 	cout << "   -c <string>  = use the specified xsl for oval-definitions Schematron validation. DEFAULT=\"oval-definitions-schematron.xsl\"" << endl;
+ 	cout << "\n";
+ 	cout << "   -m           = do not verify the oval.xml file with an MD5 hash" << endl;
+diff -urN oval-ref/src/ObjectComponent.cpp oval-ref-misc/src/ObjectComponent.cpp
+--- oval-ref/src/ObjectComponent.cpp	2007-06-22 19:11:50.000000000 +0500
++++ oval-ref-misc/src/ObjectComponent.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ObjectComponent object
++	//	Create a complete ObjectComponent object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/Object.cpp oval-ref-misc/src/Object.cpp
+--- oval-ref/src/Object.cpp	2007-04-18 19:25:34.000000000 +0500
++++ oval-ref-misc/src/Object.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete object
++	//	Create a complete object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/ObjectEntity.cpp oval-ref-misc/src/ObjectEntity.cpp
+--- oval-ref/src/ObjectEntity.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/ObjectEntity.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	//	Abstract
+ 	//
+ 	//	Copy constructor.
+-	//	Create a compelete ObjectEntity object based on the specified obj.
++	//	Create a complete ObjectEntity object based on the specified obj.
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -58,7 +58,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete ObjectEntity object
++	//	Create a complete ObjectEntity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ }
+@@ -79,7 +79,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return true iff this ObjectEntity is equal to the provided ObjectEntity
++	//	Return true if this ObjectEntity is equal to the provided ObjectEntity
+ 	// -----------------------------------------------------------------------
+ 	ObjectEntity* objectEntity = (ObjectEntity*)entity;
+ 	bool isEqual = false;
+diff -urN oval-ref/src/OvalMessage.cpp oval-ref-misc/src/OvalMessage.cpp
+--- oval-ref/src/OvalMessage.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/OvalMessage.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete OvalMessage object
++	//	Create a complete OvalMessage object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -106,7 +106,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Set the Level field's value
++	//	Make string representation of object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/RestrictionType.cpp oval-ref-misc/src/RestrictionType.cpp
+--- oval-ref/src/RestrictionType.cpp	2007-06-22 19:08:57.000000000 +0500
++++ oval-ref-misc/src/RestrictionType.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete RestrictionType
++	//	Create a complete RestrictionType
+ 	//
+ 	// -----------------------------------------------------------------------
+ 	this->datatype = datatype;
+diff -urN oval-ref/src/SetObject.cpp oval-ref-misc/src/SetObject.cpp
+--- oval-ref/src/SetObject.cpp	2007-04-18 19:25:34.000000000 +0500
++++ oval-ref-misc/src/SetObject.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete SetObject
++	//	Create a complete SetObject
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/State.cpp oval-ref-misc/src/State.cpp
+--- oval-ref/src/State.cpp	2007-06-22 19:13:33.000000000 +0500
++++ oval-ref-misc/src/State.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -53,7 +53,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ }
+@@ -62,7 +62,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete State object
++	//	Create a complete State object
+ 	//
+ 	// -----------------------------------------------------------------------
+ }
+@@ -71,7 +71,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	AbsState class handles deleteing all elements
++	//	AbsState class handles deleting all elements
+ 	// -----------------------------------------------------------------------
+ }
+ 
+diff -urN oval-ref/src/StateEntity.cpp oval-ref-misc/src/StateEntity.cpp
+--- oval-ref/src/StateEntity.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/StateEntity.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -39,7 +39,7 @@
+ 	//	Abstract
+ 	//
+ 	//	Copy constructor.
+-	//	Create a compelete StateEntity object based on the specified obj.
++	//	Create a complete StateEntity object based on the specified obj.
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -59,7 +59,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete StateEntity object
++	//	Create a complete StateEntity object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -104,7 +104,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return true iff this StateEntity is equal to the provided StateEntity
++	//	Return true if this StateEntity is equal to the provided StateEntity
+ 	// -----------------------------------------------------------------------
+ 	StateEntity* stateEntity = (StateEntity*)entity;
+ 	bool isEqual = false;
+diff -urN oval-ref/src/State.h oval-ref-misc/src/State.h
+--- oval-ref/src/State.h	2007-06-22 19:13:33.000000000 +0500
++++ oval-ref-misc/src/State.h	2007-08-06 16:08:39.000000000 +0500
+@@ -44,7 +44,7 @@
+ 
+ /**
+ 	This class represents a state in the oval definition schema.
+-	States are used by tests for analysis pruposes. The State 
++	States are used by tests for analysis purposes. The State 
+ 	declares what an expected condition is for some item on a system.
+ */
+ class State : public AbsState {
+diff -urN oval-ref/src/SubstringFunction.cpp oval-ref-misc/src/SubstringFunction.cpp
+--- oval-ref/src/SubstringFunction.cpp	2007-06-22 19:10:55.000000000 +0500
++++ oval-ref-misc/src/SubstringFunction.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Component object
++	//	Create a complete Component object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/TestedItem.cpp oval-ref-misc/src/TestedItem.cpp
+--- oval-ref/src/TestedItem.cpp	2007-06-22 19:13:33.000000000 +0500
++++ oval-ref-misc/src/TestedItem.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete Test object
++	//	Create a complete Test object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -74,7 +74,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the item field's value
++	//	Set the item field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+@@ -96,7 +96,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Return the result field's value
++	//	Set the result field's value
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/Test.h oval-ref-misc/src/Test.h
+--- oval-ref/src/Test.h	2007-06-22 20:37:13.000000000 +0500
++++ oval-ref-misc/src/Test.h	2007-08-06 16:08:39.000000000 +0500
+@@ -65,7 +65,7 @@
+ class Test {
+ 
+ public:
+-	/** Create a compelete Test object **/
++	/** Create a complete Test object **/
+ 	Test();
+ 	~Test();
+ 
+diff -urN oval-ref/src/VariableComponent.cpp oval-ref-misc/src/VariableComponent.cpp
+--- oval-ref/src/VariableComponent.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/VariableComponent.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -38,7 +38,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete VariableComponent object
++	//	Create a complete VariableComponent object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/src/VariableValue.cpp oval-ref-misc/src/VariableValue.cpp
+--- oval-ref/src/VariableValue.cpp	2007-01-09 21:43:02.000000000 +0400
++++ oval-ref-misc/src/VariableValue.cpp	2007-08-06 16:08:39.000000000 +0500
+@@ -40,7 +40,7 @@
+ 	// -----------------------------------------------------------------------
+ 	//	Abstract
+ 	//
+-	//	Create a compelete VariableValue object
++	//	Create a complete VariableValue object
+ 	//
+ 	// -----------------------------------------------------------------------
+ 
+diff -urN oval-ref/xml/oval-common-schema.xsd oval-ref-misc/xml/oval-common-schema.xsd
+--- oval-ref/xml/oval-common-schema.xsd	2007-06-26 01:01:12.000000000 +0500
++++ oval-ref-misc/xml/oval-common-schema.xsd	2007-08-06 16:08:24.000000000 +0500
+@@ -150,42 +150,42 @@
+           <xsd:restriction base="xsd:string">
+                <xsd:enumeration value="binary">
+                     <xsd:annotation>
+-                         <xsd:documentation>The binary datatype is used to represent data that is in raw (non-printable) form. Values should be hex strings. Expected operations within OVAL for binary values are 'equals' and 'not equals'.</xsd:documentation>
++                         <xsd:documentation>The binary datatype is used to represent data that is in raw (non-printable) form. Values should be hex strings. Expected operations within OVAL for binary values are 'equals' and 'not equal'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="boolean">
+                     <xsd:annotation>
+-                         <xsd:documentation>The boolean datatype represent standard boolean data, either true or false. Expected operations within OVAL for boolean values are 'equals' and 'not equals'.</xsd:documentation>
++                         <xsd:documentation>The boolean datatype represent standard boolean data, either true or false. Expected operations within OVAL for boolean values are 'equals' and 'not equal'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="evr_string">
+                     <xsd:annotation>
+-                         <xsd:documentation>The evr_string datatype represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. Expected operations within OVAL for evr_string values are 'equals', 'not equals', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
++                         <xsd:documentation>The evr_string datatype represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. Expected operations within OVAL for evr_string values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="float">
+                     <xsd:annotation>
+-                         <xsd:documentation>The float datatype describes standard float data. Expected operations within OVAL for float values are 'equals', 'not equals', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
++                         <xsd:documentation>The float datatype describes standard float data. Expected operations within OVAL for float values are 'equal', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="ios_version">
+                     <xsd:annotation>
+-                         <xsd:documentation>The ios_version datatype describes Cisco IOS Train strings. These are in essence version strings for IOS. Please refer to Cisco's IOS Reference Guide for information on how to compare different Trains as they follow a very specific pattern. Expected operations within OVAL for ios_version values are 'equals', 'not equals', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
++                         <xsd:documentation>The ios_version datatype describes Cisco IOS Train strings. These are in essence version strings for IOS. Please refer to Cisco's IOS Reference Guide for information on how to compare different Trains as they follow a very specific pattern. Expected operations within OVAL for ios_version values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="int">
+                     <xsd:annotation>
+-                         <xsd:documentation>The int datatype describes standard integer data. Expected operations within OVAL for int values are 'equals', 'not equals', 'greater than', 'greater than or equal', 'less than', 'less than or equal', 'bitwise and', and 'bitwise or'.</xsd:documentation>
++                         <xsd:documentation>The int datatype describes standard integer data. Expected operations within OVAL for int values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', 'less than or equal', 'bitwise and', and 'bitwise or'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="string">
+                     <xsd:annotation>
+-                         <xsd:documentation>The string datatype describes standard string data. Expected operations within OVAL for string values are 'equals', 'not equals', 'pattern match'.</xsd:documentation>
++                         <xsd:documentation>The string datatype describes standard string data. Expected operations within OVAL for string values are 'equals', 'not equal', 'pattern match'.</xsd:documentation>
+                     </xsd:annotation>
+                </xsd:enumeration>
+                <xsd:enumeration value="version">
+                     <xsd:annotation>
+-                         <xsd:documentation>The version datatype represents a value that is a hierarchical list of non-negative integers separated by a single character delimiter. Expected operations within OVAL for version values are 'equals', 'not equals', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
++                         <xsd:documentation>The version datatype represents a value that is a hierarchical list of non-negative integers separated by a single character delimiter. Expected operations within OVAL for version values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'.</xsd:documentation>
+                          <xsd:documentation>For example '#.#.#' or '#-#-#-#' where the numbers to the left are more significant than the numbers to the right. When performing an 'equals' operation on a version datatype, you should first check the left most number for equality. If that fails, then the values are not equal. If it succeeds, then check the second left most number for equality. Continue checking the numbers from left to right until the last number has been checked. If, after testing all the previous numbers, the last number is equal then the two versions are equal. When performing other operations, such as 'less than', 'less than or equal', 'greater than, or 'greater than or equal', similar logic as above is used. Start with the left most number and move from left to right. For each number, check if it is less than the number you are testing against. If it is, then the version in question is less than the version you are testing against. If the number is equal, then move to check the next number to the right. For example, to test if 5.7.23 is less than or equal to 5.8.0 you first compare 5 to 5. They are equal so you move on to compare 7 to 8. 7 is less than 8 so the entire test succeeds and 5.7.23 is 'less than or equal' to 5.8.0. The difference between the 'less than' and 'less than or equal' operations is how the last number is handled. If the last number is reached, the check should use the given operation (either 'less than' and 'less than or equal') to test the number. For example, to test if 4.23.6 is greater than 4.23.6 you first compare 4 to 4. They are equal so you move on to compare 23 to 23. They are equal so you move on to compare 6 to 6. This is the last number in the version and since 6 is not greater than 6, the entire test fails and 4.23.6 is not greater than 4.23.6.</xsd:documentation>
+                          <xsd:documentation>Version strings with a different number of components shall be padded with zeros to make them the same size. For example, if the version strings '1.2.3' and '6.7.8.9' are being compared, then the short one should be padded to become '1.2.3.0'.</xsd:documentation>
+                     </xsd:annotation>

Added: branches/debian/debian/patches/oval.textfilecontent.patch
===================================================================
--- branches/debian/debian/patches/oval.textfilecontent.patch	                        (rev 0)
+++ branches/debian/debian/patches/oval.textfilecontent.patch	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,162 @@
+diff -urN oval-ref/src/linux/ProbeFactory.cpp oval-ref-textfilecontent/src/linux/ProbeFactory.cpp
+--- oval-ref/src/linux/ProbeFactory.cpp	2007-01-17 00:20:32.000000000 +0400
++++ oval-ref-textfilecontent/src/linux/ProbeFactory.cpp	2007-08-06 16:05:18.000000000 +0500
+@@ -54,7 +54,7 @@
+ 	} else if(objectName.compare("environmentvariable_object") == 0) {
+ 		probe = EnvironmentVariableProbe::Instance();
+ 	} else if(objectName.compare("textfilecontent_object") == 0) {
+-		//probe = TextFileContentProbe::Instance();
++		probe = TextFileContentProbe::Instance();
+ 	} else if(objectName.compare("variable_object") == 0) {
+ 		probe = VariableProbe::Instance();
+ 	} else if(objectName.compare("xmlfilecontent_object") == 0) {
+diff -urN oval-ref/src/probes/independent/TextFileContentProbe.cpp oval-ref-textfilecontent/src/probes/independent/TextFileContentProbe.cpp
+--- oval-ref/src/probes/independent/TextFileContentProbe.cpp	2007-06-28 19:45:34.000000000 +0500
++++ oval-ref-textfilecontent/src/probes/independent/TextFileContentProbe.cpp	2007-08-06 16:05:35.000000000 +0500
+@@ -115,6 +115,7 @@
+ 		}
+ 
+ 	} else {
++
+ 		// if no filepaths check if the code should report that the path does not exist
+ 		StringVector paths;
+ 		if(fileFinder.ReportPathDoesNotExist(path, &paths)) {
+@@ -165,14 +166,58 @@
+ 		filePath.append(fileName.substr(1, fileName.length()-2));
+ 	}
+ 
+-	// read the file line by line
+ 
+-	// call the GetSubstrings method	
++	// read the file line by line
++	StringVector* results = new StringVector();
++	string buffer;
++	ifstream infile;
++	infile.open (filePath.c_str());
++	if (infile.is_open())
++	{
++		while (! infile.eof())
++		{
++			// call the GetSubstrings method	
++			getline (infile, buffer);
++			if (this->GetSubstrings (buffer, line, results))
++			{
++				StringVector::iterator iterator;
++				for (iterator = results->begin(); iterator != results->end(); iterator++) 
++				{
++					item = this->CreateItem();
++					item->SetStatus(OvalEnum::STATUS_EXISTS);
++					item->AppendElement(new ItemEntity("path", path, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
++					item->AppendElement(new ItemEntity("filename", fileName, OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
++					item->AppendElement(new ItemEntity("subexpression", line->GetValue(), OvalEnum::DATATYPE_STRING, true, OvalEnum::STATUS_EXISTS));
++					item->AppendElement(new ItemEntity("line", (*iterator), OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_EXISTS));
++				}
++			} 
++		}
++		infile.close();
++	}
+ 
+ 	return item;
+ }
+ 
+-bool TextFileContentProbe::GetSubsrtings(string lineFromFile, ObjectEntity* line, StringVector* substrings) {
++bool TextFileContentProbe::GetSubstrings(string lineFromFile, ObjectEntity* line, StringVector* substrings) {
++	bool retVal = false;
++	string pattern = line->GetValue();
++
++	if (line->GetOperation() == OvalEnum::OPERATION_EQUALS) {
++		if (this->IsMatch (pattern, lineFromFile, false) ) {
++			substrings->push_back (lineFromFile);
++			retVal = true;
++		}
++	} else if (line->GetOperation() == OvalEnum::OPERATION_NOT_EQUAL) {
++		if (not this->IsMatch (pattern, lineFromFile, false) ) {
++			substrings->push_back (lineFromFile);
++			retVal = true;
++		}
++	} else if (line->GetOperation() == OvalEnum::OPERATION_PATTERN_MATCH) {
++		if (this->IsMatch (pattern, lineFromFile, true) ) {
++			substrings->push_back (lineFromFile);
++			retVal = true;
++		}
++}
+ 
+-	return false;
+-}
+\ В конце файла нет новой строки
++	return retVal;
++}
+diff -urN oval-ref/src/probes/independent/TextFileContentProbe.h oval-ref-textfilecontent/src/probes/independent/TextFileContentProbe.h
+--- oval-ref/src/probes/independent/TextFileContentProbe.h	2007-06-25 23:57:36.000000000 +0500
++++ oval-ref-textfilecontent/src/probes/independent/TextFileContentProbe.h	2007-08-06 16:06:51.000000000 +0500
+@@ -34,7 +34,7 @@
+ 
+ #include "FileFinder.h"
+ #include "AbsProbe.h"
+-
++#include <fstream>
+ #ifdef WIN32
+ 	#define SNPRINTF _snprintf
+ #else
+@@ -45,7 +45,7 @@
+ 
+ /**
+ 	This class is responsible for collecting date for the :ind-sctextfilecontent_item definied OVAL System Characteristics Schema.
+-	This class should be platform independant.
++	This class should be platform independent.
+ */
+ class TextFileContentProbe : public AbsProbe {
+ 
+@@ -68,16 +68,12 @@
+ 
+ 	/** Return true if the specified line matches the criteria in the ObjectEntity. 
+ 		If true any resulting substrings are returned on the substrings vector. 
+-
+-		TODO: need to implement
+ 	*/
+-	bool GetSubsrtings(string lineFromFile, ObjectEntity* line, StringVector* substrings);
++	bool GetSubstrings(string lineFromFile, ObjectEntity* line, StringVector* substrings);
+ 
+ 	/** Read the specified file one line at time and add matching lines to the resultiong Item.
+ 		Call out to the GetSubstrings function to determine if a given line in a file matches the criteria
+ 		specified in the ObjectEntity. 
+-
+-		TODO: need to implement
+ 	*/
+ 	Item* GetLines(string path, string fileName, ObjectEntity* line);
+ 
+diff -urN oval-ref/src/solaris/ProbeFactory.cpp oval-ref-textfilecontent/src/solaris/ProbeFactory.cpp
+--- oval-ref/src/solaris/ProbeFactory.cpp	2007-01-17 00:09:36.000000000 +0400
++++ oval-ref-textfilecontent/src/solaris/ProbeFactory.cpp	2007-08-06 16:05:25.000000000 +0500
+@@ -65,7 +65,8 @@
+ 		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+ 		probe = EnvironmentVariableProbe::Instance();
+ 	} else if(objectName.compare("textfilecontent_object") == 0) {
+-		// not currently implemented
++		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
++		probe = TextFileContentProbe::Instance();
+ 	} else if(objectName.compare("variable_object") == 0) {
+ 		// SOLARIS PORT NOTICE: This probe was written for linux and windows systems and needs to be tested on solaris systems
+ 		probe = VariableProbe::Instance();
+diff -urN oval-ref/src/windows/ProbeFactory.cpp oval-ref-textfilecontent/src/windows/ProbeFactory.cpp
+--- oval-ref/src/windows/ProbeFactory.cpp	2007-06-28 19:41:31.000000000 +0500
++++ oval-ref-textfilecontent/src/windows/ProbeFactory.cpp	2007-08-06 16:05:30.000000000 +0500
+@@ -61,7 +61,7 @@
+ 	} else if(objectName.compare("variable_object") == 0) {
+ 		probe = VariableProbe::Instance();
+ 	} else if(objectName.compare("textfilecontent_object") == 0) {
+-		//probe = TextFileContentProbe::Instance();
++		probe = TextFileContentProbe::Instance();
+ 	} else if(objectName.compare("xmlfilecontent_object") == 0) {
+ 		probe = XmlFileContentProbe::Instance();
+ 	} else if(objectName.compare("filehash_object") == 0) {
+@@ -126,6 +126,9 @@
+ 	probe = VariableProbe::Instance();
+ 	delete probe;
+ 
++	probe = TextFileContentProbe::Instance();
++	delete probe;
++
+ 	probe = XmlFileContentProbe::Instance();
+ 	delete probe;
+ 

Added: branches/debian/debian/patches/series
===================================================================
--- branches/debian/debian/patches/series	                        (rev 0)
+++ branches/debian/debian/patches/series	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,3 @@
+oval.misc.patch
+oval.textfilecontent.patch
+oval.dpkg.patch
\ No newline at end of file

Added: branches/debian/debian/rules
===================================================================
--- branches/debian/debian/rules	                        (rev 0)
+++ branches/debian/debian/rules	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,102 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+
+
+# quilt support
+include /usr/share/quilt/quilt.make
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch
+	dh_testdir
+	# Add here commands to configure the package.
+
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	mkdir -p project/linux/Release/obj
+	cd project/linux && $(MAKE)
+	#docbook-to-man debian/oval.sgml > oval.1
+
+	touch $@
+
+clean:
+	unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+	rm -rf project/linux/Release
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/oval.
+	#$(MAKE) DESTDIR=$(CURDIR)/debian/oval install
+	dh_install -s
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman docs/ovaldi.1
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure


Property changes on: branches/debian/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: branches/debian/debian/watch
===================================================================
--- branches/debian/debian/watch	                        (rev 0)
+++ branches/debian/debian/watch	2007-08-06 19:06:00 UTC (rev 104)
@@ -0,0 +1,12 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webpage 
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php oval-(.*)\.tar\.gz
+http://oval.mitre.org/language/download/interpreter/ interpreters.src-(.*).tbz2




More information about the Oval-commits mailing list