diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-07-17 16:12:08 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-07-17 16:12:08 +1000 |
commit | fc9597034b819b295966f61d8dc797b53fda45c7 (patch) | |
tree | a5a9b7afc50720d7b6f89a4ae1f211abbff89f47 | |
parent | ba6de952a00558e6d93b8c9edd81806a99716411 (diff) |
- deraadt@cvs.openbsd.org 2004/07/11 17:48:47
[channels.c cipher.c clientloop.c clientloop.h compat.h moduli.c
readconf.c nchan.c pathnames.h progressmeter.c readconf.h servconf.c
session.c sftp-client.c sftp.c ssh-agent.1 ssh-keygen.c ssh.c ssh1.h
sshd.c ttymodes.h]
spaces
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | channels.c | 11 | ||||
-rw-r--r-- | cipher.c | 32 | ||||
-rw-r--r-- | clientloop.c | 18 | ||||
-rw-r--r-- | clientloop.h | 4 | ||||
-rw-r--r-- | compat.h | 4 | ||||
-rw-r--r-- | moduli.c | 48 | ||||
-rw-r--r-- | nchan.c | 16 | ||||
-rw-r--r-- | pathnames.h | 4 | ||||
-rw-r--r-- | progressmeter.c | 18 | ||||
-rw-r--r-- | readconf.c | 6 | ||||
-rw-r--r-- | readconf.h | 4 | ||||
-rw-r--r-- | servconf.c | 4 | ||||
-rw-r--r-- | session.c | 6 | ||||
-rw-r--r-- | sftp-client.c | 8 | ||||
-rw-r--r-- | sftp.c | 8 | ||||
-rw-r--r-- | ssh-agent.1 | 4 | ||||
-rw-r--r-- | ssh-keygen.c | 4 | ||||
-rw-r--r-- | ssh.c | 10 | ||||
-rw-r--r-- | ssh1.h | 8 | ||||
-rw-r--r-- | sshd.c | 6 | ||||
-rw-r--r-- | ttymodes.h | 18 |
22 files changed, 128 insertions, 122 deletions
@@ -3,6 +3,13 @@ | |||
3 | ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c ssh.c sshd.c | 3 | ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c ssh.c sshd.c |
4 | openbsd-compat/bsd-misc.c] Move "char *__progname" to bsd-misc.c. Reduces | 4 | openbsd-compat/bsd-misc.c] Move "char *__progname" to bsd-misc.c. Reduces |
5 | diff vs OpenBSD; ok mouring@, tested by tim@ too. | 5 | diff vs OpenBSD; ok mouring@, tested by tim@ too. |
6 | - (dtucker) OpenBSD CVS Sync | ||
7 | - deraadt@cvs.openbsd.org 2004/07/11 17:48:47 | ||
8 | [channels.c cipher.c clientloop.c clientloop.h compat.h moduli.c | ||
9 | readconf.c nchan.c pathnames.h progressmeter.c readconf.h servconf.c | ||
10 | session.c sftp-client.c sftp.c ssh-agent.1 ssh-keygen.c ssh.c ssh1.h | ||
11 | sshd.c ttymodes.h] | ||
12 | spaces | ||
6 | 13 | ||
7 | 20040711 | 14 | 20040711 |
8 | - (dtucker) [auth-pam.c] Check for zero from waitpid() too, which allows | 15 | - (dtucker) [auth-pam.c] Check for zero from waitpid() too, which allows |
@@ -1509,4 +1516,4 @@ | |||
1509 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 1516 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
1510 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 1517 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
1511 | 1518 | ||
1512 | $Id: ChangeLog,v 1.3474 2004/07/17 04:07:42 dtucker Exp $ | 1519 | $Id: ChangeLog,v 1.3475 2004/07/17 06:12:08 dtucker Exp $ |
diff --git a/channels.c b/channels.c index a72d9b93d..cf46ce09f 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.207 2004/06/21 17:36:31 avsm Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.208 2004/07/11 17:48:47 deraadt Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -737,7 +737,7 @@ channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset) | |||
737 | FD_SET(c->efd, readset); | 737 | FD_SET(c->efd, readset); |
738 | } | 738 | } |
739 | /* XXX: What about efd? races? */ | 739 | /* XXX: What about efd? races? */ |
740 | if (compat20 && c->ctl_fd != -1 && | 740 | if (compat20 && c->ctl_fd != -1 && |
741 | c->istate == CHAN_INPUT_OPEN && c->ostate == CHAN_OUTPUT_OPEN) | 741 | c->istate == CHAN_INPUT_OPEN && c->ostate == CHAN_OUTPUT_OPEN) |
742 | FD_SET(c->ctl_fd, readset); | 742 | FD_SET(c->ctl_fd, readset); |
743 | } | 743 | } |
@@ -2277,7 +2277,7 @@ channel_cancel_rport_listener(const char *host, u_short port) | |||
2277 | 2277 | ||
2278 | if (c != NULL && c->type == SSH_CHANNEL_RPORT_LISTENER && | 2278 | if (c != NULL && c->type == SSH_CHANNEL_RPORT_LISTENER && |
2279 | strncmp(c->path, host, sizeof(c->path)) == 0 && | 2279 | strncmp(c->path, host, sizeof(c->path)) == 0 && |
2280 | c->listening_port == port) { | 2280 | c->listening_port == port) { |
2281 | debug2("%s: close clannel %d", __func__, i); | 2281 | debug2("%s: close clannel %d", __func__, i); |
2282 | channel_free(c); | 2282 | channel_free(c); |
2283 | found = 1; | 2283 | found = 1; |
@@ -2364,10 +2364,9 @@ channel_request_remote_forwarding(u_short listen_port, | |||
2364 | } | 2364 | } |
2365 | 2365 | ||
2366 | /* | 2366 | /* |
2367 | * Request cancellation of remote forwarding of connection host:port from | 2367 | * Request cancellation of remote forwarding of connection host:port from |
2368 | * local side. | 2368 | * local side. |
2369 | */ | 2369 | */ |
2370 | |||
2371 | void | 2370 | void |
2372 | channel_request_rforward_cancel(u_short port) | 2371 | channel_request_rforward_cancel(u_short port) |
2373 | { | 2372 | { |
@@ -2378,7 +2377,7 @@ channel_request_rforward_cancel(u_short port) | |||
2378 | return; | 2377 | return; |
2379 | 2378 | ||
2380 | for (i = 0; i < num_permitted_opens; i++) { | 2379 | for (i = 0; i < num_permitted_opens; i++) { |
2381 | if (permitted_opens[i].host_to_connect != NULL && | 2380 | if (permitted_opens[i].host_to_connect != NULL && |
2382 | permitted_opens[i].listen_port == port) | 2381 | permitted_opens[i].listen_port == port) |
2383 | break; | 2382 | break; |
2384 | } | 2383 | } |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: cipher.c,v 1.69 2004/06/21 17:36:31 avsm Exp $"); | 38 | RCSID("$OpenBSD: cipher.c,v 1.70 2004/07/11 17:48:47 deraadt Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "log.h" | 41 | #include "log.h" |
@@ -76,19 +76,19 @@ struct Cipher { | |||
76 | u_int key_len; | 76 | u_int key_len; |
77 | const EVP_CIPHER *(*evptype)(void); | 77 | const EVP_CIPHER *(*evptype)(void); |
78 | } ciphers[] = { | 78 | } ciphers[] = { |
79 | { "none", SSH_CIPHER_NONE, 8, 0, EVP_enc_null }, | 79 | { "none", SSH_CIPHER_NONE, 8, 0, EVP_enc_null }, |
80 | { "des", SSH_CIPHER_DES, 8, 8, EVP_des_cbc }, | 80 | { "des", SSH_CIPHER_DES, 8, 8, EVP_des_cbc }, |
81 | { "3des", SSH_CIPHER_3DES, 8, 16, evp_ssh1_3des }, | 81 | { "3des", SSH_CIPHER_3DES, 8, 16, evp_ssh1_3des }, |
82 | { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, evp_ssh1_bf }, | 82 | { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, evp_ssh1_bf }, |
83 | 83 | ||
84 | { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, EVP_des_ede3_cbc }, | 84 | { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, EVP_des_ede3_cbc }, |
85 | { "blowfish-cbc", SSH_CIPHER_SSH2, 8, 16, EVP_bf_cbc }, | 85 | { "blowfish-cbc", SSH_CIPHER_SSH2, 8, 16, EVP_bf_cbc }, |
86 | { "cast128-cbc", SSH_CIPHER_SSH2, 8, 16, EVP_cast5_cbc }, | 86 | { "cast128-cbc", SSH_CIPHER_SSH2, 8, 16, EVP_cast5_cbc }, |
87 | { "arcfour", SSH_CIPHER_SSH2, 8, 16, EVP_rc4 }, | 87 | { "arcfour", SSH_CIPHER_SSH2, 8, 16, EVP_rc4 }, |
88 | #if OPENSSL_VERSION_NUMBER < 0x00907000L | 88 | #if OPENSSL_VERSION_NUMBER < 0x00907000L |
89 | { "aes128-cbc", SSH_CIPHER_SSH2, 16, 16, evp_rijndael }, | 89 | { "aes128-cbc", SSH_CIPHER_SSH2, 16, 16, evp_rijndael }, |
90 | { "aes192-cbc", SSH_CIPHER_SSH2, 16, 24, evp_rijndael }, | 90 | { "aes192-cbc", SSH_CIPHER_SSH2, 16, 24, evp_rijndael }, |
91 | { "aes256-cbc", SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, | 91 | { "aes256-cbc", SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, |
92 | { "rijndael-cbc@lysator.liu.se", | 92 | { "rijndael-cbc@lysator.liu.se", |
93 | SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, | 93 | SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, |
94 | #else | 94 | #else |
@@ -99,9 +99,9 @@ struct Cipher { | |||
99 | SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc }, | 99 | SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc }, |
100 | #endif | 100 | #endif |
101 | #if OPENSSL_VERSION_NUMBER >= 0x00905000L | 101 | #if OPENSSL_VERSION_NUMBER >= 0x00905000L |
102 | { "aes128-ctr", SSH_CIPHER_SSH2, 16, 16, evp_aes_128_ctr }, | 102 | { "aes128-ctr", SSH_CIPHER_SSH2, 16, 16, evp_aes_128_ctr }, |
103 | { "aes192-ctr", SSH_CIPHER_SSH2, 16, 24, evp_aes_128_ctr }, | 103 | { "aes192-ctr", SSH_CIPHER_SSH2, 16, 24, evp_aes_128_ctr }, |
104 | { "aes256-ctr", SSH_CIPHER_SSH2, 16, 32, evp_aes_128_ctr }, | 104 | { "aes256-ctr", SSH_CIPHER_SSH2, 16, 32, evp_aes_128_ctr }, |
105 | #endif | 105 | #endif |
106 | #if defined(EVP_CTRL_SET_ACSS_MODE) | 106 | #if defined(EVP_CTRL_SET_ACSS_MODE) |
107 | { "acss@openssh.org", SSH_CIPHER_SSH2, 16, 5, EVP_acss }, | 107 | { "acss@openssh.org", SSH_CIPHER_SSH2, 16, 5, EVP_acss }, |
diff --git a/clientloop.c b/clientloop.c index 79aabbe06..def4d8a7b 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -59,7 +59,7 @@ | |||
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include "includes.h" | 61 | #include "includes.h" |
62 | RCSID("$OpenBSD: clientloop.c,v 1.128 2004/06/18 11:11:54 djm Exp $"); | 62 | RCSID("$OpenBSD: clientloop.c,v 1.129 2004/07/11 17:48:47 deraadt Exp $"); |
63 | 63 | ||
64 | #include "ssh.h" | 64 | #include "ssh.h" |
65 | #include "ssh1.h" | 65 | #include "ssh1.h" |
@@ -402,7 +402,7 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, | |||
402 | 402 | ||
403 | if (options.server_alive_interval == 0 || !compat20) | 403 | if (options.server_alive_interval == 0 || !compat20) |
404 | tvp = NULL; | 404 | tvp = NULL; |
405 | else { | 405 | else { |
406 | tv.tv_sec = options.server_alive_interval; | 406 | tv.tv_sec = options.server_alive_interval; |
407 | tv.tv_usec = 0; | 407 | tv.tv_usec = 0; |
408 | tvp = &tv; | 408 | tvp = &tv; |
@@ -517,7 +517,7 @@ client_subsystem_reply(int type, u_int32_t seq, void *ctxt) | |||
517 | { | 517 | { |
518 | int id; | 518 | int id; |
519 | Channel *c; | 519 | Channel *c; |
520 | 520 | ||
521 | id = packet_get_int(); | 521 | id = packet_get_int(); |
522 | packet_check_eom(); | 522 | packet_check_eom(); |
523 | 523 | ||
@@ -540,13 +540,13 @@ client_extra_session2_setup(int id, void *arg) | |||
540 | struct confirm_ctx *cctx = arg; | 540 | struct confirm_ctx *cctx = arg; |
541 | Channel *c; | 541 | Channel *c; |
542 | int i; | 542 | int i; |
543 | 543 | ||
544 | if (cctx == NULL) | 544 | if (cctx == NULL) |
545 | fatal("%s: cctx == NULL", __func__); | 545 | fatal("%s: cctx == NULL", __func__); |
546 | if ((c = channel_lookup(id)) == NULL) | 546 | if ((c = channel_lookup(id)) == NULL) |
547 | fatal("%s: no channel for id %d", __func__, id); | 547 | fatal("%s: no channel for id %d", __func__, id); |
548 | 548 | ||
549 | client_session2_setup(id, cctx->want_tty, cctx->want_subsys, | 549 | client_session2_setup(id, cctx->want_tty, cctx->want_subsys, |
550 | cctx->term, &cctx->tio, c->rfd, &cctx->cmd, cctx->env, | 550 | cctx->term, &cctx->tio, c->rfd, &cctx->cmd, cctx->env, |
551 | client_subsystem_reply); | 551 | client_subsystem_reply); |
552 | 552 | ||
@@ -557,7 +557,7 @@ client_extra_session2_setup(int id, void *arg) | |||
557 | for (i = 0; cctx->env[i] != NULL; i++) | 557 | for (i = 0; cctx->env[i] != NULL; i++) |
558 | xfree(cctx->env[i]); | 558 | xfree(cctx->env[i]); |
559 | xfree(cctx->env); | 559 | xfree(cctx->env); |
560 | } | 560 | } |
561 | xfree(cctx); | 561 | xfree(cctx); |
562 | } | 562 | } |
563 | 563 | ||
@@ -614,7 +614,7 @@ client_process_control(fd_set * readset) | |||
614 | * Accept empty responses and responses consisting | 614 | * Accept empty responses and responses consisting |
615 | * of the word "yes" as affirmative. | 615 | * of the word "yes" as affirmative. |
616 | */ | 616 | */ |
617 | if (*p == '\0' || *p == '\n' || | 617 | if (*p == '\0' || *p == '\n' || |
618 | strcasecmp(p, "yes") == 0) | 618 | strcasecmp(p, "yes") == 0) |
619 | allowed = 1; | 619 | allowed = 1; |
620 | xfree(p); | 620 | xfree(p); |
@@ -714,7 +714,7 @@ client_process_control(fd_set * readset) | |||
714 | 714 | ||
715 | set_nonblock(client_fd); | 715 | set_nonblock(client_fd); |
716 | 716 | ||
717 | c = channel_new("session", SSH_CHANNEL_OPENING, | 717 | c = channel_new("session", SSH_CHANNEL_OPENING, |
718 | new_fd[0], new_fd[1], new_fd[2], | 718 | new_fd[0], new_fd[1], new_fd[2], |
719 | CHAN_SES_WINDOW_DEFAULT, CHAN_SES_PACKET_DEFAULT, | 719 | CHAN_SES_WINDOW_DEFAULT, CHAN_SES_PACKET_DEFAULT, |
720 | CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0); | 720 | CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0); |
@@ -1673,7 +1673,7 @@ client_input_global_request(int type, u_int32_t seq, void *ctxt) | |||
1673 | } | 1673 | } |
1674 | 1674 | ||
1675 | void | 1675 | void |
1676 | client_session2_setup(int id, int want_tty, int want_subsystem, | 1676 | client_session2_setup(int id, int want_tty, int want_subsystem, |
1677 | const char *term, struct termios *tiop, int in_fd, Buffer *cmd, char **env, | 1677 | const char *term, struct termios *tiop, int in_fd, Buffer *cmd, char **env, |
1678 | dispatch_fn *subsys_repl) | 1678 | dispatch_fn *subsys_repl) |
1679 | { | 1679 | { |
diff --git a/clientloop.h b/clientloop.h index c34d6674d..9992d5938 100644 --- a/clientloop.h +++ b/clientloop.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.h,v 1.10 2004/06/17 14:52:48 djm Exp $ */ | 1 | /* $OpenBSD: clientloop.h,v 1.11 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -38,5 +38,5 @@ | |||
38 | /* Client side main loop for the interactive session. */ | 38 | /* Client side main loop for the interactive session. */ |
39 | int client_loop(int, int, int); | 39 | int client_loop(int, int, int); |
40 | void client_global_request_reply_fwd(int, u_int32_t, void *); | 40 | void client_global_request_reply_fwd(int, u_int32_t, void *); |
41 | void client_session2_setup(int, int, int, const char *, struct termios *, | 41 | void client_session2_setup(int, int, int, const char *, struct termios *, |
42 | int, Buffer *, char **, dispatch_fn *); | 42 | int, Buffer *, char **, dispatch_fn *); |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: compat.h,v 1.37 2003/11/02 11:01:03 markus Exp $ */ | 1 | /* $OpenBSD: compat.h,v 1.38 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. |
@@ -27,7 +27,7 @@ | |||
27 | #ifndef COMPAT_H | 27 | #ifndef COMPAT_H |
28 | #define COMPAT_H | 28 | #define COMPAT_H |
29 | 29 | ||
30 | #define SSH_PROTO_UNKNOWN 0x00 | 30 | #define SSH_PROTO_UNKNOWN 0x00 |
31 | #define SSH_PROTO_1 0x01 | 31 | #define SSH_PROTO_1 0x01 |
32 | #define SSH_PROTO_1_PREFERRED 0x02 | 32 | #define SSH_PROTO_1_PREFERRED 0x02 |
33 | #define SSH_PROTO_2 0x04 | 33 | #define SSH_PROTO_2 0x04 |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: moduli.c,v 1.8 2004/05/21 08:43:03 markus Exp $ */ | 1 | /* $OpenBSD: moduli.c,v 1.9 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 1994 Phil Karn <karn@qualcomm.com> | 3 | * Copyright 1994 Phil Karn <karn@qualcomm.com> |
4 | * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> | 4 | * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> |
@@ -48,68 +48,68 @@ | |||
48 | */ | 48 | */ |
49 | 49 | ||
50 | /* need line long enough for largest moduli plus headers */ | 50 | /* need line long enough for largest moduli plus headers */ |
51 | #define QLINESIZE (100+8192) | 51 | #define QLINESIZE (100+8192) |
52 | 52 | ||
53 | /* Type: decimal. | 53 | /* Type: decimal. |
54 | * Specifies the internal structure of the prime modulus. | 54 | * Specifies the internal structure of the prime modulus. |
55 | */ | 55 | */ |
56 | #define QTYPE_UNKNOWN (0) | 56 | #define QTYPE_UNKNOWN (0) |
57 | #define QTYPE_UNSTRUCTURED (1) | 57 | #define QTYPE_UNSTRUCTURED (1) |
58 | #define QTYPE_SAFE (2) | 58 | #define QTYPE_SAFE (2) |
59 | #define QTYPE_SCHNOOR (3) | 59 | #define QTYPE_SCHNOOR (3) |
60 | #define QTYPE_SOPHIE_GERMAIN (4) | 60 | #define QTYPE_SOPHIE_GERMAIN (4) |
61 | #define QTYPE_STRONG (5) | 61 | #define QTYPE_STRONG (5) |
62 | 62 | ||
63 | /* Tests: decimal (bit field). | 63 | /* Tests: decimal (bit field). |
64 | * Specifies the methods used in checking for primality. | 64 | * Specifies the methods used in checking for primality. |
65 | * Usually, more than one test is used. | 65 | * Usually, more than one test is used. |
66 | */ | 66 | */ |
67 | #define QTEST_UNTESTED (0x00) | 67 | #define QTEST_UNTESTED (0x00) |
68 | #define QTEST_COMPOSITE (0x01) | 68 | #define QTEST_COMPOSITE (0x01) |
69 | #define QTEST_SIEVE (0x02) | 69 | #define QTEST_SIEVE (0x02) |
70 | #define QTEST_MILLER_RABIN (0x04) | 70 | #define QTEST_MILLER_RABIN (0x04) |
71 | #define QTEST_JACOBI (0x08) | 71 | #define QTEST_JACOBI (0x08) |
72 | #define QTEST_ELLIPTIC (0x10) | 72 | #define QTEST_ELLIPTIC (0x10) |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * Size: decimal. | 75 | * Size: decimal. |
76 | * Specifies the number of the most significant bit (0 to M). | 76 | * Specifies the number of the most significant bit (0 to M). |
77 | * WARNING: internally, usually 1 to N. | 77 | * WARNING: internally, usually 1 to N. |
78 | */ | 78 | */ |
79 | #define QSIZE_MINIMUM (511) | 79 | #define QSIZE_MINIMUM (511) |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Prime sieving defines | 82 | * Prime sieving defines |
83 | */ | 83 | */ |
84 | 84 | ||
85 | /* Constant: assuming 8 bit bytes and 32 bit words */ | 85 | /* Constant: assuming 8 bit bytes and 32 bit words */ |
86 | #define SHIFT_BIT (3) | 86 | #define SHIFT_BIT (3) |
87 | #define SHIFT_BYTE (2) | 87 | #define SHIFT_BYTE (2) |
88 | #define SHIFT_WORD (SHIFT_BIT+SHIFT_BYTE) | 88 | #define SHIFT_WORD (SHIFT_BIT+SHIFT_BYTE) |
89 | #define SHIFT_MEGABYTE (20) | 89 | #define SHIFT_MEGABYTE (20) |
90 | #define SHIFT_MEGAWORD (SHIFT_MEGABYTE-SHIFT_BYTE) | 90 | #define SHIFT_MEGAWORD (SHIFT_MEGABYTE-SHIFT_BYTE) |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * Using virtual memory can cause thrashing. This should be the largest | 93 | * Using virtual memory can cause thrashing. This should be the largest |
94 | * number that is supported without a large amount of disk activity -- | 94 | * number that is supported without a large amount of disk activity -- |
95 | * that would increase the run time from hours to days or weeks! | 95 | * that would increase the run time from hours to days or weeks! |
96 | */ | 96 | */ |
97 | #define LARGE_MINIMUM (8UL) /* megabytes */ | 97 | #define LARGE_MINIMUM (8UL) /* megabytes */ |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Do not increase this number beyond the unsigned integer bit size. | 100 | * Do not increase this number beyond the unsigned integer bit size. |
101 | * Due to a multiple of 4, it must be LESS than 128 (yielding 2**30 bits). | 101 | * Due to a multiple of 4, it must be LESS than 128 (yielding 2**30 bits). |
102 | */ | 102 | */ |
103 | #define LARGE_MAXIMUM (127UL) /* megabytes */ | 103 | #define LARGE_MAXIMUM (127UL) /* megabytes */ |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * Constant: when used with 32-bit integers, the largest sieve prime | 106 | * Constant: when used with 32-bit integers, the largest sieve prime |
107 | * has to be less than 2**32. | 107 | * has to be less than 2**32. |
108 | */ | 108 | */ |
109 | #define SMALL_MAXIMUM (0xffffffffUL) | 109 | #define SMALL_MAXIMUM (0xffffffffUL) |
110 | 110 | ||
111 | /* Constant: can sieve all primes less than 2**32, as 65537**2 > 2**32-1. */ | 111 | /* Constant: can sieve all primes less than 2**32, as 65537**2 > 2**32-1. */ |
112 | #define TINY_NUMBER (1UL<<16) | 112 | #define TINY_NUMBER (1UL<<16) |
113 | 113 | ||
114 | /* Ensure enough bit space for testing 2*q. */ | 114 | /* Ensure enough bit space for testing 2*q. */ |
115 | #define TEST_MAXIMUM (1UL<<16) | 115 | #define TEST_MAXIMUM (1UL<<16) |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: nchan.c,v 1.50 2004/06/21 17:36:31 avsm Exp $"); | 26 | RCSID("$OpenBSD: nchan.c,v 1.51 2004/07/11 17:48:47 deraadt Exp $"); |
27 | 27 | ||
28 | #include "ssh1.h" | 28 | #include "ssh1.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -42,15 +42,15 @@ RCSID("$OpenBSD: nchan.c,v 1.50 2004/06/21 17:36:31 avsm Exp $"); | |||
42 | * tear down of channels: | 42 | * tear down of channels: |
43 | * | 43 | * |
44 | * 1.3: strict request-ack-protocol: | 44 | * 1.3: strict request-ack-protocol: |
45 | * CLOSE -> | 45 | * CLOSE -> |
46 | * <- CLOSE_CONFIRM | 46 | * <- CLOSE_CONFIRM |
47 | * | 47 | * |
48 | * 1.5: uses variations of: | 48 | * 1.5: uses variations of: |
49 | * IEOF -> | 49 | * IEOF -> |
50 | * <- OCLOSE | 50 | * <- OCLOSE |
51 | * <- IEOF | 51 | * <- IEOF |
52 | * OCLOSE -> | 52 | * OCLOSE -> |
53 | * i.e. both sides have to close the channel | 53 | * i.e. both sides have to close the channel |
54 | * | 54 | * |
55 | * 2.0: the EOF messages are optional | 55 | * 2.0: the EOF messages are optional |
56 | * | 56 | * |
diff --git a/pathnames.h b/pathnames.h index 53208cf58..cf42625a4 100644 --- a/pathnames.h +++ b/pathnames.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pathnames.h,v 1.14 2004/01/30 09:48:57 markus Exp $ */ | 1 | /* $OpenBSD: pathnames.h,v 1.15 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -122,7 +122,7 @@ | |||
122 | 122 | ||
123 | /* Location of ssh-keysign for hostbased authentication */ | 123 | /* Location of ssh-keysign for hostbased authentication */ |
124 | #ifndef _PATH_SSH_KEY_SIGN | 124 | #ifndef _PATH_SSH_KEY_SIGN |
125 | #define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" | 125 | #define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | /* xauth for X11 forwarding */ | 128 | /* xauth for X11 forwarding */ |
diff --git a/progressmeter.c b/progressmeter.c index 629a536b2..93f5a3e62 100644 --- a/progressmeter.c +++ b/progressmeter.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: progressmeter.c,v 1.21 2004/06/21 17:36:31 avsm Exp $"); | 26 | RCSID("$OpenBSD: progressmeter.c,v 1.22 2004/07/11 17:48:47 deraadt Exp $"); |
27 | 27 | ||
28 | #include "progressmeter.h" | 28 | #include "progressmeter.h" |
29 | #include "atomicio.h" | 29 | #include "atomicio.h" |
@@ -48,15 +48,15 @@ void refresh_progress_meter(void); | |||
48 | /* signal handler for updating the progress meter */ | 48 | /* signal handler for updating the progress meter */ |
49 | static void update_progress_meter(int); | 49 | static void update_progress_meter(int); |
50 | 50 | ||
51 | static time_t start; /* start progress */ | 51 | static time_t start; /* start progress */ |
52 | static time_t last_update; /* last progress update */ | 52 | static time_t last_update; /* last progress update */ |
53 | static char *file; /* name of the file being transferred */ | 53 | static char *file; /* name of the file being transferred */ |
54 | static off_t end_pos; /* ending position of transfer */ | 54 | static off_t end_pos; /* ending position of transfer */ |
55 | static off_t cur_pos; /* transfer position as of last refresh */ | 55 | static off_t cur_pos; /* transfer position as of last refresh */ |
56 | static volatile off_t *counter; /* progress counter */ | 56 | static volatile off_t *counter; /* progress counter */ |
57 | static long stalled; /* how long we have been stalled */ | 57 | static long stalled; /* how long we have been stalled */ |
58 | static int bytes_per_second; /* current speed in bytes per second */ | 58 | static int bytes_per_second; /* current speed in bytes per second */ |
59 | static int win_size; /* terminal window size */ | 59 | static int win_size; /* terminal window size */ |
60 | 60 | ||
61 | /* units for format_size */ | 61 | /* units for format_size */ |
62 | static const char unit[] = " KMGT"; | 62 | static const char unit[] = " KMGT"; |
diff --git a/readconf.c b/readconf.c index 429f69129..a4fe1fe02 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: readconf.c,v 1.133 2004/06/17 15:10:14 djm Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.134 2004/07/11 17:48:47 deraadt Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -804,7 +804,7 @@ parse_int: | |||
804 | */ | 804 | */ |
805 | 805 | ||
806 | int | 806 | int |
807 | read_config_file(const char *filename, const char *host, Options *options, | 807 | read_config_file(const char *filename, const char *host, Options *options, |
808 | int checkperm) | 808 | int checkperm) |
809 | { | 809 | { |
810 | FILE *f; | 810 | FILE *f; |
@@ -818,7 +818,7 @@ read_config_file(const char *filename, const char *host, Options *options, | |||
818 | 818 | ||
819 | if (checkperm) { | 819 | if (checkperm) { |
820 | struct stat sb; | 820 | struct stat sb; |
821 | 821 | ||
822 | if (fstat(fileno(f), &sb) == -1) | 822 | if (fstat(fileno(f), &sb) == -1) |
823 | fatal("fstat %s: %s", filename, strerror(errno)); | 823 | fatal("fstat %s: %s", filename, strerror(errno)); |
824 | if (((sb.st_uid != 0 && sb.st_uid != getuid()) || | 824 | if (((sb.st_uid != 0 && sb.st_uid != getuid()) || |
diff --git a/readconf.h b/readconf.h index 5e504bece..ded422585 100644 --- a/readconf.h +++ b/readconf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.h,v 1.63 2004/06/13 15:03:02 djm Exp $ */ | 1 | /* $OpenBSD: readconf.h,v 1.64 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -103,7 +103,7 @@ typedef struct { | |||
103 | int rekey_limit; | 103 | int rekey_limit; |
104 | int no_host_authentication_for_localhost; | 104 | int no_host_authentication_for_localhost; |
105 | int identities_only; | 105 | int identities_only; |
106 | int server_alive_interval; | 106 | int server_alive_interval; |
107 | int server_alive_count_max; | 107 | int server_alive_count_max; |
108 | 108 | ||
109 | int num_send_env; | 109 | int num_send_env; |
diff --git a/servconf.c b/servconf.c index ea67f6288..02fae0fbe 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: servconf.c,v 1.134 2004/06/24 19:30:54 djm Exp $"); | 13 | RCSID("$OpenBSD: servconf.c,v 1.135 2004/07/11 17:48:47 deraadt Exp $"); |
14 | 14 | ||
15 | #include "ssh.h" | 15 | #include "ssh.h" |
16 | #include "log.h" | 16 | #include "log.h" |
@@ -956,7 +956,7 @@ load_server_config(const char *filename, Buffer *conf) | |||
956 | while (fgets(line, sizeof(line), f)) { | 956 | while (fgets(line, sizeof(line), f)) { |
957 | /* | 957 | /* |
958 | * Trim out comments and strip whitespace | 958 | * Trim out comments and strip whitespace |
959 | * NB - preserve newlines, they are needed to reproduce | 959 | * NB - preserve newlines, they are needed to reproduce |
960 | * line numbers later for error messages | 960 | * line numbers later for error messages |
961 | */ | 961 | */ |
962 | if ((cp = strchr(line, '#')) != NULL) | 962 | if ((cp = strchr(line, '#')) != NULL) |
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.177 2004/06/30 08:36:59 djm Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.178 2004/07/11 17:48:47 deraadt Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -1001,7 +1001,7 @@ do_setup_env(Session *s, const char *shell) | |||
1001 | if (!options.use_login) { | 1001 | if (!options.use_login) { |
1002 | /* Set basic environment. */ | 1002 | /* Set basic environment. */ |
1003 | for (i = 0; i < s->num_env; i++) | 1003 | for (i = 0; i < s->num_env; i++) |
1004 | child_set_env(&env, &envsize, s->env[i].name, | 1004 | child_set_env(&env, &envsize, s->env[i].name, |
1005 | s->env[i].val); | 1005 | s->env[i].val); |
1006 | 1006 | ||
1007 | child_set_env(&env, &envsize, "USER", pw->pw_name); | 1007 | child_set_env(&env, &envsize, "USER", pw->pw_name); |
@@ -1320,7 +1320,7 @@ do_pwchange(Session *s) | |||
1320 | { | 1320 | { |
1321 | fprintf(stderr, "WARNING: Your password has expired.\n"); | 1321 | fprintf(stderr, "WARNING: Your password has expired.\n"); |
1322 | if (s->ttyfd != -1) { | 1322 | if (s->ttyfd != -1) { |
1323 | fprintf(stderr, | 1323 | fprintf(stderr, |
1324 | "You must change your password now and login again!\n"); | 1324 | "You must change your password now and login again!\n"); |
1325 | execl(_PATH_PASSWD_PROG, "passwd", (char *)NULL); | 1325 | execl(_PATH_PASSWD_PROG, "passwd", (char *)NULL); |
1326 | perror("passwd"); | 1326 | perror("passwd"); |
diff --git a/sftp-client.c b/sftp-client.c index 88276cd4a..0ffacbccc 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -20,7 +20,7 @@ | |||
20 | /* XXX: copy between two remote sites */ | 20 | /* XXX: copy between two remote sites */ |
21 | 21 | ||
22 | #include "includes.h" | 22 | #include "includes.h" |
23 | RCSID("$OpenBSD: sftp-client.c,v 1.50 2004/06/03 12:22:20 pedro Exp $"); | 23 | RCSID("$OpenBSD: sftp-client.c,v 1.51 2004/07/11 17:48:47 deraadt Exp $"); |
24 | 24 | ||
25 | #include "openbsd-compat/sys-queue.h" | 25 | #include "openbsd-compat/sys-queue.h" |
26 | 26 | ||
@@ -821,7 +821,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
821 | u_int len; | 821 | u_int len; |
822 | 822 | ||
823 | /* | 823 | /* |
824 | * Simulate EOF on interrupt: stop sending new requests and | 824 | * Simulate EOF on interrupt: stop sending new requests and |
825 | * allow outstanding requests to drain gracefully | 825 | * allow outstanding requests to drain gracefully |
826 | */ | 826 | */ |
827 | if (interrupted) { | 827 | if (interrupted) { |
@@ -1053,9 +1053,9 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
1053 | int len; | 1053 | int len; |
1054 | 1054 | ||
1055 | /* | 1055 | /* |
1056 | * Can't use atomicio here because it returns 0 on EOF, | 1056 | * Can't use atomicio here because it returns 0 on EOF, |
1057 | * thus losing the last block of the file. | 1057 | * thus losing the last block of the file. |
1058 | * Simulate an EOF on interrupt, allowing ACKs from the | 1058 | * Simulate an EOF on interrupt, allowing ACKs from the |
1059 | * server to drain. | 1059 | * server to drain. |
1060 | */ | 1060 | */ |
1061 | if (interrupted) | 1061 | if (interrupted) |
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include "includes.h" | 17 | #include "includes.h" |
18 | 18 | ||
19 | RCSID("$OpenBSD: sftp.c,v 1.55 2004/06/25 23:21:38 djm Exp $"); | 19 | RCSID("$OpenBSD: sftp.c,v 1.56 2004/07/11 17:48:47 deraadt Exp $"); |
20 | 20 | ||
21 | #include "buffer.h" | 21 | #include "buffer.h" |
22 | #include "xmalloc.h" | 22 | #include "xmalloc.h" |
@@ -1328,8 +1328,8 @@ connect_to_server(char *path, char **args, int *in, int *out) | |||
1328 | 1328 | ||
1329 | /* | 1329 | /* |
1330 | * The underlying ssh is in the same process group, so we must | 1330 | * The underlying ssh is in the same process group, so we must |
1331 | * ignore SIGINT if we want to gracefully abort commands, | 1331 | * ignore SIGINT if we want to gracefully abort commands, |
1332 | * otherwise the signal will make it to the ssh process and | 1332 | * otherwise the signal will make it to the ssh process and |
1333 | * kill it too | 1333 | * kill it too |
1334 | */ | 1334 | */ |
1335 | signal(SIGINT, SIG_IGN); | 1335 | signal(SIGINT, SIG_IGN); |
@@ -1415,7 +1415,7 @@ main(int argc, char **argv) | |||
1415 | fatal("Batch file already specified."); | 1415 | fatal("Batch file already specified."); |
1416 | 1416 | ||
1417 | /* Allow "-" as stdin */ | 1417 | /* Allow "-" as stdin */ |
1418 | if (strcmp(optarg, "-") != 0 && | 1418 | if (strcmp(optarg, "-") != 0 && |
1419 | (infile = fopen(optarg, "r")) == NULL) | 1419 | (infile = fopen(optarg, "r")) == NULL) |
1420 | fatal("%s (%s).", strerror(errno), optarg); | 1420 | fatal("%s (%s).", strerror(errno), optarg); |
1421 | showprogress = 0; | 1421 | showprogress = 0; |
diff --git a/ssh-agent.1 b/ssh-agent.1 index cfefd34e9..226804e5f 100644 --- a/ssh-agent.1 +++ b/ssh-agent.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-agent.1,v 1.40 2004/05/13 02:47:50 dtucker Exp $ | 1 | .\" $OpenBSD: ssh-agent.1,v 1.41 2004/07/11 17:48:47 deraadt Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -148,7 +148,7 @@ for Bourne-type shells such as | |||
148 | or | 148 | or |
149 | .Xr ksh 1 | 149 | .Xr ksh 1 |
150 | and | 150 | and |
151 | .Cm eval `ssh-agent -c` | 151 | .Cm eval `ssh-agent -c` |
152 | for | 152 | for |
153 | .Xr csh 1 | 153 | .Xr csh 1 |
154 | and derivatives. | 154 | and derivatives. |
diff --git a/ssh-keygen.c b/ssh-keygen.c index e8e579b5d..d39e7d881 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.116 2004/06/21 17:36:31 avsm Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.117 2004/07/11 17:48:47 deraadt Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -895,7 +895,7 @@ main(int ac, char **av) | |||
895 | if (log_level == SYSLOG_LEVEL_INFO) | 895 | if (log_level == SYSLOG_LEVEL_INFO) |
896 | log_level = SYSLOG_LEVEL_DEBUG1; | 896 | log_level = SYSLOG_LEVEL_DEBUG1; |
897 | else { | 897 | else { |
898 | if (log_level >= SYSLOG_LEVEL_DEBUG1 && | 898 | if (log_level >= SYSLOG_LEVEL_DEBUG1 && |
899 | log_level < SYSLOG_LEVEL_DEBUG3) | 899 | log_level < SYSLOG_LEVEL_DEBUG3) |
900 | log_level++; | 900 | log_level++; |
901 | } | 901 | } |
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: ssh.c,v 1.222 2004/06/23 14:31:01 dtucker Exp $"); | 43 | RCSID("$OpenBSD: ssh.c,v 1.223 2004/07/11 17:48:47 deraadt Exp $"); |
44 | 44 | ||
45 | #include <openssl/evp.h> | 45 | #include <openssl/evp.h> |
46 | #include <openssl/err.h> | 46 | #include <openssl/err.h> |
@@ -551,7 +551,7 @@ again: | |||
551 | (void)read_config_file(buf, host, &options, 1); | 551 | (void)read_config_file(buf, host, &options, 1); |
552 | 552 | ||
553 | /* Read systemwide configuration file after use config. */ | 553 | /* Read systemwide configuration file after use config. */ |
554 | (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, | 554 | (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, |
555 | &options, 0); | 555 | &options, 0); |
556 | } | 556 | } |
557 | 557 | ||
@@ -1250,7 +1250,7 @@ control_client(const char *path) | |||
1250 | Buffer m; | 1250 | Buffer m; |
1251 | char *cp; | 1251 | char *cp; |
1252 | extern char **environ; | 1252 | extern char **environ; |
1253 | 1253 | ||
1254 | memset(&addr, '\0', sizeof(addr)); | 1254 | memset(&addr, '\0', sizeof(addr)); |
1255 | addr.sun_family = AF_UNIX; | 1255 | addr.sun_family = AF_UNIX; |
1256 | addr_len = offsetof(struct sockaddr_un, sun_path) + | 1256 | addr_len = offsetof(struct sockaddr_un, sun_path) + |
@@ -1291,13 +1291,13 @@ control_client(const char *path) | |||
1291 | 1291 | ||
1292 | if (options.num_send_env == 0 || environ == NULL) { | 1292 | if (options.num_send_env == 0 || environ == NULL) { |
1293 | buffer_put_int(&m, 0); | 1293 | buffer_put_int(&m, 0); |
1294 | } else { | 1294 | } else { |
1295 | /* Pass environment */ | 1295 | /* Pass environment */ |
1296 | num_env = 0; | 1296 | num_env = 0; |
1297 | for (i = 0; environ[i] != NULL; i++) | 1297 | for (i = 0; environ[i] != NULL; i++) |
1298 | if (env_permitted(environ[i])) | 1298 | if (env_permitted(environ[i])) |
1299 | num_env++; /* Count */ | 1299 | num_env++; /* Count */ |
1300 | 1300 | ||
1301 | buffer_put_int(&m, num_env); | 1301 | buffer_put_int(&m, num_env); |
1302 | 1302 | ||
1303 | for (i = 0; environ[i] != NULL && num_env >= 0; i++) | 1303 | for (i = 0; environ[i] != NULL && num_env >= 0; i++) |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh1.h,v 1.3 2001/05/30 12:55:13 markus Exp $ */ | 1 | /* $OpenBSD: ssh1.h,v 1.4 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -29,8 +29,8 @@ | |||
29 | #define SSH_SMSG_AUTH_RSA_CHALLENGE 7 /* int (BIGNUM) */ | 29 | #define SSH_SMSG_AUTH_RSA_CHALLENGE 7 /* int (BIGNUM) */ |
30 | #define SSH_CMSG_AUTH_RSA_RESPONSE 8 /* int (BIGNUM) */ | 30 | #define SSH_CMSG_AUTH_RSA_RESPONSE 8 /* int (BIGNUM) */ |
31 | #define SSH_CMSG_AUTH_PASSWORD 9 /* pass (string) */ | 31 | #define SSH_CMSG_AUTH_PASSWORD 9 /* pass (string) */ |
32 | #define SSH_CMSG_REQUEST_PTY 10 /* TERM, tty modes */ | 32 | #define SSH_CMSG_REQUEST_PTY 10 /* TERM, tty modes */ |
33 | #define SSH_CMSG_WINDOW_SIZE 11 /* row,col,xpix,ypix */ | 33 | #define SSH_CMSG_WINDOW_SIZE 11 /* row,col,xpix,ypix */ |
34 | #define SSH_CMSG_EXEC_SHELL 12 /* */ | 34 | #define SSH_CMSG_EXEC_SHELL 12 /* */ |
35 | #define SSH_CMSG_EXEC_CMD 13 /* cmd (string) */ | 35 | #define SSH_CMSG_EXEC_CMD 13 /* cmd (string) */ |
36 | #define SSH_SMSG_SUCCESS 14 /* */ | 36 | #define SSH_SMSG_SUCCESS 14 /* */ |
@@ -45,7 +45,7 @@ | |||
45 | #define SSH_MSG_CHANNEL_DATA 23 /* ch,data (int,str) */ | 45 | #define SSH_MSG_CHANNEL_DATA 23 /* ch,data (int,str) */ |
46 | #define SSH_MSG_CHANNEL_CLOSE 24 /* channel (int) */ | 46 | #define SSH_MSG_CHANNEL_CLOSE 24 /* channel (int) */ |
47 | #define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* channel (int) */ | 47 | #define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* channel (int) */ |
48 | /* SSH_CMSG_X11_REQUEST_FORWARDING 26 OBSOLETE */ | 48 | /* SSH_CMSG_X11_REQUEST_FORWARDING 26 OBSOLETE */ |
49 | #define SSH_SMSG_X11_OPEN 27 /* channel (int) */ | 49 | #define SSH_SMSG_X11_OPEN 27 /* channel (int) */ |
50 | #define SSH_CMSG_PORT_FORWARD_REQUEST 28 /* p,host,hp (i,s,i) */ | 50 | #define SSH_CMSG_PORT_FORWARD_REQUEST 28 /* p,host,hp (i,s,i) */ |
51 | #define SSH_MSG_PORT_OPEN 29 /* ch,h,p (i,s,i) */ | 51 | #define SSH_MSG_PORT_OPEN 29 /* ch,h,p (i,s,i) */ |
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.297 2004/06/26 20:07:16 avsm Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.298 2004/07/11 17:48:47 deraadt Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -803,7 +803,7 @@ send_rexec_state(int fd, Buffer *conf) | |||
803 | buffer_init(&m); | 803 | buffer_init(&m); |
804 | buffer_put_cstring(&m, buffer_ptr(conf)); | 804 | buffer_put_cstring(&m, buffer_ptr(conf)); |
805 | 805 | ||
806 | if (sensitive_data.server_key != NULL && | 806 | if (sensitive_data.server_key != NULL && |
807 | sensitive_data.server_key->type == KEY_RSA1) { | 807 | sensitive_data.server_key->type == KEY_RSA1) { |
808 | buffer_put_int(&m, 1); | 808 | buffer_put_int(&m, 1); |
809 | buffer_put_bignum(&m, sensitive_data.server_key->rsa->e); | 809 | buffer_put_bignum(&m, sensitive_data.server_key->rsa->e); |
@@ -1896,7 +1896,7 @@ do_ssh1_kex(void) | |||
1896 | session_key + sizeof(session_key) - len); | 1896 | session_key + sizeof(session_key) - len); |
1897 | 1897 | ||
1898 | derive_ssh1_session_id( | 1898 | derive_ssh1_session_id( |
1899 | sensitive_data.ssh1_host_key->rsa->n, | 1899 | sensitive_data.ssh1_host_key->rsa->n, |
1900 | sensitive_data.server_key->rsa->n, | 1900 | sensitive_data.server_key->rsa->n, |
1901 | cookie, session_id); | 1901 | cookie, session_id); |
1902 | /* | 1902 | /* |
diff --git a/ttymodes.h b/ttymodes.h index 7de4b8362..481282cd7 100644 --- a/ttymodes.h +++ b/ttymodes.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ttymodes.h,v 1.12 2002/03/04 17:27:39 stevesk Exp $ */ | 1 | /* $OpenBSD: ttymodes.h,v 1.13 2004/07/11 17:48:47 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -113,17 +113,17 @@ TTYCHAR(VDISCARD, 18) | |||
113 | /* name, field, op */ | 113 | /* name, field, op */ |
114 | TTYMODE(IGNPAR, c_iflag, 30) | 114 | TTYMODE(IGNPAR, c_iflag, 30) |
115 | TTYMODE(PARMRK, c_iflag, 31) | 115 | TTYMODE(PARMRK, c_iflag, 31) |
116 | TTYMODE(INPCK, c_iflag, 32) | 116 | TTYMODE(INPCK, c_iflag, 32) |
117 | TTYMODE(ISTRIP, c_iflag, 33) | 117 | TTYMODE(ISTRIP, c_iflag, 33) |
118 | TTYMODE(INLCR, c_iflag, 34) | 118 | TTYMODE(INLCR, c_iflag, 34) |
119 | TTYMODE(IGNCR, c_iflag, 35) | 119 | TTYMODE(IGNCR, c_iflag, 35) |
120 | TTYMODE(ICRNL, c_iflag, 36) | 120 | TTYMODE(ICRNL, c_iflag, 36) |
121 | #if defined(IUCLC) | 121 | #if defined(IUCLC) |
122 | TTYMODE(IUCLC, c_iflag, 37) | 122 | TTYMODE(IUCLC, c_iflag, 37) |
123 | #endif | 123 | #endif |
124 | TTYMODE(IXON, c_iflag, 38) | 124 | TTYMODE(IXON, c_iflag, 38) |
125 | TTYMODE(IXANY, c_iflag, 39) | 125 | TTYMODE(IXANY, c_iflag, 39) |
126 | TTYMODE(IXOFF, c_iflag, 40) | 126 | TTYMODE(IXOFF, c_iflag, 40) |
127 | #ifdef IMAXBEL | 127 | #ifdef IMAXBEL |
128 | TTYMODE(IMAXBEL,c_iflag, 41) | 128 | TTYMODE(IMAXBEL,c_iflag, 41) |
129 | #endif /* IMAXBEL */ | 129 | #endif /* IMAXBEL */ |