Bug 38423 - printjobs not displayed for students with upper case letters in UID (e.g. if printed via lpr)
Summary: printjobs not displayed for students with upper case letters in UID (e.g. if ...
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: UMC - Printermoderation
Version: UCS@school 4.0 R2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS@school 4.0 R2 Errata
Assignee: Florian Best
QA Contact: Sönke Schwardt-Krummrich
URL:
Keywords:
Depends on: 28220 34934
Blocks: 38230 38284
  Show dependency treegraph
 
Reported: 2015-05-04 09:47 CEST by Sönke Schwardt-Krummrich
Modified: 2015-11-11 14:22 CET (History)
3 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):
Customer ID:
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.82 KB, patch)
2015-05-04 14:55 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2015-05-04 09:47:43 CEST
This bug has not been completely fixed with UCS@school 4.0 R2, but the user's experience is much better now (since most users are using a Windows client for printing).

Given the case that there is a user with some capital letters in its uid, e.g. "JohnDoe", then it depends on the printing tools, if capital letters are used for the cups-pdf spooling directory (/var/spool/cups-pdf/$UID).

These are the resulting directory names depending on the print tool:
smbclient: /var/spool/cups-pdf/johndoe/
lpr:       /var/spool/cups-pdf/JohnDoe/

So the printer moderation should check any directory that matches case-insensitive to the user's UID.

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

printjobs of students which have differences in their lower/uppercase username aren't displayed in the printermoderation module.
Comment 1 Florian Best univentionstaff 2015-05-04 14:55:42 CEST
Created attachment 6869 [details]
patch

patch (untested, i hope copy.deepcopy() works).
Comment 2 Florian Best univentionstaff 2015-05-05 14:13:46 CEST
Fixed with a nicer patch, (also in 3.2 R2 via Bug #38230).

Fix: svn r60413
ucs-school-umc-printermoderation 11.0.2-1
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2015-11-09 23:15:51 CET
> path_username = dict((self._get_path(username, ''), username) for username in \
                                   (username, username.lower(), username.upper()))

I don't think that this change covers all variants. The code will currectly check 3 directories:
- $username as stored in LDAP
- $username in lower case
- $username in upper case
If "JohnDoe" is stored in LDAP but a tool (Windows-Client/smbprint/lpr/…) created the cups-pdf directory "JoHndOE", the printjobs within the directory are ignored.

Despite that, the current version seems to be better that the current state.

A functional test is currently missing.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2015-11-10 13:27:00 CET
(In reply to Sönke Schwardt-Krummrich from comment #3)
> I don't think that this change covers all variants. The code will currectly
> check 3 directories:
> - $username as stored in LDAP
> - $username in lower case
> - $username in upper case

This was the case. The code has been altered so that the module now actively checks for all existing variants of the usernames.

> A functional test is currently missing.

Functional test was successful. Code change has been reviewed by fbest.

Changelog entry been added to README_UPDATE_*
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2015-11-11 14:20:27 CET
UCS@school 4.0 R2 v3 has been released.

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