=== modified file 'mandos' --- mandos 2012-01-01 20:56:41 +0000 +++ mandos 2012-01-02 01:58:41 +0000 @@ -422,7 +422,7 @@ secret: bytestring; sent verbatim (over TLS) to client timeout: datetime.timedelta(); How long from last_checked_ok until this client is disabled - extended_timeout: extra long timeout when password has been sent + extended_timeout: extra long timeout when secret has been sent runtime_expansions: Allowed attributes for runtime expansion. expires: datetime.datetime(); time (UTC) when a client will be disabled, or None @@ -1049,9 +1049,6 @@ def __init__(self, bus = None, *args, **kwargs): self.bus = bus Client.__init__(self, *args, **kwargs) - self._approvals_pending = 0 - - self._approvals_pending = 0 # Only now, when this client is initialized, can it show up on # the D-Bus client_object_name = unicode(self.name).translate( @@ -1227,11 +1224,11 @@ "D-Bus signal" return self.need_approval() - # NeRwequest - signal + # NewRequest - signal @dbus.service.signal(_interface, signature="s") def NewRequest(self, ip): """D-Bus signal - Is sent after a client request a password. + Is sent after a client request a secret. """ pass @@ -1549,7 +1546,7 @@ if self.server.use_dbus: # Emit D-Bus signal - client.NewRequest(str(self.client_address)) + client.NewRequest(unicode(self.client_address)[0]) if client.approval_delay: delay = client.approval_delay @@ -2250,21 +2247,22 @@ # Clients who has passed its expire date can still be # enabled if its last checker was successful. Clients - # whose checker failed before we stored its state is - # assumed to have failed all checkers during downtime. + # whose checker succeeded before we stored its state is + # assumed to have successfully run all checkers during + # downtime. if client["enabled"]: if datetime.datetime.utcnow() >= client["expires"]: if not client["last_checked_ok"]: logger.warning( "disabling client {0} - Client never " - "performed a successfull checker" - .format(client["name"])) + "performed a successful checker" + .format(client_name)) client["enabled"] = False elif client["last_checker_status"] != 0: logger.warning( "disabling client {0} - Client " "last checker failed with error code {1}" - .format(client["name"], + .format(client_name, client["last_checker_status"])) client["enabled"] = False else: @@ -2273,7 +2271,7 @@ + client["timeout"]) logger.debug("Last checker succeeded," " keeping {0} enabled" - .format(client["name"])) + .format(client_name)) try: client["secret"] = ( pgp.decrypt(client["encrypted_secret"], @@ -2295,7 +2293,7 @@ - set(old_client_settings)): clients_data[client_name] = client_settings[client_name] - # Create clients all clients + # Create all client objects for client_name, client in clients_data.iteritems(): tcp_server.clients[client_name] = client_class( name = client_name, settings = client)