From 1cf0d33f1d5bf8f71bab0b49d1fa37116c38a86d Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Mon, 13 Dec 2004 07:31:01 +0000 Subject: [PATCH] [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-132] oops (continued) er, part 2 of that. --- paramiko/server.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/paramiko/server.py b/paramiko/server.py index d09c1a6..7493e2c 100644 --- a/paramiko/server.py +++ b/paramiko/server.py @@ -179,6 +179,35 @@ class ServerInterface (object): @rtype: int """ return AUTH_FAILED + + def check_global_request(self, kind, msg): + """ + Handle a global request of the given C{kind}. This method is called + in server mode and client mode, whenever the remote host makes a global + request. If there are any arguments to the request, they will be in + C{msg}. + + There aren't any useful global requests defined, aside from port + forwarding, so usually this type of request is an extension to the + protocol. + + If the request was successful and you would like to return contextual + data to the remote host, return a tuple. Items in the tuple will be + sent back with the successful result. (Note that the items in the + tuple can only be strings, ints, longs, or bools.) + + The default implementation always returns C{False}, indicating that it + does not support any global requests. + + @param kind: the kind of global request being made. + @type kind: str + @param msg: any extra arguments to the request. + @type msg: L{Message} + @return: C{True} or a tuple of data if the request was granted; + C{False} otherwise. + @rtype: bool + """ + return False ### Channel requests