diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-05-01 12:06:38 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-05-01 12:06:38 +0000 |
commit | c537c3acc5727a65dd41f94182391365ce022d27 (patch) | |
tree | dfee6154d69cb5e1ff9ff7801fec52eee89e5641 /pynslcd/pam.py | |
parent | 4dd7a4f46b8df6ea21654dae655e8b84f571ec9b (diff) |
small code improvements
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1451 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'pynslcd/pam.py')
-rw-r--r-- | pynslcd/pam.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pynslcd/pam.py b/pynslcd/pam.py index 2203e19..f680a1e 100644 --- a/pynslcd/pam.py +++ b/pynslcd/pam.py @@ -56,16 +56,16 @@ class PAMRequest(common.Request): # save the DN self.userdn = entry[0] # get the "real" username - value = common.get_rdn_value(entry, PasswdRequest.attmap_passwd_uid) + value = common.get_rdn_value(entry, passwd.PasswdRequest.attmap_passwd_uid) if not value: # get the username from the uid attribute - values = myldap_get_values(entry, PasswdRequest.attmap_passwd_uid) + values = myldap_get_values(entry, passwd.PasswdRequest.attmap_passwd_uid) if not values or not values[0]: - logging.warn('%s: is missing a %s attribute', entry.dn, PasswdRequest.attmap_passwd_uid) + logging.warn('%s: is missing a %s attribute', entry.dn, passwd.PasswdRequest.attmap_passwd_uid) value = values[0] # check the username if value and not common.isvalidname(value): - raise ValueError('%s: has invalid %s attribute', entry.dn, PasswdRequest.attmap_passwd_uid) + raise ValueError('%s: has invalid %s attribute', entry.dn, passwd.PasswdRequest.attmap_passwd_uid) # check if the username is different and update it if needed if value != self.username: logging.info('username changed from %r to %r', self.username, value) |