]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-pwd server: Remove unused srandom() call
authorJouni Malinen <jouni@codeaurora.org>
Tue, 16 Apr 2019 23:04:17 +0000 (02:04 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 17 Apr 2019 10:24:37 +0000 (13:24 +0300)
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 <jouni@codeaurora.org>
src/eap_server/eap_server_pwd.c

index 38e2af86b4706eb9ecdc34526529120af15bc3b3..e720a28c85bac6838cb52fd5a4c574b890055675 100644 (file)
@@ -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,