Merge commit 'v2.5.1'
[ossec-hids.git] / src / logcollector / main.c
index 5340c85..8608a58 100755 (executable)
@@ -1,11 +1,11 @@
-/* @(#) $Id: main.c,v 1.27 2009/11/18 19:07:40 dcid Exp $ */
+/* @(#) $Id$ */
 
 /* Copyright (C) 2009 Trend Micro Inc.
  * All right reserved.
  *
  * This program is a free software; you can redistribute it
  * and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
  * Foundation
  */
 
@@ -45,6 +45,17 @@ int main(int argc, char **argv)
     char *dir = DEFAULTDIR;
 
 
+    /* Setuping up random */
+    #ifndef WIN32
+        #ifdef __OpenBSD__
+        srandomdev();
+        #else
+        srandom(time(0));
+        #endif
+    #else
+    srandom(time(0))
+    #endif
+
     /* Setting the name */
     OS_SetName(ARGV0);