diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | auth-krb5.c | 4 | ||||
-rw-r--r-- | auth-rh-rsa.c | 4 | ||||
-rw-r--r-- | auth.c | 10 | ||||
-rw-r--r-- | cipher.c | 12 | ||||
-rw-r--r-- | key.c | 4 | ||||
-rw-r--r-- | misc.h | 8 | ||||
-rw-r--r-- | packet.c | 8 | ||||
-rw-r--r-- | session.c | 4 | ||||
-rw-r--r-- | sftp-client.c | 32 | ||||
-rw-r--r-- | sftp-glob.h | 4 | ||||
-rw-r--r-- | sftp.c | 12 | ||||
-rw-r--r-- | ssh-add.c | 6 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | sshconnect2.c | 4 | ||||
-rw-r--r-- | sshd.c | 10 | ||||
-rw-r--r-- | ttymodes.c | 18 |
17 files changed, 78 insertions, 73 deletions
@@ -89,6 +89,11 @@ | |||
89 | - markus@cvs.openbsd.org 2002/03/19 10:35:39 | 89 | - markus@cvs.openbsd.org 2002/03/19 10:35:39 |
90 | [auth-options.c auth.h session.c session.h sshd.c] | 90 | [auth-options.c auth.h session.c session.h sshd.c] |
91 | clean up prototypes | 91 | clean up prototypes |
92 | - markus@cvs.openbsd.org 2002/03/19 10:49:35 | ||
93 | [auth-krb5.c auth-rh-rsa.c auth.c cipher.c key.c misc.h packet.c session.c | ||
94 | sftp-client.c sftp-glob.h sftp.c ssh-add.c ssh.c sshconnect2.c sshd.c | ||
95 | ttymodes.c] | ||
96 | KNF whitespace | ||
92 | 97 | ||
93 | 20020317 | 98 | 20020317 |
94 | - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted, | 99 | - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is wanted, |
@@ -7935,4 +7940,4 @@ | |||
7935 | - Wrote replacements for strlcpy and mkdtemp | 7940 | - Wrote replacements for strlcpy and mkdtemp |
7936 | - Released 1.0pre1 | 7941 | - Released 1.0pre1 |
7937 | 7942 | ||
7938 | $Id: ChangeLog,v 1.1950 2002/03/22 02:50:06 mouring Exp $ | 7943 | $Id: ChangeLog,v 1.1951 2002/03/22 02:54:23 mouring Exp $ |
diff --git a/auth-krb5.c b/auth-krb5.c index 0a2fd4ba3..f878b511f 100644 --- a/auth-krb5.c +++ b/auth-krb5.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Kerberos v5 authentication and ticket-passing routines. | 2 | * Kerberos v5 authentication and ticket-passing routines. |
3 | * | 3 | * |
4 | * $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $ | 4 | * $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $ |
5 | */ | 5 | */ |
6 | /* | 6 | /* |
@@ -28,7 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "includes.h" | 30 | #include "includes.h" |
31 | RCSID("$OpenBSD: auth-krb5.c,v 1.7 2002/03/16 17:41:25 stevesk Exp $"); | 31 | RCSID("$OpenBSD: auth-krb5.c,v 1.8 2002/03/19 10:49:35 markus Exp $"); |
32 | 32 | ||
33 | #include "ssh.h" | 33 | #include "ssh.h" |
34 | #include "ssh1.h" | 34 | #include "ssh1.h" |
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index c940ec581..75fd0b257 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: auth-rh-rsa.c,v 1.32 2002/03/18 17:50:31 provos Exp $"); | 16 | RCSID("$OpenBSD: auth-rh-rsa.c,v 1.33 2002/03/19 10:49:35 markus Exp $"); |
17 | 17 | ||
18 | #include "packet.h" | 18 | #include "packet.h" |
19 | #include "uidswap.h" | 19 | #include "uidswap.h" |
@@ -49,7 +49,7 @@ auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost, | |||
49 | chost, _PATH_SSH_SYSTEM_HOSTFILE, | 49 | chost, _PATH_SSH_SYSTEM_HOSTFILE, |
50 | options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE); | 50 | options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE); |
51 | 51 | ||
52 | return (host_status == HOST_OK); | 52 | return (host_status == HOST_OK); |
53 | } | 53 | } |
54 | 54 | ||
55 | /* | 55 | /* |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth.c,v 1.38 2002/03/18 03:41:08 provos Exp $"); | 26 | RCSID("$OpenBSD: auth.c,v 1.39 2002/03/19 10:49:35 markus Exp $"); |
27 | 27 | ||
28 | #ifdef HAVE_LOGIN_H | 28 | #ifdef HAVE_LOGIN_H |
29 | #include <login.h> | 29 | #include <login.h> |
@@ -125,17 +125,17 @@ allowed_user(struct passwd * pw) | |||
125 | /* Return false if user is listed in DenyUsers */ | 125 | /* Return false if user is listed in DenyUsers */ |
126 | if (options.num_deny_users > 0) { | 126 | if (options.num_deny_users > 0) { |
127 | for (i = 0; i < options.num_deny_users; i++) | 127 | for (i = 0; i < options.num_deny_users; i++) |
128 | if (match_user(pw->pw_name, hostname, ipaddr, | 128 | if (match_user(pw->pw_name, hostname, ipaddr, |
129 | options.deny_users[i])) { | 129 | options.deny_users[i])) { |
130 | log("User %.100s not allowed because listed in DenyUsers", | 130 | log("User %.100s not allowed because listed in DenyUsers", |
131 | pw->pw_name); | 131 | pw->pw_name); |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | } | 134 | } |
135 | /* Return false if AllowUsers isn't empty and user isn't listed there */ | 135 | /* Return false if AllowUsers isn't empty and user isn't listed there */ |
136 | if (options.num_allow_users > 0) { | 136 | if (options.num_allow_users > 0) { |
137 | for (i = 0; i < options.num_allow_users; i++) | 137 | for (i = 0; i < options.num_allow_users; i++) |
138 | if (match_user(pw->pw_name, hostname, ipaddr, | 138 | if (match_user(pw->pw_name, hostname, ipaddr, |
139 | options.allow_users[i])) | 139 | options.allow_users[i])) |
140 | break; | 140 | break; |
141 | /* i < options.num_allow_users iff we break for loop */ | 141 | /* i < options.num_allow_users iff we break for loop */ |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: cipher.c,v 1.53 2002/03/18 17:13:15 markus Exp $"); | 38 | RCSID("$OpenBSD: cipher.c,v 1.54 2002/03/19 10:49:35 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "log.h" | 41 | #include "log.h" |
@@ -78,17 +78,17 @@ struct Cipher { | |||
78 | 78 | ||
79 | /*--*/ | 79 | /*--*/ |
80 | 80 | ||
81 | u_int | 81 | u_int |
82 | cipher_blocksize(Cipher *c) | 82 | cipher_blocksize(Cipher *c) |
83 | { | 83 | { |
84 | return (c->block_size); | 84 | return (c->block_size); |
85 | } | 85 | } |
86 | u_int | 86 | u_int |
87 | cipher_keylen(Cipher *c) | 87 | cipher_keylen(Cipher *c) |
88 | { | 88 | { |
89 | return (c->key_len); | 89 | return (c->key_len); |
90 | } | 90 | } |
91 | u_int | 91 | u_int |
92 | cipher_get_number(Cipher *c) | 92 | cipher_get_number(Cipher *c) |
93 | { | 93 | { |
94 | return (c->number); | 94 | return (c->number); |
@@ -509,7 +509,7 @@ ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, | |||
509 | rijndael_decrypt(&c->r_ctx, cnow, plain); | 509 | rijndael_decrypt(&c->r_ctx, cnow, plain); |
510 | } | 510 | } |
511 | 511 | ||
512 | /* | 512 | /* |
513 | * Exports an IV from the CipherContext required to export the key | 513 | * Exports an IV from the CipherContext required to export the key |
514 | * state back from the unprivileged child to the privileged parent | 514 | * state back from the unprivileged child to the privileged parent |
515 | * process. | 515 | * process. |
@@ -612,7 +612,7 @@ cipher_set_keyiv(CipherContext *cc, u_char *iv) | |||
612 | memcpy(desc->k2.iv, iv + 8, 8); | 612 | memcpy(desc->k2.iv, iv + 8, 8); |
613 | memcpy(desc->k3.iv, iv + 16, 8); | 613 | memcpy(desc->k3.iv, iv + 16, 8); |
614 | return; | 614 | return; |
615 | } | 615 | } |
616 | default: | 616 | default: |
617 | fatal("%s: bad cipher %d", __FUNCTION__, c->number); | 617 | fatal("%s: bad cipher %d", __FUNCTION__, c->number); |
618 | } | 618 | } |
@@ -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.42 2002/03/18 17:23:31 markus Exp $"); | 35 | RCSID("$OpenBSD: key.c,v 1.43 2002/03/19 10:49:35 markus Exp $"); |
36 | 36 | ||
37 | #include <openssl/evp.h> | 37 | #include <openssl/evp.h> |
38 | 38 | ||
@@ -808,7 +808,7 @@ Key * | |||
808 | key_demote(Key *k) | 808 | key_demote(Key *k) |
809 | { | 809 | { |
810 | Key *pk; | 810 | Key *pk; |
811 | 811 | ||
812 | pk = xmalloc(sizeof(*pk)); | 812 | pk = xmalloc(sizeof(*pk)); |
813 | pk->type = k->type; | 813 | pk->type = k->type; |
814 | pk->flags = k->flags; | 814 | pk->flags = k->flags; |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.11 2002/01/24 21:09:25 stevesk Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.12 2002/03/19 10:49:35 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -26,9 +26,9 @@ struct passwd *pwcopy(struct passwd *); | |||
26 | 26 | ||
27 | typedef struct arglist arglist; | 27 | typedef struct arglist arglist; |
28 | struct arglist { | 28 | struct arglist { |
29 | char **list; | 29 | char **list; |
30 | int num; | 30 | int num; |
31 | int nalloc; | 31 | int nalloc; |
32 | }; | 32 | }; |
33 | void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); | 33 | void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); |
34 | 34 | ||
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.91 2002/03/18 17:16:38 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.92 2002/03/19 10:49:35 markus Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -173,7 +173,7 @@ packet_connection_is_on_socket(void) | |||
173 | return 1; | 173 | return 1; |
174 | } | 174 | } |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * Exports an IV from the CipherContext required to export the key | 177 | * Exports an IV from the CipherContext required to export the key |
178 | * state back from the unprivileged child to the privileged parent | 178 | * state back from the unprivileged child to the privileged parent |
179 | * process. | 179 | * process. |
@@ -196,7 +196,7 @@ int | |||
196 | packet_get_keycontext(int mode, u_char *dat) | 196 | packet_get_keycontext(int mode, u_char *dat) |
197 | { | 197 | { |
198 | CipherContext *cc; | 198 | CipherContext *cc; |
199 | 199 | ||
200 | if (mode == MODE_OUT) | 200 | if (mode == MODE_OUT) |
201 | cc = &send_context; | 201 | cc = &send_context; |
202 | else | 202 | else |
@@ -209,7 +209,7 @@ void | |||
209 | packet_set_keycontext(int mode, u_char *dat) | 209 | packet_set_keycontext(int mode, u_char *dat) |
210 | { | 210 | { |
211 | CipherContext *cc; | 211 | CipherContext *cc; |
212 | 212 | ||
213 | if (mode == MODE_OUT) | 213 | if (mode == MODE_OUT) |
214 | cc = &send_context; | 214 | cc = &send_context; |
215 | else | 215 | else |
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.131 2002/03/19 10:35:39 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.132 2002/03/19 10:49:35 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -1431,7 +1431,7 @@ session_pty_req(Session *s) | |||
1431 | { | 1431 | { |
1432 | u_int len; | 1432 | u_int len; |
1433 | int n_bytes; | 1433 | int n_bytes; |
1434 | 1434 | ||
1435 | if (no_pty_flag) { | 1435 | if (no_pty_flag) { |
1436 | debug("Allocating a pty not permitted for this authentication."); | 1436 | debug("Allocating a pty not permitted for this authentication."); |
1437 | return 0; | 1437 | return 0; |
diff --git a/sftp-client.c b/sftp-client.c index fd2526710..ce82b6af5 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -28,7 +28,7 @@ | |||
28 | /* XXX: copy between two remote sites */ | 28 | /* XXX: copy between two remote sites */ |
29 | 29 | ||
30 | #include "includes.h" | 30 | #include "includes.h" |
31 | RCSID("$OpenBSD: sftp-client.c,v 1.27 2002/03/11 03:19:53 itojun Exp $"); | 31 | RCSID("$OpenBSD: sftp-client.c,v 1.28 2002/03/19 10:49:35 markus Exp $"); |
32 | 32 | ||
33 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) | 33 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) |
34 | #include <sys/queue.h> | 34 | #include <sys/queue.h> |
@@ -449,7 +449,7 @@ do_rm(struct sftp_conn *conn, char *path) | |||
449 | debug2("Sending SSH2_FXP_REMOVE \"%s\"", path); | 449 | debug2("Sending SSH2_FXP_REMOVE \"%s\"", path); |
450 | 450 | ||
451 | id = conn->msg_id++; | 451 | id = conn->msg_id++; |
452 | send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path, | 452 | send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path, |
453 | strlen(path)); | 453 | strlen(path)); |
454 | status = get_status(conn->fd_in, id); | 454 | status = get_status(conn->fd_in, id); |
455 | if (status != SSH2_FX_OK) | 455 | if (status != SSH2_FX_OK) |
@@ -496,8 +496,8 @@ do_stat(struct sftp_conn *conn, char *path, int quiet) | |||
496 | 496 | ||
497 | id = conn->msg_id++; | 497 | id = conn->msg_id++; |
498 | 498 | ||
499 | send_string_request(conn->fd_out, id, | 499 | send_string_request(conn->fd_out, id, |
500 | conn->version == 0 ? SSH2_FXP_STAT_VERSION_0 : SSH2_FXP_STAT, | 500 | conn->version == 0 ? SSH2_FXP_STAT_VERSION_0 : SSH2_FXP_STAT, |
501 | path, strlen(path)); | 501 | path, strlen(path)); |
502 | 502 | ||
503 | return(get_decode_stat(conn->fd_in, id, quiet)); | 503 | return(get_decode_stat(conn->fd_in, id, quiet)); |
@@ -727,7 +727,7 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len, | |||
727 | char *handle, u_int handle_len) | 727 | char *handle, u_int handle_len) |
728 | { | 728 | { |
729 | Buffer msg; | 729 | Buffer msg; |
730 | 730 | ||
731 | buffer_init(&msg); | 731 | buffer_init(&msg); |
732 | buffer_clear(&msg); | 732 | buffer_clear(&msg); |
733 | buffer_put_char(&msg, SSH2_FXP_READ); | 733 | buffer_put_char(&msg, SSH2_FXP_READ); |
@@ -737,7 +737,7 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len, | |||
737 | buffer_put_int(&msg, len); | 737 | buffer_put_int(&msg, len); |
738 | send_msg(fd_out, &msg); | 738 | send_msg(fd_out, &msg); |
739 | buffer_free(&msg); | 739 | buffer_free(&msg); |
740 | } | 740 | } |
741 | 741 | ||
742 | int | 742 | int |
743 | do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | 743 | do_download(struct sftp_conn *conn, char *remote_path, char *local_path, |
@@ -754,7 +754,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
754 | u_int id; | 754 | u_int id; |
755 | u_int len; | 755 | u_int len; |
756 | u_int64_t offset; | 756 | u_int64_t offset; |
757 | TAILQ_ENTRY(request) tq; | 757 | TAILQ_ENTRY(request) tq; |
758 | }; | 758 | }; |
759 | TAILQ_HEAD(reqhead, request) requests; | 759 | TAILQ_HEAD(reqhead, request) requests; |
760 | struct request *req; | 760 | struct request *req; |
@@ -820,7 +820,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
820 | 820 | ||
821 | /* Send some more requests */ | 821 | /* Send some more requests */ |
822 | while (num_req < max_req) { | 822 | while (num_req < max_req) { |
823 | debug3("Request range %llu -> %llu (%d/%d)", | 823 | debug3("Request range %llu -> %llu (%d/%d)", |
824 | (unsigned long long)offset, | 824 | (unsigned long long)offset, |
825 | (unsigned long long)offset + buflen - 1, | 825 | (unsigned long long)offset + buflen - 1, |
826 | num_req, max_req); | 826 | num_req, max_req); |
@@ -831,7 +831,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
831 | offset += buflen; | 831 | offset += buflen; |
832 | num_req++; | 832 | num_req++; |
833 | TAILQ_INSERT_TAIL(&requests, req, tq); | 833 | TAILQ_INSERT_TAIL(&requests, req, tq); |
834 | send_read_request(conn->fd_out, req->id, req->offset, | 834 | send_read_request(conn->fd_out, req->id, req->offset, |
835 | req->len, handle, handle_len); | 835 | req->len, handle, handle_len); |
836 | } | 836 | } |
837 | 837 | ||
@@ -862,7 +862,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
862 | case SSH2_FXP_DATA: | 862 | case SSH2_FXP_DATA: |
863 | data = buffer_get_string(&msg, &len); | 863 | data = buffer_get_string(&msg, &len); |
864 | debug3("Received data %llu -> %llu", | 864 | debug3("Received data %llu -> %llu", |
865 | (unsigned long long)req->offset, | 865 | (unsigned long long)req->offset, |
866 | (unsigned long long)req->offset + len - 1); | 866 | (unsigned long long)req->offset + len - 1); |
867 | if (len > req->len) | 867 | if (len > req->len) |
868 | fatal("Received more data than asked for " | 868 | fatal("Received more data than asked for " |
@@ -884,13 +884,13 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
884 | /* Resend the request for the missing data */ | 884 | /* Resend the request for the missing data */ |
885 | debug3("Short data block, re-requesting " | 885 | debug3("Short data block, re-requesting " |
886 | "%llu -> %llu (%2d)", | 886 | "%llu -> %llu (%2d)", |
887 | (unsigned long long)req->offset + len, | 887 | (unsigned long long)req->offset + len, |
888 | (unsigned long long)req->offset + | 888 | (unsigned long long)req->offset + |
889 | req->len - 1, num_req); | 889 | req->len - 1, num_req); |
890 | req->id = conn->msg_id++; | 890 | req->id = conn->msg_id++; |
891 | req->len -= len; | 891 | req->len -= len; |
892 | req->offset += len; | 892 | req->offset += len; |
893 | send_read_request(conn->fd_out, req->id, | 893 | send_read_request(conn->fd_out, req->id, |
894 | req->offset, req->len, handle, handle_len); | 894 | req->offset, req->len, handle, handle_len); |
895 | /* Reduce the request size */ | 895 | /* Reduce the request size */ |
896 | if (len < buflen) | 896 | if (len < buflen) |
@@ -921,7 +921,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, | |||
921 | fatal("Transfer complete, but requests still in queue"); | 921 | fatal("Transfer complete, but requests still in queue"); |
922 | 922 | ||
923 | if (read_error) { | 923 | if (read_error) { |
924 | error("Couldn't read from remote file \"%s\" : %s", | 924 | error("Couldn't read from remote file \"%s\" : %s", |
925 | remote_path, fx2txt(status)); | 925 | remote_path, fx2txt(status)); |
926 | do_close(conn, handle, handle_len); | 926 | do_close(conn, handle, handle_len); |
927 | } else if (write_error) { | 927 | } else if (write_error) { |
@@ -974,7 +974,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
974 | u_int id; | 974 | u_int id; |
975 | u_int len; | 975 | u_int len; |
976 | u_int64_t offset; | 976 | u_int64_t offset; |
977 | TAILQ_ENTRY(outstanding_ack) tq; | 977 | TAILQ_ENTRY(outstanding_ack) tq; |
978 | }; | 978 | }; |
979 | TAILQ_HEAD(ackhead, outstanding_ack) acks; | 979 | TAILQ_HEAD(ackhead, outstanding_ack) acks; |
980 | struct outstanding_ack *ack; | 980 | struct outstanding_ack *ack; |
@@ -1063,7 +1063,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
1063 | if (ack == NULL) | 1063 | if (ack == NULL) |
1064 | fatal("Unexpected ACK %u", id); | 1064 | fatal("Unexpected ACK %u", id); |
1065 | 1065 | ||
1066 | if (id == startid || len == 0 || | 1066 | if (id == startid || len == 0 || |
1067 | id - ackid >= conn->num_requests) { | 1067 | id - ackid >= conn->num_requests) { |
1068 | buffer_clear(&msg); | 1068 | buffer_clear(&msg); |
1069 | get_msg(conn->fd_in, &msg); | 1069 | get_msg(conn->fd_in, &msg); |
@@ -1093,7 +1093,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, | |||
1093 | close(local_fd); | 1093 | close(local_fd); |
1094 | goto done; | 1094 | goto done; |
1095 | } | 1095 | } |
1096 | debug3("In write loop, ack for %u %d bytes at %llu", | 1096 | debug3("In write loop, ack for %u %d bytes at %llu", |
1097 | ack->id, ack->len, (unsigned long long)ack->offset); | 1097 | ack->id, ack->len, (unsigned long long)ack->offset); |
1098 | ++ackid; | 1098 | ++ackid; |
1099 | free(ack); | 1099 | free(ack); |
diff --git a/sftp-glob.h b/sftp-glob.h index 488b0a80b..9c754912c 100644 --- a/sftp-glob.h +++ b/sftp-glob.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp-glob.h,v 1.6 2002/02/13 00:59:23 djm Exp $ */ | 1 | /* $OpenBSD: sftp-glob.h,v 1.7 2002/03/19 10:49:35 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001,2002 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2001,2002 Damien Miller. All rights reserved. |
@@ -32,7 +32,7 @@ | |||
32 | #include "sftp-client.h" | 32 | #include "sftp-client.h" |
33 | 33 | ||
34 | int | 34 | int |
35 | remote_glob(struct sftp_conn *, const char *, int, | 35 | remote_glob(struct sftp_conn *, const char *, int, |
36 | int (*)(const char *, int), glob_t *); | 36 | int (*)(const char *, int), glob_t *); |
37 | 37 | ||
38 | #endif | 38 | #endif |
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | 26 | ||
27 | RCSID("$OpenBSD: sftp.c,v 1.26 2002/02/12 12:32:27 djm Exp $"); | 27 | RCSID("$OpenBSD: sftp.c,v 1.27 2002/03/19 10:49:35 markus Exp $"); |
28 | 28 | ||
29 | /* XXX: short-form remote directory listings (like 'ls -C') */ | 29 | /* XXX: short-form remote directory listings (like 'ls -C') */ |
30 | 30 | ||
@@ -94,7 +94,7 @@ static void | |||
94 | usage(void) | 94 | usage(void) |
95 | { | 95 | { |
96 | extern char *__progname; | 96 | extern char *__progname; |
97 | 97 | ||
98 | fprintf(stderr, | 98 | fprintf(stderr, |
99 | "usage: %s [-vC1] [-b batchfile] [-o option] [-s subsystem|path] [-B buffer_size]\n" | 99 | "usage: %s [-vC1] [-b batchfile] [-o option] [-s subsystem|path] [-B buffer_size]\n" |
100 | " [-F config] [-P direct server path] [-S program]\n" | 100 | " [-F config] [-P direct server path] [-S program]\n" |
@@ -172,7 +172,7 @@ main(int argc, char **argv) | |||
172 | case 'R': | 172 | case 'R': |
173 | num_requests = strtol(optarg, &cp, 10); | 173 | num_requests = strtol(optarg, &cp, 10); |
174 | if (num_requests == 0 || *cp != '\0') | 174 | if (num_requests == 0 || *cp != '\0') |
175 | fatal("Invalid number of requests \"%s\"", | 175 | fatal("Invalid number of requests \"%s\"", |
176 | optarg); | 176 | optarg); |
177 | break; | 177 | break; |
178 | case 'h': | 178 | case 'h': |
@@ -218,19 +218,19 @@ main(int argc, char **argv) | |||
218 | addargs(&args, "-s"); | 218 | addargs(&args, "-s"); |
219 | 219 | ||
220 | addargs(&args, "%s", host); | 220 | addargs(&args, "%s", host); |
221 | addargs(&args, "%s", (sftp_server != NULL ? | 221 | addargs(&args, "%s", (sftp_server != NULL ? |
222 | sftp_server : "sftp")); | 222 | sftp_server : "sftp")); |
223 | args.list[0] = ssh_program; | 223 | args.list[0] = ssh_program; |
224 | 224 | ||
225 | fprintf(stderr, "Connecting to %s...\n", host); | 225 | fprintf(stderr, "Connecting to %s...\n", host); |
226 | connect_to_server(ssh_program, args.list, &in, &out, | 226 | connect_to_server(ssh_program, args.list, &in, &out, |
227 | &sshpid); | 227 | &sshpid); |
228 | } else { | 228 | } else { |
229 | args.list = NULL; | 229 | args.list = NULL; |
230 | addargs(&args, "sftp-server"); | 230 | addargs(&args, "sftp-server"); |
231 | 231 | ||
232 | fprintf(stderr, "Attaching to %s...\n", sftp_direct); | 232 | fprintf(stderr, "Attaching to %s...\n", sftp_direct); |
233 | connect_to_server(sftp_direct, args.list, &in, &out, | 233 | connect_to_server(sftp_direct, args.list, &in, &out, |
234 | &sshpid); | 234 | &sshpid); |
235 | } | 235 | } |
236 | 236 | ||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: ssh-add.c,v 1.50 2002/01/29 14:27:57 markus Exp $"); | 38 | RCSID("$OpenBSD: ssh-add.c,v 1.51 2002/03/19 10:49:35 markus Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -62,7 +62,7 @@ extern char *__progname; | |||
62 | static char *default_files[] = { | 62 | static char *default_files[] = { |
63 | _PATH_SSH_CLIENT_ID_RSA, | 63 | _PATH_SSH_CLIENT_ID_RSA, |
64 | _PATH_SSH_CLIENT_ID_DSA, | 64 | _PATH_SSH_CLIENT_ID_DSA, |
65 | _PATH_SSH_CLIENT_IDENTITY, | 65 | _PATH_SSH_CLIENT_IDENTITY, |
66 | NULL | 66 | NULL |
67 | }; | 67 | }; |
68 | 68 | ||
@@ -319,7 +319,7 @@ main(int argc, char **argv) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | for(i = 0; default_files[i]; i++) { | 321 | for(i = 0; default_files[i]; i++) { |
322 | snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, | 322 | snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, |
323 | default_files[i]); | 323 | default_files[i]); |
324 | if (do_file(ac, deleting, buf) == -1) | 324 | if (do_file(ac, deleting, buf) == -1) |
325 | ret = 1; | 325 | ret = 1; |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.164 2002/02/14 23:28:00 markus Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.165 2002/03/19 10:49:35 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -475,7 +475,7 @@ again: | |||
475 | /* NOTREACHED */ | 475 | /* NOTREACHED */ |
476 | } | 476 | } |
477 | if ((fwd_port = a2port(sfwd_port)) == 0 || | 477 | if ((fwd_port = a2port(sfwd_port)) == 0 || |
478 | (fwd_host_port = a2port(sfwd_host_port)) == 0) { | 478 | (fwd_host_port = a2port(sfwd_host_port)) == 0) { |
479 | fprintf(stderr, | 479 | fprintf(stderr, |
480 | "Bad forwarding port(s) '%s'\n", optarg); | 480 | "Bad forwarding port(s) '%s'\n", optarg); |
481 | exit(1); | 481 | exit(1); |
diff --git a/sshconnect2.c b/sshconnect2.c index c5b5ee515..fbd18aaa7 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.97 2002/02/25 16:33:27 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.98 2002/03/19 10:49:35 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh.h" | 28 | #include "ssh.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -391,7 +391,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) | |||
391 | debug("no key from blob. pkalg %s", pkalg); | 391 | debug("no key from blob. pkalg %s", pkalg); |
392 | break; | 392 | break; |
393 | } | 393 | } |
394 | if (key->type != pktype) { | 394 | if (key->type != pktype) { |
395 | error("input_userauth_pk_ok: type mismatch " | 395 | error("input_userauth_pk_ok: type mismatch " |
396 | "for decoded key (received %d, expected %d)", | 396 | "for decoded key (received %d, expected %d)", |
397 | key->type, pktype); | 397 | key->type, pktype); |
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.233 2002/03/19 10:35:39 markus Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.234 2002/03/19 10:49:35 markus Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -538,7 +538,7 @@ privsep_preauth_child(void) | |||
538 | strerror(errno)); | 538 | strerror(errno)); |
539 | if (chdir("/") == -1) | 539 | if (chdir("/") == -1) |
540 | fatal("chdir(/)"); | 540 | fatal("chdir(/)"); |
541 | 541 | ||
542 | /* Drop our privileges */ | 542 | /* Drop our privileges */ |
543 | setegid(options.unprivileged_group); | 543 | setegid(options.unprivileged_group); |
544 | setgid(options.unprivileged_group); | 544 | setgid(options.unprivileged_group); |
@@ -564,7 +564,7 @@ privsep_postauth(Authctxt *authctxt, pid_t pid) | |||
564 | use_privsep = 0; | 564 | use_privsep = 0; |
565 | return; | 565 | return; |
566 | } | 566 | } |
567 | 567 | ||
568 | /* Authentication complete */ | 568 | /* Authentication complete */ |
569 | alarm(0); | 569 | alarm(0); |
570 | if (startup_pipe != -1) { | 570 | if (startup_pipe != -1) { |
@@ -1376,7 +1376,7 @@ main(int ac, char **av) | |||
1376 | 1376 | ||
1377 | if (!use_privsep) | 1377 | if (!use_privsep) |
1378 | goto skip_privilegeseparation; | 1378 | goto skip_privilegeseparation; |
1379 | 1379 | ||
1380 | /* Set up unprivileged child process to deal with network data */ | 1380 | /* Set up unprivileged child process to deal with network data */ |
1381 | monitor = monitor_init(); | 1381 | monitor = monitor_init(); |
1382 | /* Store a pointer to the kex for later rekeying */ | 1382 | /* Store a pointer to the kex for later rekeying */ |
@@ -1422,7 +1422,7 @@ main(int ac, char **av) | |||
1422 | exit(0); | 1422 | exit(0); |
1423 | 1423 | ||
1424 | authenticated: | 1424 | authenticated: |
1425 | /* | 1425 | /* |
1426 | * In privilege separation, we fork another child and prepare | 1426 | * In privilege separation, we fork another child and prepare |
1427 | * file descriptor passing. | 1427 | * file descriptor passing. |
1428 | */ | 1428 | */ |
diff --git a/ttymodes.c b/ttymodes.c index ccc001f20..8afdff1a4 100644 --- a/ttymodes.c +++ b/ttymodes.c | |||
@@ -43,7 +43,7 @@ | |||
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include "includes.h" | 45 | #include "includes.h" |
46 | RCSID("$OpenBSD: ttymodes.c,v 1.16 2001/12/27 20:39:58 markus Exp $"); | 46 | RCSID("$OpenBSD: ttymodes.c,v 1.17 2002/03/19 10:49:35 markus Exp $"); |
47 | 47 | ||
48 | #include "packet.h" | 48 | #include "packet.h" |
49 | #include "log.h" | 49 | #include "log.h" |
@@ -402,17 +402,17 @@ tty_parse_modes(int fd, int *n_bytes_ptr) | |||
402 | * SSH1: | 402 | * SSH1: |
403 | * Opcodes 1 to 127 are defined to have | 403 | * Opcodes 1 to 127 are defined to have |
404 | * a one-byte argument. | 404 | * a one-byte argument. |
405 | * Opcodes 128 to 159 are defined to have | 405 | * Opcodes 128 to 159 are defined to have |
406 | * an integer argument. | 406 | * an integer argument. |
407 | */ | 407 | */ |
408 | if (opcode > 0 && opcode < 128) { | 408 | if (opcode > 0 && opcode < 128) { |
409 | n_bytes += 1; | 409 | n_bytes += 1; |
410 | (void) packet_get_char(); | 410 | (void) packet_get_char(); |
411 | break; | 411 | break; |
412 | } else if (opcode >= 128 && opcode < 160) { | 412 | } else if (opcode >= 128 && opcode < 160) { |
413 | n_bytes += 4; | 413 | n_bytes += 4; |
414 | (void) packet_get_int(); | 414 | (void) packet_get_int(); |
415 | break; | 415 | break; |
416 | } else { | 416 | } else { |
417 | /* | 417 | /* |
418 | * It is a truly undefined opcode (160 to 255). | 418 | * It is a truly undefined opcode (160 to 255). |
@@ -423,7 +423,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr) | |||
423 | */ | 423 | */ |
424 | log("parse_tty_modes: unknown opcode %d", opcode); | 424 | log("parse_tty_modes: unknown opcode %d", opcode); |
425 | goto set; | 425 | goto set; |
426 | } | 426 | } |
427 | } else { | 427 | } else { |
428 | /* | 428 | /* |
429 | * SSH2: | 429 | * SSH2: |
@@ -440,7 +440,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr) | |||
440 | log("parse_tty_modes: unknown opcode %d", opcode); | 440 | log("parse_tty_modes: unknown opcode %d", opcode); |
441 | goto set; | 441 | goto set; |
442 | } | 442 | } |
443 | } | 443 | } |
444 | } | 444 | } |
445 | } | 445 | } |
446 | 446 | ||