]> andersk Git - openssh.git/blobdiff - session.c
- stevesk@cvs.openbsd.org 2006/07/06 17:36:37
[openssh.git] / session.c
index 87e7ee6e310208a62629ae85c61f402ad625092c..9115c5aa1553d6af240f021d370d60827211a785 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.203 2006/04/20 21:53:44 djm Exp $ */
+/* $OpenBSD: session.c,v 1.206 2006/07/06 16:03:53 stevesk Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
 #include <sys/wait.h>
 #include <sys/un.h>
 
+#include <grp.h>
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 #endif
+#include <pwd.h>
 #include <signal.h>
+#include <arpa/inet.h>
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -1839,7 +1842,7 @@ session_subsystem_req(Session *s)
        struct stat st;
        u_int len;
        int success = 0;
-       char *cmd, *subsys = packet_get_string(&len);
+       char *prog, *cmd, *subsys = packet_get_string(&len);
        u_int i;
 
        packet_check_eom();
@@ -1847,9 +1850,10 @@ session_subsystem_req(Session *s)
 
        for (i = 0; i < options.num_subsystems; i++) {
                if (strcmp(subsys, options.subsystem_name[i]) == 0) {
-                       cmd = options.subsystem_command[i];
-                       if (stat(cmd, &st) < 0) {
-                               error("subsystem: cannot stat %s: %s", cmd,
+                       prog = options.subsystem_command[i];
+                       cmd = options.subsystem_args[i];
+                       if (stat(prog, &st) < 0) {
+                               error("subsystem: cannot stat %s: %s", prog,
                                    strerror(errno));
                                break;
                        }
This page took 0.0471 seconds and 4 git commands to generate.