Changeset 771 for server/common/oursrc/whoisd
- Timestamp:
- Jun 19, 2008, 3:40:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/common/oursrc/whoisd/whoisd.tac
r762 r771 7 7 class WhoisProtocol(basic.LineReceiver): 8 8 def lineReceived(self, hostname): 9 self.factory.getWhois(hostname 10 ).addErrback(lambda _: "Internal error in server" 11 ).addCallback(lambda m: 12 (self.transport.write(m+"\r\n"), 13 self.transport.loseConnection())) 9 (key, hostname) = hostname.split('=',2) 10 if key != '0xvVk043ZT61jR1bAlX0JSzM': 11 self.transport.write("Unauthorized to use whois"+"\r\n") 12 self.transport.loseConnection() 13 else: 14 self.factory.getWhois(hostname 15 ).addErrback(lambda _: "Internal error in server" 16 ).addCallback(lambda m: 17 (self.transport.write(m+"\r\n"), 18 self.transport.loseConnection())) 14 19 class WhoisFactory(protocol.ServerFactory): 15 20 protocol = WhoisProtocol … … 69 74 user = pwd.getpwuid(int(attrs['apacheSuexecUid'])) 70 75 if user: 71 attrs['locker'] = user.pw_name p76 attrs['locker'] = user.pw_name 72 77 else: 73 78 attrs['locker'] = None
Note: See TracChangeset
for help on using the changeset viewer.