]> andersk Git - openssh.git/commitdiff
- dtucker@cvs.openbsd.org 2009/11/20 00:15:41
authordtucker <dtucker>
Fri, 8 Jan 2010 06:09:50 +0000 (06:09 +0000)
committerdtucker <dtucker>
Fri, 8 Jan 2010 06:09:50 +0000 (06:09 +0000)
     [session.c]
     Warn but do not fail if stat()ing the subsystem binary fails.  This helps
     with chrootdirectory+forcecommand=sftp-server and restricted shells.
     bz #1599, ok djm.

ChangeLog
session.c

index 0ece9c09d646e91eef99fb88690559afa5ddee05..16b9c133a887bf2a53094a90fbfe4a9cff85f42c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      with ForceCommand=internal-sftp with a shell session (i.e. not a
      subsystem session). Avoids stuck client when attempting to ssh to such a
      service. ok dtucker@
+   - dtucker@cvs.openbsd.org 2009/11/20 00:15:41
+     [session.c]
+     Warn but do not fail if stat()ing the subsystem binary fails.  This helps
+     with chrootdirectory+forcecommand=sftp-server and restricted shells.
+     bz #1599, ok djm.
 
 20091226
  - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1
index cc205386f3d1b597ac9630529caa0132f477cd02..733b5a9095c225885a30dc50bd6cb767050fbb90 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.248 2009/11/19 23:39:50 djm Exp $ */
+/* $OpenBSD: session.c,v 1.249 2009/11/20 00:15:41 dtucker Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -2121,16 +2121,16 @@ session_subsystem_req(Session *s)
                if (strcmp(subsys, options.subsystem_name[i]) == 0) {
                        prog = options.subsystem_command[i];
                        cmd = options.subsystem_args[i];
-                       if (!strcmp(INTERNAL_SFTP_NAME, prog)) {
+                       if (strcmp(INTERNAL_SFTP_NAME, prog) == 0) {
                                s->is_subsystem = SUBSYSTEM_INT_SFTP;
-                       } else if (stat(prog, &st) < 0) {
-                               error("subsystem: cannot stat %s: %s", prog,
-                                   strerror(errno));
-                               break;
+                               debug("subsystem: %s", prog);
                        } else {
+                               if (stat(prog, &st) < 0)
+                                       debug("subsystem: cannot stat %s: %s",
+                                           prog, strerror(errno));
                                s->is_subsystem = SUBSYSTEM_EXT;
+                               debug("subsystem: exec() %s", cmd);
                        }
-                       debug("subsystem: exec() %s", cmd);
                        success = do_exec(s, cmd) == 0;
                        break;
                }
This page took 0.097038 seconds and 5 git commands to generate.