diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-03-23 13:11:33 +0000 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-03-23 13:11:33 +0000 |
commit | e853de01cbc077e9cd31b2f479631ed87dfd1a30 (patch) | |
tree | 6ab5584606aad1c4f21d3cdac0ad36e1127218bb /kolabd/__init__.py | |
parent | c125bb6af218622da1426ee37b503e04471c6c3a (diff) | |
download | pykolab-e853de01cbc077e9cd31b2f479631ed87dfd1a30.tar.gz |
Remove the saslauthd component from kolabd
Diffstat (limited to 'kolabd/__init__.py')
-rw-r--r-- | kolabd/__init__.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/kolabd/__init__.py b/kolabd/__init__.py index b21e17a..86210cc 100644 --- a/kolabd/__init__.py +++ b/kolabd/__init__.py @@ -129,48 +129,3 @@ class KolabDaemon(object): # Give up the memory del imap del auth - - def do_saslauthd(self): - import binascii - import socket - import struct - - s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - - # TODO: The saslauthd socket path could be a setting. - - try: - os.remove('/var/run/saslauthd/mux') - except: - pass - - s.bind('/var/run/saslauthd/mux') - os.chmod('/var/run/saslauthd/mux', 0777) - - s.listen(5) - - while 1: - (clientsocket, address) = s.accept() - received = clientsocket.recv(4096) - - login = [] - - start = 0 - end = 2 - - while end < len(received): - (length,) = struct.unpack("!H", received[start:end]) - start += 2 - end += length - (value,) = struct.unpack("!%ds" %(length), received[start:end]) - start += length - end = start + 2 - login.append(value) - - auth = Auth(self.conf) - if auth.authenticate(login): - clientsocket.send(struct.pack("!H2s", 2, "OK")) - else: - clientsocket.send(struct.pack("!H2s", 2, "NO")) - - clientsocket.close() |