Add a New Comment (Rich Markup)
Comment Type & Canned Response: None No canned response available
Good catch. Thanks for the patch. Added to git: http://git.savannah.gnu.org/cgit/acl.git/commit/?id=d539830d19b35df0c12c0b7d36c1f6c428f34a91
Well,
fixing the bug in the same way as
http://git.savannah.gnu.org/cgit/acl.git/commit/?id=63451a0
but this time for setfacl seems to be correct.
But it remains the question why walk_tree_rec decides not to follow symlinks (by setting "follow_symlinks" to 0, and then follows them...
(file #19363)
I took a deeper look at the source code. Assume setfacl is called as above.
After processing the options, the function walk_tree_rec (file: libmisc/walk_tree.c) is called with path ".". A little time later, the same function is called with path "2", which is a symlink.
In line 62 of libmisc/walk_tree.c, it is decided not to follow symlinks (that is correct!). In line 77, lstat(...) is called on the symlink "2".
The conditions in line 79 and line 81 are true, so on line 84 stat(...) is called on the symlink "2". Note that "2" is a dangling symlink in my example (otherwise "ls" would have listed a file named "1"), so stat() failes, because stat follows symlinks in contrast to lstat(). This failure is returned to the caller on line 85.
Please comment the attached patch.
(file #19362)
On https://bugzilla.redhat.com/show_bug.cgi?id=488674 I found the following bug, which is always reproduible:
--- cut here --- msteinbo@acer:/tmp/2>ls -l insgesamt 0 lrwxrwxrwx 1 msteinbo msteinbo 1 30. Nov 15:21 2 -> 1 msteinbo@acer:/tmp/2>LANG=C ../acl-2.2.49/setfacl/setfacl -RP -m u:bin:r . lt-setfacl: ./2: No such file or directory msteinbo@acer:/tmp/2>echo $? 1 --- cut here ---
As you see, version 2.2.49 does not fix this bug.
With version 2.2.39 you get the expected results:
--- cut here --- msteinbo@acer:/tmp/2>ls -l insgesamt 0 lrwxrwxrwx 1 msteinbo msteinbo 1 30. Nov 15:21 2 -> 1 msteinbo@acer:/tmp/2>setfacl -RP -m u:bin:r . msteinbo@acer:/tmp/2>echo $? 0 --- cut here ---
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9