Bug 36251 - 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 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.0 R2
Assigned To: Florian Best
Alexander Kramer
:
Depends on:
Blocks: 36214 36913 38226 39600 41112
  Show dependency treegraph
 
Reported: 2014-10-21 21:06 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):
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 2014-10-21 21:06:58 CEST
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 2014-10-21 21:13:17 CEST
Untested hotfix:

--- a/ucs-school-3.2r2/ucs-school-umc-exam/umc/python/schoolexam-master/__init__.py
+++ b/ucs-school-3.2r2/ucs-school-umc-exam/umc/python/schoolexam-master/__init__.py
@@ -399,7 +399,7 @@ class Instance( SchoolBaseModule ):
 		## Add all host members of room to 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_add( room['hosts'], host_uid_list )	## adds any uniqueMember and member listed if not already present
 		else:
 			return ## self.examGroup called finished in this case, so just return
Comment 2 Ammar Najjar univentionstaff 2014-12-15 12:24:10 CET
In script "101_exam_mode" created for bug #36214, proof_uniquemember  is skipped for now until this bug is fixed.
Please re-enable that check after fixing this bug.
Comment 3 Ammar Najjar univentionstaff 2015-04-13 11:12:11 CEST
Test "101_exam_mode_group_members" created for bug #38226 is disabled, please enable when this bug is fixed.
Comment 4 Florian Best univentionstaff 2015-04-20 15:41:36 CEST
The attached patch has been applied.

Fix: svn r59704
Package: ucs-school-umc-exam
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2015-04-21 09:12:19 CEST
Has the test script been reenabled?
Comment 6 Florian Best univentionstaff 2015-04-22 11:06:38 CEST
(In reply to Sönke Schwardt-Krummrich from comment #5)
> Has the test script been reenabled?
yes
Comment 7 Alexander Kramer univentionstaff 2015-04-24 10:06:07 CEST
OK - e.g.
* old
memberUid: OLDWIN-PC
* new
memberUid: USER-PC$
memberUid: WIN81STUDENT63$
memberUid: LEHRERPC$
memberUid: WIN81STUDENT62$
memberUid: WIN81LEHRER61$

OK - debian changelog

MISSING - xml changelog
Comment 8 Florian Best univentionstaff 2015-04-24 12:40:29 CEST
Changelog added.
Comment 9 Alexander Kramer univentionstaff 2015-04-24 12:48:15 CEST
OK - xml changelog
Comment 10 Florian Best univentionstaff 2015-05-11 19:24:51 CEST
UCS@school 4.0 R2 v1 has been released:
http://docs.univention.de/release-notes-ucsschool-4.0R2v1-de.html

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