summaryrefslogtreecommitdiffstats
path: root/kolabd
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-23 13:11:33 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-23 13:11:33 +0000
commite853de01cbc077e9cd31b2f479631ed87dfd1a30 (patch)
tree6ab5584606aad1c4f21d3cdac0ad36e1127218bb /kolabd
parentc125bb6af218622da1426ee37b503e04471c6c3a (diff)
downloadpykolab-e853de01cbc077e9cd31b2f479631ed87dfd1a30.tar.gz
Remove the saslauthd component from kolabd
Diffstat (limited to 'kolabd')
-rw-r--r--kolabd/__init__.py45
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()