mirror of git://anongit.mindrot.org/openssh.git
- deraadt@cvs.openbsd.org 2002/06/30 21:54:16
[auth2.c session.c sshd.c] lint asks that we use names that do not overlap
This commit is contained in:
parent
810af968b8
commit
5a9d0eaba6
|
@ -30,6 +30,9 @@
|
|||
- deraadt@cvs.openbsd.org 2002/06/28 23:05:06
|
||||
[sshd.c]
|
||||
gidset[2] -> gidset[1]; markus ok
|
||||
- deraadt@cvs.openbsd.org 2002/06/30 21:54:16
|
||||
[auth2.c session.c sshd.c]
|
||||
lint asks that we use names that do not overlap
|
||||
|
||||
20020702
|
||||
- (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
|
||||
|
@ -1238,4 +1241,4 @@
|
|||
- (stevesk) entropy.c: typo in debug message
|
||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||
|
||||
$Id: ChangeLog,v 1.2323 2002/07/04 00:11:40 mouring Exp $
|
||||
$Id: ChangeLog,v 1.2324 2002/07/04 00:12:53 mouring Exp $
|
||||
|
|
8
auth2.c
8
auth2.c
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: auth2.c,v 1.93 2002/05/31 11:35:15 markus Exp $");
|
||||
RCSID("$OpenBSD: auth2.c,v 1.94 2002/06/30 21:54:16 deraadt Exp $");
|
||||
|
||||
#include "ssh2.h"
|
||||
#include "xmalloc.h"
|
||||
|
@ -102,7 +102,7 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
|
|||
{
|
||||
Authctxt *authctxt = ctxt;
|
||||
u_int len;
|
||||
int accept = 0;
|
||||
int acceptit = 0;
|
||||
char *service = packet_get_string(&len);
|
||||
packet_check_eom();
|
||||
|
||||
|
@ -111,14 +111,14 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
|
|||
|
||||
if (strcmp(service, "ssh-userauth") == 0) {
|
||||
if (!authctxt->success) {
|
||||
accept = 1;
|
||||
acceptit = 1;
|
||||
/* now we can handle user-auth requests */
|
||||
dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request);
|
||||
}
|
||||
}
|
||||
/* XXX all other service requests are denied */
|
||||
|
||||
if (accept) {
|
||||
if (acceptit) {
|
||||
packet_start(SSH2_MSG_SERVICE_ACCEPT);
|
||||
packet_put_cstring(service);
|
||||
packet_send();
|
||||
|
|
12
session.c
12
session.c
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: session.c,v 1.142 2002/06/26 13:49:26 deraadt Exp $");
|
||||
RCSID("$OpenBSD: session.c,v 1.143 2002/06/30 21:54:16 deraadt Exp $");
|
||||
|
||||
#include "ssh.h"
|
||||
#include "ssh1.h"
|
||||
|
@ -992,13 +992,13 @@ do_setup_env(Session *s, const char *shell)
|
|||
if (!options.use_login) {
|
||||
while (custom_environment) {
|
||||
struct envstring *ce = custom_environment;
|
||||
char *s = ce->s;
|
||||
char *str = ce->s;
|
||||
|
||||
for (i = 0; s[i] != '=' && s[i]; i++)
|
||||
for (i = 0; str[i] != '=' && str[i]; i++)
|
||||
;
|
||||
if (s[i] == '=') {
|
||||
s[i] = 0;
|
||||
child_set_env(&env, &envsize, s, s + i + 1);
|
||||
if (str[i] == '=') {
|
||||
str[i] = 0;
|
||||
child_set_env(&env, &envsize, str, str + i + 1);
|
||||
}
|
||||
custom_environment = ce->next;
|
||||
xfree(ce->s);
|
||||
|
|
24
sshd.c
24
sshd.c
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: sshd.c,v 1.253 2002/06/28 23:05:06 deraadt Exp $");
|
||||
RCSID("$OpenBSD: sshd.c,v 1.254 2002/06/30 21:54:16 deraadt Exp $");
|
||||
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/bn.h>
|
||||
|
@ -320,7 +320,7 @@ grace_alarm_handler(int sig)
|
|||
static void
|
||||
generate_ephemeral_server_key(void)
|
||||
{
|
||||
u_int32_t rand = 0;
|
||||
u_int32_t rnd = 0;
|
||||
int i;
|
||||
|
||||
verbose("Generating %s%d bit RSA key.",
|
||||
|
@ -333,9 +333,9 @@ generate_ephemeral_server_key(void)
|
|||
|
||||
for (i = 0; i < SSH_SESSION_KEY_LENGTH; i++) {
|
||||
if (i % 4 == 0)
|
||||
rand = arc4random();
|
||||
sensitive_data.ssh1_cookie[i] = rand & 0xff;
|
||||
rand >>= 8;
|
||||
rnd = arc4random();
|
||||
sensitive_data.ssh1_cookie[i] = rnd & 0xff;
|
||||
rnd >>= 8;
|
||||
}
|
||||
arc4random_stir();
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ demote_sensitive_data(void)
|
|||
static void
|
||||
privsep_preauth_child(void)
|
||||
{
|
||||
u_int32_t rand[256];
|
||||
u_int32_t rnd[256];
|
||||
gid_t gidset[1];
|
||||
struct passwd *pw;
|
||||
int i;
|
||||
|
@ -538,8 +538,8 @@ privsep_preauth_child(void)
|
|||
privsep_challenge_enable();
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
rand[i] = arc4random();
|
||||
RAND_seed(rand, sizeof(rand));
|
||||
rnd[i] = arc4random();
|
||||
RAND_seed(rnd, sizeof(rnd));
|
||||
|
||||
/* Demote the private keys to public keys. */
|
||||
demote_sensitive_data();
|
||||
|
@ -1600,7 +1600,7 @@ do_ssh1_kex(void)
|
|||
u_char session_key[SSH_SESSION_KEY_LENGTH];
|
||||
u_char cookie[8];
|
||||
u_int cipher_type, auth_mask, protocol_flags;
|
||||
u_int32_t rand = 0;
|
||||
u_int32_t rnd = 0;
|
||||
|
||||
/*
|
||||
* Generate check bytes that the client must send back in the user
|
||||
|
@ -1613,9 +1613,9 @@ do_ssh1_kex(void)
|
|||
*/
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (i % 4 == 0)
|
||||
rand = arc4random();
|
||||
cookie[i] = rand & 0xff;
|
||||
rand >>= 8;
|
||||
rnd = arc4random();
|
||||
cookie[i] = rnd & 0xff;
|
||||
rnd >>= 8;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue