summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--auth2.c8
-rw-r--r--session.c12
-rw-r--r--sshd.c24
4 files changed, 26 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 089a532ed..897fe8889 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,9 @@
30 - deraadt@cvs.openbsd.org 2002/06/28 23:05:06 30 - deraadt@cvs.openbsd.org 2002/06/28 23:05:06
31 [sshd.c] 31 [sshd.c]
32 gidset[2] -> gidset[1]; markus ok 32 gidset[2] -> gidset[1]; markus ok
33 - deraadt@cvs.openbsd.org 2002/06/30 21:54:16
34 [auth2.c session.c sshd.c]
35 lint asks that we use names that do not overlap
33 36
3420020702 3720020702
35 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc & 38 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
@@ -1238,4 +1241,4 @@
1238 - (stevesk) entropy.c: typo in debug message 1241 - (stevesk) entropy.c: typo in debug message
1239 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1242 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1240 1243
1241$Id: ChangeLog,v 1.2323 2002/07/04 00:11:40 mouring Exp $ 1244$Id: ChangeLog,v 1.2324 2002/07/04 00:12:53 mouring Exp $
diff --git a/auth2.c b/auth2.c
index 6dfd91f74..eea381d95 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.93 2002/05/31 11:35:15 markus Exp $"); 26RCSID("$OpenBSD: auth2.c,v 1.94 2002/06/30 21:54:16 deraadt Exp $");
27 27
28#include "ssh2.h" 28#include "ssh2.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -102,7 +102,7 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
102{ 102{
103 Authctxt *authctxt = ctxt; 103 Authctxt *authctxt = ctxt;
104 u_int len; 104 u_int len;
105 int accept = 0; 105 int acceptit = 0;
106 char *service = packet_get_string(&len); 106 char *service = packet_get_string(&len);
107 packet_check_eom(); 107 packet_check_eom();
108 108
@@ -111,14 +111,14 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
111 111
112 if (strcmp(service, "ssh-userauth") == 0) { 112 if (strcmp(service, "ssh-userauth") == 0) {
113 if (!authctxt->success) { 113 if (!authctxt->success) {
114 accept = 1; 114 acceptit = 1;
115 /* now we can handle user-auth requests */ 115 /* now we can handle user-auth requests */
116 dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request); 116 dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request);
117 } 117 }
118 } 118 }
119 /* XXX all other service requests are denied */ 119 /* XXX all other service requests are denied */
120 120
121 if (accept) { 121 if (acceptit) {
122 packet_start(SSH2_MSG_SERVICE_ACCEPT); 122 packet_start(SSH2_MSG_SERVICE_ACCEPT);
123 packet_put_cstring(service); 123 packet_put_cstring(service);
124 packet_send(); 124 packet_send();
diff --git a/session.c b/session.c
index 747a00afa..19b22c2aa 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.142 2002/06/26 13:49:26 deraadt Exp $"); 36RCSID("$OpenBSD: session.c,v 1.143 2002/06/30 21:54:16 deraadt Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -992,13 +992,13 @@ do_setup_env(Session *s, const char *shell)
992 if (!options.use_login) { 992 if (!options.use_login) {
993 while (custom_environment) { 993 while (custom_environment) {
994 struct envstring *ce = custom_environment; 994 struct envstring *ce = custom_environment;
995 char *s = ce->s; 995 char *str = ce->s;
996 996
997 for (i = 0; s[i] != '=' && s[i]; i++) 997 for (i = 0; str[i] != '=' && str[i]; i++)
998 ; 998 ;
999 if (s[i] == '=') { 999 if (str[i] == '=') {
1000 s[i] = 0; 1000 str[i] = 0;
1001 child_set_env(&env, &envsize, s, s + i + 1); 1001 child_set_env(&env, &envsize, str, str + i + 1);
1002 } 1002 }
1003 custom_environment = ce->next; 1003 custom_environment = ce->next;
1004 xfree(ce->s); 1004 xfree(ce->s);
diff --git a/sshd.c b/sshd.c
index c371e55ca..765dac99c 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.253 2002/06/28 23:05:06 deraadt Exp $"); 45RCSID("$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)
320static void 320static void
321generate_ephemeral_server_key(void) 321generate_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)
529static void 529static void
530privsep_preauth_child(void) 530privsep_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 /*