From 3f0482e523d598ed2be2eb77f5f0770e1c64f9c0 Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 31 Mar 2014 12:35:59 +0200 Subject: [PATCH] plugin account: reverted patch abd3a75d629c --- src/plugins/plugin_misc_account.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/plugins/plugin_misc_account.py b/src/plugins/plugin_misc_account.py index 7fb8c9eb..b303c943 100755 --- a/src/plugins/plugin_misc_account.py +++ b/src/plugins/plugin_misc_account.py @@ -64,7 +64,6 @@ class PasswordsMatchingError(Exception): class ProsodyRegisterProtocol(protocol.ProcessProtocol): """ Try to register an account with prosody """ - prosody_gid = None def __init__(self, password=None, deferred=None): """ @@ -74,14 +73,6 @@ class ProsodyRegisterProtocol(protocol.ProcessProtocol): self.password = password self.deferred = deferred self.data = '' - if ProsodyRegisterProtocol.prosody_gid is None: - try: - import grp - ProsodyRegisterProtocol.prosody_gid = grp.getgrnam("prosody").gr_gid - info("prosody gid found: %s" % ProsodyRegisterProtocol.prosody_gid) - except: - warning("Can't find prosody gid") - def connectionMade(self): if self.password is None: @@ -116,7 +107,7 @@ class ProsodyRegisterProtocol(protocol.ProcessProtocol): prosody_reg = ProsodyRegisterProtocol(password, d) prosody_exe = join(plugin._prosody_path, plugin.getConfig('prosodyctl')) # TODO delete account which are not on the same host - reactor.spawnProcess(prosody_reg, prosody_exe, [prosody_exe, command, "%s@%s" % (profile, plugin.getConfig('new_account_domain'))], path=plugin._prosody_path, gid=ProsodyRegisterProtocol.prosody_gid) + reactor.spawnProcess(prosody_reg, prosody_exe, [prosody_exe, command, "%s@%s" % (profile, plugin.getConfig('new_account_domain'))], path=plugin._prosody_path) return d