nss-pam-ldapd commit: r1437 - nss-pam-ldapd/pynslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1437 - nss-pam-ldapd/pynslcd
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1437 - nss-pam-ldapd/pynslcd
- Date: Thu, 28 Apr 2011 20:32:54 +0200 (CEST)
Author: arthur
Date: Thu Apr 28 20:32:52 2011
New Revision: 1437
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1437
Log:
remove duplicate and wrong write() method
Modified:
nss-pam-ldapd/pynslcd/group.py
Modified: nss-pam-ldapd/pynslcd/group.py
==============================================================================
--- nss-pam-ldapd/pynslcd/group.py Sun Apr 24 23:01:04 2011 (r1436)
+++ nss-pam-ldapd/pynslcd/group.py Thu Apr 28 20:32:52 2011 (r1437)
@@ -48,39 +48,6 @@
def write(self, entry):
dn, attributes = entry
- # get uid attribute and check against requested user name
- names = attributes.get('uid', [])
- if self.name:
- if self.name not in names:
- return
- names = ( self.name, )
- # get user password entry
- passwd = '*'
- # get numeric user and group ids
- uids = ( self.uid, ) if self.uid else
attributes.get(self.attmap_group_uidNumber, [])
- uids = [ int(x) for x in uids ]
- ( gid, ) = attributes[self.attmap_group_gidNumber]
- gid = int(gid)
- # FIXME: use expression here
- gecos = attributes.get(self.attmap_group_gecos, [None])[0] or
attributes.get(self.attmap_group_cn, [''])[0]
- ( home, ) = attributes.get(self.attmap_group_homeDirectory, [''])
- ( shell, ) = attributes.get(self.attmap_group_loginShell, [''])
- for name in names:
- if not common.isvalidname(name):
- print 'Warning: group entry %s contains invalid user name:
"%s"' % ( dn, name )
- else:
- for uid in uids:
- self.fp.write_int32(constants.NSLCD_RESULT_BEGIN)
- self.fp.write_string(name)
- self.fp.write_string(passwd)
- self.fp.write_uid_t(uid)
- self.fp.write_gid_t(gid)
- self.fp.write_string(gecos)
- self.fp.write_string(home)
- self.fp.write_string(shell)
-
- def write(self, entry):
- dn, attributes = entry
# get group names and check against requested group name
names = attributes.get(self.attmap_group_cn, [])
if self.name:
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits
- nss-pam-ldapd commit: r1437 - nss-pam-ldapd/pynslcd,
Commits of the nss-pam-ldapd project