Ticket #1879: CSFactorySecurity.2.diff
File CSFactorySecurity.2.diff, 1.3 KB (added by , 16 years ago) |
---|
-
pb.py
1023 1023 protocol = Broker 1024 1024 unsafeTracebacks = 0 1025 1025 1026 def __init__(self ):1026 def __init__(self,security=globalSecurity): 1027 1027 self._reset() 1028 self.security=security 1028 1029 1029 1030 def _reset(self): 1030 1031 self.rootObjectRequests = [] # list of deferred … … 1052 1053 1053 1054 def clientConnectionMade(self, broker): 1054 1055 self._broker = broker 1056 self._broker.security=self.security 1055 1057 self._root = broker.remoteForName("root") 1056 1058 ds = self.rootObjectRequests 1057 1059 self.rootObjectRequests = [] … … 1116 1118 # object broker factory 1117 1119 protocol = Broker 1118 1120 1119 def __init__(self, root, unsafeTracebacks=False ):1121 def __init__(self, root, unsafeTracebacks=False,security=globalSecurity): 1120 1122 self.root = IPBRoot(root) 1121 1123 self.unsafeTracebacks = unsafeTracebacks 1124 self.security=security 1122 1125 1123 1126 def buildProtocol(self, addr): 1124 1127 """Return a Broker attached to me (as the service provider). 1125 1128 """ 1126 proto = self.protocol(0 )1129 proto = self.protocol(0, security=self.security) 1127 1130 proto.factory = self 1128 1131 proto.setNameForLocal("root", self.root.rootObject(proto)) 1129 1132 return proto