Windows: secure rand()
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 8 Sep 2009 20:43:01 +0000 (16:43 -0400)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Wed, 9 Sep 2009 04:28:55 +0000 (21:28 -0700)
rand_s() is available on Visual Studio 2005 and above (aka 1400 and above)

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/430
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/rpc_srvsvc.c

index 1cb809d..a63a40c 100644 (file)
@@ -330,7 +330,7 @@ RPC_SRVSVC_Init(void)
 {
     lock_InitializeMutex(&shareEnum_mx, "NetrShareEnum", 0);
     shareEnumQ = NULL;
-#if _MSC_VER < 1500
+#if _MSC_VER < 1400
     srand((unsigned) time( NULL ));
     shareEnum_next_handle = rand();
 #else