Remote IP logged for failed authentication attempts

This commit is contained in:
David Blockow
2015-12-08 15:00:29 +10:30
parent 2e7af82865
commit e59b3f3ab1

View File

@@ -236,7 +236,7 @@ class PAMAuthenticator(LocalAuthenticator):
try: try:
pamela.authenticate(username, data['password'], service=self.service) pamela.authenticate(username, data['password'], service=self.service)
except pamela.PAMError as e: except pamela.PAMError as e:
self.log.warn("PAM Authentication failed: %s", e) self.log.warn("PAM Authentication failed (@%s): %s", handler.request.remote_ip, e)
else: else:
return username return username