Bug 39600 - Invalid memberUid entries at exam group
Invalid memberUid entries at exam group
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
UCS@school 4.0 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.0 R2 Errata
Assigned To: Daniel Tröder
Florian Best
:
Depends on: 36251
Blocks: 38226 41112
  Show dependency treegraph
 
Reported: 2015-10-20 12:10 CEST by Sönke Schwardt-Krummrich
Modified: 2016-04-25 13:26 CEST (History)
1 user (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): External feedback
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 2015-10-20 12:10:38 CEST
The last fix was not sufficient. Only adding the UID to memberUID has been fixed but not the removal. Thus, now the valid memberUID entries will not get removed from LDAP if the exam mode is stopped.

+++ This bug was initially created as a clone of Bug #36251 +++

When starting an exam mode, all users of the selected class/group and all computers of the selected room are added as member to the exam group ("cn=OU${OU}-Klassenarbeit").
While the attribute values for users are correct, the memberUid entry for the computer member is not correct. The $ sign is missing.

# OUgrundschule-Klassenarbeit, ucsschool, groups, ucsatschool.demo
dn: cn=OUgrundschule-Klassenarbeit,cn=ucsschool,cn=groups,dc=ucsatschool,dc=demo
sambaGroupType: 2
cn: OUgrundschule-Klassenarbeit
objectClass: top
objectClass: posixGroup
objectClass: univentionGroup
objectClass: sambaGroupMapping
objectClass: univentionObject
univentionObjectType: groups/group
gidNumber: 5094
univentionGroupType: -2147483646
sambaSID: S-1-5-21-2487603509-1121409813-4031083802-1133
memberUid: winpc6
memberUid: exam-john.doe
uniqueMember: cn=winpc6,cn=computers,ou=Grundschule,dc=ucsatschool,dc=demo
uniqueMember: uid=exam-john.doe,cn=examusers,ou=Grundschule,dc=ucsatschool,dc=demo

Found entry:    memberUid: winpc6
Expected entry: memberUid: winpc6$

This way, there may be an naming conflict between users and computers.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2015-10-20 13:26:53 CEST
Bug 36251 fixed the missing $ sign only for the fast_member_add() calls and not for the fast_member_remove() call.

--- a/ucs-school-4.0r2/ucs-school-umc-exam/umc/python/schoolexam-master/__init__.py
+++ b/ucs-school-4.0r2/ucs-school-umc-exam/umc/python/schoolexam-master/__init__.py
@@ -443,7 +443,7 @@ class Instance( SchoolBaseModule ):
 		## Remove all host members of room from examGroup
 		examGroup = self.examGroup
 		if examGroup:
-			host_uid_list = [ univention.admin.uldap.explodeDn(uniqueMember, 1)[0] for uniqueMember in room['hosts'] ]
+			host_uid_list = [univention.admin.uldap.explodeDn(uniqueMember, 1)[0] + '$' for uniqueMember in room['hosts']]
 			examGroup.fast_member_remove( room['hosts'], host_uid_list )	## removes any uniqueMember and member listed if still present
 
 		self.finished(request.id, {}, success=True)
Comment 2 Daniel Tröder univentionstaff 2015-11-30 12:17:54 CET
Fixed in r65984.
Package ucs-school-umc-exam 4.0.2-3.97.201511301216 built in scope ucs-school-4.0r2.
Comment 3 Florian Best univentionstaff 2015-12-14 17:29:14 CET
OK: after stopping the exam the computer is removed from memberUid attribute list.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2015-12-21 16:26:09 CET
UCS@school 4.0 R2 v4 has been released:
http://docs.univention.de/release-notes-ucsschool-4.0R2v4-de.html

If this error occurs again, please use "Clone This Bug".