Index: trunk/tools/subversion/user-management/modify-ldap-group |
— | — | @@ -67,23 +67,23 @@ |
68 | 68 | checkuid = pwd.getpwnam(raw_member) |
69 | 69 | |
70 | 70 | membertoadd = 'uid=' + raw_member + ',ou=people,' + base |
71 | | - # uniqueMember expects DNs |
72 | | - if 'uniqueMember' in NewPosixData.keys(): |
73 | | - if membertoadd in NewPosixData['uniqueMember']: |
| 71 | + # member expects DNs |
| 72 | + if 'member' in NewPosixData.keys(): |
| 73 | + if membertoadd in NewPosixData['member']: |
74 | 74 | sys.stderr.write(raw_member + " is already a member of the group, skipping.\n") |
75 | 75 | else: |
76 | | - NewPosixData['uniqueMember'].append(membertoadd) |
| 76 | + NewPosixData['member'].append(membertoadd) |
77 | 77 | else: |
78 | | - NewPosixData['uniqueMember'] = [ membertoadd ] |
| 78 | + NewPosixData['member'] = [ membertoadd ] |
79 | 79 | except KeyError: |
80 | 80 | sys.stderr.write(raw_member + " doesn't exist, and won't be added to the group.\n") |
81 | 81 | elif options.deleteMembers: |
82 | 82 | raw_members = options.deleteMembers.split(',') |
83 | 83 | for raw_member in raw_members: |
84 | 84 | membertoremove = 'uid=' + raw_member + ',ou=people,' + base |
85 | | - if 'uniqueMember' in NewPosixData.keys(): |
86 | | - if membertoremove in NewPosixData['uniqueMember']: |
87 | | - NewPosixData['uniqueMember'].remove(membertoremove) |
| 85 | + if 'member' in NewPosixData.keys(): |
| 86 | + if membertoremove in NewPosixData['member']: |
| 87 | + NewPosixData['member'].remove(membertoremove) |
88 | 88 | else: |
89 | 89 | sys.stderr.write(raw_member + " isn't a member of the group, skipping.\n") |
90 | 90 | else: |
Index: trunk/tools/subversion/user-management/add-ldap-group |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | |
38 | 38 | dn = 'cn=' + groupname + ',ou=group,' + base |
39 | 39 | cn = groupname |
40 | | - objectClasses = ['posixGroup', 'groupOfUniqueNames', 'top'] |
| 40 | + objectClasses = ['posixGroup', 'groupOfNames', 'top'] |
41 | 41 | if options.gidNumber: |
42 | 42 | try: |
43 | 43 | groupcheck = grp.getgrgid(options.gidNumber) |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | # TODO: make this use LDAP calls instead of getent |
66 | 66 | checkuid = pwd.getpwnam(raw_member) |
67 | 67 | |
68 | | - # uniqueMember expects DNs |
| 68 | + # member expects DNs |
69 | 69 | members.append('uid=' + raw_member + ',ou=people,' + base) |
70 | 70 | except KeyError: |
71 | 71 | sys.stderr.write(raw_member + " doesn't exist, and won't be added to the group.\n") |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | groupEntry['gidNumber'] = gidNumber |
76 | 76 | groupEntry['cn'] = cn |
77 | 77 | if members: |
78 | | - groupEntry['uniqueMember'] = members |
| 78 | + groupEntry['member'] = members |
79 | 79 | |
80 | 80 | modlist = ldap.modlist.addModlist(groupEntry) |
81 | 81 | ds.add_s(dn, modlist) |