Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selective opening mode to extract file hash #778

Merged
merged 2 commits into from
Aug 24, 2016
Merged

Selective opening mode to extract file hash #778

merged 2 commits into from
Aug 24, 2016

Conversation

vikman90
Copy link
Contributor

The pull request #744 solved the issue #42 by opening files in binary mode.

This change leaves the behaviour of Linux binaries unaltered, but makes the file integrity monitoring in Windows to read properly binary files. Unfortunately I discovered that it makes the reception of merged.mg to fail in Windows.

In order to make both elements to work, it's necessary to insert a parameter on every call to file hashing functions. So, OSSEC will only read files in binary mode at Syscheck routines.

@ddpbsd
Copy link
Member

ddpbsd commented Apr 1, 2016

Can you remerge (or whatever git calls it) MASTER? Some of the failures from travis I recognize as fixed, but not entirely sure about the others.

@vikman90
Copy link
Contributor Author

Yes, I'm able to do "git merge binhash" towards master with no problems. I compiled the merged branch with TARGET=server|agent|winagent|local|hybrid, and I haven't got errors.

@ddpbsd
Copy link
Member

ddpbsd commented Apr 13, 2016

It looks like the tests are still failing. Perhaps an update didn't make it to your branch?

@ddpbsd
Copy link
Member

ddpbsd commented Apr 13, 2016

Try adding

#include "defs.h"

to tests/test_os_crypto.c. That should grab the OS_TEXT define and allow some of the tests to pass.

@vikman90
Copy link
Contributor Author

It seems to work now!

@atomicturtle atomicturtle merged commit d39ed86 into ossec:master Aug 24, 2016
@vikman90 vikman90 deleted the binhash branch October 19, 2016 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants