summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-forensics/ovaldi
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-forensics/ovaldi')
-rw-r--r--app-forensics/ovaldi/Manifest3
-rw-r--r--app-forensics/ovaldi/files/disable-acl.patch23
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.2-add-selinux-libs.patch11
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-ldap-probes.patch11
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-selinux-probes.patch94
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.2-missing-memory-header.patch20
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.2-strnicmp.patch11
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.2-xerces3.patch306
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.4-disable-selinux-probes.patch84
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.4-strnicmp.patch11
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.4-xerces3.patch283
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.9.1-disable-ldap-probes.patch32
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.9.1-strnicmp.patch11
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.9.1-xerces3.patch270
-rw-r--r--app-forensics/ovaldi/files/rpmdb.patch58
-rw-r--r--app-forensics/ovaldi/files/use_local_rpmdb.patch11
-rw-r--r--app-forensics/ovaldi/metadata.xml16
-rw-r--r--app-forensics/ovaldi/ovaldi-5.10.1.2.ebuild78
-rw-r--r--app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild103
-rw-r--r--app-forensics/ovaldi/ovaldi-5.9.1.ebuild64
20 files changed, 1500 insertions, 0 deletions
diff --git a/app-forensics/ovaldi/Manifest b/app-forensics/ovaldi/Manifest
new file mode 100644
index 000000000000..b585afec0b11
--- /dev/null
+++ b/app-forensics/ovaldi/Manifest
@@ -0,0 +1,3 @@
+DIST ovaldi-5.10.1.2-src.tar.bz2 14859172 SHA256 2d00a1bc730f6635beebd52611ee30c914169626ef5adf68ff313295c483d319 SHA512 77ffc04a8b33a43a9370b795e6af5e79e63ca59ec70c974408fffc163d487c654f153924494b14e1fc8b2ba2f33e96bc85e175fd8044e370a75a88f3f9c37fcb WHIRLPOOL 6c8e8da498c9f0c36be7a88a1293a984975e6fc90993fe6a860969af63cd8b9393e6adb4bf68893c6da468562322adb4b60a4894393bd7916047f900631f8296
+DIST ovaldi-5.10.1.4-src.tar.bz2 14868251 SHA256 92a22ad75ecdb02abb155e520cf249cc0f737c52b17380b1d58caf410f8c2560 SHA512 d7926a7416fe90013e203b333390e33d51c3eb0caa6ebba69dd593791a8377ac38f5db72fcff2d1ab2dd39a0f5d1b0d2a0d08f906d3e26740288532a27debb47 WHIRLPOOL b9e9142f3d51818c6fbdd12d036176a435bb7af4a75b39bd6bbaee9c542718f9058401ccdfb053a84bac97dfb9b5ba0acdbcf98c4085f6198ad51e94d6ea9d25
+DIST ovaldi-5.9.1-src.tar.bz2 14745625 SHA256 40161ac64fd221543a19f178de283919be2dd7f513a6fb354f1440fe1bfb98e1 SHA512 5ac3fb0b943aa6c650ae31131a41e059d2b338defe608b1a7b65ba776e249d005ccf4c3ff3ab64fb042a775c70467f4ca879de005f6bf78c19a4a0c782204d34 WHIRLPOOL d96fcf29bfbf301dde50e54a6d710db913520d7b0e47be8b17f2a202353f81eef94e2934d0aa84ca6ddd24dce8a0fdd9c4cfe6224f4757717c88317895ad12af
diff --git a/app-forensics/ovaldi/files/disable-acl.patch b/app-forensics/ovaldi/files/disable-acl.patch
new file mode 100644
index 000000000000..49ea42c80558
--- /dev/null
+++ b/app-forensics/ovaldi/files/disable-acl.patch
@@ -0,0 +1,23 @@
+--- src/probes/unix/FileProbe.cpp.old 2013-01-14 16:28:33.000000000 +0100
++++ src/probes/unix/FileProbe.cpp 2013-01-14 16:30:33.000000000 +0100
+@@ -427,19 +427,8 @@
+ 5) If a file doesn't have an ACL, or it matches the standard UNIX permissions, the value will be 'false' (this is covered by acl_extended_file() - thank you openscap)
+ 6) If a file has an ACL, the value will be 'true'.
+ */
+-
+- int hasExtendedAcl = acl_extended_file(filePath.c_str());
+- if(hasExtendedAcl > -1){ // behavior 4, 5, and 6
+- item->AppendElement(new ItemEntity("has_extended_acl",Common::ToString(hasExtendedAcl),OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_EXISTS,0));
+- }else{
+- if(errno == EOPNOTSUPP){ // behavior 3
+- item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_DOES_NOT_EXIST,0));
+- }else{ // behavior 2
+- item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_ERROR,0));
+- item->AppendMessage(new OvalMessage(string("Error reading ACL data: ") + strerror(errno)));
+- }
+- }
+
++ item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));
+ # else
+ // behavior 1
+ item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.2-add-selinux-libs.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-add-selinux-libs.patch
new file mode 100644
index 000000000000..d390be2ed6ce
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-add-selinux-libs.patch
@@ -0,0 +1,11 @@
+--- project/linux/Makefile.orig 2012-01-02 12:08:20.400871287 +0100
++++ project/linux/Makefile 2012-01-02 12:08:48.966488826 +0100
+@@ -50,7 +50,7 @@
+ LIBDIR = -L/usr/local/lib -L/usr/lib
+
+ # What libraries do we need?
+-LIBS = -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt -lblkid
++LIBS = -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt -lblkid -lsepol -lselinux
+
+ # Determine what package management system is being used
+ #PACKAGE_RPM = $(shell /usr/bin/env rpm --version 2>/dev/null)
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-ldap-probes.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-ldap-probes.patch
new file mode 100644
index 000000000000..1a15ca25d62f
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-ldap-probes.patch
@@ -0,0 +1,11 @@
+--- src/linux/ProbeFactory.cpp 2010-12-10 13:37:00.019140703 +0100
++++ src/linux/ProbeFactory.cpp 2010-08-27 21:23:41.000000000 +0200
+@@ -61,8 +61,6 @@
+ probe = XmlFileContentProbe::Instance();
+ } else if(objectName.compare("textfilecontent54_object") == 0) {
+ probe = TextFileContent54Probe::Instance();
+- } else if(objectName.compare("ldap_object") == 0) {
+- probe = LDAPProbe::Instance();
+
+ // here are the objects defined in the unix schema
+ } else if(objectName.compare("file_object") == 0) {
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-selinux-probes.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-selinux-probes.patch
new file mode 100644
index 000000000000..f93304deb1b3
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-disable-selinux-probes.patch
@@ -0,0 +1,94 @@
+--- ./src/linux/ProbeFactory.cpp.old 2011-08-18 14:45:11.314556346 +0200
++++ ./src/linux/ProbeFactory.cpp 2011-08-18 14:45:23.151011753 +0200
+@@ -101,10 +101,6 @@
+ #endif
+ } else if (objectName.compare("partition_object") == 0) {
+ probe = PartitionProbe::Instance();
+- } else if (objectName.compare("selinuxsecuritycontext_object") == 0) {
+- probe = SelinuxSecurityContextProbe::Instance();
+- } else if (objectName.compare("selinuxboolean_object") == 0) {
+- probe = SelinuxBooleanProbe::Instance();
+ } else if (objectName.compare("iflisteners_object") == 0) {
+ probe = IfListenersProbe::Instance();
+ } else {
+--- src/linux/ProbeFactory.h.old 2011-08-18 14:47:23.226501075 +0200
++++ src/linux/ProbeFactory.h 2011-08-18 14:47:34.183998019 +0200
+@@ -71,8 +71,6 @@
+ #include "InetdProbe.h"
+
+ #include "PartitionProbe.h"
+-#include "SelinuxSecurityContextProbe.h"
+-#include "SelinuxBooleanProbe.h"
+ #include "IfListenersProbe.h"
+
+ class AbsProbe;
+--- src/probes/unix/Process58Probe.cpp.old 2012-05-22 10:09:52.980828398 +0200
++++ src/probes/unix/Process58Probe.cpp 2012-05-22 10:11:06.266468168 +0200
+@@ -29,10 +29,10 @@
+ //****************************************************************************************//
+
+ #ifdef LINUX
+-# include <selinux/selinux.h>
+-# include <selinux/context.h>
++/*# include <selinux/selinux.h>
++# include <selinux/context.h>*/
+ # include <sys/capability.h>
+-# include <SecurityContextGuard.h>
++/*# include <SecurityContextGuard.h>*/
+ #endif
+
+ #include <fstream>
+@@ -328,7 +328,7 @@
+ pid_t sessionId;
+ uid_t loginuid;
+ uint64_t effCap, *effCapp=&effCap;
+- string selinuxDomainLabel;
++/* string selinuxDomainLabel;*/
+
+ Process58Probe::ProcStatus statStatus, statusStatus, ttyStatus, loginuidStatus;
+
+@@ -423,10 +423,10 @@
+ }
+
+ // this one doesn't require reading anything in /proc
+- if (!RetrieveSelinuxDomainLabel(pid, &selinuxDomainLabel, &errMsg)) {
++/* if (!RetrieveSelinuxDomainLabel(pid, &selinuxDomainLabel, &errMsg)) {
+ item->AppendMessage(new OvalMessage(errMsg, OvalEnum::LEVEL_ERROR));
+ item->SetStatus(OvalEnum::STATUS_ERROR);
+- }
++ }*/
+
+ // The Linux start time is represented as the number of jiffies (1/100 sec)
+ // that the application was started after the last system reboot. To get an
+@@ -491,10 +491,10 @@
+ // aren't any.
+ item->AppendElement(new ItemEntity("posix_capability", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+
+- if (selinuxDomainLabel.empty())
++/* if (selinuxDomainLabel.empty())*/
+ item->AppendElement(new ItemEntity("selinux_domain_label", "", OvalEnum::DATATYPE_STRING, false, OvalEnum::STATUS_ERROR));
+- else
+- item->AppendElement(new ItemEntity("selinux_domain_label", selinuxDomainLabel));
++/* else
++ item->AppendElement(new ItemEntity("selinux_domain_label", selinuxDomainLabel));*/
+
+ if (statStatus == PROC_OK)
+ item->AppendElement(new ItemEntity("session_id", Common::ToString(sessionId), OvalEnum::DATATYPE_INTEGER));
+@@ -709,7 +709,7 @@
+ capMap[capEnum]));
+ }
+ }
+-
++/*
+ bool Process58Probe::RetrieveSelinuxDomainLabel(pid_t pid, string *label, string *err) {
+ security_context_t sctx;
+ int ec = getpidcon(pid, &sctx);
+@@ -732,7 +732,7 @@
+ *label = tmp;
+ return true;
+ }
+-
++*/
+ #elif defined SUNOS
+
+ void Process58Probe::GetPSInfo(string command, string pidStr, ItemVector* items) {
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.2-missing-memory-header.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-missing-memory-header.patch
new file mode 100644
index 000000000000..3f5fcdba2450
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-missing-memory-header.patch
@@ -0,0 +1,20 @@
+--- src/CountFunction.cpp.old 2012-01-02 11:37:27.113604532 +0100
++++ src/CountFunction.cpp 2012-01-02 11:37:39.624998573 +0100
+@@ -29,6 +29,7 @@
+ //****************************************************************************************//
+
+ #include <cstddef>
++#include <memory>
+ #include "CountFunction.h"
+ #include "ComponentFactory.h"
+
+--- src/UniqueFunction.cpp.orig 2012-01-02 11:39:58.564269070 +0100
++++ src/UniqueFunction.cpp 2012-01-02 11:40:12.057615550 +0100
+@@ -29,6 +29,7 @@
+ //****************************************************************************************//
+
+ #include <set>
++#include <memory>
+ #include "Common.h"
+ #include "ComponentFactory.h"
+ #include "UniqueFunction.h"
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.2-strnicmp.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-strnicmp.patch
new file mode 100644
index 000000000000..fc127efd3cdb
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-strnicmp.patch
@@ -0,0 +1,11 @@
+--- src/Main.h.old 2010-10-22 14:59:13.000000000 +0200
++++ src/Main.h 2010-10-22 14:59:38.000000000 +0200
+@@ -38,7 +38,7 @@
+ #endif
+
+ #ifdef LINUX
+-# define STRNICMP strnicmp
++# define STRNICMP strncasecmp
+ #elif defined SUNOS
+ # define STRNICMP strncasecmp
+ #elif defined DARWIN
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.2-xerces3.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-xerces3.patch
new file mode 100644
index 000000000000..b127ee44ed45
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.2-xerces3.patch
@@ -0,0 +1,306 @@
+--- src/XmlProcessor.cpp.old 2011-08-18 14:51:20.311616357 +0200
++++ src/XmlProcessor.cpp 2011-08-18 14:51:47.214381144 +0200
+@@ -35,7 +35,6 @@
+ // for dom Writer
+ #include <xercesc/dom/DOMImplementation.hpp>
+ #include <xercesc/dom/DOMImplementationLS.hpp>
+-#include <xercesc/dom/DOMWriter.hpp>
+ #include <xercesc/framework/StdOutFormatTarget.hpp>
+ #include <xercesc/framework/LocalFileFormatTarget.hpp>
+ #include <xercesc/util/XMLUni.hpp>
+@@ -53,8 +52,17 @@
+ //****************************************************************************************//
+ // DataDirResolver Class //
+ //****************************************************************************************//
+-
++#if XERCES_VERSION_MAJOR < 3
+ DOMInputSource* DataDirResolver::resolveEntity (const XMLCh *const /*publicId*/, const XMLCh *const systemId, const XMLCh *const /*baseURI*/) {
++#else
++InputSource* DataDirResolver::resolveEntity(const XMLCh* publicId, const XMLCh* systemId)
++{
++ return NULL;
++ //return DataDirResolver::resolveEntity (publicId, systemId, NULL);
++}
++
++DOMLSInput* DataDirResolver::resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI) {
++#endif
+ string path = "";
+ size_t last;
+ string schemapath = Common::GetSchemaPath();
+@@ -104,13 +112,19 @@
+
+ try {
+ XMLPlatformUtils::Initialize();
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(parser,n,v) parser->setFeature(n,v)
++#else
++#define SetParameter(parser,n,v) parser->getDomConfig()->setParameter(n,v)
++#endif
+
+ parser = makeParser();
+ parserWithCallerAdoption = makeParser();
+ // add one extra feature on this parser to prevent it from
+ // taking ownership of its documents.
+- parserWithCallerAdoption->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
++ SetParameter(parserWithCallerAdoption, XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
++#undef SetParameter
+ } catch (const XMLException& toCatch) {
+ string errMsg = "Error: An error occured durring initialization of the xml utilities:\n";
+ errMsg.append(XmlCommon::ToString(toCatch.getMessage()));
+@@ -137,32 +151,55 @@
+
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ DOMBuilder *XmlProcessor::makeParser() {
++#else
++DOMLSParser *XmlProcessor::makeParser() {
++#endif
+ // Instantiate the DOM parser.
+ static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull };
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(gLS);
+
++#if XERCES_VERSION_MAJOR < 3
+ DOMBuilder *parser = ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#else
++ DOMLSParser *parser = ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#endif
+
+ ///////////////////////////////////////////////////////
+ // Set features on the builder
+ ///////////////////////////////////////////////////////
+
+- parser->setFeature(XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
+- parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
+- parser->setFeature(XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
+- parser->setFeature(XMLUni::fgDOMValidation, true); // Report all validation errors.
+- parser->setFeature(XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
+- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
+- parser->setFeature(XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
+- parser->setFeature(XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(parser,n,v) parser->setFeature(n,v)
++#else
++#define SetParameter(parser,n,v) parser->getDomConfig()->setParameter(n,v)
++#endif
++
++ SetParameter(parser, XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
++ SetParameter(parser, XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
++ SetParameter(parser, XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
++#if XERCES_VERSION_MAJOR < 3
++ SetParameter(parser, XMLUni::fgDOMValidation, true); // Report all validation errors.
++#else
++ SetParameter(parser, XMLUni::fgDOMValidate, true); // Report all validation errors.
++#endif
++ SetParameter(parser, XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
++ SetParameter(parser, XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
++ SetParameter(parser, XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
++ SetParameter(parser, XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
++#undef SetParameter
+
+ ///////////////////////////////////////////////////////
+ //****************************************************************************************//
+ // The following code was added to handle air-gap operation //
+ //****************************************************************************************//
+ /* Look for XML schemas in local directory instead of Internet */
++#if XERCES_VERSION_MAJOR < 3
+ parser->setEntityResolver (&resolver);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgXercesEntityResolver, &resolver);
++#endif
+ //****************************************************************************************//
+ // End of air-gap code //
+ //****************************************************************************************//
+@@ -170,7 +207,11 @@
+ ///////////////////////////////////////////////////////
+ // Add an Error Handler
+ ///////////////////////////////////////////////////////
++#if XERCES_VERSION_MAJOR < 3
+ parser->setErrorHandler(&errHandler);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, &errHandler);
++#endif
+
+ return parser;
+ }
+@@ -250,24 +291,26 @@
+ XMLCh tempStr[100];
+ XMLString::transcode("LS", tempStr, 99);
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
++#if XERCES_VERSION_MAJOR < 3
+ DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
++#else
++ DOMLSSerializer *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
++#endif
++
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(serializer,n,v) if (serializer->canSetFeature(n,v)) serializer->setFeature(n,v)
++#else
++#define SetParameter(serializer,n,v) if (serializer->getDomConfig()->canSetParameter(n,v)) serializer->getDomConfig()->setParameter(n,v)
++#endif
+
+ // set feature if the serializer supports the feature/mode
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, false))
+- theSerializer->setFeature(XMLUni::fgDOMWRTBOM, false);
+-
+- //if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- // theSerializer->setFeature(XMLUni::fgDOMWRTBOM, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTSplitCdataSections, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTDiscardDefaultContent, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTFormatPrettyPrint, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, false);
++ //SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, true);
+
++#undef SetParameter
+ //
+ // Plug in a format target to receive the resultant
+ // XML stream from the serializer.
+@@ -284,7 +327,13 @@
+ //
+ // do the serialization through DOMWriter::writeNode();
+ //
++#if XERCES_VERSION_MAJOR < 3
+ theSerializer->writeNode(myFormTarget, *doc);
++#else
++ DOMLSOutput *output = ((DOMImplementationLS*)impl)->createLSOutput();
++ output->setByteStream(myFormTarget);
++ theSerializer->write(doc, output);
++#endif
+
+ theSerializer->release();
+ delete myFormTarget;
+--- src/XmlProcessor.h.old 2011-08-18 14:35:41.608703233 +0200
++++ src/XmlProcessor.h 2011-08-18 14:39:21.835597094 +0200
+@@ -38,14 +38,17 @@
+ #include <string>
+
+ // required xerces includes
+-#include <xercesc/dom/DOMBuilder.hpp>
+ #include <xercesc/dom/DOMDocument.hpp>
+ #include <xercesc/dom/DOMErrorHandler.hpp>
+ #include <xercesc/dom/DOMError.hpp>
+
+ // for entity resolver
+-#include <xercesc/dom/DOMEntityResolver.hpp>
+-#include <xercesc/dom/DOMInputSource.hpp>
++
++#include <xercesc/dom/DOMImplementationRegistry.hpp>
++#include <xercesc/dom/DOMLSParser.hpp>
++#include <xercesc/sax/EntityResolver.hpp>
++#include <xercesc/sax/InputSource.hpp>
++#include <xercesc/sax2/SAX2XMLReader.hpp>
+
+ #include "Exception.h"
+
+@@ -53,12 +56,14 @@
+ This class extends the default DOMEntityResolver and implments the resolve entity method
+ to support
+ */
+-class DataDirResolver : public xercesc::DOMEntityResolver {
++class DataDirResolver : public xercesc::EntityResolver {
+ public:
+ /**
+ *
+ */
+- xercesc::DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++// xercesc::DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++ xercesc::InputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId);
++ xercesc::DOMLSInput *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
+ };
+
+ /**
+@@ -135,7 +140,7 @@
+ /**
+ * Has the common code for creating an XML parser.
+ */
+- xercesc::DOMBuilder *makeParser();
++ xercesc::DOMLSParser *makeParser();
+
+ static XmlProcessor* instance;
+
+@@ -144,7 +149,7 @@
+ * owns the documents it builds. Users must manually destroy
+ * those documents.
+ */
+- xercesc::DOMBuilder *parserWithCallerAdoption;
++ xercesc::DOMLSParser *parserWithCallerAdoption;
+
+ /**
+ * This parser doesn't have user-adoption switched on, so it
+@@ -156,7 +161,7 @@
+ * appear to ever be switched off. So to make sure this isn't
+ * leaking memory, I have created separate parsers.
+ */
+- xercesc::DOMBuilder *parser;
++ xercesc::DOMLSParser *parser;
+
+ /** The entity resolver for both parsers. */
+ DataDirResolver resolver;
+--- src/probes/independent/XmlFileContentProbe.cpp.old 2010-10-22 14:49:22.000000000 +0200
++++ src/probes/independent/XmlFileContentProbe.cpp 2010-10-22 14:51:39.000000000 +0200
+@@ -419,12 +419,24 @@
+ return new DummyEntityResolver::DoNothingBinInputStream();
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#else
++const XMLCh* DummyEntityResolver::DoNothingBinInputStream::getContentType() const
++{
++ return NULL;
++}
++XMLFilePos DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#endif
+ {
+ return 0;
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const /*toFill*/, const unsigned int /*maxToRead*/)
++#else
++XMLSize_t DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const toFill, XMLSize_t maxToRead)
++#endif
+ {
+ return 0;
+ }
+--- src/probes/independent/XmlFileContentProbe.h.old 2010-10-22 14:55:47.000000000 +0200
++++ src/probes/independent/XmlFileContentProbe.h 2010-10-22 14:57:00.000000000 +0200
+@@ -134,8 +134,14 @@
+ class DoNothingBinInputStream : public BinInputStream
+ {
+ public:
++#if XERCES_VERSION_MAJOR < 3
+ virtual unsigned int curPos() const;
+ virtual unsigned int readBytes(XMLByte *const toFill, const unsigned int maxToRead);
++#else
++ virtual XMLFilePos curPos() const;
++ virtual const XMLCh* getContentType() const;
++ virtual XMLSize_t readBytes(XMLByte *const toFill, XMLSize_t maxToRead);
++#endif
+ };
+ };
+
+--- src/XmlCommon.cpp.old
++++ src/XmlCommon.cpp
+@@ -546,7 +546,11 @@ void XmlCommon::AddSchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *do
+ string XmlCommon::GetNamespace(DOMElement *element) {
+
+ string xmlns = "";
++#if XERCES_VERSION_MAJOR < 3
+ xmlns = XmlCommon::ToString(element->getTypeInfo()->getNamespace());
++#else
++ xmlns = XmlCommon::ToString(element->getSchemaTypeInfo()->getTypeNamespace());
++#endif
+ if (xmlns.compare("") == 0) {
+ xmlns = "";
+ }
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.4-disable-selinux-probes.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.4-disable-selinux-probes.patch
new file mode 100644
index 000000000000..b9d02d763c61
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.4-disable-selinux-probes.patch
@@ -0,0 +1,84 @@
+--- src/probes/unix/Process58Probe.cpp.old 2013-01-14 16:05:18.000000000 +0100
++++ src/probes/unix/Process58Probe.cpp 2013-01-14 16:06:16.000000000 +0100
+@@ -29,8 +29,8 @@
+ //****************************************************************************************//
+
+ #ifdef LINUX
+-# include <selinux/selinux.h>
+-# include <selinux/context.h>
++/*# include <selinux/selinux.h>
++# include <selinux/context.h>*/
+ # include <sys/capability.h>
+ # include <SecurityContextGuard.h>
+ #endif
+@@ -328,7 +328,7 @@
+ pid_t sessionId;
+ uid_t loginuid;
+ uint64_t effCap, *effCapp=&effCap;
+- string selinuxDomainLabel;
++/* string selinuxDomainLabel;*/
+
+ Process58Probe::ProcStatus statStatus, statusStatus, ttyStatus, loginuidStatus;
+
+@@ -423,10 +423,10 @@
+ }
+
+ // this one doesn't require reading anything in /proc
+- if (!RetrieveSelinuxDomainLabel(pid, &selinuxDomainLabel, &errMsg)) {
++/* if (!RetrieveSelinuxDomainLabel(pid, &selinuxDomainLabel, &errMsg)) {
+ item->AppendMessage(new OvalMessage(errMsg, OvalEnum::LEVEL_ERROR));
+ item->SetStatus(OvalEnum::STATUS_ERROR);
+- }
++ }*/
+
+ // The Linux start time is represented as the number of jiffies (1/100 sec)
+ // that the application was started after the last system reboot. To get an
+@@ -522,10 +522,10 @@
+ // aren't any.
+ item->AppendElement(new ItemEntity("posix_capability", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_ERROR));
+
+- if (selinuxDomainLabel.empty())
++/* if (selinuxDomainLabel.empty())
+ item->AppendElement(new ItemEntity("selinux_domain_label", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_ERROR));
+ else
+- item->AppendElement(new ItemEntity("selinux_domain_label", selinuxDomainLabel));
++ item->AppendElement(new ItemEntity("selinux_domain_label", selinuxDomainLabel));*/
+
+ if (statStatus == PROC_OK)
+ item->AppendElement(new ItemEntity("session_id", Common::ToString(sessionId), OvalEnum::DATATYPE_INTEGER));
+@@ -740,7 +740,7 @@
+ capMap[capEnum]));
+ }
+ }
+-
++/*
+ bool Process58Probe::RetrieveSelinuxDomainLabel(pid_t pid, string *label, string *err) {
+ security_context_t sctx;
+ int ec = getpidcon(pid, &sctx);
+@@ -763,7 +763,7 @@
+ *label = tmp;
+ return true;
+ }
+-
++*/
+ #elif defined SUNOS
+
+ void Process58Probe::GetPSInfo(string command, string pidStr, ItemVector* items) {
+@@ -830,7 +830,7 @@
+ item->AppendElement(new ItemEntity("exec_shield", "", OvalEnum::DATATYPE_BOOLEAN, OvalEnum::STATUS_NOT_COLLECTED));
+ item->AppendElement(new ItemEntity("loginuid", "", OvalEnum::DATATYPE_INTEGER, OvalEnum::STATUS_NOT_COLLECTED));
+ item->AppendElement(new ItemEntity("posix_capability", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_NOT_COLLECTED));
+- item->AppendElement(new ItemEntity("selinux_domain_label", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_NOT_COLLECTED));
++/* item->AppendElement(new ItemEntity("selinux_domain_label", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_NOT_COLLECTED));*/
+ item->AppendElement(new ItemEntity("session_id", Common::ToString(info.pr_sid), OvalEnum::DATATYPE_INTEGER));
+
+ items->push_back(item);
+@@ -988,7 +988,7 @@
+ item->AppendElement(new ItemEntity("exec_shield", "", OvalEnum::DATATYPE_BOOLEAN, OvalEnum::STATUS_NOT_COLLECTED));
+ item->AppendElement(new ItemEntity("loginuid", "", OvalEnum::DATATYPE_INTEGER, OvalEnum::STATUS_NOT_COLLECTED));
+ item->AppendElement(new ItemEntity("posix_capability", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_NOT_COLLECTED));
+- item->AppendElement(new ItemEntity("selinux_domain_label", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_NOT_COLLECTED));
++/* item->AppendElement(new ItemEntity("selinux_domain_label", "", OvalEnum::DATATYPE_STRING, OvalEnum::STATUS_NOT_COLLECTED));*/
+ item->AppendElement(new ItemEntity("session_id", "", OvalEnum::DATATYPE_INTEGER, OvalEnum::STATUS_NOT_COLLECTED));
+
+ items->push_back(item);
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.4-strnicmp.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.4-strnicmp.patch
new file mode 100644
index 000000000000..fc127efd3cdb
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.4-strnicmp.patch
@@ -0,0 +1,11 @@
+--- src/Main.h.old 2010-10-22 14:59:13.000000000 +0200
++++ src/Main.h 2010-10-22 14:59:38.000000000 +0200
+@@ -38,7 +38,7 @@
+ #endif
+
+ #ifdef LINUX
+-# define STRNICMP strnicmp
++# define STRNICMP strncasecmp
+ #elif defined SUNOS
+ # define STRNICMP strncasecmp
+ #elif defined DARWIN
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.4-xerces3.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.4-xerces3.patch
new file mode 100644
index 000000000000..9350029312c4
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.4-xerces3.patch
@@ -0,0 +1,283 @@
+--- src/XmlProcessor.h.old 2011-08-18 14:35:41.608703233 +0200
++++ src/XmlProcessor.h 2011-08-18 14:39:21.835597094 +0200
+@@ -38,14 +38,17 @@
+ #include <string>
+
+ // required xerces includes
+-#include <xercesc/dom/DOMBuilder.hpp>
+ #include <xercesc/dom/DOMDocument.hpp>
+ #include <xercesc/dom/DOMErrorHandler.hpp>
+ #include <xercesc/dom/DOMError.hpp>
+
+ // for entity resolver
+-#include <xercesc/dom/DOMEntityResolver.hpp>
+-#include <xercesc/dom/DOMInputSource.hpp>
++
++#include <xercesc/dom/DOMImplementationRegistry.hpp>
++#include <xercesc/dom/DOMLSParser.hpp>
++#include <xercesc/sax/EntityResolver.hpp>
++#include <xercesc/sax/InputSource.hpp>
++#include <xercesc/sax2/SAX2XMLReader.hpp>
+
+ #include "Exception.h"
+
+@@ -53,12 +56,14 @@
+ This class extends the default DOMEntityResolver and implments the resolve entity method
+ to support
+ */
+-class DataDirResolver : public xercesc::DOMEntityResolver {
++class DataDirResolver : public xercesc::EntityResolver {
+ public:
+ /**
+ *
+ */
+- xercesc::DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++// xercesc::DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++ xercesc::InputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId);
++ xercesc::DOMLSInput *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
+ };
+
+ /**
+@@ -144,7 +149,7 @@
+ * owns the documents it builds. Users must manually destroy
+ * those documents.
+ */
+- xercesc::DOMBuilder *parserWithCallerAdoption;
++ xercesc::DOMLSParser *parserWithCallerAdoption;
+
+ /**
+ * This parser doesn't have user-adoption switched on, so it
+@@ -156,7 +161,7 @@
+ * appear to ever be switched off. So to make sure this isn't
+ * leaking memory, I have created separate parsers.
+ */
+- xercesc::DOMBuilder *parser;
++ xercesc::DOMLSParser *parser;
+
+ /** The entity resolver for both parsers. */
+ DataDirResolver resolver;
+--- src/probes/independent/XmlFileContentProbe.cpp.old 2010-10-22 14:49:22.000000000 +0200
++++ src/probes/independent/XmlFileContentProbe.cpp 2010-10-22 14:51:39.000000000 +0200
+@@ -419,12 +419,24 @@
+ return new DummyEntityResolver::DoNothingBinInputStream();
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#else
++const XMLCh* DummyEntityResolver::DoNothingBinInputStream::getContentType() const
++{
++ return NULL;
++}
++XMLFilePos DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#endif
+ {
+ return 0;
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const /*toFill*/, const unsigned int /*maxToRead*/)
++#else
++XMLSize_t DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const toFill, XMLSize_t maxToRead)
++#endif
+ {
+ return 0;
+ }
+--- src/probes/independent/XmlFileContentProbe.h.old 2010-10-22 14:55:47.000000000 +0200
++++ src/probes/independent/XmlFileContentProbe.h 2010-10-22 14:57:00.000000000 +0200
+@@ -134,8 +134,14 @@
+ class DoNothingBinInputStream : public BinInputStream
+ {
+ public:
++#if XERCES_VERSION_MAJOR < 3
+ virtual unsigned int curPos() const;
+ virtual unsigned int readBytes(XMLByte *const toFill, const unsigned int maxToRead);
++#else
++ virtual XMLFilePos curPos() const;
++ virtual const XMLCh* getContentType() const;
++ virtual XMLSize_t readBytes(XMLByte *const toFill, XMLSize_t maxToRead);
++#endif
+ };
+ };
+
+--- src/XmlCommon.cpp.old
++++ src/XmlCommon.cpp
+@@ -546,7 +546,11 @@ void XmlCommon::AddSchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *do
+ string XmlCommon::GetNamespace(DOMElement *element) {
+
+ string xmlns = "";
++#if XERCES_VERSION_MAJOR < 3
+ xmlns = XmlCommon::ToString(element->getTypeInfo()->getNamespace());
++#else
++ xmlns = XmlCommon::ToString(element->getSchemaTypeInfo()->getTypeNamespace());
++#endif
+ if (xmlns.compare("") == 0) {
+ xmlns = "";
+ }
+--- src/XmlProcessor.cpp.old 2013-01-14 15:16:14.000000000 +0100
++++ src/XmlProcessor.cpp 2013-01-14 15:19:20.000000000 +0100
+@@ -35,7 +35,6 @@
+ // for dom Writer
+ #include <xercesc/dom/DOMImplementation.hpp>
+ #include <xercesc/dom/DOMImplementationLS.hpp>
+-#include <xercesc/dom/DOMWriter.hpp>
+ #include <xercesc/framework/StdOutFormatTarget.hpp>
+ #include <xercesc/framework/LocalFileFormatTarget.hpp>
+ #include <xercesc/util/XMLUni.hpp>
+@@ -50,11 +49,26 @@
+ using namespace std;
+ using namespace xercesc;
+
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(serializer,n,v) if (serializer->canSetFeature(n,v)) serializer->setFeature(n,v)
++#else
++#define SetParameter(serializer,n,v) if (serializer->getDomConfig()->canSetParameter(n,v)) serializer->getDomConfig()->setParameter(n,v)
++#endif
++
+ //****************************************************************************************//
+ // DataDirResolver Class //
+ //****************************************************************************************//
+-
++#if XERCES_VERSION_MAJOR < 3
+ DOMInputSource* DataDirResolver::resolveEntity (const XMLCh *const /*publicId*/, const XMLCh *const systemId, const XMLCh *const /*baseURI*/) {
++#else
++InputSource* DataDirResolver::resolveEntity(const XMLCh* publicId, const XMLCh* systemId)
++{
++ return NULL;
++ //return DataDirResolver::resolveEntity (publicId, systemId, NULL);
++}
++
++DOMLSInput* DataDirResolver::resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI) {
++#endif
+ string path = "";
+ size_t last;
+ string schemapath = Common::GetSchemaPath();
+@@ -127,7 +141,7 @@
+ parserWithCallerAdoption = makeParser(schemaLocation);
+ // add one extra feature on this parser to prevent it from
+ // taking ownership of its documents.
+- parserWithCallerAdoption->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
++ SetParameter(parserWithCallerAdoption, XMLUni::fgXercesUserAdoptsDOMDocument, true);
+
+ } catch (const XMLException& toCatch) {
+ string errMsg = "Error: An error occured durring initialization of the xml utilities:\n";
+@@ -156,32 +170,40 @@
+ XMLPlatformUtils::Terminate();
+ }
+
+-DOMBuilder *XmlProcessor::makeParser(const string &schemaLocation) {
++DOMLSParser *XmlProcessor::makeParser(const string &schemaLocation) {
+ // Instantiate the DOM parser.
+ static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull };
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(gLS);
+
+- DOMBuilder *parser = ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#if XERCES_VERSION_MAJOR < 3
++ DOMLSParser *parser = ((DOMImplementationLS*)impl)->createDOMLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#else
++ DOMLSParser *parser = ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#endif
+
+ ///////////////////////////////////////////////////////
+ // Set features on the builder
+ ///////////////////////////////////////////////////////
+
+- parser->setFeature(XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
+- parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
+- parser->setFeature(XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
+- parser->setFeature(XMLUni::fgDOMValidation, true); // Report all validation errors.
+- parser->setFeature(XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
+- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
+- parser->setFeature(XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
+- parser->setFeature(XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
++ SetParameter(parser, XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
++ SetParameter(parser, XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
++ SetParameter(parser, XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
++ SetParameter(parser, XMLUni::fgDOMValidate, true); // Report all validation errors.
++ SetParameter(parser, XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
++ SetParameter(parser, XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
++ SetParameter(parser, XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
++ SetParameter(parser, XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
+
+ ///////////////////////////////////////////////////////
+ //****************************************************************************************//
+ // The following code was added to handle air-gap operation //
+ //****************************************************************************************//
+ /* Look for XML schemas in local directory instead of Internet */
++#if XERCES_VERSION_MAJOR < 3
+ parser->setEntityResolver (&resolver);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgXercesEntityResolver, &resolver);
++#endif
+ //****************************************************************************************//
+ // End of air-gap code //
+ //****************************************************************************************//
+@@ -189,7 +211,11 @@
+ ///////////////////////////////////////////////////////
+ // Add an Error Handler
+ ///////////////////////////////////////////////////////
++#if XERCES_VERSION_MAJOR < 3
+ parser->setErrorHandler(&errHandler);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, &errHandler);
++#endif
+
+ // Fix a schema location if possible, so instance documents don't
+ // have to set the schemaLocation attribute. And if they do, this
+@@ -197,7 +223,7 @@
+ // overriding of the value in instance documents.
+ if (!schemaLocation.empty()) {
+ XMLCh *schemaLocationCstr = XMLString::transcode(schemaLocation.c_str());
+- parser->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation, schemaLocationCstr);
++ SetParameter(parser, XMLUni::fgXercesSchemaExternalSchemaLocation, schemaLocationCstr);
+ XMLString::release(&schemaLocationCstr);
+ }
+
+@@ -279,23 +305,19 @@
+ XMLCh tempStr[100];
+ XMLString::transcode("LS", tempStr, 99);
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
++#if XERCES_VERSION_MAJOR < 3
+ DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
++#else
++ DOMLSSerializer *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
++#endif
+
+- // set feature if the serializer supports the feature/mode
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, true);
+
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, false))
+- theSerializer->setFeature(XMLUni::fgDOMWRTBOM, false);
+-
+- //if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- // theSerializer->setFeature(XMLUni::fgDOMWRTBOM, true);
++ // set feature if the serializer supports the feature/mode
++ SetParameter(theSerializer, XMLUni::fgDOMWRTSplitCdataSections, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTDiscardDefaultContent, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTFormatPrettyPrint, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, false);
++ //SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, true);
+
+ //
+ // Plug in a format target to receive the resultant
+@@ -313,7 +335,13 @@
+ //
+ // do the serialization through DOMWriter::writeNode();
+ //
++#if XERCES_VERSION_MAJOR < 3
+ theSerializer->writeNode(myFormTarget, *doc);
++#else
++ DOMLSOutput *output = ((DOMImplementationLS*)impl)->createLSOutput();
++ output->setByteStream(myFormTarget);
++ theSerializer->write(doc, output);
++#endif
+
+ theSerializer->release();
+ delete myFormTarget;
diff --git a/app-forensics/ovaldi/files/ovaldi-5.9.1-disable-ldap-probes.patch b/app-forensics/ovaldi/files/ovaldi-5.9.1-disable-ldap-probes.patch
new file mode 100644
index 000000000000..1f59b02b699e
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.9.1-disable-ldap-probes.patch
@@ -0,0 +1,32 @@
+--- src/linux/ProbeFactory.cpp 2010-12-10 13:37:00.019140703 +0100
++++ src/linux/ProbeFactory.cpp 2010-08-27 21:23:41.000000000 +0200
+@@ -61,8 +61,6 @@
+ probe = XmlFileContentProbe::Instance();
+ } else if(objectName.compare("textfilecontent54_object") == 0) {
+ probe = TextFileContent54Probe::Instance();
+- } else if(objectName.compare("ldap_object") == 0) {
+- probe = LDAPProbe::Instance();
+
+ // here are the objects defined in the unix schema
+ } else if(objectName.compare("file_object") == 0) {
+--- src/linux/ProbeFactory.h 2010-12-10 13:36:50.315386197 +0100
++++ src/linux/ProbeFactory.h 2010-08-27 21:23:41.000000000 +0200
+@@ -68,7 +68,6 @@
+ #include "RunLevelProbe.h"
+ #include "XinetdProbe.h"
+ #include "InetdProbe.h"
+-#include "LDAPProbe.h"
+
+
+
+--- project/linux/Makefile 2010-12-10 13:49:06.655143160 +0100
++++ project/linux/Makefile 2010-12-10 13:47:37.247382096 +0100
+@@ -49,7 +49,7 @@
+ LIBDIR = -L/usr/local/lib -L/usr/lib
+
+ # What libraries do we need?
+-LIBS = -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt -lldap
++LIBS = -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt
+
+ # Determine what package management system is being used
+ PACKAGE_RPM = $(shell /usr/bin/env rpm --version 2>/dev/null)
diff --git a/app-forensics/ovaldi/files/ovaldi-5.9.1-strnicmp.patch b/app-forensics/ovaldi/files/ovaldi-5.9.1-strnicmp.patch
new file mode 100644
index 000000000000..fc127efd3cdb
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.9.1-strnicmp.patch
@@ -0,0 +1,11 @@
+--- src/Main.h.old 2010-10-22 14:59:13.000000000 +0200
++++ src/Main.h 2010-10-22 14:59:38.000000000 +0200
+@@ -38,7 +38,7 @@
+ #endif
+
+ #ifdef LINUX
+-# define STRNICMP strnicmp
++# define STRNICMP strncasecmp
+ #elif defined SUNOS
+ # define STRNICMP strncasecmp
+ #elif defined DARWIN
diff --git a/app-forensics/ovaldi/files/ovaldi-5.9.1-xerces3.patch b/app-forensics/ovaldi/files/ovaldi-5.9.1-xerces3.patch
new file mode 100644
index 000000000000..a5269cbb5ea5
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.9.1-xerces3.patch
@@ -0,0 +1,270 @@
+--- src/XmlProcessor.cpp.old 2010-10-25 15:13:58.000000000 +0200
++++ src/XmlProcessor.cpp 2010-10-26 09:14:46.000000000 +0200
+@@ -34,8 +34,17 @@
+ //****************************************************************************************//
+ // DataDirResolver Class //
+ //****************************************************************************************//
+-
++#if XERCES_VERSION_MAJOR < 3
+ DOMInputSource* DataDirResolver::resolveEntity (const XMLCh *const /*publicId*/, const XMLCh *const systemId, const XMLCh *const /*baseURI*/) {
++#else
++InputSource* DataDirResolver::resolveEntity(const XMLCh* publicId, const XMLCh* systemId)
++{
++ return NULL;
++ //return DataDirResolver::resolveEntity (publicId, systemId, NULL);
++}
++
++DOMLSInput* DataDirResolver::resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI) {
++#endif
+ string path = "";
+ size_t last;
+ string schemapath = Common::GetSchemaPath();
+@@ -111,21 +120,35 @@
+ // Instantiate the DOM parser.
+ static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull };
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(gLS);
++#if XERCES_VERSION_MAJOR < 3
+ parser = ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#else
++ parser = ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#endif
+
+ ///////////////////////////////////////////////////////
+ // Set fetuares on the builder
+ ///////////////////////////////////////////////////////
+
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(parser,n,v) parser->setFeature(n,v)
++#else
++#define SetParameter(parser,n,v) parser->getDomConfig()->setParameter(n,v)
++#endif
++ SetParameter(parser, XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
++ SetParameter(parser, XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
++ SetParameter(parser, XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
++#if XERCES_VERSION_MAJOR < 3
++ SetParameter(parser, XMLUni::fgDOMValidation, true); // Report all validation errors.
++#else
++ SetParameter(parser, XMLUni::fgDOMValidate, true); // Report all validation errors.
++#endif
++ SetParameter(parser, XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
++ SetParameter(parser, XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
++ SetParameter(parser, XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
++ SetParameter(parser, XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
+
+- parser->setFeature(XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
+- parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
+- parser->setFeature(XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
+- parser->setFeature(XMLUni::fgDOMValidation, true); // Report all validation errors.
+- parser->setFeature(XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
+- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
+- parser->setFeature(XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
+- parser->setFeature(XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
++#undef SetParameter
+
+ ///////////////////////////////////////////////////////
+ //****************************************************************************************//
+@@ -133,7 +156,11 @@
+ //****************************************************************************************//
+ /* Look for XML schemas in local directory instead of Internet */
+ DataDirResolver resolver;
++#if XERCES_VERSION_MAJOR < 3
+ parser->setEntityResolver (&resolver);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgXercesEntityResolver, &resolver);
++#endif
+ //****************************************************************************************//
+ // End of air-gap code //
+ //****************************************************************************************//
+@@ -144,7 +171,11 @@
+ // Create a new DOMErrorHandler
+ // and set it to the builder
+ XmlProcessorErrorHandler *errHandler = new XmlProcessorErrorHandler();
++#if XERCES_VERSION_MAJOR < 3
+ parser->setErrorHandler(errHandler);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, errHandler);
++#endif
+
+ try {
+ // reset document pool
+@@ -215,24 +246,26 @@
+ XMLCh tempStr[100];
+ XMLString::transcode("LS", tempStr, 99);
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
++#if XERCES_VERSION_MAJOR < 3
+ DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
++#else
++ DOMLSSerializer *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
++#endif
++
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(serializer,n,v) if (serializer->canSetFeature(n,v)) serializer->setFeature(n,v)
++#else
++#define SetParameter(serializer,n,v) if (serializer->getDomConfig()->canSetParameter(n,v)) serializer->getDomConfig()->setParameter(n,v)
++#endif
+
+ // set feature if the serializer supports the feature/mode
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, false))
+- theSerializer->setFeature(XMLUni::fgDOMWRTBOM, false);
+-
+- //if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- // theSerializer->setFeature(XMLUni::fgDOMWRTBOM, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTSplitCdataSections, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTDiscardDefaultContent, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTFormatPrettyPrint, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, false);
++ //SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, true);
+
++#undef SetParameter
+ //
+ // Plug in a format target to receive the resultant
+ // XML stream from the serializer.
+@@ -249,7 +282,13 @@
+ //
+ // do the serialization through DOMWriter::writeNode();
+ //
++#if XERCES_VERSION_MAJOR < 3
+ theSerializer->writeNode(myFormTarget, *doc);
++#else
++ DOMLSOutput *output = ((DOMImplementationLS*)impl)->createLSOutput();
++ output->setByteStream(myFormTarget);
++ theSerializer->write(doc, output);
++#endif
+
+ delete theSerializer;
+ delete myFormTarget;
+--- src/XmlProcessor.h.old 2010-10-22 12:06:05.000000000 +0200
++++ src/XmlProcessor.h 2010-10-22 12:06:20.000000000 +0200
+@@ -40,7 +40,7 @@
+
+ // required xerces includes
+ #include <xercesc/dom/DOMImplementationRegistry.hpp>
+-#include <xercesc/dom/DOMBuilder.hpp>
++//#include <xercesc/dom/DOMBuilder.hpp>
+ #include <xercesc/dom/DOMException.hpp>
+ #include <xercesc/dom/DOMErrorHandler.hpp>
+ #include <xercesc/dom/DOMError.hpp>
+--- src/XmlProcessor.h.old 2010-10-22 14:40:45.000000000 +0200
++++ src/XmlProcessor.h 2010-10-22 14:42:00.000000000 +0200
+@@ -50,18 +50,23 @@
+ // for dom Writer
+ #include <xercesc/dom/DOMImplementation.hpp>
+ #include <xercesc/dom/DOMImplementationLS.hpp>
+-#include <xercesc/dom/DOMWriter.hpp>
++//#include <xercesc/dom/DOMWriter.hpp>
+ #include <xercesc/framework/StdOutFormatTarget.hpp>
+ #include <xercesc/framework/LocalFileFormatTarget.hpp>
+ #include <xercesc/parsers/XercesDOMParser.hpp>
+ #include <xercesc/util/XMLUni.hpp>
+
+ // for entity resolver
+-#include <xercesc/dom/DOMEntityResolver.hpp>
+-#include <xercesc/dom/DOMInputSource.hpp>
++//#include <xercesc/dom/DOMEntityResolver.hpp>
++//#include <xercesc/dom/DOMInputSource.hpp>
+ #include <xercesc/framework/LocalFileInputSource.hpp>
+ #include <xercesc/framework/Wrapper4InputSource.hpp>
+
++#include <xercesc/dom/DOMImplementationRegistry.hpp>
++#include <xercesc/sax/EntityResolver.hpp>
++#include <xercesc/sax/InputSource.hpp>
++#include <xercesc/sax2/SAX2XMLReader.hpp>
++
+
+ XERCES_CPP_NAMESPACE_USE
+
+--- src/XmlProcessor.h.old 2010-10-22 14:43:06.000000000 +0200
++++ src/XmlProcessor.h 2010-10-22 14:44:16.000000000 +0200
+@@ -75,12 +75,14 @@
+ This class extends the default DOMEntityResolver and implments the resolve entity method
+ to support
+ */
+-class DataDirResolver : public DOMEntityResolver {
++class DataDirResolver : public EntityResolver {
+ public:
+ /**
+ *
+ */
+- DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++// DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++ InputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId);
++ DOMLSInput *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
+ };
+
+ /**
+@@ -120,7 +122,7 @@
+
+ static XmlProcessor* instance;
+
+- DOMBuilder *parser;
++ DOMLSParser *parser;
+ };
+
+ /**
+--- src/probes/independent/XmlFileContentProbe.cpp.old 2010-10-22 14:49:22.000000000 +0200
++++ src/probes/independent/XmlFileContentProbe.cpp 2010-10-22 14:51:39.000000000 +0200
+@@ -419,12 +419,24 @@
+ return new DummyEntityResolver::DoNothingBinInputStream();
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#else
++const XMLCh* DummyEntityResolver::DoNothingBinInputStream::getContentType() const
++{
++ return NULL;
++}
++XMLFilePos DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#endif
+ {
+ return 0;
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const /*toFill*/, const unsigned int /*maxToRead*/)
++#else
++XMLSize_t DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const toFill, XMLSize_t maxToRead)
++#endif
+ {
+ return 0;
+ }
+--- src/probes/independent/XmlFileContentProbe.h.old 2010-10-22 14:55:47.000000000 +0200
++++ src/probes/independent/XmlFileContentProbe.h 2010-10-22 14:57:00.000000000 +0200
+@@ -134,8 +134,14 @@
+ class DoNothingBinInputStream : public BinInputStream
+ {
+ public:
++#if XERCES_VERSION_MAJOR < 3
+ virtual unsigned int curPos() const;
+ virtual unsigned int readBytes(XMLByte *const toFill, const unsigned int maxToRead);
++#else
++ virtual XMLFilePos curPos() const;
++ virtual const XMLCh* getContentType() const;
++ virtual XMLSize_t readBytes(XMLByte *const toFill, XMLSize_t maxToRead);
++#endif
+ };
+ };
+
+--- src/XmlCommon.cpp.old
++++ src/XmlCommon.cpp
+@@ -546,7 +546,11 @@ void XmlCommon::AddSchemaLocation(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *do
+ string XmlCommon::GetNamespace(DOMElement *element) {
+
+ string xmlns = "";
++#if XERCES_VERSION_MAJOR < 3
+ xmlns = XmlCommon::ToString(element->getTypeInfo()->getNamespace());
++#else
++ xmlns = XmlCommon::ToString(element->getSchemaTypeInfo()->getTypeNamespace());
++#endif
+ if (xmlns.compare("") == 0) {
+ xmlns = "";
+ }
diff --git a/app-forensics/ovaldi/files/rpmdb.patch b/app-forensics/ovaldi/files/rpmdb.patch
new file mode 100644
index 000000000000..0d6e62608b52
--- /dev/null
+++ b/app-forensics/ovaldi/files/rpmdb.patch
@@ -0,0 +1,58 @@
+--- src/probes/linux/rpmdb.h.old 2010-10-22 15:16:49.000000000 +0200
++++ src/probes/linux/rpmdb.h 2010-10-22 15:22:09.000000000 +0200
+@@ -8,8 +8,8 @@
+ */
+
+ #include <assert.h>
+-#include "rpmlib.h"
+-#include "rpmsw.h"
++/*#include <rpmlib.h>
++#include <rpmsw.h>*/
+ #include "db.h"
+
+ /*@-exportlocal@*/
+@@ -508,7 +508,7 @@
+ * @param opx per-rpmdb accumulator index (aka rpmtsOpX)
+ * @return per-rpmdb accumulator pointer
+ */
+-void * dbiStatsAccumulator(dbiIndex dbi, int opx)
++rpmop_s * dbiStatsAccumulator(dbiIndex dbi, int opx)
+ /*@*/;
+
+ #if !defined(SWIG)
+@@ -576,7 +576,7 @@
+ /*@globals fileSystem, internalState @*/
+ /*@modifies dbi, *dbcursor, fileSystem, internalState @*/
+ {
+- void * sw = dbiStatsAccumulator(dbi, 16); /* RPMTS_OP_DBDEL */
++ rpmop_s *sw = dbiStatsAccumulator(dbi, 16); /* RPMTS_OP_DBDEL */
+ int rc;
+ assert(key->data != NULL && key->size > 0);
+ (void) rpmswEnter(sw, 0);
+@@ -600,7 +600,7 @@
+ /*@globals fileSystem, internalState @*/
+ /*@modifies dbi, *dbcursor, *key, *data, fileSystem, internalState @*/
+ {
+- void * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
++ rpmop_s * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
+ int rc;
+ assert((flags == DB_NEXT) || (key->data != NULL && key->size > 0));
+ (void) rpmswEnter(sw, 0);
+@@ -625,7 +625,7 @@
+ /*@globals fileSystem, internalState @*/
+ /*@modifies dbi, *dbcursor, *key, *pkey, *data, fileSystem, internalState @*/
+ {
+- void * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
++ rpmop_s * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
+ int rc;
+ assert((flags == DB_NEXT) || (key->data != NULL && key->size > 0));
+ (void) rpmswEnter(sw, 0);
+@@ -649,7 +649,7 @@
+ /*@globals fileSystem, internalState @*/
+ /*@modifies dbi, *dbcursor, *key, fileSystem, internalState @*/
+ {
+- void * sw = dbiStatsAccumulator(dbi, 15); /* RPMTS_OP_DBPUT */
++ rpmop_s * sw = dbiStatsAccumulator(dbi, 15); /* RPMTS_OP_DBPUT */
+ int rc;
+ assert(key->data != NULL && key->size > 0 && data->data != NULL && data->size > 0);
+ (void) rpmswEnter(sw, 0);
diff --git a/app-forensics/ovaldi/files/use_local_rpmdb.patch b/app-forensics/ovaldi/files/use_local_rpmdb.patch
new file mode 100644
index 000000000000..036d35edf947
--- /dev/null
+++ b/app-forensics/ovaldi/files/use_local_rpmdb.patch
@@ -0,0 +1,11 @@
+--- src/probes/linux/RPMInfoProbe.h.old 2010-10-22 15:12:50.000000000 +0200
++++ src/probes/linux/RPMInfoProbe.h 2010-10-22 15:13:02.000000000 +0200
+@@ -36,7 +36,7 @@
+ #include <rpm/rpmlib.h>
+ #include <rpm/rpmio.h>
+ #include <rpm/rpmts.h>
+-#include <rpm/rpmdb.h>
++#include "rpmdb.h"
+ #include <rpm/header.h>
+ #include <rpm/rpmcli.h> // added for rpm query function
+ #include <rpm/rpmds.h> // added for rpm query function
diff --git a/app-forensics/ovaldi/metadata.xml b/app-forensics/ovaldi/metadata.xml
new file mode 100644
index 000000000000..c82cdda62c13
--- /dev/null
+++ b/app-forensics/ovaldi/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>clabbe.montjoie@gmail.com</email>
+ <name>LABBE Corentin</name>
+ <description>Upstream and Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <use>
+ <flag name="rpm">Enable the RPM probes</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ovaldi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-forensics/ovaldi/ovaldi-5.10.1.2.ebuild b/app-forensics/ovaldi/ovaldi-5.10.1.2.ebuild
new file mode 100644
index 000000000000..10235f4589c7
--- /dev/null
+++ b/app-forensics/ovaldi/ovaldi-5.10.1.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Free implementation of OVAL"
+HOMEPAGE="http://oval.mitre.org/language/interpreter.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap rpm selinux"
+
+DEPEND="rpm? ( app-arch/rpm )
+ dev-libs/libgcrypt:0
+ dev-libs/libpcre
+ dev-libs/xalan-c
+ dev-libs/xerces-c
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}
+ selinux? ( sys-libs/libselinux )"
+
+S="${WORKDIR}/${P}-src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-xerces3.patch
+ epatch "${FILESDIR}"/${P}-strnicmp.patch
+ epatch "${FILESDIR}"/${P}-missing-memory-header.patch
+ if ! use ldap ; then
+ einfo "Disabling LDAP probes"
+ epatch "${FILESDIR}"/${P}-disable-ldap-probes.patch
+ sed -i 's/-lldap//' project/linux/Makefile || die
+ sed -i 's/.*LDAPProbe.h.*//' src/linux/ProbeFactory.h || die
+ rm src/probes/independent/LDAPProbe.{cpp,h} || die
+ fi
+
+ # rpm probes support is build dependant only on the presence of the rpm binary
+ if use rpm ; then
+ #Same problems as bug 274679, so i do a local copy of the header and patch it
+ cp /usr/include/rpm/rpmdb.h src/probes/linux/ || die
+ epatch "${FILESDIR}"/use_local_rpmdb.patch
+ epatch "${FILESDIR}"/rpmdb.patch
+ else
+ einfo "Disabling rpm probes"
+ sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
+ fi
+ # same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree
+ einfo "Disabling dpkg probes"
+ sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die
+
+ #Disabling SELinux support
+ if ! use selinux ; then
+ rm src/probes/linux/SelinuxSecurityContextProbe.cpp || die
+ rm src/probes/linux/SelinuxBooleanProbe.cpp || die
+ rm src/probes/linux/SelinuxBooleanProbe.h || die
+ epatch "${FILESDIR}"/${P}-disable-selinux-probes.patch
+ else
+ epatch "${FILESDIR}"/${P}-add-selinux-libs.patch
+ fi
+}
+
+src_compile () {
+ emake -C project/linux || die
+}
+
+src_install () {
+ # no make install in Makefile
+ dosbin project/linux/Release/ovaldi project/linux/ovaldi.sh || die
+ dodir /var/log/${PN} || die
+ insinto /usr/share/${PN}
+ doins xml/* || die
+ dodoc docs/{README.txt,version.txt} || die
+ doman docs/ovaldi.1 || die
+}
diff --git a/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild b/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild
new file mode 100644
index 000000000000..0e6af2534dc0
--- /dev/null
+++ b/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Free implementation of OVAL"
+HOMEPAGE="http://oval.mitre.org/language/interpreter.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="acl ldap rpm selinux"
+
+CDEPEND="dev-libs/libgcrypt:0
+ dev-libs/libpcre
+ dev-libs/xalan-c
+ dev-libs/xerces-c
+ sys-apps/util-linux
+ sys-libs/libcap
+ acl? ( sys-apps/acl )
+ ldap? ( net-nds/openldap )
+ rpm? ( app-arch/rpm )"
+DEPEND="${CDEPEND}
+ sys-apps/sed"
+RDEPEND="${CDEPEND}
+ selinux? ( sys-libs/libselinux )"
+
+S="${WORKDIR}/${P}-src"
+
+src_prepare() {
+ #Ovaldi do not support xerces 3, but portage have only that
+ epatch "${FILESDIR}"/${P}-xerces3.patch
+ sed -i 's,xercesc::DOMBuilder,xercesc::DOMLSParser,' src/XmlProcessor.h || die
+ sed -i 's,DOMBuilder,DOMLSParser,' src/XmlProcessor.cpp || die
+
+ epatch "${FILESDIR}"/${P}-strnicmp.patch
+
+ if ! use ldap ; then
+ einfo "Disabling LDAP probes"
+ sed -i 's,.*ldap,//&,' src/linux/ProbeFactory.cpp || die
+ sed -i 's,.*LDAP,//&,' src/linux/ProbeFactory.cpp || die
+ sed -i 's/-lldap//' project/linux/Makefile || die
+ sed -i 's/-llber//' project/linux/Makefile || die
+ sed -i 's/.*LDAPProbe.h.*//' src/linux/ProbeFactory.h || die
+ rm src/probes/independent/LDAPProbe.{cpp,h} || die
+ fi
+
+ if ! use acl ; then
+ sed -i 's,.*libacl,//&,' src/probes/unix/FileProbe.h || die
+ epatch "${FILESDIR}"/disable-acl.patch
+ sed -i 's, -lacl , ,' project/linux/Makefile || die
+ fi
+
+ # rpm probes support is build dependant only on the presence of the rpm binary
+ if use rpm ; then
+ #Same problems as bug 274679, so i do a local copy of the header and patch it
+ cp /usr/include/rpm/rpmdb.h src/probes/linux/ || die
+ epatch "${FILESDIR}"/use_local_rpmdb.patch
+ epatch "${FILESDIR}"/rpmdb.patch
+ else
+ einfo "Disabling rpm probes"
+ sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
+ fi
+ # same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree
+ einfo "Disabling dpkg probes"
+ sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die
+
+ #Disabling SELinux support
+ if ! use selinux ; then
+ rm src/probes/linux/SelinuxSecurityContextProbe.cpp || die
+ rm src/probes/linux/SelinuxBooleanProbe.cpp || die
+ rm src/probes/linux/SelinuxBooleanProbe.h || die
+ epatch "${FILESDIR}"/${P}-disable-selinux-probes.patch
+ sed -i 's,.*selinux.*,//&,' src/linux/ProbeFactory.cpp || die
+ sed -i 's,.*Selinux.*,//&,' src/linux/ProbeFactory.cpp || die
+ sed -i 's,.*selinux.*,//&,' src/linux/ProbeFactory.h || die
+ sed -i 's,.*Selinux.*,//&,' src/linux/ProbeFactory.h || die
+ sed -i 's,.*SecurityContextGuard.h.*,//&,' src/probes/unix/Process58Probe.cpp || die
+ rm src/linux/SecurityContextGuard.h || die
+ sed -i 's, -lselinux,,' project/linux/Makefile || die
+ fi
+ # respect CXXFLAGS and CXX
+ sed -i -e '/^CPPFLAGS/s/$(INCDIRS)/$(CXXFLAGS) \0/' project/linux/Makefile || die
+ tc-export CXX
+}
+
+src_compile () {
+ emake -C project/linux
+}
+
+src_install () {
+ # no make install in Makefile
+ dosbin project/linux/Release/ovaldi project/linux/ovaldi.sh
+ dodir /var/log/${PN}
+ insinto /usr/share/${PN}
+ doins xml/*
+ dodoc docs/{README.txt,version.txt}
+ doman docs/ovaldi.1
+}
diff --git a/app-forensics/ovaldi/ovaldi-5.9.1.ebuild b/app-forensics/ovaldi/ovaldi-5.9.1.ebuild
new file mode 100644
index 000000000000..d0f4b9c161b4
--- /dev/null
+++ b/app-forensics/ovaldi/ovaldi-5.9.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Free implementation of OVAL"
+HOMEPAGE="http://oval.mitre.org/language/interpreter.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap rpm"
+
+DEPEND="rpm? ( app-arch/rpm )
+ dev-libs/libgcrypt:0
+ dev-libs/libpcre
+ dev-libs/xalan-c
+ dev-libs/xerces-c
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}-src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-xerces3.patch
+ epatch "${FILESDIR}"/${P}-strnicmp.patch
+ if ! use ldap ; then
+ einfo "Disabling LDAP probes"
+ epatch "${FILESDIR}"/${P}-disable-ldap-probes.patch
+ rm src/probes/independent/LDAPProbe.{cpp,h} || die
+ fi
+
+ # rpm probes support is build dependant only on the presence of the rpm binary
+ if use rpm ; then
+ #Same problems as bug 274679, so i do a local copy of the header and patch it
+ cp /usr/include/rpm/rpmdb.h src/probes/linux/ || die
+ epatch "${FILESDIR}"/use_local_rpmdb.patch
+ epatch "${FILESDIR}"/rpmdb.patch
+ else
+ einfo "Disabling rpm probes"
+ sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
+ fi
+ # same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree
+ einfo "Disabling dpkg probes"
+ sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die
+}
+
+src_compile () {
+ emake -C project/linux || die
+}
+
+src_install () {
+ # no make install in Makefile
+ dosbin project/linux/Release/ovaldi project/linux/ovaldi.sh || die
+ dodir /var/log/${PN} || die
+ insinto /usr/share/${PN}
+ doins xml/* || die
+ dodoc docs/{README.txt,version.txt} || die
+ doman docs/ovaldi.1 || die
+}