diff options
author | Colin Watson <cjwatson@debian.org> | 2007-06-12 16:16:35 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-06-12 16:16:35 +0000 |
commit | b7e40fa9da0b5491534a429dadb321eab5a77558 (patch) | |
tree | bed1da11e9f829925797aa093e379fc0b5868ecd /authfd.c | |
parent | 4f84beedf1005e44ff33c854abd6b711ffc0adb7 (diff) | |
parent | 086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff) |
* New upstream release (closes: #395507, #397961, #420035). Important
changes not previously backported to 4.3p2:
- 4.4/4.4p1 (http://www.openssh.org/txt/release-4.4):
+ On portable OpenSSH, fix a GSSAPI authentication abort that could be
used to determine the validity of usernames on some platforms.
+ Implemented conditional configuration in sshd_config(5) using the
"Match" directive. This allows some configuration options to be
selectively overridden if specific criteria (based on user, group,
hostname and/or address) are met. So far a useful subset of
post-authentication options are supported and more are expected to
be added in future releases.
+ Add support for Diffie-Hellman group exchange key agreement with a
final hash of SHA256.
+ Added a "ForceCommand" directive to sshd_config(5). Similar to the
command="..." option accepted in ~/.ssh/authorized_keys, this forces
the execution of the specified command regardless of what the user
requested. This is very useful in conjunction with the new "Match"
option.
+ Add a "PermitOpen" directive to sshd_config(5). This mirrors the
permitopen="..." authorized_keys option, allowing fine-grained
control over the port-forwardings that a user is allowed to
establish.
+ Add optional logging of transactions to sftp-server(8).
+ ssh(1) will now record port numbers for hosts stored in
~/.ssh/known_hosts when a non-standard port has been requested
(closes: #50612).
+ Add an "ExitOnForwardFailure" option to cause ssh(1) to exit (with a
non-zero exit code) when requested port forwardings could not be
established.
+ Extend sshd_config(5) "SubSystem" declarations to allow the
specification of command-line arguments.
+ Replacement of all integer overflow susceptible invocations of
malloc(3) and realloc(3) with overflow-checking equivalents.
+ Many manpage fixes and improvements.
+ Add optional support for OpenSSL hardware accelerators (engines),
enabled using the --with-ssl-engine configure option.
+ Tokens in configuration files may be double-quoted in order to
contain spaces (closes: #319639).
+ Move a debug() call out of a SIGCHLD handler, fixing a hang when the
session exits very quickly (closes: #307890).
+ Fix some incorrect buffer allocation calculations (closes: #410599).
+ ssh-add doesn't ask for a passphrase if key file permissions are too
liberal (closes: #103677).
+ Likewise, ssh doesn't ask either (closes: #99675).
- 4.6/4.6p1 (http://www.openssh.org/txt/release-4.6):
+ sshd now allows the enabling and disabling of authentication methods
on a per user, group, host and network basis via the Match directive
in sshd_config.
+ Fixed an inconsistent check for a terminal when displaying scp
progress meter (closes: #257524).
+ Fix "hang on exit" when background processes are running at the time
of exit on a ttyful/login session (closes: #88337).
* Update to current GSSAPI patch from
http://www.sxw.org.uk/computing/patches/openssh-4.6p1-gsskex-20070312.patch;
install ChangeLog.gssapi.
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 29 |
1 files changed, 19 insertions, 10 deletions
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: authfd.c,v 1.80 2006/08/03 03:34:41 deraadt Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -35,16 +36,25 @@ | |||
35 | */ | 36 | */ |
36 | 37 | ||
37 | #include "includes.h" | 38 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.66 2005/06/17 02:44:32 djm Exp $"); | 39 | |
40 | #include <sys/types.h> | ||
41 | #include <sys/un.h> | ||
42 | #include <sys/socket.h> | ||
39 | 43 | ||
40 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
41 | 45 | ||
46 | #include <openssl/crypto.h> | ||
47 | #include <fcntl.h> | ||
48 | #include <stdlib.h> | ||
49 | #include <signal.h> | ||
50 | #include <stdarg.h> | ||
51 | #include <string.h> | ||
52 | #include <unistd.h> | ||
53 | |||
54 | #include "xmalloc.h" | ||
42 | #include "ssh.h" | 55 | #include "ssh.h" |
43 | #include "rsa.h" | 56 | #include "rsa.h" |
44 | #include "buffer.h" | 57 | #include "buffer.h" |
45 | #include "bufaux.h" | ||
46 | #include "xmalloc.h" | ||
47 | #include "getput.h" | ||
48 | #include "key.h" | 58 | #include "key.h" |
49 | #include "authfd.h" | 59 | #include "authfd.h" |
50 | #include "cipher.h" | 60 | #include "cipher.h" |
@@ -52,6 +62,7 @@ RCSID("$OpenBSD: authfd.c,v 1.66 2005/06/17 02:44:32 djm Exp $"); | |||
52 | #include "compat.h" | 62 | #include "compat.h" |
53 | #include "log.h" | 63 | #include "log.h" |
54 | #include "atomicio.h" | 64 | #include "atomicio.h" |
65 | #include "misc.h" | ||
55 | 66 | ||
56 | static int agent_present = 0; | 67 | static int agent_present = 0; |
57 | 68 | ||
@@ -103,7 +114,7 @@ ssh_get_authentication_socket(void) | |||
103 | close(sock); | 114 | close(sock); |
104 | return -1; | 115 | return -1; |
105 | } | 116 | } |
106 | if (connect(sock, (struct sockaddr *) &sunaddr, sizeof sunaddr) < 0) { | 117 | if (connect(sock, (struct sockaddr *)&sunaddr, sizeof sunaddr) < 0) { |
107 | close(sock); | 118 | close(sock); |
108 | return -1; | 119 | return -1; |
109 | } | 120 | } |
@@ -119,7 +130,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply | |||
119 | 130 | ||
120 | /* Get the length of the message, and format it in the buffer. */ | 131 | /* Get the length of the message, and format it in the buffer. */ |
121 | len = buffer_len(request); | 132 | len = buffer_len(request); |
122 | PUT_32BIT(buf, len); | 133 | put_u32(buf, len); |
123 | 134 | ||
124 | /* Send the length and then the packet to the agent. */ | 135 | /* Send the length and then the packet to the agent. */ |
125 | if (atomicio(vwrite, auth->fd, buf, 4) != 4 || | 136 | if (atomicio(vwrite, auth->fd, buf, 4) != 4 || |
@@ -138,7 +149,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply | |||
138 | } | 149 | } |
139 | 150 | ||
140 | /* Extract the length, and check it for sanity. */ | 151 | /* Extract the length, and check it for sanity. */ |
141 | len = GET_32BIT(buf); | 152 | len = get_u32(buf); |
142 | if (len > 256 * 1024) | 153 | if (len > 256 * 1024) |
143 | fatal("Authentication response too long: %u", len); | 154 | fatal("Authentication response too long: %u", len); |
144 | 155 | ||
@@ -335,7 +346,6 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio | |||
335 | break; | 346 | break; |
336 | default: | 347 | default: |
337 | return NULL; | 348 | return NULL; |
338 | break; | ||
339 | } | 349 | } |
340 | /* Decrement the number of remaining entries. */ | 350 | /* Decrement the number of remaining entries. */ |
341 | auth->howmany--; | 351 | auth->howmany--; |
@@ -394,7 +404,7 @@ ssh_decrypt_challenge(AuthenticationConnection *auth, | |||
394 | * fatal error if the packet is corrupt. | 404 | * fatal error if the packet is corrupt. |
395 | */ | 405 | */ |
396 | for (i = 0; i < 16; i++) | 406 | for (i = 0; i < 16; i++) |
397 | response[i] = buffer_get_char(&buffer); | 407 | response[i] = (u_char)buffer_get_char(&buffer); |
398 | } | 408 | } |
399 | buffer_free(&buffer); | 409 | buffer_free(&buffer); |
400 | return success; | 410 | return success; |
@@ -517,7 +527,6 @@ ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key, | |||
517 | default: | 527 | default: |
518 | buffer_free(&msg); | 528 | buffer_free(&msg); |
519 | return 0; | 529 | return 0; |
520 | break; | ||
521 | } | 530 | } |
522 | if (constrained) { | 531 | if (constrained) { |
523 | if (life != 0) { | 532 | if (life != 0) { |