summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2004-12-13 07:31:01 +0000
committerRobey Pointer <robey@lag.net>2004-12-13 07:31:01 +0000
commit1cf0d33f1d5bf8f71bab0b49d1fa37116c38a86d (patch)
tree6e706fdcf7e017bdf3c9dffcb3eda3ba77350b38
parentcaa8d4cf4166e134cc59a8acf4d4b6f07fd7c252 (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-132]
oops (continued) er, part 2 of that.
-rw-r--r--paramiko/server.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/paramiko/server.py b/paramiko/server.py
index d09c1a69..7493e2c0 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