Bug 86455 - getfacl should include file name in error messages (patch included)
getfacl should include file name in error messages (patch included)
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: acl (Show other bugs)
phoebe
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Michael K. Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-22 09:42 EST by Jay Berkenbilt
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-26 13:01:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch relative to extracted acl-2.2.3-1 (842 bytes, patch)
2003-03-22 09:45 EST, Jay Berkenbilt
no flags Details | Diff
patch to acl source RPM (1.56 KB, patch)
2003-03-22 09:48 EST, Jay Berkenbilt
no flags Details | Diff

  None (edit)
Description Jay Berkenbilt 2003-03-22 09:42:55 EST
Description of problem:

If getfacl has an error getting acl information for a file, it prints an error
message that does not include the name of the file in question.  This makes the
output useless when multiple input files are selected.


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

acl-2.2.3-1

How reproducible:

always

Steps to Reproduce:
1. create an empty directory
2. touch 1 3
3. getfacl 1 2 3 4
    
Actual results:

# file: 1
# owner: ejb
# group: ejb
user::rw-
group::rw-
other::r--

getfacl: No such file or directory
# file: 3
# owner: ejb
# group: ejb
user::rw-
group::rw-
other::r--

getfacl: No such file or directory


Expected results:

# file: 1
# owner: ejb
# group: ejb
user::rw-
group::rw-
other::r--

getfacl: 2: No such file or directory
# file: 3
# owner: ejb
# group: ejb
user::rw-
group::rw-
other::r--

getfacl: 4: No such file or directory


Additional info:

This is pretty serious.  If you use getfacl to dump acl information to a file
for all files in a directory and there are some dangling links (common for lock
files) or files for which you don't have permission to stat, getfacl will spit
out a bunch of error messages to stderr each without indicating which file has
the problem.  This makes diagnosis difficult.  This is a trivial fix.  I'm not
sure I found all the cases of where this type of lazy error message is issued,
but the one responsible for this error and an equivalent problem set setfacl are
fixed by the patch I've attached.
Comment 1 Jay Berkenbilt 2003-03-22 09:45:27 EST
Created attachment 90694 [details]
patch relative to extracted acl-2.2.3-1

Install acl-2.2.3-1 source rpm
rpmbuild -bp acl.spec
cd ..../BUILD/acl-2.2.3
patch -p1 ..../acl-2.2.3-error.patch

See also alternative patch to rpm spec....
Comment 2 Jay Berkenbilt 2003-03-22 09:48:41 EST
Created attachment 90695 [details]
patch to acl source RPM

install source rpm
apply this patch from the parent of the SPEC directory.  Installs patch into
SOURCES and modifies acl.spec to apply the patch and change the release to 1.1
(I'm not going to change it to 2.  You can do that ;-])
Comment 3 Michael K. Johnson 2003-03-26 12:32:48 EST
This looks like a patch that should definitely go into upstream -- it
would benefit everyone...
Comment 4 Michael K. Johnson 2003-03-26 13:01:27 EST
Patch applied in acl-2.2.3-2, will be in next rawhide.  Thanks!

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