Bug 131066 - [PATCH] getfacl or setfacl fail with "Numerical result out of range"
[PATCH] getfacl or setfacl fail with "Numerical result out of range"
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: acl (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jiri Moskovcak
:
Depends On:
Blocks: 185486 190430
  Show dependency treegraph
 
Reported: 2004-08-27 02:18 EDT by Kiyotaka Endo
Modified: 2015-02-01 17:47 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-10 07:12:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the patch for this bug (531 bytes, patch)
2004-08-27 02:27 EDT, Kiyotaka Endo
no flags Details | Diff
Patch for IT 87278 (495 bytes, patch)
2006-04-26 12:41 EDT, John Jarvis
no flags Details | Diff

  None (edit)
Description Kiyotaka Endo 2004-08-27 02:18:48 EDT
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 02:27:16 EDT
Created attachment 103153 [details]
the patch for this bug
Comment 2 Kiyotaka Endo 2004-08-27 02:42:03 EDT
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 13:14:58 EST
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@oss.sgi.com:/cvs' co xfs-cmds/acl
Comment 5 David Lawrence 2006-04-25 12:38:25 EDT
Adding blocker bug 185486 and IBM group per request by John Jarvis.
Comment 6 John Jarvis 2006-04-26 12:40:08 EDT
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 12:41:18 EDT
Created attachment 128267 [details]
Patch for IT 87278
Comment 8 David Lawrence 2006-04-27 13:13:43 EDT
Mistakenly added to IBM group, removing.
Comment 10 Issue Tracker 2007-07-06 13:17:25 EDT
RHEL 3 is no more. Closing. CRM 732310 is waiting on Customer, Sé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 07:12:38 EDT
Closed according to comment #10.

Note You need to log in before you can comment on or make changes to this bug.