Bug 488568 - getfacl follows symlinks, even without -L
getfacl follows symlinks, even without -L
Status: CLOSED DUPLICATE of bug 488674
Product: Fedora
Classification: Fedora
Component: acl (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2009-03-04 15:43 EST by Leo Bergolth
Modified: 2009-12-17 08:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-17 08:51:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Leo Bergolth 2009-03-04 15:43:41 EST
getfacl from acl-2.2.47 has a bug which causes it to follow symlinks even if it shouldn't ('-L' option not specified).

This is a known bug and it's already fixed in SGIs CVS:

Since many users are using getfacl to backup ACLs, an updated Fedora package that contains the patches would be nice, because this bug leads to infinite loops if it follows symlinks that e.g. point to higher directory levels.

IMHO an updated package should contain the following patches:


Comment 1 Bug Zapper 2009-11-18 06:16:51 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 2 Kamil Dudka 2009-12-17 07:26:08 EST
It works as documented:
-L, --logical
    Logical  walk, follow symbolic links to directories. The default
    behavior is to follow symbolic link arguments, and skip symbolic
    links encountered in subdirectories.  Only effective in
    combination with -R.

If you think it does not, please be more verbose and write in particular:
1. what are you trying to do
2. what are you expecting to get (and why)
3. what are you getting actually
Comment 3 Leo Bergolth 2009-12-17 07:50:58 EST
It follows symlinks, even if "-L" is not specified.
As you cited from the man-page, getfacl shouldn't follow symlinks in subdirectories if "-L" is not specified.

Please see the upstream bug I quoted in my first report for details and for the patch.
Comment 4 Kamil Dudka 2009-12-17 08:10:18 EST
(In reply to comment #0)
> getfacl from acl-2.2.47 has a bug which causes it to follow symlinks even if it
> shouldn't ('-L' option not specified).

The above is not a bug, but documented behavior.

> http://oss.sgi.com/bugzilla/show_bug.cgi?id=790

This issue will be addressed, see the bug 488674.

You still didn't answered my questions 1, 2 and 3, therefore I won't be able to verify if the fix solves your problem.
Comment 5 Leo Bergolth 2009-12-17 08:38:17 EST
# mkdir a
# ln -s nonexistingfile a/symlink
# getfacl -R a

# file: a
# owner: bergolth
# group: edvz

# file: a/file
# owner: bergolth
# group: edvz

getfacl: a/symlink: No such file or directory

Expected result:
above output without the error message.

strace shows that it first does an lstat and then a stat. The second system call shouldn't happen on symlinks if "-L" is not specified.

lstat64("a/symlink", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
stat64("a/symlink", 0xbff79eb8)         = -1 ENOENT (No such file or directory)

Again, this is explained in detail in
> http://oss.sgi.com/bugzilla/show_bug.cgi?id=790
Comment 6 Kamil Dudka 2009-12-17 08:51:24 EST
Thanks for the reproducer! It's fixed in acl-2.2.48, I'll build it for Fedora 11+.

*** This bug has been marked as a duplicate of bug 488674 ***

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