Closed GoogleCodeExporter closed 9 years ago
The issue here is related with sharing modes as described in
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363874(v=vs.85).aspx.
The "match" functions internally calls CreateFile using FILE_SHARE_READ but not
FILE_SHARE_WRITE. This means that we can share the file with other processes
trying to read from it, but not with processes trying to write. As those logs
files are already open by Windows in write mode, and we are not specifying
FILE_SHARE_WRITE, our call to CreateFile fails. The Python's "open" in the
other hand calls CreateFile with FILE_SHARE_WRITE enabled.
The correct behavior for YARA is disallowing scans on files are being written
to by other processes, otherwise it can't guarantee a correct result.
Original comment by plus...@gmail.com
on 6 Dec 2013 at 1:45
Original issue reported on code.google.com by
Veno...@gmail.com
on 7 May 2013 at 7:42