ossec / ossec-hids

OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.
http://www.ossec.net
Other
4.49k stars 1.04k forks source link

OS_IsValidIP always return "not valid IP Address" #1494

Open jschorb opened 6 years ago

jschorb commented 6 years ago

OS: Solaris 11.3 OSSEC Version: ossec-hids-3.0.0

OS_IsValidIP returns alwas return 0 for a invalid ip address. The Problem is getaddrinfo, getaddrinfo return 1 for an invalid ip address. But when I test with the ip_test programm the function works correctly. Is there a solution for this problem?

Regards Jürgen

ddpbsd commented 6 years ago

I don't have access to Solaris. Any chance you can try to figure out why getaddrinfo is failing for you?

jschorb commented 6 years ago

Yes I has figured out the problem. It is the chroot() function. I think the shared object is not completely loaded in the program memory.

ddpbsd commented 6 years ago

You could try compiling it as a static binary. I haven't really been able to do this on Linux, but it might work on Solaris.

jschorb commented 6 years ago

No I think there is no way to build a static binary. The standard libraries will be shipped only in shared format.