summaryrefslogtreecommitdiff
path: root/auth-options.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-06-12 16:16:35 +0000
committerColin Watson <cjwatson@debian.org>2007-06-12 16:16:35 +0000
commitb7e40fa9da0b5491534a429dadb321eab5a77558 (patch)
treebed1da11e9f829925797aa093e379fc0b5868ecd /auth-options.c
parent4f84beedf1005e44ff33c854abd6b711ffc0adb7 (diff)
parent086ea76990b1e6287c24b6db74adffd4605eb3b0 (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 'auth-options.c')
-rw-r--r--auth-options.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/auth-options.c b/auth-options.c
index ad97e6129..ca5e1c931 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-options.c,v 1.40 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
@@ -10,18 +11,31 @@
10 */ 11 */
11 12
12#include "includes.h" 13#include "includes.h"
13RCSID("$OpenBSD: auth-options.c,v 1.33 2005/12/08 18:34:11 reyk Exp $"); 14
15#include <sys/types.h>
16
17#include <netdb.h>
18#include <pwd.h>
19#include <string.h>
20#include <stdio.h>
21#include <stdarg.h>
14 22
15#include "xmalloc.h" 23#include "xmalloc.h"
16#include "match.h" 24#include "match.h"
17#include "log.h" 25#include "log.h"
18#include "canohost.h" 26#include "canohost.h"
27#include "buffer.h"
19#include "channels.h" 28#include "channels.h"
20#include "auth-options.h" 29#include "auth-options.h"
21#include "servconf.h" 30#include "servconf.h"
22#include "misc.h" 31#include "misc.h"
23#include "monitor_wrap.h" 32#include "key.h"
33#include "hostfile.h"
24#include "auth.h" 34#include "auth.h"
35#ifdef GSSAPI
36#include "ssh-gss.h"
37#endif
38#include "monitor_wrap.h"
25 39
26/* Flags set authorized_keys flags */ 40/* Flags set authorized_keys flags */
27int no_port_forwarding_flag = 0; 41int no_port_forwarding_flag = 0;
@@ -131,7 +145,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
131 forced_command = NULL; 145 forced_command = NULL;
132 goto bad_option; 146 goto bad_option;
133 } 147 }
134 forced_command[i] = 0; 148 forced_command[i] = '\0';
135 auth_debug_add("Forced command: %.900s", forced_command); 149 auth_debug_add("Forced command: %.900s", forced_command);
136 opts++; 150 opts++;
137 goto next_option; 151 goto next_option;
@@ -163,7 +177,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
163 xfree(s); 177 xfree(s);
164 goto bad_option; 178 goto bad_option;
165 } 179 }
166 s[i] = 0; 180 s[i] = '\0';
167 auth_debug_add("Adding to environment: %.900s", s); 181 auth_debug_add("Adding to environment: %.900s", s);
168 debug("Adding to environment: %.900s", s); 182 debug("Adding to environment: %.900s", s);
169 opts++; 183 opts++;
@@ -200,7 +214,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
200 xfree(patterns); 214 xfree(patterns);
201 goto bad_option; 215 goto bad_option;
202 } 216 }
203 patterns[i] = 0; 217 patterns[i] = '\0';
204 opts++; 218 opts++;
205 if (match_host_and_ip(remote_host, remote_ip, 219 if (match_host_and_ip(remote_host, remote_ip,
206 patterns) != 1) { 220 patterns) != 1) {
@@ -245,7 +259,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
245 xfree(patterns); 259 xfree(patterns);
246 goto bad_option; 260 goto bad_option;
247 } 261 }
248 patterns[i] = 0; 262 patterns[i] = '\0';
249 opts++; 263 opts++;
250 p = patterns; 264 p = patterns;
251 host = hpdelim(&p); 265 host = hpdelim(&p);
@@ -293,7 +307,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
293 forced_tun_device = -1; 307 forced_tun_device = -1;
294 goto bad_option; 308 goto bad_option;
295 } 309 }
296 tun[i] = 0; 310 tun[i] = '\0';
297 forced_tun_device = a2tun(tun, NULL); 311 forced_tun_device = a2tun(tun, NULL);
298 xfree(tun); 312 xfree(tun);
299 if (forced_tun_device == SSH_TUNID_ERR) { 313 if (forced_tun_device == SSH_TUNID_ERR) {