]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
Support SSH2_MSG_GLOBAL_REQUEST (just return failure)
authorSimon Tatham <anakin@pobox.com>
Thu, 10 Jan 2002 16:42:17 +0000 (16:42 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 10 Jan 2002 16:42:17 +0000 (16:42 +0000)
git-svn-id: http://svn.tartarus.org/sgt/putty@1542 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index 8fac56805f023cf8191e8bac0d5bd984e849de92..22b8f5e76bbe0433b120f83f97b74a770234448a 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -5138,6 +5138,23 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
                        ssh2_pkt_send();
                    }
                }
+           } else if (pktin.type == SSH2_MSG_GLOBAL_REQUEST) {
+               char *type;
+               int typelen, want_reply;
+
+               ssh2_pkt_getstring(&type, &typelen);
+               want_reply = ssh2_pkt_getbool();
+
+                /*
+                 * We currently don't support any global requests
+                 * at all, so we either ignore the request or
+                 * respond with REQUEST_FAILURE, depending on
+                 * want_reply.
+                 */
+                if (want_reply) {
+                    ssh2_pkt_init(SSH2_MSG_REQUEST_FAILURE);
+                    ssh2_pkt_send();
+               }
            } else if (pktin.type == SSH2_MSG_CHANNEL_OPEN) {
                char *type;
                int typelen;