[tncfhh] Fixed broken dependencies of boost-system and boost-thread Fixed some performance and implementation
avesh agarwal
avesh at fedoraproject.org
Mon Aug 8 15:34:26 UTC 2011
commit 194dfdce60faf6562a2d5d07fe760ff1b3c9d212
Author: Avesh Agarwal <avagarwa at redhat.com>
Date: Mon Aug 8 11:34:15 2011 -0400
Fixed broken dependencies of boost-system and boost-thread
Fixed some performance and implementation issues
tncfhh-0.8.2-issues.patch | 126 +++++++++++++++++++++++++++++++++++++++++++++
tncfhh.spec | 9 +++-
2 files changed, 134 insertions(+), 1 deletions(-)
---
diff --git a/tncfhh-0.8.2-issues.patch b/tncfhh-0.8.2-issues.patch
new file mode 100644
index 0000000..a950d70
--- /dev/null
+++ b/tncfhh-0.8.2-issues.patch
@@ -0,0 +1,126 @@
+diff -urNp tncfhh-0.8.2-cvs-patched/imcv/clamav/imc/src/ClamavIMC.cpp tncfhh-0.8.2-current/imcv/clamav/imc/src/ClamavIMC.cpp
+--- tncfhh-0.8.2-cvs-patched/imcv/clamav/imc/src/ClamavIMC.cpp 2011-07-26 11:16:17.312054017 -0400
++++ tncfhh-0.8.2-current/imcv/clamav/imc/src/ClamavIMC.cpp 2011-07-26 12:31:27.202805975 -0400
+@@ -265,7 +265,7 @@ void ClamavIMC::checkClamconf(){
+ * *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+ void ClamavIMC::parseResults(){
+- int pos1, pos2;
++ unsigned int pos1, pos2;
+ std::string tmp;
+
+ LOG4CXX_DEBUG(logger, "parsing results");
+diff -urNp tncfhh-0.8.2-cvs-patched/imcv/platid/imc/src/PlatidIMC.cpp tncfhh-0.8.2-current/imcv/platid/imc/src/PlatidIMC.cpp
+--- tncfhh-0.8.2-cvs-patched/imcv/platid/imc/src/PlatidIMC.cpp 2011-07-26 11:16:17.311054026 -0400
++++ tncfhh-0.8.2-current/imcv/platid/imc/src/PlatidIMC.cpp 2011-07-26 12:37:34.533897454 -0400
+@@ -161,46 +161,41 @@ int PlatidIMC::processConfigLine(string
+
+ void PlatidIMC::processUseWksLine(string line)
+ {
+- int i;
++ unsigned int i;
+ i = line.find_first_of(' ');
+
+- if (i == line.npos)
+- return; /* no space found */
+-
++ if(i != line.npos) {
+ if (!line.compare(i+1, strlen("yes"), "yes")) {
+ LOG4CXX_DEBUG(logger, "Config file says we use the WKS");
+ useWksSrk = true;
+ }
++ }
+ }
+
+
+
+ void PlatidIMC::processPrivateKeyLine(string line)
+ {
+- int i;
++ unsigned int i;
+ i = line.find_first_of(' ');
+
+- if (i == line.npos)
+- return; /* no space found */
+-
++ if(i != line.npos) {
+ privateKeyFile = line.substr(i+1, line.length() - (i + 1));
+ LOG4CXX_INFO(logger, "Private Key File = " << privateKeyFile);
+-
++ }
+ }
+
+
+
+ void PlatidIMC::processCertificateFileLine(string line)
+ {
+- int i;
++ unsigned int i;
+ i = line.find_first_of(' ');
+
+- if (i == line.npos) {
+- return; /* no space found */
+- }
+-
++ if(i != line.npos) {
+ certificateFile = line.substr(i + 1, line.length() - (i + 1));
+ LOG4CXX_INFO(logger, "Certificate File = " << certificateFile);
++ }
+ }
+
+ int PlatidIMC::initializeEngine(void)
+diff -urNp tncfhh-0.8.2-cvs-patched/imcv/platid/imv/src/PlatidIMV.cpp tncfhh-0.8.2-current/imcv/platid/imv/src/PlatidIMV.cpp
+--- tncfhh-0.8.2-cvs-patched/imcv/platid/imv/src/PlatidIMV.cpp 2011-07-26 11:16:17.312054017 -0400
++++ tncfhh-0.8.2-current/imcv/platid/imv/src/PlatidIMV.cpp 2011-07-26 12:44:22.153652220 -0400
+@@ -253,7 +253,7 @@ PlatidIMV::verifySignature(TNC_BufferRef
+
+ LOG4CXX_DEBUG(logger, "Size of fingerprint:" << x509digestLen);
+
+- for (int j = 0; j < x509digestLen; j++) {
++ for (unsigned int j = 0; j < x509digestLen; j++) {
+ snprintf(hex, 4, "%02X%s", md[j],
+ (j != (x509digestLen - 1)) ? ":" : "");
+ strfp.append(hex);
+diff -urNp tncfhh-0.8.2-cvs-patched/imunit/src/imunit/AbstractIMUnit.cpp tncfhh-0.8.2-current/imunit/src/imunit/AbstractIMUnit.cpp
+--- tncfhh-0.8.2-cvs-patched/imunit/src/imunit/AbstractIMUnit.cpp 2011-07-26 11:16:17.263054452 -0400
++++ tncfhh-0.8.2-current/imunit/src/imunit/AbstractIMUnit.cpp 2011-07-26 13:53:05.000146865 -0400
+@@ -80,7 +80,8 @@ TNC_Result AbstractIMUnit::notifyConnect
+ {
+ LOG4CXX_TRACE(logger, "notifyConnectionChange new state = " << newState);
+ // check newState value
+- if(newState >= 0 && newState <= 5){
++ if(newState >= TNC_CONNECTION_STATE_CREATE
++ && newState <= TNC_CONNECTION_STATE_DELETE){
+ connectionState = newState;
+ // call hook method for event notification
+ return notifyConnectionChange();
+diff -urNp tncfhh-0.8.2-cvs-patched/imunit/src/imunit/imc/IMCLibrary.cpp tncfhh-0.8.2-current/imunit/src/imunit/imc/IMCLibrary.cpp
+--- tncfhh-0.8.2-cvs-patched/imunit/src/imunit/imc/IMCLibrary.cpp 2011-07-26 11:16:17.262054461 -0400
++++ tncfhh-0.8.2-current/imunit/src/imunit/imc/IMCLibrary.cpp 2011-07-26 12:51:00.833564191 -0400
+@@ -171,7 +171,10 @@ TNC_Result IMCLibrary::notifyConnectionC
+
+ // save IMC
+ imcInstances[connectionID] = tmp;
+- imc = getImcInstances(connectionID);
++ /* why to search in the global list*/
++ /* if the list is long, it can cause performance issues*/
++ //imc = getImcInstances(connectionID);
++ imc = tmp;
+ }
+ break;
+ case TNC_CONNECTION_STATE_DELETE:
+diff -urNp tncfhh-0.8.2-cvs-patched/imunit/src/imunit/imv/IMVLibrary.cpp tncfhh-0.8.2-current/imunit/src/imunit/imv/IMVLibrary.cpp
+--- tncfhh-0.8.2-cvs-patched/imunit/src/imunit/imv/IMVLibrary.cpp 2011-07-26 11:16:17.263054452 -0400
++++ tncfhh-0.8.2-current/imunit/src/imunit/imv/IMVLibrary.cpp 2011-07-26 12:52:36.694588195 -0400
+@@ -183,7 +183,10 @@ TNC_Result IMVLibrary::notifyConnectionC
+ if (!tmp) throw ResultException("createNewIMVInstance(..) return NULL", TNC_RESULT_FATAL);
+
+ imvInstances[connectionID] = tmp;
+- imv = getImvInstances(connectionID);
++ /* why to search in the global list*/
++ /* if the list is long, it can cause performance issues*/
++ //imv = getImvInstances(connectionID);
++ imv=tmp;
+ }
+ break;
+ case TNC_CONNECTION_STATE_DELETE:
diff --git a/tncfhh.spec b/tncfhh.spec
index da8dcd8..0b3f920 100644
--- a/tncfhh.spec
+++ b/tncfhh.spec
@@ -4,7 +4,7 @@ Summary: An open source implementation of the Trusted Network Connect (TNC) fram
Name: tncfhh
Version: 0.8.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Url: http://trust.inform.fh-hannover.de/joomla/index.php/projects/tncfhh
Source0: http://trust.inform.fh-hannover.de/download/tncfhh/tncfhh-%{version}.tar.gz
@@ -17,6 +17,7 @@ BuildRequires: libtool-ltdl-devel boost-devel openssl-devel
Patch1: tncxacml-xerces.patch
Patch2: tncfhh-cmake-issues.patch
Patch3: tncfhh-memory-leak-exception.patch
+Patch4: tncfhh-0.8.2-issues.patch
%description
The TNC at FHH project is an open source implementation of the Trusted Network
@@ -33,6 +34,7 @@ Summary: Dynamic library for TNC
License: GPLv2
Group: Development/Libraries
Requires: %{name} = %{version}
+Requires: boost-thread boost-system
%description libs
This package provides naaeap, tnsc, imunit, tncutil, and tncxacml
@@ -73,6 +75,7 @@ A shared library that offers simple configuration file parsing.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
%cmake . -DCOMPONENT=all -DNAL=8021x \
@@ -159,6 +162,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libtncutil.so.?.?.?
%changelog
+* Mon Aug 8 2011 Avesh Agarwal <avagarwa at redhat.com> - 0.8.2-2
+- Fixed broken dependencies of boost-system and boost-thread
+- Fixed some performance and implementation issues
+
* Mon Jul 18 2011 Avesh Agarwal <avagarwa at redhat.com> - 0.8.2-1
- Initial packaging of tncfhh-0.8.2
- Fixed cmake issues
More information about the scm-commits
mailing list