diff options
author | Michael Ziegler <diese-addy@funzt-halt.net> | 2012-07-15 19:08:40 +0400 |
---|---|---|
committer | Michael Ziegler <diese-addy@funzt-halt.net> | 2012-07-15 19:08:40 +0400 |
commit | f2dcb258631a08f36f38922683424477e49356c7 (patch) | |
tree | 25b076f005facb318e7dba39feaf827a5c0570b5 | |
parent | a2285b51c4c2d89712574c5e9b216f23e6e65c05 (diff) |
apply the changes from phpBB3auth.py to SMF authenticators
-rw-r--r-- | Authenticators/SMF/1.x/smfauth.py | 7 | ||||
-rwxr-xr-x | Authenticators/SMF/2.0/smfauth.py | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Authenticators/SMF/1.x/smfauth.py b/Authenticators/SMF/1.x/smfauth.py index 2f0e901..5e387ac 100644 --- a/Authenticators/SMF/1.x/smfauth.py +++ b/Authenticators/SMF/1.x/smfauth.py @@ -248,7 +248,12 @@ 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('', ['-I' + Ice.getSliceDir(), cfg.ice.slice]) + slicedir = Ice.getSliceDir() + if not slicedir: + slicedir = ["-I/usr/share/Ice/slice", "-I/usr/share/slice"] + else: + slicedir = ['-I' + slicedir] + Ice.loadSlice('', slicedir + [cfg.ice.slice]) import Murmur class smfauthenticatorApp(Ice.Application): diff --git a/Authenticators/SMF/2.0/smfauth.py b/Authenticators/SMF/2.0/smfauth.py index fa6c6d8..f6efebf 100755 --- a/Authenticators/SMF/2.0/smfauth.py +++ b/Authenticators/SMF/2.0/smfauth.py @@ -248,7 +248,12 @@ 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('', ['-I' + Ice.getSliceDir(), cfg.ice.slice]) + slicedir = Ice.getSliceDir() + if not slicedir: + slicedir = ["-I/usr/share/Ice/slice", "-I/usr/share/slice"] + else: + slicedir = ['-I' + slicedir] + Ice.loadSlice('', slicedir + [cfg.ice.slice]) import Murmur class smfauthenticatorApp(Ice.Application): |