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 3 product line. The current stable release is 3.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 131066

Summary: [PATCH] getfacl or setfacl fail with "Numerical result out of range"
Product: Red Hat Enterprise Linux 3 Reporter: Kiyotaka Endo <ki-endo>
Component: aclAssignee: Jiri Moskovcak <jmoskovc>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: dfediuck, mgarski, sct
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-10 11:12:38 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: 185486, 190430    
Attachments:
Description Flags
the patch for this bug
none
Patch for IT 87278 none

Description Kiyotaka Endo 2004-08-27 06:18:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
When we use "getfacl" or "setfacl" to set or get ACLs of a directory 
with a number of ACLs already set, those commands fail with an error 
message "Numerical result out of range".

We find that this error occurs when all of conditions shown below are 
filled,

1. 13 or more default ACLs (except default ACLs of owner user or 
owner group) are already set on the target directory.
2. There are less non-default ACLs set on the target directory than 
the default ACLs.


Version-Release number of selected component (if applicable):
acl-2.2.3-1

How reproducible:
Always

Steps to Reproduce:
1.Set 13 or more default ACLs on a directory on an ACL enabled 
filesystem, e.g., type this command "cut -f 1 -d ':' /etc/passwd | 
while read U; do setfacl -m d:u:$U:rwx /some/directory; done".
2.Use "getfacl" to print ACLs of that directory (e.g. 
getfacl /some/directory), or use "setfacl" to modify ACL of that 
directory (e.g. setfacl -m d:u:root:rwx /some/directory).

    

Actual Results:  The commands failed with
"getfacl: /some/directory: Numerical result out of range"
or
"setfacl: /some/directory: Numerical result out of range"


Expected Results:  The commands will fail with
"getfacl: /some/directory: Numerical result out of range"
or
"setfacl: /some/directory: Numerical result out of range"


Additional info:

Comment 1 Kiyotaka Endo 2004-08-27 06:27:16 UTC
Created attachment 103153 [details]
the patch for this bug

Comment 2 Kiyotaka Endo 2004-08-27 06:42:03 UTC
supplementary comment for the patch:
There is a problem in the C function "get_acl_file" in libacl.
When the buffer is too small to store ACL information, get_acl_file 
tries to allocate sufficient memory.
However, when treating default ACLs, get_acl_file calculate how many 
bytes is sufficient for non-default ACLs instead of default ACLs.
Therefore, in some situation, get_acl_file allocate insufficient 
memory and "getxattr" system call returns ERANGE.

Comment 3 Andreas Gruenbacher 2004-12-13 18:14:58 UTC
The fix for this bug was checked into the CVS on 2003/02/10: "Merge
libacl bug fix from Andreas - acl_get_file mishandled default ACL when
initial ACE count guess was incorrect."

$ cvs -d ':pserver:cvs.com:/cvs' co xfs-cmds/acl

Comment 5 David Lawrence 2006-04-25 16:38:25 UTC
Adding blocker bug 185486 and IBM group per request by John Jarvis.

Comment 6 John Jarvis 2006-04-26 16:40:08 UTC
Adding patch from IT 87278 LTC20886-acl_get_file in libacl.so returns 'Numerical
result out of range'

Comment 7 John Jarvis 2006-04-26 16:41:18 UTC
Created attachment 128267 [details]
Patch for IT 87278

Comment 8 David Lawrence 2006-04-27 17:13:43 UTC
Mistakenly added to IBM group, removing.

Comment 10 Issue Tracker 2007-07-06 17:17:25 UTC
RHEL 3 is no more. Closing. CRM 732310 is waiting on Customer, S&eacute;bastien,
please inform and close accordingly.

ezio

saime assigned to issue for EMEA Production Escalation.
Internal Status set to 'Resolved'
Status set to: Closed by Tech
Resolution set to: 'Rejected'

This event sent from IssueTracker by pdemauro 
 issue 83862

Comment 11 Jiri Moskovcak 2007-07-10 11:12:38 UTC
Closed according to comment #10.