Patch for updated EAP-TNC support for freeradius from tnc at fhh

Arran Cudbard-Bell a.cudbardb at
Sat Mar 9 14:50:06 CET 2013

I've refactored the code and shrunk it.

The code you submitted leaked opaque data, which i've fixed. 

I'm concerned about the call to storeUserName, and getConnection, there's no where where the connection is explicitly destroyed, so I don't see how memory passed to those functions or allocated by those functions is ever freed. I guess there must be some magic GC/reference counting i'm missing?


Regarding the library.

The build scripts for tnc-fhh are poor and do not work correctly on my system (OSX 10.8.2, Apple clang version 4.0, cmake version

I get errors from the linker/clang

	clang: error: invalid argument '-current_version 0.8.4' only allowed with '-dynamiclib'

and when I add 

	clang: error: invalid argument '-bundle' not allowed with '-dynamiclib'

Adding -dynamiclib and removing -bundle from CMakeFiles/dummyimv.dir/link.txt fixes this, but i'm guessing there's a better way.

ditto for:

tncutil/CMakeLists.txt doesn't specify linker flags for libssl libcrypto or boost_system / boost_system-mt, so the linker fails with unresolved symbols.

I added them manually:
target_link_libraries(${PROJECT_NAME} ${Log4cxx_LIBRARY} ${XercesC_LIBRARY} ssl crypto boost_system-mt)

I'm guessing there's a better way of doing this.

The code itself has typos and won't compile:

tnc-fhh/imcv/hostscanner/imv/src/HostScannerIMV.cpp:318:9: error: use of undeclared identifier 'u_int'
        u_int pos = line.find_first_of('=');

Changing it to unsigned int at least allowed the build system to get past that.

and there's an obvious typo here:

nc-fhh/imcv/platid/imv/src/PlatidIMV.cpp:209:16: warning: equality comparison result unused [-Wunused-comparison]
                nothingWrong == false;

That should be an assignment operator.


CMake Error at imunit/cmake_install.cmake:31 (FILE):
  file INSTALL cannot set permissions on "/usr/local/include"

Why is the install script attempting to change permissions on /usr/local/include in the first place?

I'll take a look at the eap-ttls modifications later, and do them as a separate commit.


More information about the Freeradius-Devel mailing list