Changeset View
Changeset View
Standalone View
Standalone View
saslauthd/__init__.py
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | def do_saslauthd(self): | ||||
try: | try: | ||||
success = auth.authenticate(login) | success = auth.authenticate(login) | ||||
except: | except: | ||||
success = False | success = False | ||||
if success: | if success: | ||||
# #1170: Catch broken pipe error (incomplete authentication request) | # #1170: Catch broken pipe error (incomplete authentication request) | ||||
try: | try: | ||||
clientsocket.send(struct.pack("!H2s", 2, "OK")) | clientsocket.send(struct.pack("!H2s", 2, b"OK")) | ||||
except: | except: | ||||
pass | pass | ||||
else: | else: | ||||
# #1170: Catch broken pipe error (incomplete authentication request) | # #1170: Catch broken pipe error (incomplete authentication request) | ||||
try: | try: | ||||
clientsocket.send(struct.pack("!H2s", 2, "NO")) | clientsocket.send(struct.pack("!H2s", 2, b"NO")) | ||||
except: | except: | ||||
pass | pass | ||||
clientsocket.close() | clientsocket.close() | ||||
auth.disconnect() | auth.disconnect() | ||||
def reload_config(self, *args, **kw): | def reload_config(self, *args, **kw): | ||||
pass | pass | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |