diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | auth-bsdauth.c | 8 | ||||
-rw-r--r-- | auth-skey.c | 6 | ||||
-rw-r--r-- | auth1.c | 4 | ||||
-rw-r--r-- | auth2-chall.c | 4 | ||||
-rw-r--r-- | auth2-none.c | 5 | ||||
-rw-r--r-- | authfd.c | 4 | ||||
-rw-r--r-- | authfd.h | 22 | ||||
-rw-r--r-- | monitor_wrap.c | 10 | ||||
-rw-r--r-- | msg.c | 4 | ||||
-rw-r--r-- | nchan.c | 4 | ||||
-rw-r--r-- | radix.c | 4 | ||||
-rw-r--r-- | readconf.c | 4 | ||||
-rw-r--r-- | scp.c | 4 | ||||
-rw-r--r-- | sftp.1 | 10 | ||||
-rw-r--r-- | ssh-add.1 | 4 | ||||
-rw-r--r-- | ssh-add.c | 4 | ||||
-rw-r--r-- | ssh-agent.1 | 4 | ||||
-rw-r--r-- | ssh-agent.c | 6 | ||||
-rw-r--r-- | ssh-keygen.1 | 4 | ||||
-rw-r--r-- | ssh-keygen.c | 4 | ||||
-rw-r--r-- | ssh-keysign.c | 16 | ||||
-rw-r--r-- | ssh.1 | 4 | ||||
-rw-r--r-- | sshconnect.c | 4 | ||||
-rw-r--r-- | sshconnect.h | 24 | ||||
-rw-r--r-- | sshconnect2.c | 16 | ||||
-rw-r--r-- | ttymodes.c | 4 | ||||
-rw-r--r-- | xmalloc.h | 4 |
28 files changed, 101 insertions, 99 deletions
@@ -23,6 +23,13 @@ | |||
23 | - deraadt@cvs.openbsd.org 2002/06/17 06:05:56 | 23 | - deraadt@cvs.openbsd.org 2002/06/17 06:05:56 |
24 | [scp.c] | 24 | [scp.c] |
25 | make usage like man page | 25 | make usage like man page |
26 | - deraadt@cvs.openbsd.org 2002/06/19 00:27:55 | ||
27 | [auth-bsdauth.c auth-skey.c auth1.c auth2-chall.c auth2-none.c authfd.c | ||
28 | authfd.h monitor_wrap.c msg.c nchan.c radix.c readconf.c scp.c sftp.1 | ||
29 | ssh-add.1 ssh-add.c ssh-agent.1 ssh-agent.c ssh-keygen.1 ssh-keygen.c | ||
30 | ssh-keysign.c ssh.1 sshconnect.c sshconnect.h sshconnect2.c ttymodes.c | ||
31 | xmalloc.h] | ||
32 | KNF done automatically while reading.... | ||
26 | - (bal) Cygwin special handling of empty passwords wrong. Patch by | 33 | - (bal) Cygwin special handling of empty passwords wrong. Patch by |
27 | vinschen@redhat.com | 34 | vinschen@redhat.com |
28 | 35 | ||
@@ -953,4 +960,4 @@ | |||
953 | - (stevesk) entropy.c: typo in debug message | 960 | - (stevesk) entropy.c: typo in debug message |
954 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ | 961 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ |
955 | 962 | ||
956 | $Id: ChangeLog,v 1.2224 2002/06/21 00:26:22 mouring Exp $ | 963 | $Id: ChangeLog,v 1.2225 2002/06/21 00:41:51 mouring Exp $ |
diff --git a/auth-bsdauth.c b/auth-bsdauth.c index fa06732cc..4f1b452b7 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.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: auth-bsdauth.c,v 1.3 2002/03/18 17:50:31 provos Exp $"); | 25 | RCSID("$OpenBSD: auth-bsdauth.c,v 1.4 2002/06/19 00:27:55 deraadt Exp $"); |
26 | 26 | ||
27 | #ifdef BSD_AUTH | 27 | #ifdef BSD_AUTH |
28 | #include "xmalloc.h" | 28 | #include "xmalloc.h" |
@@ -57,7 +57,7 @@ bsdauth_query(void *ctx, char **name, char **infotxt, | |||
57 | debug3("bsdauth_query: style %s", | 57 | debug3("bsdauth_query: style %s", |
58 | authctxt->style ? authctxt->style : "<default>"); | 58 | authctxt->style ? authctxt->style : "<default>"); |
59 | authctxt->as = auth_userchallenge(authctxt->user, | 59 | authctxt->as = auth_userchallenge(authctxt->user, |
60 | authctxt->style, "auth-ssh", &challenge); | 60 | authctxt->style, "auth-ssh", &challenge); |
61 | if (authctxt->as == NULL) | 61 | if (authctxt->as == NULL) |
62 | challenge = NULL; | 62 | challenge = NULL; |
63 | debug2("bsdauth_query: <%s>", challenge ? challenge : "empty"); | 63 | debug2("bsdauth_query: <%s>", challenge ? challenge : "empty"); |
@@ -66,8 +66,8 @@ bsdauth_query(void *ctx, char **name, char **infotxt, | |||
66 | if (challenge == NULL) | 66 | if (challenge == NULL) |
67 | return -1; | 67 | return -1; |
68 | 68 | ||
69 | *name = xstrdup(""); | 69 | *name = xstrdup(""); |
70 | *infotxt = xstrdup(""); | 70 | *infotxt = xstrdup(""); |
71 | *numprompts = 1; | 71 | *numprompts = 1; |
72 | *prompts = xmalloc(*numprompts * sizeof(char*)); | 72 | *prompts = xmalloc(*numprompts * sizeof(char*)); |
73 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); | 73 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); |
diff --git a/auth-skey.c b/auth-skey.c index b64550443..eb13c5cc5 100644 --- a/auth-skey.c +++ b/auth-skey.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: auth-skey.c,v 1.18 2002/05/13 02:37:39 itojun Exp $"); | 25 | RCSID("$OpenBSD: auth-skey.c,v 1.19 2002/06/19 00:27:55 deraadt Exp $"); |
26 | 26 | ||
27 | #ifdef SKEY | 27 | #ifdef SKEY |
28 | 28 | ||
@@ -50,8 +50,8 @@ skey_query(void *ctx, char **name, char **infotxt, | |||
50 | if (skeychallenge(&skey, authctxt->user, challenge) == -1) | 50 | if (skeychallenge(&skey, authctxt->user, challenge) == -1) |
51 | return -1; | 51 | return -1; |
52 | 52 | ||
53 | *name = xstrdup(""); | 53 | *name = xstrdup(""); |
54 | *infotxt = xstrdup(""); | 54 | *infotxt = xstrdup(""); |
55 | *numprompts = 1; | 55 | *numprompts = 1; |
56 | *prompts = xmalloc(*numprompts * sizeof(char*)); | 56 | *prompts = xmalloc(*numprompts * sizeof(char*)); |
57 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); | 57 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); |
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: auth1.c,v 1.40 2002/04/10 08:21:47 markus Exp $"); | 13 | RCSID("$OpenBSD: auth1.c,v 1.41 2002/06/19 00:27:55 deraadt Exp $"); |
14 | 14 | ||
15 | #include "xmalloc.h" | 15 | #include "xmalloc.h" |
16 | #include "rsa.h" | 16 | #include "rsa.h" |
@@ -203,7 +203,7 @@ do_authloop(Authctxt *authctxt) | |||
203 | if (bits != BN_num_bits(client_host_key->rsa->n)) | 203 | if (bits != BN_num_bits(client_host_key->rsa->n)) |
204 | verbose("Warning: keysize mismatch for client_host_key: " | 204 | verbose("Warning: keysize mismatch for client_host_key: " |
205 | "actual %d, announced %d", | 205 | "actual %d, announced %d", |
206 | BN_num_bits(client_host_key->rsa->n), bits); | 206 | BN_num_bits(client_host_key->rsa->n), bits); |
207 | packet_check_eom(); | 207 | packet_check_eom(); |
208 | 208 | ||
209 | authenticated = auth_rhosts_rsa(pw, client_user, | 209 | authenticated = auth_rhosts_rsa(pw, client_user, |
diff --git a/auth2-chall.c b/auth2-chall.c index 38f955a02..f35bfb2f8 100644 --- a/auth2-chall.c +++ b/auth2-chall.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ | 24 | */ |
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2-chall.c,v 1.17 2002/03/18 17:50:31 provos Exp $"); | 26 | RCSID("$OpenBSD: auth2-chall.c,v 1.18 2002/06/19 00:27:55 deraadt Exp $"); |
27 | 27 | ||
28 | #include "ssh2.h" | 28 | #include "ssh2.h" |
29 | #include "auth.h" | 29 | #include "auth.h" |
@@ -219,7 +219,7 @@ send_userauth_info_request(Authctxt *authctxt) | |||
219 | packet_start(SSH2_MSG_USERAUTH_INFO_REQUEST); | 219 | packet_start(SSH2_MSG_USERAUTH_INFO_REQUEST); |
220 | packet_put_cstring(name); | 220 | packet_put_cstring(name); |
221 | packet_put_cstring(instr); | 221 | packet_put_cstring(instr); |
222 | packet_put_cstring(""); /* language not used */ | 222 | packet_put_cstring(""); /* language not used */ |
223 | packet_put_int(numprompts); | 223 | packet_put_int(numprompts); |
224 | for (i = 0; i < numprompts; i++) { | 224 | for (i = 0; i < numprompts; i++) { |
225 | packet_put_cstring(prompts[i]); | 225 | packet_put_cstring(prompts[i]); |
diff --git a/auth2-none.c b/auth2-none.c index 30337fd6d..720d3c10f 100644 --- a/auth2-none.c +++ b/auth2-none.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2-none.c,v 1.2 2002/05/31 11:35:15 markus Exp $"); | 26 | RCSID("$OpenBSD: auth2-none.c,v 1.3 2002/06/19 00:27:55 deraadt Exp $"); |
27 | 27 | ||
28 | #include "auth.h" | 28 | #include "auth.h" |
29 | #include "xmalloc.h" | 29 | #include "xmalloc.h" |
@@ -65,7 +65,7 @@ auth2_read_banner(void) | |||
65 | return (NULL); | 65 | return (NULL); |
66 | } | 66 | } |
67 | banner[n] = '\0'; | 67 | banner[n] = '\0'; |
68 | 68 | ||
69 | return (banner); | 69 | return (banner); |
70 | } | 70 | } |
71 | 71 | ||
@@ -88,7 +88,6 @@ userauth_banner(void) | |||
88 | done: | 88 | done: |
89 | if (banner) | 89 | if (banner) |
90 | xfree(banner); | 90 | xfree(banner); |
91 | return; | ||
92 | } | 91 | } |
93 | 92 | ||
94 | static int | 93 | static int |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.54 2002/06/15 01:27:48 markus Exp $"); | 38 | RCSID("$OpenBSD: authfd.c,v 1.55 2002/06/19 00:27:55 deraadt Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -59,7 +59,7 @@ int decode_reply(int type); | |||
59 | /* macro to check for "agent failure" message */ | 59 | /* macro to check for "agent failure" message */ |
60 | #define agent_failed(x) \ | 60 | #define agent_failed(x) \ |
61 | ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE) || \ | 61 | ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE) || \ |
62 | (x == SSH2_AGENT_FAILURE)) | 62 | (x == SSH2_AGENT_FAILURE)) |
63 | 63 | ||
64 | /* Returns the number of the authentication fd, or -1 if there is none. */ | 64 | /* Returns the number of the authentication fd, or -1 if there is none. */ |
65 | 65 | ||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfd.h,v 1.29 2002/06/15 01:27:48 markus Exp $ */ | 1 | /* $OpenBSD: authfd.h,v 1.30 2002/06/19 00:27:55 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -40,11 +40,11 @@ | |||
40 | 40 | ||
41 | /* smartcard */ | 41 | /* smartcard */ |
42 | #define SSH_AGENTC_ADD_SMARTCARD_KEY 20 | 42 | #define SSH_AGENTC_ADD_SMARTCARD_KEY 20 |
43 | #define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21 | 43 | #define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21 |
44 | 44 | ||
45 | /* lock/unlock the agent */ | 45 | /* lock/unlock the agent */ |
46 | #define SSH_AGENTC_LOCK 22 | 46 | #define SSH_AGENTC_LOCK 22 |
47 | #define SSH_AGENTC_UNLOCK 23 | 47 | #define SSH_AGENTC_UNLOCK 23 |
48 | 48 | ||
49 | /* add key with constraints */ | 49 | /* add key with constraints */ |
50 | #define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24 | 50 | #define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24 |
@@ -56,21 +56,21 @@ | |||
56 | #define SSH2_AGENT_FAILURE 30 | 56 | #define SSH2_AGENT_FAILURE 30 |
57 | 57 | ||
58 | /* additional error code for ssh.com's ssh-agent2 */ | 58 | /* additional error code for ssh.com's ssh-agent2 */ |
59 | #define SSH_COM_AGENT2_FAILURE 102 | 59 | #define SSH_COM_AGENT2_FAILURE 102 |
60 | 60 | ||
61 | #define SSH_AGENT_OLD_SIGNATURE 0x01 | 61 | #define SSH_AGENT_OLD_SIGNATURE 0x01 |
62 | 62 | ||
63 | typedef struct { | 63 | typedef struct { |
64 | int fd; | 64 | int fd; |
65 | Buffer identities; | 65 | Buffer identities; |
66 | int howmany; | 66 | int howmany; |
67 | } AuthenticationConnection; | 67 | } AuthenticationConnection; |
68 | 68 | ||
69 | int ssh_get_authentication_socket(void); | 69 | int ssh_get_authentication_socket(void); |
70 | void ssh_close_authentication_socket(int); | 70 | void ssh_close_authentication_socket(int); |
71 | 71 | ||
72 | AuthenticationConnection *ssh_get_authentication_connection(void); | 72 | AuthenticationConnection *ssh_get_authentication_connection(void); |
73 | void ssh_close_authentication_connection(AuthenticationConnection *); | 73 | void ssh_close_authentication_connection(AuthenticationConnection *); |
74 | int ssh_get_num_identities(AuthenticationConnection *, int); | 74 | int ssh_get_num_identities(AuthenticationConnection *, int); |
75 | Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); | 75 | Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); |
76 | Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); | 76 | Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); |
diff --git a/monitor_wrap.c b/monitor_wrap.c index 65998a1e1..e40874627 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor_wrap.c,v 1.9 2002/06/14 21:35:00 todd Exp $"); | 28 | RCSID("$OpenBSD: monitor_wrap.c,v 1.10 2002/06/19 00:27:55 deraadt Exp $"); |
29 | 29 | ||
30 | #include <openssl/bn.h> | 30 | #include <openssl/bn.h> |
31 | #include <openssl/dh.h> | 31 | #include <openssl/dh.h> |
@@ -68,7 +68,7 @@ mm_request_send(int socket, enum monitor_reqtype type, Buffer *m) | |||
68 | debug3("%s entering: type %d", __func__, type); | 68 | debug3("%s entering: type %d", __func__, type); |
69 | 69 | ||
70 | PUT_32BIT(buf, mlen + 1); | 70 | PUT_32BIT(buf, mlen + 1); |
71 | buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */ | 71 | buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */ |
72 | if (atomicio(write, socket, buf, sizeof(buf)) != sizeof(buf)) | 72 | if (atomicio(write, socket, buf, sizeof(buf)) != sizeof(buf)) |
73 | fatal("%s: write", __func__); | 73 | fatal("%s: write", __func__); |
74 | if (atomicio(write, socket, buffer_ptr(m), mlen) != mlen) | 74 | if (atomicio(write, socket, buffer_ptr(m), mlen) != mlen) |
@@ -221,7 +221,7 @@ char* mm_auth2_read_banner(void) | |||
221 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTH2_READ_BANNER, &m); | 221 | mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTH2_READ_BANNER, &m); |
222 | banner = buffer_get_string(&m, NULL); | 222 | banner = buffer_get_string(&m, NULL); |
223 | buffer_free(&m); | 223 | buffer_free(&m); |
224 | 224 | ||
225 | return (banner); | 225 | return (banner); |
226 | } | 226 | } |
227 | 227 | ||
@@ -694,8 +694,8 @@ static void | |||
694 | mm_chall_setup(char **name, char **infotxt, u_int *numprompts, | 694 | mm_chall_setup(char **name, char **infotxt, u_int *numprompts, |
695 | char ***prompts, u_int **echo_on) | 695 | char ***prompts, u_int **echo_on) |
696 | { | 696 | { |
697 | *name = xstrdup(""); | 697 | *name = xstrdup(""); |
698 | *infotxt = xstrdup(""); | 698 | *infotxt = xstrdup(""); |
699 | *numprompts = 1; | 699 | *numprompts = 1; |
700 | *prompts = xmalloc(*numprompts * sizeof(char*)); | 700 | *prompts = xmalloc(*numprompts * sizeof(char*)); |
701 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); | 701 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); |
@@ -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: msg.c,v 1.1 2002/05/23 19:24:30 markus Exp $"); | 25 | RCSID("$OpenBSD: msg.c,v 1.2 2002/06/19 00:27:55 deraadt Exp $"); |
26 | 26 | ||
27 | #include "buffer.h" | 27 | #include "buffer.h" |
28 | #include "getput.h" | 28 | #include "getput.h" |
@@ -39,7 +39,7 @@ msg_send(int fd, u_char type, Buffer *m) | |||
39 | debug3("msg_send: type %d", type); | 39 | debug3("msg_send: type %d", type); |
40 | 40 | ||
41 | PUT_32BIT(buf, mlen + 1); | 41 | PUT_32BIT(buf, mlen + 1); |
42 | buf[4] = type; /* 1st byte of payload is mesg-type */ | 42 | buf[4] = type; /* 1st byte of payload is mesg-type */ |
43 | if (atomicio(write, fd, buf, sizeof(buf)) != sizeof(buf)) | 43 | if (atomicio(write, fd, buf, sizeof(buf)) != sizeof(buf)) |
44 | fatal("msg_send: write"); | 44 | fatal("msg_send: write"); |
45 | if (atomicio(write, fd, buffer_ptr(m), mlen) != mlen) | 45 | if (atomicio(write, fd, buffer_ptr(m), mlen) != mlen) |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: nchan.c,v 1.46 2002/06/09 13:32:01 markus Exp $"); | 26 | RCSID("$OpenBSD: nchan.c,v 1.47 2002/06/19 00:27:55 deraadt Exp $"); |
27 | 27 | ||
28 | #include "ssh1.h" | 28 | #include "ssh1.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -367,7 +367,7 @@ chan_rcvd_ieof(Channel *c) | |||
367 | else | 367 | else |
368 | chan_rcvd_ieof1(c); | 368 | chan_rcvd_ieof1(c); |
369 | if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN && | 369 | if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN && |
370 | buffer_len(&c->output) == 0 && | 370 | buffer_len(&c->output) == 0 && |
371 | !CHANNEL_EFD_OUTPUT_ACTIVE(c)) | 371 | !CHANNEL_EFD_OUTPUT_ACTIVE(c)) |
372 | chan_obuf_empty(c); | 372 | chan_obuf_empty(c); |
373 | } | 373 | } |
@@ -26,7 +26,7 @@ | |||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | #include "uuencode.h" | 27 | #include "uuencode.h" |
28 | 28 | ||
29 | RCSID("$OpenBSD: radix.c,v 1.20 2002/04/23 12:58:26 markus Exp $"); | 29 | RCSID("$OpenBSD: radix.c,v 1.21 2002/06/19 00:27:55 deraadt Exp $"); |
30 | 30 | ||
31 | #ifdef AFS | 31 | #ifdef AFS |
32 | #include <krb.h> | 32 | #include <krb.h> |
@@ -148,7 +148,7 @@ radix_to_creds(const char *buf, CREDENTIALS *creds) | |||
148 | goto done; | 148 | goto done; |
149 | memcpy(&creds->ticket_st.dat, p, len); | 149 | memcpy(&creds->ticket_st.dat, p, len); |
150 | creds->ticket_st.length = len; | 150 | creds->ticket_st.length = len; |
151 | 151 | ||
152 | ret = 1; | 152 | ret = 1; |
153 | done: | 153 | done: |
154 | buffer_free(&b); | 154 | buffer_free(&b); |
diff --git a/readconf.c b/readconf.c index 9defef1de..80d99fef1 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.99 2002/06/10 17:45:20 stevesk Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.100 2002/06/19 00:27:55 deraadt Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -92,7 +92,7 @@ RCSID("$OpenBSD: readconf.c,v 1.99 2002/06/10 17:45:20 stevesk Exp $"); | |||
92 | typedef enum { | 92 | typedef enum { |
93 | oBadOption, | 93 | oBadOption, |
94 | oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication, | 94 | oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication, |
95 | oPasswordAuthentication, oRSAAuthentication, | 95 | oPasswordAuthentication, oRSAAuthentication, |
96 | oChallengeResponseAuthentication, oXAuthLocation, | 96 | oChallengeResponseAuthentication, oXAuthLocation, |
97 | #if defined(KRB4) || defined(KRB5) | 97 | #if defined(KRB4) || defined(KRB5) |
98 | oKerberosAuthentication, | 98 | oKerberosAuthentication, |
@@ -75,7 +75,7 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include "includes.h" | 77 | #include "includes.h" |
78 | RCSID("$OpenBSD: scp.c,v 1.90 2002/06/17 06:05:56 deraadt Exp $"); | 78 | RCSID("$OpenBSD: scp.c,v 1.91 2002/06/19 00:27:55 deraadt Exp $"); |
79 | 79 | ||
80 | #include "xmalloc.h" | 80 | #include "xmalloc.h" |
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
@@ -227,7 +227,7 @@ main(argc, argv) | |||
227 | __progname = get_progname(argv[0]); | 227 | __progname = get_progname(argv[0]); |
228 | 228 | ||
229 | args.list = NULL; | 229 | args.list = NULL; |
230 | addargs(&args, "ssh"); /* overwritten with ssh_program */ | 230 | addargs(&args, "ssh"); /* overwritten with ssh_program */ |
231 | addargs(&args, "-x"); | 231 | addargs(&args, "-x"); |
232 | addargs(&args, "-oForwardAgent no"); | 232 | addargs(&args, "-oForwardAgent no"); |
233 | addargs(&args, "-oClearAllForwardings yes"); | 233 | addargs(&args, "-oClearAllForwardings yes"); |
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: sftp.1,v 1.33 2002/02/26 19:06:43 deraadt Exp $ | 1 | .\" $OpenBSD: sftp.1,v 1.34 2002/06/19 00:27:55 deraadt Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. | 3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -100,7 +100,7 @@ does not have an sftp subsystem configured. | |||
100 | .It Fl v | 100 | .It Fl v |
101 | Raise logging level. This option is also passed to ssh. | 101 | Raise logging level. This option is also passed to ssh. |
102 | .It Fl B Ar buffer_size | 102 | .It Fl B Ar buffer_size |
103 | Specify the size of the buffer that | 103 | Specify the size of the buffer that |
104 | .Nm | 104 | .Nm |
105 | uses when transferring files. Larger buffers require fewer round trips at | 105 | uses when transferring files. Larger buffers require fewer round trips at |
106 | the cost of higher memory consumption. The default is 32768 bytes. | 106 | the cost of higher memory consumption. The default is 32768 bytes. |
@@ -115,13 +115,13 @@ per-user configuration file for | |||
115 | This option is directly passed to | 115 | This option is directly passed to |
116 | .Xr ssh 1 . | 116 | .Xr ssh 1 . |
117 | .It Fl P Ar sftp_server path | 117 | .It Fl P Ar sftp_server path |
118 | Connect directly to a local | 118 | Connect directly to a local |
119 | .Nm sftp-server | 119 | .Nm sftp-server |
120 | (rather than via | 120 | (rather than via |
121 | .Nm ssh ) | 121 | .Nm ssh ) |
122 | This option may be useful in debugging the client and server. | 122 | This option may be useful in debugging the client and server. |
123 | .It Fl R Ar num_requests | 123 | .It Fl R Ar num_requests |
124 | Specify how many requests may be outstanding at any one time. Increasing | 124 | Specify how many requests may be outstanding at any one time. Increasing |
125 | this may slightly improve file transfer speed but will increase memory | 125 | this may slightly improve file transfer speed but will increase memory |
126 | usage. The default is 16 outstanding requests. | 126 | usage. The default is 16 outstanding requests. |
127 | .It Fl S Ar program | 127 | .It Fl S Ar program |
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-add.1,v 1.34 2002/06/10 17:36:22 stevesk Exp $ | 1 | .\" $OpenBSD: ssh-add.1,v 1.35 2002/06/19 00:27:55 deraadt Exp $ |
2 | .\" | 2 | .\" |
3 | .\" -*- nroff -*- | 3 | .\" -*- nroff -*- |
4 | .\" | 4 | .\" |
@@ -58,7 +58,7 @@ adds RSA or DSA identities to the authentication agent, | |||
58 | .Xr ssh-agent 1 . | 58 | .Xr ssh-agent 1 . |
59 | When run without arguments, it adds the files | 59 | When run without arguments, it adds the files |
60 | .Pa $HOME/.ssh/id_rsa , | 60 | .Pa $HOME/.ssh/id_rsa , |
61 | .Pa $HOME/.ssh/id_dsa | 61 | .Pa $HOME/.ssh/id_dsa |
62 | and | 62 | and |
63 | .Pa $HOME/.ssh/identity . | 63 | .Pa $HOME/.ssh/identity . |
64 | Alternative file names can be given on the command line. | 64 | Alternative file names can be given on the command line. |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: ssh-add.c,v 1.60 2002/06/15 01:27:48 markus Exp $"); | 38 | RCSID("$OpenBSD: ssh-add.c,v 1.61 2002/06/19 00:27:55 deraadt Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -244,7 +244,7 @@ lock_agent(AuthenticationConnection *ac, int lock) | |||
244 | { | 244 | { |
245 | char prompt[100], *p1, *p2; | 245 | char prompt[100], *p1, *p2; |
246 | int passok = 1, ret = -1; | 246 | int passok = 1, ret = -1; |
247 | 247 | ||
248 | strlcpy(prompt, "Enter lock password: ", sizeof(prompt)); | 248 | strlcpy(prompt, "Enter lock password: ", sizeof(prompt)); |
249 | p1 = read_passphrase(prompt, RP_ALLOW_STDIN); | 249 | p1 = read_passphrase(prompt, RP_ALLOW_STDIN); |
250 | if (lock) { | 250 | if (lock) { |
diff --git a/ssh-agent.1 b/ssh-agent.1 index 5f498b7e3..e5ea1e325 100644 --- a/ssh-agent.1 +++ b/ssh-agent.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-agent.1,v 1.32 2002/06/05 16:08:07 markus Exp $ | 1 | .\" $OpenBSD: ssh-agent.1,v 1.33 2002/06/19 00:27:55 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 |
@@ -102,7 +102,7 @@ When executed without arguments, | |||
102 | .Xr ssh-add 1 | 102 | .Xr ssh-add 1 |
103 | adds the files | 103 | adds the files |
104 | .Pa $HOME/.ssh/id_rsa , | 104 | .Pa $HOME/.ssh/id_rsa , |
105 | .Pa $HOME/.ssh/id_dsa | 105 | .Pa $HOME/.ssh/id_dsa |
106 | and | 106 | and |
107 | .Pa $HOME/.ssh/identity . | 107 | .Pa $HOME/.ssh/identity . |
108 | If the identity has a passphrase, | 108 | If the identity has a passphrase, |
diff --git a/ssh-agent.c b/ssh-agent.c index 536db2de0..c3a907798 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include "includes.h" | 36 | #include "includes.h" |
37 | #include "openbsd-compat/fake-queue.h" | 37 | #include "openbsd-compat/fake-queue.h" |
38 | RCSID("$OpenBSD: ssh-agent.c,v 1.94 2002/06/15 01:27:48 markus Exp $"); | 38 | RCSID("$OpenBSD: ssh-agent.c,v 1.95 2002/06/19 00:27:55 deraadt Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | #include <openssl/md5.h> | 41 | #include <openssl/md5.h> |
@@ -365,7 +365,6 @@ process_remove_all_identities(SocketEntry *e, int version) | |||
365 | /* Send success. */ | 365 | /* Send success. */ |
366 | buffer_put_int(&e->output, 1); | 366 | buffer_put_int(&e->output, 1); |
367 | buffer_put_char(&e->output, SSH_AGENT_SUCCESS); | 367 | buffer_put_char(&e->output, SSH_AGENT_SUCCESS); |
368 | return; | ||
369 | } | 368 | } |
370 | 369 | ||
371 | static void | 370 | static void |
@@ -499,11 +498,10 @@ process_lock_agent(SocketEntry *e, int lock) | |||
499 | } | 498 | } |
500 | memset(passwd, 0, strlen(passwd)); | 499 | memset(passwd, 0, strlen(passwd)); |
501 | xfree(passwd); | 500 | xfree(passwd); |
502 | 501 | ||
503 | buffer_put_int(&e->output, 1); | 502 | buffer_put_int(&e->output, 1); |
504 | buffer_put_char(&e->output, | 503 | buffer_put_char(&e->output, |
505 | success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE); | 504 | success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE); |
506 | return; | ||
507 | } | 505 | } |
508 | 506 | ||
509 | static void | 507 | static void |
diff --git a/ssh-keygen.1 b/ssh-keygen.1 index 6ad94e6eb..35b0bb916 100644 --- a/ssh-keygen.1 +++ b/ssh-keygen.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-keygen.1,v 1.53 2002/02/16 14:53:37 stevesk Exp $ | 1 | .\" $OpenBSD: ssh-keygen.1,v 1.54 2002/06/19 00:27:55 deraadt Exp $ |
2 | .\" | 2 | .\" |
3 | .\" -*- nroff -*- | 3 | .\" -*- nroff -*- |
4 | .\" | 4 | .\" |
@@ -86,7 +86,7 @@ | |||
86 | generates, manages and converts authentication keys for | 86 | generates, manages and converts authentication keys for |
87 | .Xr ssh 1 . | 87 | .Xr ssh 1 . |
88 | .Nm | 88 | .Nm |
89 | can create RSA keys for use by SSH protocol version 1 and RSA or DSA | 89 | can create RSA keys for use by SSH protocol version 1 and RSA or DSA |
90 | keys for use by SSH protocol version 2. The type of key to be generated | 90 | keys for use by SSH protocol version 2. The type of key to be generated |
91 | is specified with the | 91 | is specified with the |
92 | .Fl t | 92 | .Fl t |
diff --git a/ssh-keygen.c b/ssh-keygen.c index d83ccecc4..df8c90afb 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.99 2002/06/09 13:32:01 markus Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.100 2002/06/19 00:27:55 deraadt Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -140,7 +140,7 @@ load_identity(char *filename) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | #define SSH_COM_PUBLIC_BEGIN "---- BEGIN SSH2 PUBLIC KEY ----" | 142 | #define SSH_COM_PUBLIC_BEGIN "---- BEGIN SSH2 PUBLIC KEY ----" |
143 | #define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" | 143 | #define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" |
144 | #define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----" | 144 | #define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----" |
145 | #define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb | 145 | #define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb |
146 | 146 | ||
diff --git a/ssh-keysign.c b/ssh-keysign.c index 520927829..7f1d25d8c 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.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: ssh-keysign.c,v 1.3 2002/06/08 05:07:09 markus Exp $"); | 25 | RCSID("$OpenBSD: ssh-keysign.c,v 1.4 2002/06/19 00:27:55 deraadt Exp $"); |
26 | 26 | ||
27 | #include <openssl/evp.h> | 27 | #include <openssl/evp.h> |
28 | 28 | ||
@@ -59,7 +59,7 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, | |||
59 | 59 | ||
60 | buffer_init(&b); | 60 | buffer_init(&b); |
61 | buffer_append(&b, data, datalen); | 61 | buffer_append(&b, data, datalen); |
62 | 62 | ||
63 | /* session id, currently limited to SHA1 (20 bytes) */ | 63 | /* session id, currently limited to SHA1 (20 bytes) */ |
64 | p = buffer_get_string(&b, &len); | 64 | p = buffer_get_string(&b, &len); |
65 | if (len != 20) | 65 | if (len != 20) |
@@ -104,9 +104,9 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data, | |||
104 | if (strlen(host) != len - 1) | 104 | if (strlen(host) != len - 1) |
105 | fail++; | 105 | fail++; |
106 | else if (p[len - 1] != '.') | 106 | else if (p[len - 1] != '.') |
107 | fail++; | 107 | fail++; |
108 | else if (strncasecmp(host, p, len - 1) != 0) | 108 | else if (strncasecmp(host, p, len - 1) != 0) |
109 | fail++; | 109 | fail++; |
110 | xfree(p); | 110 | xfree(p); |
111 | 111 | ||
112 | /* local user */ | 112 | /* local user */ |
@@ -153,14 +153,14 @@ main(int argc, char **argv) | |||
153 | 153 | ||
154 | #ifdef DEBUG_SSH_KEYSIGN | 154 | #ifdef DEBUG_SSH_KEYSIGN |
155 | log_init("ssh-keysign", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 0); | 155 | log_init("ssh-keysign", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 0); |
156 | #endif | 156 | #endif |
157 | 157 | ||
158 | if (key_fd[0] == -1 && key_fd[1] == -1) | 158 | if (key_fd[0] == -1 && key_fd[1] == -1) |
159 | fatal("could not open any host key"); | 159 | fatal("could not open any host key"); |
160 | 160 | ||
161 | if ((pw = getpwuid(getuid())) == NULL) | 161 | if ((pw = getpwuid(getuid())) == NULL) |
162 | fatal("getpwuid failed"); | 162 | fatal("getpwuid failed"); |
163 | pw = pwcopy(pw); | 163 | pw = pwcopy(pw); |
164 | 164 | ||
165 | SSLeay_add_all_algorithms(); | 165 | SSLeay_add_all_algorithms(); |
166 | 166 | ||
@@ -188,7 +188,7 @@ main(int argc, char **argv) | |||
188 | fatal("bad fd"); | 188 | fatal("bad fd"); |
189 | if ((host = get_local_name(fd)) == NULL) | 189 | if ((host = get_local_name(fd)) == NULL) |
190 | fatal("cannot get sockname for fd"); | 190 | fatal("cannot get sockname for fd"); |
191 | 191 | ||
192 | data = buffer_get_string(&b, &dlen); | 192 | data = buffer_get_string(&b, &dlen); |
193 | if (valid_request(pw, host, &key, data, dlen) < 0) | 193 | if (valid_request(pw, host, &key, data, dlen) < 0) |
194 | fatal("not a valid request"); | 194 | fatal("not a valid request"); |
@@ -208,7 +208,7 @@ main(int argc, char **argv) | |||
208 | 208 | ||
209 | if (key_sign(keys[i], &signature, &slen, data, dlen) != 0) | 209 | if (key_sign(keys[i], &signature, &slen, data, dlen) != 0) |
210 | fatal("key_sign failed"); | 210 | fatal("key_sign failed"); |
211 | 211 | ||
212 | /* send reply */ | 212 | /* send reply */ |
213 | buffer_clear(&b); | 213 | buffer_clear(&b); |
214 | buffer_put_string(&b, signature, slen); | 214 | buffer_put_string(&b, signature, slen); |
@@ -34,7 +34,7 @@ | |||
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | .\" | 36 | .\" |
37 | .\" $OpenBSD: ssh.1,v 1.156 2002/06/10 17:45:20 stevesk Exp $ | 37 | .\" $OpenBSD: ssh.1,v 1.157 2002/06/19 00:27:55 deraadt Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSH 1 | 39 | .Dt SSH 1 |
40 | .Os | 40 | .Os |
@@ -1377,7 +1377,7 @@ and | |||
1377 | .Cm HostbasedAuthentication . | 1377 | .Cm HostbasedAuthentication . |
1378 | If the protocol version 1 | 1378 | If the protocol version 1 |
1379 | .Cm RhostsRSAAuthentication | 1379 | .Cm RhostsRSAAuthentication |
1380 | method is used, | 1380 | method is used, |
1381 | .Nm | 1381 | .Nm |
1382 | must be setuid root, since the host key is readable only by root. | 1382 | must be setuid root, since the host key is readable only by root. |
1383 | For protocol version 2, | 1383 | For protocol version 2, |
diff --git a/sshconnect.c b/sshconnect.c index 3a93a4fbb..9b4c38835 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.124 2002/06/11 04:14:26 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect.c,v 1.125 2002/06/19 00:27:55 deraadt Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | 19 | ||
@@ -771,7 +771,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, | |||
771 | len = strlen(msg); | 771 | len = strlen(msg); |
772 | snprintf(msg + len, sizeof(msg) - len, | 772 | snprintf(msg + len, sizeof(msg) - len, |
773 | "\nMatching host key in %s:%d", | 773 | "\nMatching host key in %s:%d", |
774 | host_file, host_line); | 774 | host_file, host_line); |
775 | } | 775 | } |
776 | if (options.strict_host_key_checking == 1) { | 776 | if (options.strict_host_key_checking == 1) { |
777 | log(msg); | 777 | log(msg); |
diff --git a/sshconnect.h b/sshconnect.h index 48148833f..0be30fe69 100644 --- a/sshconnect.h +++ b/sshconnect.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect.h,v 1.16 2002/06/11 04:14:26 markus Exp $ */ | 1 | /* $OpenBSD: sshconnect.h,v 1.17 2002/06/19 00:27:55 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
@@ -28,9 +28,9 @@ | |||
28 | 28 | ||
29 | typedef struct Sensitive Sensitive; | 29 | typedef struct Sensitive Sensitive; |
30 | struct Sensitive { | 30 | struct Sensitive { |
31 | Key **keys; | 31 | Key **keys; |
32 | int nkeys; | 32 | int nkeys; |
33 | int external_keysign; | 33 | int external_keysign; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | int | 36 | int |
@@ -54,16 +54,16 @@ void ssh_put_password(char *); | |||
54 | /* | 54 | /* |
55 | * Macros to raise/lower permissions. | 55 | * Macros to raise/lower permissions. |
56 | */ | 56 | */ |
57 | #define PRIV_START do { \ | 57 | #define PRIV_START do { \ |
58 | int save_errno = errno; \ | 58 | int save_errno = errno; \ |
59 | (void)seteuid(original_effective_uid); \ | 59 | (void)seteuid(original_effective_uid); \ |
60 | errno = save_errno; \ | 60 | errno = save_errno; \ |
61 | } while (0) | 61 | } while (0) |
62 | 62 | ||
63 | #define PRIV_END do { \ | 63 | #define PRIV_END do { \ |
64 | int save_errno = errno; \ | 64 | int save_errno = errno; \ |
65 | (void)seteuid(original_real_uid); \ | 65 | (void)seteuid(original_real_uid); \ |
66 | errno = save_errno; \ | 66 | errno = save_errno; \ |
67 | } while (0) | 67 | } while (0) |
68 | 68 | ||
69 | #endif | 69 | #endif |
diff --git a/sshconnect2.c b/sshconnect2.c index 6950c5ee6..7f28ab51e 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.103 2002/05/31 10:30:33 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.104 2002/06/19 00:27:55 deraadt Exp $"); |
27 | 27 | ||
28 | #include "ssh.h" | 28 | #include "ssh.h" |
29 | #include "ssh2.h" | 29 | #include "ssh2.h" |
@@ -395,7 +395,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt) | |||
395 | if (key->type != pktype) { | 395 | if (key->type != pktype) { |
396 | error("input_userauth_pk_ok: type mismatch " | 396 | error("input_userauth_pk_ok: type mismatch " |
397 | "for decoded key (received %d, expected %d)", | 397 | "for decoded key (received %d, expected %d)", |
398 | key->type, pktype); | 398 | key->type, pktype); |
399 | break; | 399 | break; |
400 | } | 400 | } |
401 | fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX); | 401 | fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX); |
@@ -463,7 +463,7 @@ userauth_passwd(Authctxt *authctxt) | |||
463 | packet_add_padding(64); | 463 | packet_add_padding(64); |
464 | packet_send(); | 464 | packet_send(); |
465 | 465 | ||
466 | dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, | 466 | dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, |
467 | &input_userauth_passwd_changereq); | 467 | &input_userauth_passwd_changereq); |
468 | 468 | ||
469 | return 1; | 469 | return 1; |
@@ -495,7 +495,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt) | |||
495 | packet_put_cstring(authctxt->service); | 495 | packet_put_cstring(authctxt->service); |
496 | packet_put_cstring(authctxt->method->name); | 496 | packet_put_cstring(authctxt->method->name); |
497 | packet_put_char(1); /* additional info */ | 497 | packet_put_char(1); /* additional info */ |
498 | snprintf(prompt, sizeof(prompt), | 498 | snprintf(prompt, sizeof(prompt), |
499 | "Enter %.30s@%.128s's old password: ", | 499 | "Enter %.30s@%.128s's old password: ", |
500 | authctxt->server_user, authctxt->host); | 500 | authctxt->server_user, authctxt->host); |
501 | password = read_passphrase(prompt, 0); | 501 | password = read_passphrase(prompt, 0); |
@@ -504,7 +504,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt) | |||
504 | xfree(password); | 504 | xfree(password); |
505 | password = NULL; | 505 | password = NULL; |
506 | while (password == NULL) { | 506 | while (password == NULL) { |
507 | snprintf(prompt, sizeof(prompt), | 507 | snprintf(prompt, sizeof(prompt), |
508 | "Enter %.30s@%.128s's new password: ", | 508 | "Enter %.30s@%.128s's new password: ", |
509 | authctxt->server_user, authctxt->host); | 509 | authctxt->server_user, authctxt->host); |
510 | password = read_passphrase(prompt, RP_ALLOW_EOF); | 510 | password = read_passphrase(prompt, RP_ALLOW_EOF); |
@@ -512,7 +512,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt) | |||
512 | /* bail out */ | 512 | /* bail out */ |
513 | return; | 513 | return; |
514 | } | 514 | } |
515 | snprintf(prompt, sizeof(prompt), | 515 | snprintf(prompt, sizeof(prompt), |
516 | "Retype %.30s@%.128s's new password: ", | 516 | "Retype %.30s@%.128s's new password: ", |
517 | authctxt->server_user, authctxt->host); | 517 | authctxt->server_user, authctxt->host); |
518 | retype = read_passphrase(prompt, 0); | 518 | retype = read_passphrase(prompt, 0); |
@@ -530,8 +530,8 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt) | |||
530 | xfree(password); | 530 | xfree(password); |
531 | packet_add_padding(64); | 531 | packet_add_padding(64); |
532 | packet_send(); | 532 | packet_send(); |
533 | 533 | ||
534 | dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, | 534 | dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, |
535 | &input_userauth_passwd_changereq); | 535 | &input_userauth_passwd_changereq); |
536 | } | 536 | } |
537 | 537 | ||
diff --git a/ttymodes.c b/ttymodes.c index 8afdff1a4..5cc13dcd5 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.17 2002/03/19 10:49:35 markus Exp $"); | 46 | RCSID("$OpenBSD: ttymodes.c,v 1.18 2002/06/19 00:27:55 deraadt Exp $"); |
47 | 47 | ||
48 | #include "packet.h" | 48 | #include "packet.h" |
49 | #include "log.h" | 49 | #include "log.h" |
@@ -307,7 +307,6 @@ end: | |||
307 | else | 307 | else |
308 | packet_put_raw(buffer_ptr(&buf), buffer_len(&buf)); | 308 | packet_put_raw(buffer_ptr(&buf), buffer_len(&buf)); |
309 | buffer_free(&buf); | 309 | buffer_free(&buf); |
310 | return; | ||
311 | } | 310 | } |
312 | 311 | ||
313 | /* | 312 | /* |
@@ -457,5 +456,4 @@ set: | |||
457 | /* Set the new modes for the terminal. */ | 456 | /* Set the new modes for the terminal. */ |
458 | if (tcsetattr(fd, TCSANOW, &tio) == -1) | 457 | if (tcsetattr(fd, TCSANOW, &tio) == -1) |
459 | log("Setting tty modes failed: %.100s", strerror(errno)); | 458 | log("Setting tty modes failed: %.100s", strerror(errno)); |
460 | return; | ||
461 | } | 459 | } |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: xmalloc.h,v 1.8 2002/03/04 17:27:39 stevesk Exp $ */ | 1 | /* $OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -22,6 +22,6 @@ | |||
22 | void *xmalloc(size_t); | 22 | void *xmalloc(size_t); |
23 | void *xrealloc(void *, size_t); | 23 | void *xrealloc(void *, size_t); |
24 | void xfree(void *); | 24 | void xfree(void *); |
25 | char *xstrdup(const char *); | 25 | char *xstrdup(const char *); |
26 | 26 | ||
27 | #endif /* XMALLOC_H */ | 27 | #endif /* XMALLOC_H */ |