diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | session.c | 14 |
2 files changed, 12 insertions, 7 deletions
@@ -67,6 +67,11 @@ | |||
67 | with ForceCommand=internal-sftp with a shell session (i.e. not a | 67 | with ForceCommand=internal-sftp with a shell session (i.e. not a |
68 | subsystem session). Avoids stuck client when attempting to ssh to such a | 68 | subsystem session). Avoids stuck client when attempting to ssh to such a |
69 | service. ok dtucker@ | 69 | service. ok dtucker@ |
70 | - dtucker@cvs.openbsd.org 2009/11/20 00:15:41 | ||
71 | [session.c] | ||
72 | Warn but do not fail if stat()ing the subsystem binary fails. This helps | ||
73 | with chrootdirectory+forcecommand=sftp-server and restricted shells. | ||
74 | bz #1599, ok djm. | ||
70 | 75 | ||
71 | 20091226 | 76 | 20091226 |
72 | - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1 | 77 | - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1 |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.248 2009/11/19 23:39:50 djm Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.249 2009/11/20 00:15:41 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -2121,16 +2121,16 @@ session_subsystem_req(Session *s) | |||
2121 | if (strcmp(subsys, options.subsystem_name[i]) == 0) { | 2121 | if (strcmp(subsys, options.subsystem_name[i]) == 0) { |
2122 | prog = options.subsystem_command[i]; | 2122 | prog = options.subsystem_command[i]; |
2123 | cmd = options.subsystem_args[i]; | 2123 | cmd = options.subsystem_args[i]; |
2124 | if (!strcmp(INTERNAL_SFTP_NAME, prog)) { | 2124 | if (strcmp(INTERNAL_SFTP_NAME, prog) == 0) { |
2125 | s->is_subsystem = SUBSYSTEM_INT_SFTP; | 2125 | s->is_subsystem = SUBSYSTEM_INT_SFTP; |
2126 | } else if (stat(prog, &st) < 0) { | 2126 | debug("subsystem: %s", prog); |
2127 | error("subsystem: cannot stat %s: %s", prog, | ||
2128 | strerror(errno)); | ||
2129 | break; | ||
2130 | } else { | 2127 | } else { |
2128 | if (stat(prog, &st) < 0) | ||
2129 | debug("subsystem: cannot stat %s: %s", | ||
2130 | prog, strerror(errno)); | ||
2131 | s->is_subsystem = SUBSYSTEM_EXT; | 2131 | s->is_subsystem = SUBSYSTEM_EXT; |
2132 | debug("subsystem: exec() %s", cmd); | ||
2132 | } | 2133 | } |
2133 | debug("subsystem: exec() %s", cmd); | ||
2134 | success = do_exec(s, cmd) == 0; | 2134 | success = do_exec(s, cmd) == 0; |
2135 | break; | 2135 | break; |
2136 | } | 2136 | } |