Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: third_party/twisted_8_1/twisted/conch/tap.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 #
5 # Twisted, the Framework of Your Internet
6 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
7 # See LICENSE for details.
8
9
10 """
11 I am a support module for making SSH servers with mktap.
12 """
13
14 from twisted.conch import checkers, unix
15 from twisted.conch.openssh_compat import factory
16 from twisted.cred import portal
17 from twisted.python import usage
18 from twisted.application import strports
19
20
21 class Options(usage.Options):
22 synopsis = "Usage: mktap conch [-i <interface>] [-p <port>] [-d <dir>] "
23 longdesc = "Makes a Conch SSH server.."
24 optParameters = [
25 ["interface", "i", "", "local interface to which we listen"],
26 ["port", "p", "22", "Port on which to listen"],
27 ["data", "d", "/etc", "directory to look for host keys in"],
28 ["moduli", "", None, "directory to look for moduli in "
29 "(if different from --data)"]
30 ]
31 zsh_actions = {"data" : "_dirs", "moduli" : "_dirs"}
32
33
34 def makeService(config):
35 t = factory.OpenSSHFactory()
36 t.portal = portal.Portal(unix.UnixSSHRealm())
37 t.portal.registerChecker(checkers.UNIXPasswordDatabase())
38 t.portal.registerChecker(checkers.SSHPublicKeyDatabase())
39 if checkers.pamauth:
40 t.portal.registerChecker(checkers.PluggableAuthenticationModulesChecker( ))
41 t.dataRoot = config['data']
42 t.moduliRoot = config['moduli'] or config['data']
43 port = config['port']
44 if config['interface']:
45 # Add warning here
46 port += ':interface='+config['interface']
47 return strports.service(port, t)
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/conch/stdio.py ('k') | third_party/twisted_8_1/twisted/conch/telnet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698