ossec/ossec-hids — pull request #336 by awiddersheim (2014-10-06 00:26:11+00:00)
Title: Fix manage agents keys

Create temporary files in a secure manner on both NIX and Windows
platforms that will be used to write client.keys and ossec.conf data to.
Then use atomic operations where possible to replace the current
versions when making updates.

On Windows, decided to hard code the location of COMSPEC instead of
pulling it from an environment variable each time. It is highly unlikely
the location of this will change but may re-examine in the future.

Since temporary files are now a possibility on agent only installs I
updated the Windows installer to include a tmp directory. Need to figure
out what is involved with doing the same on the NIX side.