diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | authfd.c | 4 | ||||
-rw-r--r-- | authfile.c | 4 | ||||
-rw-r--r-- | channels.c | 4 | ||||
-rw-r--r-- | kexdh.c | 6 | ||||
-rw-r--r-- | kexgex.c | 6 | ||||
-rw-r--r-- | packet.c | 6 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | sshconnect.c | 4 | ||||
-rw-r--r-- | sshconnect1.c | 12 |
10 files changed, 30 insertions, 27 deletions
@@ -66,7 +66,10 @@ | |||
66 | [auth2.c] | 66 | [auth2.c] |
67 | style is used for bsdauth. | 67 | style is used for bsdauth. |
68 | disconnect on user/service change (ietf-drafts) | 68 | disconnect on user/service change (ietf-drafts) |
69 | 69 | - markus@cvs.openbsd.org 2001/06/07 20:23:05 | |
70 | [authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c | ||
71 | sshconnect.c sshconnect1.c] | ||
72 | use xxx_put_cstring() | ||
70 | 20010606 | 73 | 20010606 |
71 | - OpenBSD CVS Sync | 74 | - OpenBSD CVS Sync |
72 | - markus@cvs.openbsd.org 2001/05/17 21:34:15 | 75 | - markus@cvs.openbsd.org 2001/05/17 21:34:15 |
@@ -5577,4 +5580,4 @@ | |||
5577 | - Wrote replacements for strlcpy and mkdtemp | 5580 | - Wrote replacements for strlcpy and mkdtemp |
5578 | - Released 1.0pre1 | 5581 | - Released 1.0pre1 |
5579 | 5582 | ||
5580 | $Id: ChangeLog,v 1.1266 2001/06/09 01:40:00 mouring Exp $ | 5583 | $Id: ChangeLog,v 1.1267 2001/06/09 01:42:01 mouring Exp $ |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.39 2001/04/05 10:42:48 markus Exp $"); | 38 | RCSID("$OpenBSD: authfd.c,v 1.40 2001/06/07 20:23:03 markus Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -432,7 +432,7 @@ ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment) | |||
432 | buffer_put_bignum(b, key->iqmp); /* ssh key->u */ | 432 | buffer_put_bignum(b, key->iqmp); /* ssh key->u */ |
433 | buffer_put_bignum(b, key->q); /* ssh key->p, SSL key->q */ | 433 | buffer_put_bignum(b, key->q); /* ssh key->p, SSL key->q */ |
434 | buffer_put_bignum(b, key->p); /* ssh key->q, SSL key->p */ | 434 | buffer_put_bignum(b, key->p); /* ssh key->q, SSL key->p */ |
435 | buffer_put_string(b, comment, strlen(comment)); | 435 | buffer_put_cstring(b, comment); |
436 | } | 436 | } |
437 | 437 | ||
438 | void | 438 | void |
diff --git a/authfile.c b/authfile.c index db6aed83e..c4da9aad3 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include "includes.h" | 38 | #include "includes.h" |
39 | RCSID("$OpenBSD: authfile.c,v 1.35 2001/05/29 12:31:27 markus Exp $"); | 39 | RCSID("$OpenBSD: authfile.c,v 1.36 2001/06/07 20:23:03 markus Exp $"); |
40 | 40 | ||
41 | #include <openssl/err.h> | 41 | #include <openssl/err.h> |
42 | #include <openssl/evp.h> | 42 | #include <openssl/evp.h> |
@@ -125,7 +125,7 @@ key_save_private_rsa1(Key *key, const char *filename, const char *passphrase, | |||
125 | buffer_put_int(&encrypted, BN_num_bits(key->rsa->n)); | 125 | buffer_put_int(&encrypted, BN_num_bits(key->rsa->n)); |
126 | buffer_put_bignum(&encrypted, key->rsa->n); | 126 | buffer_put_bignum(&encrypted, key->rsa->n); |
127 | buffer_put_bignum(&encrypted, key->rsa->e); | 127 | buffer_put_bignum(&encrypted, key->rsa->e); |
128 | buffer_put_string(&encrypted, comment, strlen(comment)); | 128 | buffer_put_cstring(&encrypted, comment); |
129 | 129 | ||
130 | /* Allocate space for the private part of the key in the buffer. */ | 130 | /* Allocate space for the private part of the key in the buffer. */ |
131 | buffer_append_space(&encrypted, &cp, buffer_len(&buffer)); | 131 | buffer_append_space(&encrypted, &cp, buffer_len(&buffer)); |
diff --git a/channels.c b/channels.c index 2664726a2..283a70323 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.124 2001/06/05 10:24:32 markus Exp $"); | 43 | RCSID("$OpenBSD: channels.c,v 1.125 2001/06/07 20:23:04 markus Exp $"); |
44 | 44 | ||
45 | #include "ssh.h" | 45 | #include "ssh.h" |
46 | #include "ssh1.h" | 46 | #include "ssh1.h" |
@@ -1019,7 +1019,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) | |||
1019 | packet_put_int(nc->self); | 1019 | packet_put_int(nc->self); |
1020 | if (packet_get_protocol_flags() & | 1020 | if (packet_get_protocol_flags() & |
1021 | SSH_PROTOFLAG_HOST_IN_FWD_OPEN) | 1021 | SSH_PROTOFLAG_HOST_IN_FWD_OPEN) |
1022 | packet_put_string(buf, strlen(buf)); | 1022 | packet_put_cstring(buf); |
1023 | packet_send(); | 1023 | packet_send(); |
1024 | } | 1024 | } |
1025 | xfree(remote_ipaddr); | 1025 | xfree(remote_ipaddr); |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: kexdh.c,v 1.3 2001/04/04 09:48:34 markus Exp $"); | 26 | RCSID("$OpenBSD: kexdh.c,v 1.4 2001/06/07 20:23:04 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/crypto.h> | 28 | #include <openssl/crypto.h> |
29 | #include <openssl/bn.h> | 29 | #include <openssl/bn.h> |
@@ -55,8 +55,8 @@ kex_dh_hash( | |||
55 | EVP_MD_CTX md; | 55 | EVP_MD_CTX md; |
56 | 56 | ||
57 | buffer_init(&b); | 57 | buffer_init(&b); |
58 | buffer_put_string(&b, client_version_string, strlen(client_version_string)); | 58 | buffer_put_cstring(&b, client_version_string); |
59 | buffer_put_string(&b, server_version_string, strlen(server_version_string)); | 59 | buffer_put_cstring(&b, server_version_string); |
60 | 60 | ||
61 | /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ | 61 | /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ |
62 | buffer_put_int(&b, ckexinitlen+1); | 62 | buffer_put_int(&b, ckexinitlen+1); |
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: kexgex.c,v 1.5 2001/04/05 10:42:50 markus Exp $"); | 27 | RCSID("$OpenBSD: kexgex.c,v 1.6 2001/06/07 20:23:04 markus Exp $"); |
28 | 28 | ||
29 | #include <openssl/bn.h> | 29 | #include <openssl/bn.h> |
30 | 30 | ||
@@ -57,8 +57,8 @@ kexgex_hash( | |||
57 | EVP_MD_CTX md; | 57 | EVP_MD_CTX md; |
58 | 58 | ||
59 | buffer_init(&b); | 59 | buffer_init(&b); |
60 | buffer_put_string(&b, client_version_string, strlen(client_version_string)); | 60 | buffer_put_cstring(&b, client_version_string); |
61 | buffer_put_string(&b, server_version_string, strlen(server_version_string)); | 61 | buffer_put_cstring(&b, server_version_string); |
62 | 62 | ||
63 | /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ | 63 | /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ |
64 | buffer_put_int(&b, ckexinitlen+1); | 64 | buffer_put_int(&b, ckexinitlen+1); |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.64 2001/05/31 10:30:16 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.65 2001/06/07 20:23:04 markus Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -333,7 +333,7 @@ packet_put_string(const char *buf, u_int len) | |||
333 | void | 333 | void |
334 | packet_put_cstring(const char *str) | 334 | packet_put_cstring(const char *str) |
335 | { | 335 | { |
336 | buffer_put_string(&outgoing_packet, str, strlen(str)); | 336 | buffer_put_cstring(&outgoing_packet, str); |
337 | } | 337 | } |
338 | void | 338 | void |
339 | packet_put_raw(const char *buf, u_int len) | 339 | packet_put_raw(const char *buf, u_int len) |
@@ -1079,7 +1079,7 @@ packet_disconnect(const char *fmt,...) | |||
1079 | packet_put_cstring(""); | 1079 | packet_put_cstring(""); |
1080 | } else { | 1080 | } else { |
1081 | packet_start(SSH_MSG_DISCONNECT); | 1081 | packet_start(SSH_MSG_DISCONNECT); |
1082 | packet_put_string(buf, strlen(buf)); | 1082 | packet_put_cstring(buf); |
1083 | } | 1083 | } |
1084 | packet_send(); | 1084 | packet_send(); |
1085 | packet_write_wait(); | 1085 | packet_write_wait(); |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.123 2001/05/31 10:30:17 markus Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.124 2001/06/07 20:23:05 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -868,7 +868,7 @@ ssh_session(void) | |||
868 | cp = getenv("TERM"); | 868 | cp = getenv("TERM"); |
869 | if (!cp) | 869 | if (!cp) |
870 | cp = ""; | 870 | cp = ""; |
871 | packet_put_string(cp, strlen(cp)); | 871 | packet_put_cstring(cp); |
872 | 872 | ||
873 | /* Store window size in the packet. */ | 873 | /* Store window size in the packet. */ |
874 | if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) | 874 | if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) |
diff --git a/sshconnect.c b/sshconnect.c index fc7920ee8..bafdec95a 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.106 2001/05/28 23:58:35 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect.c,v 1.107 2001/06/07 20:23:05 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | 19 | ||
@@ -799,7 +799,7 @@ ssh_put_password(char *password) | |||
799 | char *padded; | 799 | char *padded; |
800 | 800 | ||
801 | if (datafellows & SSH_BUG_PASSWORDPAD) { | 801 | if (datafellows & SSH_BUG_PASSWORDPAD) { |
802 | packet_put_string(password, strlen(password)); | 802 | packet_put_cstring(password); |
803 | return; | 803 | return; |
804 | } | 804 | } |
805 | size = roundup(strlen(password) + 1, 32); | 805 | size = roundup(strlen(password) + 1, 32); |
diff --git a/sshconnect1.c b/sshconnect1.c index c0fe86293..c20613571 100644 --- a/sshconnect1.c +++ b/sshconnect1.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect1.c,v 1.32 2001/05/18 14:13:29 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect1.c,v 1.33 2001/06/07 20:23:05 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | #include <openssl/evp.h> | 19 | #include <openssl/evp.h> |
@@ -332,7 +332,7 @@ try_rhosts_rsa_authentication(const char *local_user, Key * host_key) | |||
332 | 332 | ||
333 | /* Tell the server that we are willing to authenticate using this key. */ | 333 | /* Tell the server that we are willing to authenticate using this key. */ |
334 | packet_start(SSH_CMSG_AUTH_RHOSTS_RSA); | 334 | packet_start(SSH_CMSG_AUTH_RHOSTS_RSA); |
335 | packet_put_string(local_user, strlen(local_user)); | 335 | packet_put_cstring(local_user); |
336 | packet_put_int(BN_num_bits(host_key->rsa->n)); | 336 | packet_put_int(BN_num_bits(host_key->rsa->n)); |
337 | packet_put_bignum(host_key->rsa->e); | 337 | packet_put_bignum(host_key->rsa->e); |
338 | packet_put_bignum(host_key->rsa->n); | 338 | packet_put_bignum(host_key->rsa->n); |
@@ -527,7 +527,7 @@ send_kerberos_tgt(void) | |||
527 | xfree(creds); | 527 | xfree(creds); |
528 | 528 | ||
529 | packet_start(SSH_CMSG_HAVE_KERBEROS_TGT); | 529 | packet_start(SSH_CMSG_HAVE_KERBEROS_TGT); |
530 | packet_put_string(buffer, strlen(buffer)); | 530 | packet_put_cstring(buffer); |
531 | packet_send(); | 531 | packet_send(); |
532 | packet_write_wait(); | 532 | packet_write_wait(); |
533 | 533 | ||
@@ -594,7 +594,7 @@ send_afs_tokens(void) | |||
594 | if (creds_to_radix(&creds, (u_char *) buffer, sizeof buffer) <= 0) | 594 | if (creds_to_radix(&creds, (u_char *) buffer, sizeof buffer) <= 0) |
595 | break; | 595 | break; |
596 | packet_start(SSH_CMSG_HAVE_AFS_TOKEN); | 596 | packet_start(SSH_CMSG_HAVE_AFS_TOKEN); |
597 | packet_put_string(buffer, strlen(buffer)); | 597 | packet_put_cstring(buffer); |
598 | packet_send(); | 598 | packet_send(); |
599 | packet_write_wait(); | 599 | packet_write_wait(); |
600 | 600 | ||
@@ -922,7 +922,7 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host, | |||
922 | 922 | ||
923 | /* Send the name of the user to log in as on the server. */ | 923 | /* Send the name of the user to log in as on the server. */ |
924 | packet_start(SSH_CMSG_USER); | 924 | packet_start(SSH_CMSG_USER); |
925 | packet_put_string(server_user, strlen(server_user)); | 925 | packet_put_cstring(server_user); |
926 | packet_send(); | 926 | packet_send(); |
927 | packet_write_wait(); | 927 | packet_write_wait(); |
928 | 928 | ||
@@ -980,7 +980,7 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host, | |||
980 | options.rhosts_authentication) { | 980 | options.rhosts_authentication) { |
981 | debug("Trying rhosts authentication."); | 981 | debug("Trying rhosts authentication."); |
982 | packet_start(SSH_CMSG_AUTH_RHOSTS); | 982 | packet_start(SSH_CMSG_AUTH_RHOSTS); |
983 | packet_put_string(local_user, strlen(local_user)); | 983 | packet_put_cstring(local_user); |
984 | packet_send(); | 984 | packet_send(); |
985 | packet_write_wait(); | 985 | packet_write_wait(); |
986 | 986 | ||