diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.253 2002/06/28 23:05:06 deraadt Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.254 2002/06/30 21:54:16 deraadt Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -320,7 +320,7 @@ grace_alarm_handler(int sig) | |||
320 | static void | 320 | static void |
321 | generate_ephemeral_server_key(void) | 321 | generate_ephemeral_server_key(void) |
322 | { | 322 | { |
323 | u_int32_t rand = 0; | 323 | u_int32_t rnd = 0; |
324 | int i; | 324 | int i; |
325 | 325 | ||
326 | verbose("Generating %s%d bit RSA key.", | 326 | verbose("Generating %s%d bit RSA key.", |
@@ -333,9 +333,9 @@ generate_ephemeral_server_key(void) | |||
333 | 333 | ||
334 | for (i = 0; i < SSH_SESSION_KEY_LENGTH; i++) { | 334 | for (i = 0; i < SSH_SESSION_KEY_LENGTH; i++) { |
335 | if (i % 4 == 0) | 335 | if (i % 4 == 0) |
336 | rand = arc4random(); | 336 | rnd = arc4random(); |
337 | sensitive_data.ssh1_cookie[i] = rand & 0xff; | 337 | sensitive_data.ssh1_cookie[i] = rnd & 0xff; |
338 | rand >>= 8; | 338 | rnd >>= 8; |
339 | } | 339 | } |
340 | arc4random_stir(); | 340 | arc4random_stir(); |
341 | } | 341 | } |
@@ -529,7 +529,7 @@ demote_sensitive_data(void) | |||
529 | static void | 529 | static void |
530 | privsep_preauth_child(void) | 530 | privsep_preauth_child(void) |
531 | { | 531 | { |
532 | u_int32_t rand[256]; | 532 | u_int32_t rnd[256]; |
533 | gid_t gidset[1]; | 533 | gid_t gidset[1]; |
534 | struct passwd *pw; | 534 | struct passwd *pw; |
535 | int i; | 535 | int i; |
@@ -538,8 +538,8 @@ privsep_preauth_child(void) | |||
538 | privsep_challenge_enable(); | 538 | privsep_challenge_enable(); |
539 | 539 | ||
540 | for (i = 0; i < 256; i++) | 540 | for (i = 0; i < 256; i++) |
541 | rand[i] = arc4random(); | 541 | rnd[i] = arc4random(); |
542 | RAND_seed(rand, sizeof(rand)); | 542 | RAND_seed(rnd, sizeof(rnd)); |
543 | 543 | ||
544 | /* Demote the private keys to public keys. */ | 544 | /* Demote the private keys to public keys. */ |
545 | demote_sensitive_data(); | 545 | demote_sensitive_data(); |
@@ -1600,7 +1600,7 @@ do_ssh1_kex(void) | |||
1600 | u_char session_key[SSH_SESSION_KEY_LENGTH]; | 1600 | u_char session_key[SSH_SESSION_KEY_LENGTH]; |
1601 | u_char cookie[8]; | 1601 | u_char cookie[8]; |
1602 | u_int cipher_type, auth_mask, protocol_flags; | 1602 | u_int cipher_type, auth_mask, protocol_flags; |
1603 | u_int32_t rand = 0; | 1603 | u_int32_t rnd = 0; |
1604 | 1604 | ||
1605 | /* | 1605 | /* |
1606 | * Generate check bytes that the client must send back in the user | 1606 | * Generate check bytes that the client must send back in the user |
@@ -1613,9 +1613,9 @@ do_ssh1_kex(void) | |||
1613 | */ | 1613 | */ |
1614 | for (i = 0; i < 8; i++) { | 1614 | for (i = 0; i < 8; i++) { |
1615 | if (i % 4 == 0) | 1615 | if (i % 4 == 0) |
1616 | rand = arc4random(); | 1616 | rnd = arc4random(); |
1617 | cookie[i] = rand & 0xff; | 1617 | cookie[i] = rnd & 0xff; |
1618 | rand >>= 8; | 1618 | rnd >>= 8; |
1619 | } | 1619 | } |
1620 | 1620 | ||
1621 | /* | 1621 | /* |