From 6151c9b900fe4016e3151565434da68696b4b2e5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 17 Apr 2019 02:04:17 +0300 Subject: [PATCH] EAP-pwd server: Remove unused srandom() call Commit 4b16c15bbc8b ("EAP-pwd server: Use os_get_random() for unpredictable token") replaced use of os_random(), i.e., of random(), with os_get_random(), but forgot to remove the now unused srandom() call. Clean up the implementation and remove that unneeded code. Signed-off-by: Jouni Malinen --- src/eap_server/eap_server_pwd.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c index 38e2af86b..e720a28c8 100644 --- a/src/eap_server/eap_server_pwd.c +++ b/src/eap_server/eap_server_pwd.c @@ -1038,14 +1038,6 @@ static u8 * eap_pwd_get_session_id(struct eap_sm *sm, void *priv, size_t *len) int eap_server_pwd_register(void) { struct eap_method *eap; - struct timeval tp; - struct timezone tz; - u32 sr; - - sr = 0xdeaddada; - (void) gettimeofday(&tp, &tz); - sr ^= (tp.tv_sec ^ tp.tv_usec); - srandom(sr); eap = eap_server_method_alloc(EAP_SERVER_METHOD_INTERFACE_VERSION, EAP_VENDOR_IETF, EAP_TYPE_PWD,