Bug 33030 - Traceback in proof_uniqueMembers
Traceback in proof_uniqueMembers
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2-2-errata
Assigned To: Lukas Walter
Felix Botner
:
Depends on:
Blocks: 35911
  Show dependency treegraph
 
Reported: 2013-10-31 09:14 CET by Sönke Schwardt-Krummrich
Modified: 2014-09-11 15:06 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-10-31 09:14:01 CET
Traceback (most recent call last):
  File "./proof_uniqueMembers", line 239, in <module>
    main()
  File "./proof_uniqueMembers", line 230, in main
    check_groups(conn, basedn)
  File "./proof_uniqueMembers", line 136, in check_groups
    count_changes += check_groups_by_dn(conn, group_dn, group)
  File "./proof_uniqueMembers", line 150, in check_groups_by_dn
    member_filter, base = member_dn.split(',', 1)
ValueError: need more than 1 value to unpack
Comment 1 Markus Dählmann 2013-11-01 16:38:39 CET
Dieser Traceback tritt in unserer Umgebung auf, wenn es Gruppen gibt, die über ein leeres "uniqueMember"-Attribut verfügen.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2013-11-05 09:17:29 CET
It seems that there are empty uniqueMember attributes at groups. The following patch fixes the traceback:

--- /usr/share/univention-directory-manager-tools/proof_uniqueMembers.ORIG	2013-11-05 09:13:01.000000000 +0100
+++ /usr/share/univention-directory-manager-tools/proof_uniqueMembers	2013-11-05 09:14:34.000000000 +0100
@@ -147,6 +147,8 @@
 	remmembers = set()
 	for member_dn in group_member_dns:
 		# Split uid=USER, cn=user,dc=FQDN
+		if not ',' in member_dn:
+			continue
 		member_filter, base = member_dn.split(',', 1)
 		try:
 			member_result = conn.search_s(base, ldap.SCOPE_ONELEVEL,
Comment 3 Lukas Walter univentionstaff 2014-07-08 15:18:03 CEST
Fixed in svn r51614: univention-directory-manager-modules (9.0.76-13).

Instead of looking for a ',' in the attribute value, the exception is caught.
Comment 4 Felix Botner univentionstaff 2014-07-09 11:11:27 CEST
Works, but please also remove the faulty uniqueMember entry.

-> univention-ldapsearch cn=Domain\ Users uniqueMember
dn: cn=Domain Users,cn=groups,dc=w2k12,dc=test
uniqueMember:
uniqueMember: uid=Administrator,cn=users,dc=w2k12,dc=test
uniqueMember: uid=krbtgt,cn=users,dc=w2k12,dc=test
uniqueMember: uid=test1,dc=w2k12,dc=test

-> /usr/share/univention-directory-manager-tools/proof_uniqueMembers 
Checking if users are member of their primary group...
Checked 8 posixAccounts, fixed 0 issues.
Checking if group-members exist...
Checked 72 posixGroups, fixed 0 issues.
Comment 5 Lukas Walter univentionstaff 2014-07-09 12:11:10 CEST
(In reply to Felix Botner from comment #4)
> Works, but please also remove the faulty uniqueMember entry.
> 
> -> univention-ldapsearch cn=Domain\ Users uniqueMember
> dn: cn=Domain Users,cn=groups,dc=w2k12,dc=test
> uniqueMember:
> uniqueMember: uid=Administrator,cn=users,dc=w2k12,dc=test
> uniqueMember: uid=krbtgt,cn=users,dc=w2k12,dc=test
> uniqueMember: uid=test1,dc=w2k12,dc=test
> 
> -> /usr/share/univention-directory-manager-tools/proof_uniqueMembers 
> Checking if users are member of their primary group...
> Checked 8 posixAccounts, fixed 0 issues.
> Checking if group-members exist...
> Checked 72 posixGroups, fixed 0 issues.

Adapted in svn 51646: univention-directory-manager-modules (9.0.76-14)
Comment 6 Felix Botner univentionstaff 2014-07-09 16:56:11 CEST
OK, works

OK - YAML
Comment 7 Janek Walkenhorst univentionstaff 2014-08-07 17:48:29 CEST
http://errata.univention.de/ucs/3.2/170.html