]> andersk Git - openssh.git/blobdiff - ssh.c
- jmc@cvs.openbsd.org 2008/06/11 07:30:37
[openssh.git] / ssh.c
diff --git a/ssh.c b/ssh.c
index 3bcca53ee8861cb7719a08e2db6e185d3409a86e..e3737bb9ce65f749577b53f50b8f3dc0185406a8 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.313 2008/05/09 14:26:08 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.314 2008/06/10 22:15:23 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1151,6 +1151,15 @@ ssh_session2(void)
        if (!no_shell_flag || (datafellows & SSH_BUG_DUMMYCHAN))
                id = ssh_session2_open();
 
+       /* If we don't expect to open a new session, then disallow it */
+       if (options.control_master == SSHCTL_MASTER_NO) {
+               debug("Requesting no-more-sessions@openssh.com");
+               packet_start(SSH2_MSG_GLOBAL_REQUEST);
+               packet_put_cstring("no-more-sessions@openssh.com");
+               packet_put_char(0);
+               packet_send();
+       }
+
        /* Execute a local command */
        if (options.local_command != NULL &&
            options.permit_local_command)
This page took 0.033773 seconds and 4 git commands to generate.