Changeset View
Changeset View
Standalone View
Standalone View
saslauthd/__init__.py
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | def do_saslauthd(self): | ||||
# TODO: The saslauthd socket path could be a setting. | # TODO: The saslauthd socket path could be a setting. | ||||
try: | try: | ||||
os.remove(conf.socketfile) | os.remove(conf.socketfile) | ||||
except: | except: | ||||
# TODO: Do the "could not remove, could not start" dance | # TODO: Do the "could not remove, could not start" dance | ||||
pass | pass | ||||
s.bind(conf.socketfile) | s.bind(conf.socketfile) | ||||
os.chmod(conf.socketfile, 0777) | os.chmod(conf.socketfile, 0o777) | ||||
s.listen(5) | s.listen(5) | ||||
while 1: | while 1: | ||||
max_tries = 20 | max_tries = 20 | ||||
cur_tries = 0 | cur_tries = 0 | ||||
bound = False | bound = False | ||||
while not bound: | while not bound: | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |