diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-05 23:26:32 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-05 23:26:32 +0000 |
commit | a3700050ec681277bcdf76a02b0c2e304ff317c7 (patch) | |
tree | 6cd727ebf611f03b345783cb9d6d8d04e8f483bf | |
parent | a6c20148f58e34a902512ffe5eee3279acaaa26b (diff) |
- markus@cvs.openbsd.org 2001/04/05 10:42:57
[auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c
mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c
sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c
sshconnect2.c sshd.c]
fix whitespace: unexpand + trailing spaces.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | auth-chall.c | 6 | ||||
-rw-r--r-- | authfd.c | 6 | ||||
-rw-r--r-- | channels.c | 6 | ||||
-rw-r--r-- | clientloop.c | 10 | ||||
-rw-r--r-- | kex.c | 8 | ||||
-rw-r--r-- | kexgex.c | 8 | ||||
-rw-r--r-- | key.c | 10 | ||||
-rw-r--r-- | mac.c | 4 | ||||
-rw-r--r-- | packet.c | 8 | ||||
-rw-r--r-- | serverloop.c | 4 | ||||
-rw-r--r-- | sftp-client.c | 6 | ||||
-rw-r--r-- | sftp-client.h | 8 | ||||
-rw-r--r-- | sftp-glob.c | 8 | ||||
-rw-r--r-- | sftp-glob.h | 4 | ||||
-rw-r--r-- | sftp-int.c | 6 | ||||
-rw-r--r-- | sftp-server.c | 4 | ||||
-rw-r--r-- | sftp.c | 6 | ||||
-rw-r--r-- | ssh-keygen.c | 4 | ||||
-rw-r--r-- | sshconnect.c | 4 | ||||
-rw-r--r-- | sshconnect2.c | 6 | ||||
-rw-r--r-- | sshd.c | 8 |
22 files changed, 74 insertions, 68 deletions
@@ -11,6 +11,12 @@ | |||
11 | [version.h] | 11 | [version.h] |
12 | temporary version 2.5.4 (supports rekeying). | 12 | temporary version 2.5.4 (supports rekeying). |
13 | this is not an official release. | 13 | this is not an official release. |
14 | - markus@cvs.openbsd.org 2001/04/05 10:42:57 | ||
15 | [auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c | ||
16 | mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c | ||
17 | sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c | ||
18 | sshconnect2.c sshd.c] | ||
19 | fix whitespace: unexpand + trailing spaces. | ||
14 | 20 | ||
15 | 20010405 | 21 | 20010405 |
16 | - OpenBSD CVS Sync | 22 | - OpenBSD CVS Sync |
@@ -4883,4 +4889,4 @@ | |||
4883 | - Wrote replacements for strlcpy and mkdtemp | 4889 | - Wrote replacements for strlcpy and mkdtemp |
4884 | - Released 1.0pre1 | 4890 | - Released 1.0pre1 |
4885 | 4891 | ||
4886 | $Id: ChangeLog,v 1.1066 2001/04/05 23:22:25 mouring Exp $ | 4892 | $Id: ChangeLog,v 1.1067 2001/04/05 23:26:32 mouring Exp $ |
diff --git a/auth-chall.c b/auth-chall.c index ee7b6cd96..f3502f4ee 100644 --- a/auth-chall.c +++ b/auth-chall.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth-chall.c,v 1.6 2001/03/20 18:57:04 markus Exp $"); | 26 | RCSID("$OpenBSD: auth-chall.c,v 1.7 2001/04/05 10:42:47 markus Exp $"); |
27 | 27 | ||
28 | #include "auth.h" | 28 | #include "auth.h" |
29 | #include "log.h" | 29 | #include "log.h" |
@@ -50,8 +50,8 @@ get_challenge(Authctxt *authctxt, char *devs) | |||
50 | debug3("bsd auth: devs %s", devs ? devs : "<default>"); | 50 | debug3("bsd auth: devs %s", devs ? devs : "<default>"); |
51 | authctxt->as = auth_userchallenge(authctxt->user, devs, "auth-ssh", | 51 | authctxt->as = auth_userchallenge(authctxt->user, devs, "auth-ssh", |
52 | &challenge); | 52 | &challenge); |
53 | if (authctxt->as == NULL) | 53 | if (authctxt->as == NULL) |
54 | return NULL; | 54 | return NULL; |
55 | debug2("get_challenge: <%s>", challenge ? challenge : "EMPTY"); | 55 | debug2("get_challenge: <%s>", challenge ? challenge : "EMPTY"); |
56 | return challenge; | 56 | return challenge; |
57 | } | 57 | } |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.38 2001/03/06 00:33:03 deraadt Exp $"); | 38 | RCSID("$OpenBSD: authfd.c,v 1.39 2001/04/05 10:42:48 markus Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -121,7 +121,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply | |||
121 | while (len > 0) { | 121 | while (len > 0) { |
122 | l = read(auth->fd, buf + 4 - len, len); | 122 | l = read(auth->fd, buf + 4 - len, len); |
123 | if (l == -1 && (errno == EAGAIN || errno == EINTR)) | 123 | if (l == -1 && (errno == EAGAIN || errno == EINTR)) |
124 | continue; | 124 | continue; |
125 | if (l <= 0) { | 125 | if (l <= 0) { |
126 | error("Error reading response length from authentication socket."); | 126 | error("Error reading response length from authentication socket."); |
127 | return 0; | 127 | return 0; |
@@ -142,7 +142,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply | |||
142 | l = sizeof(buf); | 142 | l = sizeof(buf); |
143 | l = read(auth->fd, buf, l); | 143 | l = read(auth->fd, buf, l); |
144 | if (l == -1 && (errno == EAGAIN || errno == EINTR)) | 144 | if (l == -1 && (errno == EAGAIN || errno == EINTR)) |
145 | continue; | 145 | continue; |
146 | if (l <= 0) { | 146 | if (l <= 0) { |
147 | error("Error reading response from authentication socket."); | 147 | error("Error reading response from authentication socket."); |
148 | return 0; | 148 | return 0; |
diff --git a/channels.c b/channels.c index 7790564cc..6ca31b840 100644 --- a/channels.c +++ b/channels.c | |||
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: channels.c,v 1.100 2001/04/04 20:25:35 markus Exp $"); | 43 | RCSID("$OpenBSD: channels.c,v 1.101 2001/04/05 10:42:48 markus Exp $"); |
44 | 44 | ||
45 | #include <openssl/rsa.h> | 45 | #include <openssl/rsa.h> |
46 | #include <openssl/dsa.h> | 46 | #include <openssl/dsa.h> |
@@ -1793,7 +1793,7 @@ channel_permit_all_opens() | |||
1793 | all_opens_permitted = 1; | 1793 | all_opens_permitted = 1; |
1794 | } | 1794 | } |
1795 | 1795 | ||
1796 | void | 1796 | void |
1797 | channel_add_permitted_opens(char *host, int port) | 1797 | channel_add_permitted_opens(char *host, int port) |
1798 | { | 1798 | { |
1799 | if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) | 1799 | if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) |
@@ -1807,7 +1807,7 @@ channel_add_permitted_opens(char *host, int port) | |||
1807 | all_opens_permitted = 0; | 1807 | all_opens_permitted = 0; |
1808 | } | 1808 | } |
1809 | 1809 | ||
1810 | void | 1810 | void |
1811 | channel_clear_permitted_opens(void) | 1811 | channel_clear_permitted_opens(void) |
1812 | { | 1812 | { |
1813 | int i; | 1813 | int i; |
diff --git a/clientloop.c b/clientloop.c index 4b87e3b6d..71eda80e6 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.56 2001/04/04 20:25:37 markus Exp $"); | 62 | RCSID("$OpenBSD: clientloop.c,v 1.57 2001/04/05 10:42:49 markus Exp $"); |
63 | 63 | ||
64 | #include "ssh.h" | 64 | #include "ssh.h" |
65 | #include "ssh1.h" | 65 | #include "ssh1.h" |
@@ -735,7 +735,7 @@ client_process_output(fd_set * writeset) | |||
735 | } | 735 | } |
736 | /* Consume printed data from the buffer. */ | 736 | /* Consume printed data from the buffer. */ |
737 | buffer_consume(&stdout_buffer, len); | 737 | buffer_consume(&stdout_buffer, len); |
738 | stdout_bytes += len; | 738 | stdout_bytes += len; |
739 | } | 739 | } |
740 | /* Write buffered output to stderr. */ | 740 | /* Write buffered output to stderr. */ |
741 | if (FD_ISSET(fileno(stderr), writeset)) { | 741 | if (FD_ISSET(fileno(stderr), writeset)) { |
@@ -753,7 +753,7 @@ client_process_output(fd_set * writeset) | |||
753 | } | 753 | } |
754 | /* Consume printed characters from the buffer. */ | 754 | /* Consume printed characters from the buffer. */ |
755 | buffer_consume(&stderr_buffer, len); | 755 | buffer_consume(&stderr_buffer, len); |
756 | stderr_bytes += len; | 756 | stderr_bytes += len; |
757 | } | 757 | } |
758 | } | 758 | } |
759 | 759 | ||
@@ -964,7 +964,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
964 | break; | 964 | break; |
965 | } | 965 | } |
966 | buffer_consume(&stdout_buffer, len); | 966 | buffer_consume(&stdout_buffer, len); |
967 | stdout_bytes += len; | 967 | stdout_bytes += len; |
968 | } | 968 | } |
969 | 969 | ||
970 | /* Output any buffered data for stderr. */ | 970 | /* Output any buffered data for stderr. */ |
@@ -976,7 +976,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
976 | break; | 976 | break; |
977 | } | 977 | } |
978 | buffer_consume(&stderr_buffer, len); | 978 | buffer_consume(&stderr_buffer, len); |
979 | stderr_bytes += len; | 979 | stderr_bytes += len; |
980 | } | 980 | } |
981 | 981 | ||
982 | if (have_pty) | 982 | if (have_pty) |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: kex.c,v 1.32 2001/04/04 23:09:18 markus Exp $"); | 26 | RCSID("$OpenBSD: kex.c,v 1.33 2001/04/05 10:42:50 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/crypto.h> | 28 | #include <openssl/crypto.h> |
29 | 29 | ||
@@ -108,7 +108,7 @@ kex_prop_free(char **proposal) | |||
108 | void | 108 | void |
109 | kex_protocol_error(int type, int plen, void *ctxt) | 109 | kex_protocol_error(int type, int plen, void *ctxt) |
110 | { | 110 | { |
111 | error("Hm, kex protocol error: type %d plen %d", type, plen); | 111 | error("Hm, kex protocol error: type %d plen %d", type, plen); |
112 | } | 112 | } |
113 | 113 | ||
114 | void | 114 | void |
@@ -133,8 +133,8 @@ kex_finish(Kex *kex) | |||
133 | /* packet_write_wait(); */ | 133 | /* packet_write_wait(); */ |
134 | debug("SSH2_MSG_NEWKEYS sent"); | 134 | debug("SSH2_MSG_NEWKEYS sent"); |
135 | 135 | ||
136 | debug("waiting for SSH2_MSG_NEWKEYS"); | 136 | debug("waiting for SSH2_MSG_NEWKEYS"); |
137 | packet_read_expect(&plen, SSH2_MSG_NEWKEYS); | 137 | packet_read_expect(&plen, SSH2_MSG_NEWKEYS); |
138 | debug("SSH2_MSG_NEWKEYS received"); | 138 | debug("SSH2_MSG_NEWKEYS received"); |
139 | 139 | ||
140 | kex->done = 1; | 140 | kex->done = 1; |
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: kexgex.c,v 1.4 2001/04/04 22:04:35 markus Exp $"); | 27 | RCSID("$OpenBSD: kexgex.c,v 1.5 2001/04/05 10:42:50 markus Exp $"); |
28 | 28 | ||
29 | #include <openssl/bn.h> | 29 | #include <openssl/bn.h> |
30 | 30 | ||
@@ -69,7 +69,7 @@ kexgex_hash( | |||
69 | buffer_append(&b, skexinit, skexinitlen); | 69 | buffer_append(&b, skexinit, skexinitlen); |
70 | 70 | ||
71 | buffer_put_string(&b, serverhostkeyblob, sbloblen); | 71 | buffer_put_string(&b, serverhostkeyblob, sbloblen); |
72 | if (min == -1 || max == -1) | 72 | if (min == -1 || max == -1) |
73 | buffer_put_int(&b, wantbits); | 73 | buffer_put_int(&b, wantbits); |
74 | else { | 74 | else { |
75 | buffer_put_int(&b, min); | 75 | buffer_put_int(&b, min); |
@@ -205,7 +205,7 @@ kexgex_client(Kex *kex) | |||
205 | kbuf = xmalloc(klen); | 205 | kbuf = xmalloc(klen); |
206 | kout = DH_compute_key(kbuf, dh_server_pub, dh); | 206 | kout = DH_compute_key(kbuf, dh_server_pub, dh); |
207 | #ifdef DEBUG_KEXDH | 207 | #ifdef DEBUG_KEXDH |
208 | dump_digest("shared secret", kbuf, kout); | 208 | dump_digest("shared secret", kbuf, kout); |
209 | #endif | 209 | #endif |
210 | shared_secret = BN_new(); | 210 | shared_secret = BN_new(); |
211 | BN_bin2bn(kbuf, kout, shared_secret); | 211 | BN_bin2bn(kbuf, kout, shared_secret); |
@@ -339,7 +339,7 @@ kexgex_server(Kex *kex) | |||
339 | kbuf = xmalloc(klen); | 339 | kbuf = xmalloc(klen); |
340 | kout = DH_compute_key(kbuf, dh_client_pub, dh); | 340 | kout = DH_compute_key(kbuf, dh_client_pub, dh); |
341 | #ifdef DEBUG_KEXDH | 341 | #ifdef DEBUG_KEXDH |
342 | dump_digest("shared secret", kbuf, kout); | 342 | dump_digest("shared secret", kbuf, kout); |
343 | #endif | 343 | #endif |
344 | shared_secret = BN_new(); | 344 | shared_secret = BN_new(); |
345 | BN_bin2bn(kbuf, kout, shared_secret); | 345 | BN_bin2bn(kbuf, kout, shared_secret); |
@@ -32,7 +32,7 @@ | |||
32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | #include "includes.h" | 34 | #include "includes.h" |
35 | RCSID("$OpenBSD: key.c,v 1.22 2001/03/12 22:02:01 markus Exp $"); | 35 | RCSID("$OpenBSD: key.c,v 1.23 2001/04/05 10:42:50 markus Exp $"); |
36 | 36 | ||
37 | #include <openssl/evp.h> | 37 | #include <openssl/evp.h> |
38 | 38 | ||
@@ -211,7 +211,7 @@ key_fingerprint_raw(Key *k, enum fp_type dgst_type, size_t *dgst_raw_length) | |||
211 | } | 211 | } |
212 | 212 | ||
213 | char* | 213 | char* |
214 | key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len) | 214 | key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len) |
215 | { | 215 | { |
216 | char *retval; | 216 | char *retval; |
217 | int i; | 217 | int i; |
@@ -228,7 +228,7 @@ key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | char* | 230 | char* |
231 | key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len) | 231 | key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len) |
232 | { | 232 | { |
233 | char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'y' }; | 233 | char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'y' }; |
234 | char consonants[] = { 'b', 'c', 'd', 'f', 'g', 'h', 'k', 'l', 'm', | 234 | char consonants[] = { 'b', 'c', 'd', 'f', 'g', 'h', 'k', 'l', 'm', |
@@ -277,9 +277,9 @@ key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len) | |||
277 | char* | 277 | char* |
278 | key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep) | 278 | key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep) |
279 | { | 279 | { |
280 | char *retval = NULL; | 280 | char *retval = NULL; |
281 | u_char *dgst_raw; | 281 | u_char *dgst_raw; |
282 | size_t dgst_raw_len; | 282 | size_t dgst_raw_len; |
283 | 283 | ||
284 | dgst_raw = key_fingerprint_raw(k, dgst_type, &dgst_raw_len); | 284 | dgst_raw = key_fingerprint_raw(k, dgst_type, &dgst_raw_len); |
285 | if (!dgst_raw) | 285 | if (!dgst_raw) |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: mac.c,v 1.1 2001/02/11 12:59:24 markus Exp $"); | 26 | RCSID("$OpenBSD: mac.c,v 1.2 2001/04/05 10:42:51 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/hmac.h> | 28 | #include <openssl/hmac.h> |
29 | 29 | ||
@@ -45,7 +45,7 @@ struct { | |||
45 | { "hmac-md5-96", EVP_md5, 96 }, | 45 | { "hmac-md5-96", EVP_md5, 96 }, |
46 | { "hmac-ripemd160", EVP_ripemd160, 0 }, | 46 | { "hmac-ripemd160", EVP_ripemd160, 0 }, |
47 | { "hmac-ripemd160@openssh.com", EVP_ripemd160, 0 }, | 47 | { "hmac-ripemd160@openssh.com", EVP_ripemd160, 0 }, |
48 | { NULL, NULL, 0 } | 48 | { NULL, NULL, 0 } |
49 | }; | 49 | }; |
50 | 50 | ||
51 | int | 51 | int |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.60 2001/04/05 10:39:03 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.61 2001/04/05 10:42:51 markus Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -529,7 +529,7 @@ set_newkeys(int mode) | |||
529 | enc = &newkeys[mode]->enc; | 529 | enc = &newkeys[mode]->enc; |
530 | mac = &newkeys[mode]->mac; | 530 | mac = &newkeys[mode]->mac; |
531 | comp = &newkeys[mode]->comp; | 531 | comp = &newkeys[mode]->comp; |
532 | memset(mac->key, 0, mac->key_len); | 532 | memset(mac->key, 0, mac->key_len); |
533 | xfree(enc->name); | 533 | xfree(enc->name); |
534 | xfree(enc->iv); | 534 | xfree(enc->iv); |
535 | xfree(enc->key); | 535 | xfree(enc->key); |
@@ -1329,10 +1329,10 @@ packet_set_maxsize(int s) | |||
1329 | 1329 | ||
1330 | /* | 1330 | /* |
1331 | * 9.2. Ignored Data Message | 1331 | * 9.2. Ignored Data Message |
1332 | * | 1332 | * |
1333 | * byte SSH_MSG_IGNORE | 1333 | * byte SSH_MSG_IGNORE |
1334 | * string data | 1334 | * string data |
1335 | * | 1335 | * |
1336 | * All implementations MUST understand (and ignore) this message at any | 1336 | * All implementations MUST understand (and ignore) this message at any |
1337 | * time (after receiving the protocol version). No implementation is | 1337 | * time (after receiving the protocol version). No implementation is |
1338 | * required to send them. This message can be used as an additional | 1338 | * required to send them. This message can be used as an additional |
diff --git a/serverloop.c b/serverloop.c index 4f6c82694..cd9368d07 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: serverloop.c,v 1.58 2001/04/04 22:04:35 markus Exp $"); | 38 | RCSID("$OpenBSD: serverloop.c,v 1.59 2001/04/05 10:42:51 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "packet.h" | 41 | #include "packet.h" |
@@ -667,7 +667,7 @@ server_loop2(void) | |||
667 | for (;;) { | 667 | for (;;) { |
668 | process_buffered_input_packets(); | 668 | process_buffered_input_packets(); |
669 | 669 | ||
670 | rekeying = (xxx_kex != NULL && !xxx_kex->done); | 670 | rekeying = (xxx_kex != NULL && !xxx_kex->done); |
671 | 671 | ||
672 | if (!had_channel && channel_still_open()) | 672 | if (!had_channel && channel_still_open()) |
673 | had_channel = 1; | 673 | had_channel = 1; |
diff --git a/sftp-client.c b/sftp-client.c index 7be73d29f..cf672e70d 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -29,7 +29,7 @@ | |||
29 | /* XXX: copy between two remote sites */ | 29 | /* XXX: copy between two remote sites */ |
30 | 30 | ||
31 | #include "includes.h" | 31 | #include "includes.h" |
32 | RCSID("$OpenBSD: sftp-client.c,v 1.15 2001/03/19 10:52:51 djm Exp $"); | 32 | RCSID("$OpenBSD: sftp-client.c,v 1.16 2001/04/05 10:42:52 markus Exp $"); |
33 | 33 | ||
34 | #include "ssh.h" | 34 | #include "ssh.h" |
35 | #include "buffer.h" | 35 | #include "buffer.h" |
@@ -284,7 +284,7 @@ do_close(int fd_in, int fd_out, char *handle, u_int handle_len) | |||
284 | 284 | ||
285 | 285 | ||
286 | int | 286 | int |
287 | do_lsreaddir(int fd_in, int fd_out, char *path, int printflag, | 287 | do_lsreaddir(int fd_in, int fd_out, char *path, int printflag, |
288 | SFTP_DIRENT ***dir) | 288 | SFTP_DIRENT ***dir) |
289 | { | 289 | { |
290 | Buffer msg; | 290 | Buffer msg; |
@@ -370,7 +370,7 @@ do_lsreaddir(int fd_in, int fd_out, char *path, int printflag, | |||
370 | printf("%s\n", longname); | 370 | printf("%s\n", longname); |
371 | 371 | ||
372 | if (dir) { | 372 | if (dir) { |
373 | *dir = xrealloc(*dir, sizeof(**dir) * | 373 | *dir = xrealloc(*dir, sizeof(**dir) * |
374 | (ents + 2)); | 374 | (ents + 2)); |
375 | (*dir)[ents] = xmalloc(sizeof(***dir)); | 375 | (*dir)[ents] = xmalloc(sizeof(***dir)); |
376 | (*dir)[ents]->filename = xstrdup(filename); | 376 | (*dir)[ents]->filename = xstrdup(filename); |
diff --git a/sftp-client.h b/sftp-client.h index a935736e3..09ffcc05c 100644 --- a/sftp-client.h +++ b/sftp-client.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-client.h,v 1.4 2001/03/16 08:16:18 djm Exp $ */ | 1 | /* $OpenBSD: sftp-client.h,v 1.5 2001/04/05 10:42:52 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2001 Damien Miller. All rights reserved. |
@@ -34,8 +34,8 @@ struct SFTP_DIRENT { | |||
34 | Attrib a; | 34 | Attrib a; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Initialiase a SSH filexfer connection. Returns -1 on error or | 38 | * Initialiase a SSH filexfer connection. Returns -1 on error or |
39 | * protocol version on success. | 39 | * protocol version on success. |
40 | */ | 40 | */ |
41 | int do_init(int fd_in, int fd_out); | 41 | int do_init(int fd_in, int fd_out); |
@@ -68,7 +68,7 @@ Attrib *do_stat(int fd_in, int fd_out, char *path, int quiet); | |||
68 | Attrib *do_lstat(int fd_in, int fd_out, char *path, int quiet); | 68 | Attrib *do_lstat(int fd_in, int fd_out, char *path, int quiet); |
69 | 69 | ||
70 | /* Get file attributes of open file 'handle' */ | 70 | /* Get file attributes of open file 'handle' */ |
71 | Attrib *do_fstat(int fd_in, int fd_out, char *handle, u_int handle_len, | 71 | Attrib *do_fstat(int fd_in, int fd_out, char *handle, u_int handle_len, |
72 | int quiet); | 72 | int quiet); |
73 | 73 | ||
74 | /* Set file attributes of 'path' */ | 74 | /* Set file attributes of 'path' */ |
diff --git a/sftp-glob.c b/sftp-glob.c index 208efeb15..535241002 100644 --- a/sftp-glob.c +++ b/sftp-glob.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sftp-glob.c,v 1.3 2001/04/03 13:56:11 stevesk Exp $"); | 26 | RCSID("$OpenBSD: sftp-glob.c,v 1.4 2001/04/05 10:42:53 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh.h" | 28 | #include "ssh.h" |
29 | #include "buffer.h" | 29 | #include "buffer.h" |
@@ -84,7 +84,7 @@ struct dirent *fudge_readdir(struct SFTP_OPENDIR *od) | |||
84 | #ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME | 84 | #ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME |
85 | strlcpy(ret->d_name, od->dir[od->offset++]->filename, MAXPATHLEN); | 85 | strlcpy(ret->d_name, od->dir[od->offset++]->filename, MAXPATHLEN); |
86 | #else | 86 | #else |
87 | strlcpy(ret->d_name, od->dir[od->offset++]->filename, | 87 | strlcpy(ret->d_name, od->dir[od->offset++]->filename, |
88 | sizeof(ret->d_name)); | 88 | sizeof(ret->d_name)); |
89 | #endif | 89 | #endif |
90 | #ifdef __GNU_LIBRARY__ | 90 | #ifdef __GNU_LIBRARY__ |
@@ -150,7 +150,7 @@ int fudge_stat(const char *path, struct stat *st) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | int | 152 | int |
153 | remote_glob(int fd_in, int fd_out, const char *pattern, int flags, | 153 | remote_glob(int fd_in, int fd_out, const char *pattern, int flags, |
154 | const int (*errfunc)(const char *, int), glob_t *pglob) | 154 | const int (*errfunc)(const char *, int), glob_t *pglob) |
155 | { | 155 | { |
156 | pglob->gl_opendir = (void*)fudge_opendir; | 156 | pglob->gl_opendir = (void*)fudge_opendir; |
@@ -163,6 +163,6 @@ remote_glob(int fd_in, int fd_out, const char *pattern, int flags, | |||
163 | cur.fd_in = fd_in; | 163 | cur.fd_in = fd_in; |
164 | cur.fd_out = fd_out; | 164 | cur.fd_out = fd_out; |
165 | 165 | ||
166 | return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc, | 166 | return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc, |
167 | pglob)); | 167 | pglob)); |
168 | } | 168 | } |
diff --git a/sftp-glob.h b/sftp-glob.h index 9e75168ac..944f32865 100644 --- a/sftp-glob.h +++ b/sftp-glob.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-glob.h,v 1.1 2001/03/13 22:42:54 djm Exp $ */ | 1 | /* $OpenBSD: sftp-glob.h,v 1.2 2001/04/05 10:42:53 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2001 Damien Miller. All rights reserved. |
@@ -27,6 +27,6 @@ | |||
27 | /* Remote sftp filename globbing */ | 27 | /* Remote sftp filename globbing */ |
28 | 28 | ||
29 | int | 29 | int |
30 | remote_glob(int fd_in, int fd_out, const char *pattern, int flags, | 30 | remote_glob(int fd_in, int fd_out, const char *pattern, int flags, |
31 | const int (*errfunc)(const char *, int), glob_t *pglob); | 31 | const int (*errfunc)(const char *, int), glob_t *pglob); |
32 | 32 | ||
diff --git a/sftp-int.c b/sftp-int.c index aa69d802d..18f2e6c46 100644 --- a/sftp-int.c +++ b/sftp-int.c | |||
@@ -26,7 +26,7 @@ | |||
26 | /* XXX: recursive operations */ | 26 | /* XXX: recursive operations */ |
27 | 27 | ||
28 | #include "includes.h" | 28 | #include "includes.h" |
29 | RCSID("$OpenBSD: sftp-int.c,v 1.32 2001/03/23 13:10:57 markus Exp $"); | 29 | RCSID("$OpenBSD: sftp-int.c,v 1.33 2001/04/05 10:42:53 markus Exp $"); |
30 | 30 | ||
31 | #include "buffer.h" | 31 | #include "buffer.h" |
32 | #include "xmalloc.h" | 32 | #include "xmalloc.h" |
@@ -665,8 +665,8 @@ parse_dispatch_command(int in, int out, const char *cmd, char **pwd) | |||
665 | break; | 665 | break; |
666 | case I_PUT: | 666 | case I_PUT: |
667 | err = process_put(in, out, path1, path2, *pwd, pflag); | 667 | err = process_put(in, out, path1, path2, *pwd, pflag); |
668 | break; | 668 | break; |
669 | case I_RENAME: | 669 | case I_RENAME: |
670 | path1 = make_absolute(path1, *pwd); | 670 | path1 = make_absolute(path1, *pwd); |
671 | path2 = make_absolute(path2, *pwd); | 671 | path2 = make_absolute(path2, *pwd); |
672 | err = do_rename(in, out, path1, path2); | 672 | err = do_rename(in, out, path1, path2); |
diff --git a/sftp-server.c b/sftp-server.c index 966122452..0695a9824 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #include "includes.h" | 24 | #include "includes.h" |
25 | RCSID("$OpenBSD: sftp-server.c,v 1.24 2001/03/14 22:50:25 deraadt Exp $"); | 25 | RCSID("$OpenBSD: sftp-server.c,v 1.25 2001/04/05 10:42:53 markus Exp $"); |
26 | 26 | ||
27 | #include "buffer.h" | 27 | #include "buffer.h" |
28 | #include "bufaux.h" | 28 | #include "bufaux.h" |
@@ -288,7 +288,7 @@ send_status(u_int32_t id, u_int32_t error) | |||
288 | buffer_put_int(&msg, id); | 288 | buffer_put_int(&msg, id); |
289 | buffer_put_int(&msg, error); | 289 | buffer_put_int(&msg, error); |
290 | if (version >= 3) { | 290 | if (version >= 3) { |
291 | buffer_put_cstring(&msg, | 291 | buffer_put_cstring(&msg, |
292 | status_messages[MIN(error,SSH2_FX_MAX)]); | 292 | status_messages[MIN(error,SSH2_FX_MAX)]); |
293 | buffer_put_cstring(&msg, ""); | 293 | buffer_put_cstring(&msg, ""); |
294 | } | 294 | } |
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | 26 | ||
27 | RCSID("$OpenBSD: sftp.c,v 1.11 2001/03/07 10:11:23 djm Exp $"); | 27 | RCSID("$OpenBSD: sftp.c,v 1.12 2001/04/05 10:42:54 markus Exp $"); |
28 | 28 | ||
29 | /* XXX: commandline mode */ | 29 | /* XXX: commandline mode */ |
30 | /* XXX: copy between two remote hosts (commandline) */ | 30 | /* XXX: copy between two remote hosts (commandline) */ |
@@ -191,9 +191,9 @@ main(int argc, char **argv) | |||
191 | case 'b': | 191 | case 'b': |
192 | if (infile == stdin) { | 192 | if (infile == stdin) { |
193 | infile = fopen(optarg, "r"); | 193 | infile = fopen(optarg, "r"); |
194 | if (infile == NULL) | 194 | if (infile == NULL) |
195 | fatal("%s (%s).", strerror(errno), optarg); | 195 | fatal("%s (%s).", strerror(errno), optarg); |
196 | } else | 196 | } else |
197 | fatal("Filename already specified."); | 197 | fatal("Filename already specified."); |
198 | break; | 198 | break; |
199 | case 'h': | 199 | case 'h': |
diff --git a/ssh-keygen.c b/ssh-keygen.c index b0f814475..0469ca5b6 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.54 2001/04/03 13:56:11 stevesk Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.55 2001/04/05 10:42:54 markus Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -118,7 +118,7 @@ try_load_pem_key(char *filename) | |||
118 | char *pass; | 118 | char *pass; |
119 | Key *prv; | 119 | Key *prv; |
120 | 120 | ||
121 | prv = key_load_private(filename, "", NULL); | 121 | prv = key_load_private(filename, "", NULL); |
122 | if (prv == NULL) { | 122 | if (prv == NULL) { |
123 | pass = read_passphrase("Enter passphrase: ", 1); | 123 | pass = read_passphrase("Enter passphrase: ", 1); |
124 | prv = key_load_private(filename, pass, NULL); | 124 | prv = key_load_private(filename, pass, NULL); |
diff --git a/sshconnect.c b/sshconnect.c index d4f510b11..754ac1243 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect.c,v 1.101 2001/03/26 08:07:09 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect.c,v 1.102 2001/04/05 10:42:55 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | 19 | ||
@@ -265,7 +265,7 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, | |||
265 | temporarily_use_uid(original_real_uid); | 265 | temporarily_use_uid(original_real_uid); |
266 | if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) { | 266 | if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) { |
267 | /* Successful connection. */ | 267 | /* Successful connection. */ |
268 | memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen); | 268 | memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen); |
269 | restore_uid(); | 269 | restore_uid(); |
270 | break; | 270 | break; |
271 | } else { | 271 | } else { |
diff --git a/sshconnect2.c b/sshconnect2.c index 918ab38e8..da5b71478 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.66 2001/04/04 20:25:38 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.67 2001/04/05 10:42:56 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/md5.h> | 29 | #include <openssl/md5.h> |
@@ -642,7 +642,7 @@ int agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | |||
642 | int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, | 642 | int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp, |
643 | u_char *data, int datalen) | 643 | u_char *data, int datalen) |
644 | { | 644 | { |
645 | return key_sign(key, sigp, lenp, data, datalen); | 645 | return key_sign(key, sigp, lenp, data, datalen); |
646 | } | 646 | } |
647 | 647 | ||
648 | int | 648 | int |
@@ -825,7 +825,7 @@ static char *preferred = NULL; | |||
825 | /* | 825 | /* |
826 | * Given the authentication method list sent by the server, return the | 826 | * Given the authentication method list sent by the server, return the |
827 | * next method we should try. If the server initially sends a nil list, | 827 | * next method we should try. If the server initially sends a nil list, |
828 | * use a built-in default list. | 828 | * use a built-in default list. |
829 | */ | 829 | */ |
830 | Authmethod * | 830 | Authmethod * |
831 | authmethod_get(char *authlist) | 831 | authmethod_get(char *authlist) |
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: sshd.c,v 1.190 2001/04/04 20:25:38 markus Exp $"); | 43 | RCSID("$OpenBSD: sshd.c,v 1.191 2001/04/05 10:42:57 markus Exp $"); |
44 | 44 | ||
45 | #include <openssl/dh.h> | 45 | #include <openssl/dh.h> |
46 | #include <openssl/bn.h> | 46 | #include <openssl/bn.h> |
@@ -282,11 +282,11 @@ generate_ephemeral_server_key(void) | |||
282 | u_int32_t rand = 0; | 282 | u_int32_t rand = 0; |
283 | int i; | 283 | int i; |
284 | 284 | ||
285 | verbose("Generating %s%d bit RSA key.", | 285 | verbose("Generating %s%d bit RSA key.", |
286 | sensitive_data.server_key ? "new " : "", options.server_key_bits); | 286 | sensitive_data.server_key ? "new " : "", options.server_key_bits); |
287 | if (sensitive_data.server_key != NULL) | 287 | if (sensitive_data.server_key != NULL) |
288 | key_free(sensitive_data.server_key); | 288 | key_free(sensitive_data.server_key); |
289 | sensitive_data.server_key = key_generate(KEY_RSA1, | 289 | sensitive_data.server_key = key_generate(KEY_RSA1, |
290 | options.server_key_bits); | 290 | options.server_key_bits); |
291 | verbose("RSA key generation complete."); | 291 | verbose("RSA key generation complete."); |
292 | 292 | ||
@@ -341,7 +341,7 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /* Read other side's version identification. */ | 343 | /* Read other side's version identification. */ |
344 | memset(buf, 0, sizeof(buf)); | 344 | memset(buf, 0, sizeof(buf)); |
345 | for (i = 0; i < sizeof(buf) - 1; i++) { | 345 | for (i = 0; i < sizeof(buf) - 1; i++) { |
346 | if (atomicio(read, sock_in, &buf[i], 1) != 1) { | 346 | if (atomicio(read, sock_in, &buf[i], 1) != 1) { |
347 | log("Did not receive identification string from %s.", | 347 | log("Did not receive identification string from %s.", |