rfxn/linux-malware-detect — pull request #10 by waja (2014-06-30 15:34:13+00:00)
Title: GNU Parallel Semaphores Added

First go ahead with semaphores for LMD. Using GNU's parallel program (perl
threads with file locking) we are able to parallelize the file scanning
process which is the bottleneck in this process.

Users can pass in the number of threads at run by the -a param:
maldet -a /home/?/public_html 15
This will run 15 thread scans.....^^

With one test case pass, I suspect more bugs exists in this implementation. So
far that one test cases includes scanning the /tmp directory where no hits
were found. In addition, the test case was not branch coverage so some if /
logic statements were never ran.

The downfall of using semaphores within bash is variable scope -- they need to
be exported into the environment. This is where most bugs will be introduced.

Signed-off-by: Adam Brenner