Bug 54638 - Filesystem quota doesn't work with usernames containing only numbers [5.0]
Filesystem quota doesn't work with usernames containing only numbers [5.0]
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Quota
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Arvid Requate
Florian Best
https://git.knut.univention.de/univen...
:
Depends on:
Blocks: 54537
  Show dependency treegraph
 
Reported: 2022-04-05 11:25 CEST by Arvid Requate
Modified: 2022-05-04 16:58 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.137
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022030821000382
Bug group (optional):
Max CVSS v3 score:


Attachments
umc-quota-numeric-username.png (3.95 KB, image/png)
2022-04-26 11:57 CEST, Arvid Requate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2022-04-05 11:25:24 CEST
We also need this in UCS 5.0

+++ This bug was initially created as a clone of Bug #54537 +++
Comment 2 Arvid Requate univentionstaff 2022-04-20 19:10:31 CEST
cherry-pick from 4.4-9:

ad0e1dee8f | Make quota work for numeric only usernames
e6f479fe10 | Advisory version

Package: univention-quota
Version: 14.0.1-10A~5.0.0.202204201908
Branch: ucs_5.0-0
Scope: errata5.0-1
Comment 3 Florian Best univentionstaff 2022-04-26 10:49:22 CEST
REOPEN: while the code changes look good there seems to be another problem.
When I add a user "1234" assign a file limit of 33/34 and size limit of 2mb/3mb and reach the limits then the quotas are removed.

su 1234
for ((i=1;i<=10; i++)); do
    dd if=/dev/urandom of=foo$i count=1024
done
Comment 4 Arvid Requate univentionstaff 2022-04-26 11:57:19 CEST
Created attachment 10941 [details]
umc-quota-numeric-username.png

Cannot reproduce in UCS 5.0-1:
* Created user named "5678" and configured quota explicitly for that user
* Ran the above loop and obtained:

dm-0: write failed, user block limit reached.
dd: Schreiben in 'foo6': Der zugewiesene Plattenplatz (Quota) ist überschritten
etc.

* Looked into UMC and quota disaplay looks as expected, see attached screenshot.
Comment 5 Arvid Requate univentionstaff 2022-04-26 14:26:32 CEST
Ok, could reproduce: After creating a file share a simple `su - 1234` removes the quota.

Debugging with `ucr set quota/logfile=/tmp/1.log` showed that univention-user-quota calls
setquota with `0 0 0 0`. That was caused because the preceeding call to quota was still
missing the --always-resolve.

02c043f6d1 | Advisory update
14dce0c2cc | Add missing --always-resolve to univention-user-quota
Comment 6 Florian Best univentionstaff 2022-04-28 14:14:51 CEST
OK: quotas work for users with numeric only usernames
OK: YAML