Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 181870

Summary: Key quota handling incorrect in allocation
Product: Red Hat Enterprise Linux 4 Reporter: David Howells <dhowells>
Component: kernelAssignee: David Howells <dhowells>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0575 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-10 22:20:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 181409    
Attachments:
Description Flags
Fix key quota detection in key allocation none

Description David Howells 2006-02-17 11:16:15 UTC
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):  
 
 
How reproducible:  
  
100% 
  
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 
    
Actual results:  
 
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. 
 
Expected results:  
 
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. 
  
Additional info:

Comment 1 David Howells 2006-02-17 11:16:15 UTC
Created attachment 124807 [details]
Fix key quota detection in key allocation

Comment 6 Red Hat Bugzilla 2006-08-10 22:20:26 UTC
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.

http://rhn.redhat.com/errata/RHSA-2006-0575.html