Bug 86455 - getfacl should include file name in error messages (patch included)
Summary: getfacl should include file name in error messages (patch included)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: acl
Version: phoebe
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-22 14:42 UTC by Jay Berkenbilt
Modified: 2008-05-01 15:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-26 18:01:27 UTC


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

Description Jay Berkenbilt 2003-03-22 14:42:55 UTC
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 14:45:27 UTC
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 14:48:41 UTC
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 17:32:48 UTC
This looks like a patch that should definitely go into upstream -- it
would benefit everyone...

Comment 4 Michael K. Johnson 2003-03-26 18:01:27 UTC
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.