[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ossec-cvs] ossec-hids: agentd.c (HEAD) [dcid]



Module name:	ossec-hids
Changes by:	dcid	07/10/10 20:29:33

Modified files:
	agentd.c

Log message:
Description: Some fixes in time for beta. Changing all rand usage to random, removing some memory leaks nd fixing decoder for pam.
Reviewed by: dcid
Bug:

Index: agentd.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/client-agent/agentd.c,v
diff -u -r1.36 -r1.37
--- agentd.c	4 Oct 2007 01:41:36 -0000	1.36
+++ agentd.c	10 Oct 2007 23:29:33 -0000	1.37
@@ -84,8 +84,13 @@
 
     
     /* Initial random numbers */
-    srand( time(0) + getpid() + pid + getppid() );
-    rand();
+    #ifdef __OpenBSD__
+    srandomdev();
+    #else
+    srandom( time(0) + getpid()+ pid + getppid());
+    #endif
+                    
+    random();
 
 
     /* Connecting UDP */


OSSEC home | Main Index | Thread Index


OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.