Red Hat Bugzilla – Bug 181870
Key quota handling incorrect in allocation
Last modified: 2007-11-30 17:07:23 EST
Description of problem:
The key quota detection in key allocation only fails if *both* quotas are
exceeded (there's a total space quota and a key count quota).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. key session -
2. for ((i=1; i<101; i++)); do keyctl add user $i "a" @s; done
3. cat /proc/key-users
Allocates all the keys successfully and attaches them to the session keyring.
It can then be seen in step 3 that the key count quota has been exceeded.
NOTE! This assumes that other pre-existing keys owned by this user won't
already have shoved the key space quota into excess.
The excess key allocations should give a "Disk quota exceeded" error,
and /proc/key-users should show that the number of keys allocated to that user
maxes out at the quota.
Created attachment 124807 [details]
Fix key quota detection in key allocation
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.