diff --git a/pam_auth_provider.py b/pam_auth_provider.py index bb3d6ae..e15975d 100644 --- a/pam_auth_provider.py +++ b/pam_auth_provider.py @@ -1,12 +1,12 @@ # Copyright 2017 Willem Mulder -# +# # Licensed under the EUPL, Version 1.1 or - as soon they will be approved by # the European Commission - subsequent versions of the EUPL (the "Licence"); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the Licence at: -# +# # https://joinup.ec.europa.eu/software/page/eupl -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the Licence is distributed on an "AS IS" basis, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,7 +44,7 @@ def check_password(self, user_id, password): defer.returnValue(False) # Now check the password - if not pam.authenticate(localpart, password, service='matrix-synapse'): + if not pam.pam().authenticate(localpart, password, service='matrix-synapse'): defer.returnValue(False) # From here on, the user is authenticated diff --git a/setup.py b/setup.py index 2cad50c..24ff26b 100755 --- a/setup.py +++ b/setup.py @@ -1,14 +1,14 @@ #!/usr/bin/env python # Copyright 2017 Willem Mulder -# +# # Licensed under the EUPL, Version 1.1 or - as soon they will be approved by # the European Commission - subsequent versions of the EUPL (the "Licence"); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the Licence at: -# +# # https://joinup.ec.europa.eu/software/page/eupl -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the Licence is distributed on an "AS IS" basis, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,11 +19,11 @@ setup( name="matrix-synapse-pam", - version="0.1.1", + version="0.1.2", py_modules=['pam_auth_provider'], install_requires=[ "Twisted>=8.0.0", - "pam" + "python-pam" ], author="Willem Mulder",