Bugfix: pam_normalize_username didn't return username

- A trivial bug caused by my last change to #2397 - made possible by
  the fact we didn't have a way to reliable test PAM stuff.
- Thanks to @narnish for noticing.
- Closes: #2875
This commit is contained in:
Richard Darst
2020-01-02 16:00:42 +02:00
committed by Erik Sundell
parent 68ad36e945
commit 0efb16793e

View File

@@ -981,6 +981,7 @@ class PAMAuthenticator(LocalAuthenticator):
uid = pwd.getpwnam(username).pw_uid
username = pwd.getpwuid(uid).pw_name
username = self.username_map.get(username, username)
return username
else:
return super().normalize_username(username)