diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2010-04-11 17:18:50 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2010-04-11 17:18:50 +0400 |
commit | 1d6a58578fdb2b9dafb8715e06f8238bd943bc61 (patch) | |
tree | 1982122267e36a69719a6b4c82aa00dfc8f100ba /Authenticators | |
parent | f60b2567ee154edb00ebd3f36c7404bef8bba1ab (diff) |
Make all script compatible with the Murmur 1.2.3 slicefile. Extend mice.py to dynload the slice from the server.
Diffstat (limited to 'Authenticators')
-rw-r--r-- | Authenticators/SMF/smfauth.py | 11 | ||||
-rw-r--r-- | Authenticators/phpBB3/phpBB3auth.py | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Authenticators/SMF/smfauth.py b/Authenticators/SMF/smfauth.py index f7ec83a..46d2cee 100644 --- a/Authenticators/SMF/smfauth.py +++ b/Authenticators/SMF/smfauth.py @@ -46,7 +46,6 @@ import thread import logging import urllib2 import ConfigParser -import re from logging import (debug, info, @@ -227,7 +226,7 @@ def do_main_program(): #--- Authenticator implementation # All of this has to go in here so we can correctly daemonize the tool # without loosing the file descriptors opened by the Ice module - Ice.loadSlice(cfg.ice.slice) + Ice.loadSlice('', ['-I' + Ice.getSliceDir(), cfg.ice.slice]) import Murmur class smfauthenticatorApp(Ice.Application): @@ -276,11 +275,12 @@ def do_main_program(): adapter.activate() try: + authprx = adapter.addWithUUID(smfauthenticator()) + auth = Murmur.ServerUpdatingAuthenticatorPrx.uncheckedCast(authprx) + for server in meta.getBootedServers(): if not cfg.murmur.servers or server.id() in cfg.murmur.servers: info('Setting authenticator for server %d', server.id()) - authprx = adapter.addWithUUID(smfauthenticator(server, adapter)) - auth = Murmur.ServerUpdatingAuthenticatorPrx.uncheckedCast(authprx) server.setAuthenticator(auth) except (Murmur.InvalidSecretException, Ice.UnknownUserException), e: if hasattr(e, "unknown") and e.unknown != "Murmur::InvalidSecretException": @@ -316,9 +316,8 @@ def do_main_program(): class smfauthenticator(Murmur.ServerUpdatingAuthenticator): texture_cache = {} - def __init__(self, server, adapter): + def __init__(self): Murmur.ServerUpdatingAuthenticator.__init__(self) - self.server = server @checkSecret def authenticate(self, name, pw, certlist, certhash, strong, current = None): diff --git a/Authenticators/phpBB3/phpBB3auth.py b/Authenticators/phpBB3/phpBB3auth.py index 2dcf22a..898f2b6 100644 --- a/Authenticators/phpBB3/phpBB3auth.py +++ b/Authenticators/phpBB3/phpBB3auth.py @@ -200,7 +200,7 @@ def do_main_program(): #--- Authenticator implementation # All of this has to go in here so we can correctly daemonize the tool # without loosing the file descriptors opened by the Ice module - Ice.loadSlice(cfg.ice.slice) + Ice.loadSlice('', ['-I' + Ice.getSliceDir(), cfg.ice.slice]) import Murmur class phpBBauthenticatorApp(Ice.Application): |