- Timestamp:
- Jun 19, 2008, 3:44:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/common/oursrc/whoisd/whoisd.tac
r771 r772 8 8 def lineReceived(self, hostname): 9 9 (key, hostname) = hostname.split('=',2) 10 if key != '0xvVk043ZT61jR1bAlX0JSzM':10 if key != self.factory.key: 11 11 self.transport.write("Unauthorized to use whois"+"\r\n") 12 12 self.transport.loseConnection() … … 19 19 class WhoisFactory(protocol.ServerFactory): 20 20 protocol = WhoisProtocol 21 def __init__(self, vhostDir, ldap_URL, ldap_base ):21 def __init__(self, vhostDir, ldap_URL, ldap_base, keyFile): 22 22 self.vhostDir = vhostDir 23 23 self.ldap_URL = ldap_URL … … 27 27 if vhostDir: 28 28 self.rescanVhosts() 29 self.key = file(keyFile).read() 29 30 def rescanVhosts(self): 30 31 newVhosts = {} … … 94 95 application = service.Application('whois', uid=99, gid=99) 95 96 factory = WhoisFactory(None, 96 "ldap://localhost", "ou=VirtualHosts,dc=scripts,dc=mit,dc=edu" )97 "ldap://localhost", "ou=VirtualHosts,dc=scripts,dc=mit,dc=edu", "/etc/whoisd-password") 97 98 internet.TCPServer(43, factory).setServiceParent( 98 99 service.IServiceCollection(application))
Note: See TracChangeset
for help on using the changeset viewer.