Changeset - 92ebcf7d8042
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 10 years ago 2015-10-20 20:15:04
madski@unity3d.com
auth_pam: fix crash caused by colliding variable names

Regression introduced in 03afa7766ac7.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/auth_modules/auth_pam.py
Show inline comments
 
@@ -120,15 +120,15 @@ class KallitheaAuthPlugin(auth_modules.K
 
            'active': active,
 
            "active_from_extern": None,
 
            'extern_name': username,
 
        }
 

	
 
        try:
 
            user_data = pwd.getpwnam(username)
 
            user_pw_data = pwd.getpwnam(username)
 
            regex = settings["gecos"]
 
            match = re.search(regex, user_data.pw_gecos)
 
            match = re.search(regex, user_pw_data.pw_gecos)
 
            if match:
 
                user_data["firstname"] = match.group('first_name')
 
                user_data["lastname"] = match.group('last_name')
 
        except Exception:
 
            log.warning("Cannot extract additional info for PAM user %s", username)
 
            pass
0 comments (0 inline, 0 general)