bugacl - Bugs: bug #28131, setfacl --physical mode does not...

 
 

bug #28131: setfacl --physical mode does not work

Submitter:  Markus Steinborn <msteinbo>
Submitted:  Mon 30 Nov 2009 02:29:24 PM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Fri 22 Jan 2010 11:54:37 PM UTC, comment #3: 
Brandon Philips <philips>
Project Administrator
Sat 26 Dec 2009 12:40:32 PM UTC, comment #2: 

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)

Markus Steinborn <msteinbo>
Sat 26 Dec 2009 09:54:11 AM UTC, comment #1: 

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)

Markus Steinborn <msteinbo>
Mon 30 Nov 2009 02:29:24 PM UTC, original submission:  

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 ---

Markus Steinborn <msteinbo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #19363:  setfacl.patch added by msteinbo (1KiB - text/x-patch - New patch, replacing (?) the old one)
file #19362:  acl-physical-walk.patch added by msteinbo (823B - text/x-patch - Proposed patch to fix the bug.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by philips (Posted a comment)
  • -email is unavailable- added by msteinbo (Submitted the item)
  •  

    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.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-22 philips Open/ClosedOpen Closed
    2009-12-26 msteinbo Attached File- Added setfacl.patch, #19363
    2009-12-26 msteinbo Attached File- Added acl-physical-walk.patch, #19362

    Back to the top


    Powered by Savane 3.9