ossec/ossec-hids — pull request #16 by jrossi (2014-01-29 14:32:30+00:00)
Title: Allow NIX agent to use "-f" option and run in foreground

While this works I'm not sure I fully understand how it affects this code when the agent is actually run in the foreground:

srandom( time(0) + getpid()+ pid + getppid());

My guess is this is why the foreground option was never implemented for this daemon in the first place. Seems like the random stuff is only used with keep_alive messages and might not be that big of a deal but I'd appreciate someone double checking.

Original Pull Request: https://bitbucket.org/jbcheng/ossec-hids/pull-request/35/allow-nix-agent-to-use-f-option-and-run-in/diff