[Top] [All Lists]

Re: acl and attr: Fix path walking code

To: Timothy Shimmin <tes@xxxxxxx>
Subject: Re: acl and attr: Fix path walking code
From: Andreas Gruenbacher <agruen@xxxxxxx>
Date: Sat, 10 Nov 2007 22:36:52 +0100
Cc: linux-xfs@xxxxxxxxxxx, Gerald Bringhurst <gbringhurst@xxxxxxxxxx>, Brandon Philips <bphilips@xxxxxxx>
In-reply-to: <47340ECC.4000205@xxxxxxx>
Organization: SUSE Labs
References: <200710281858.24428.agruen@xxxxxxx> <47340ECC.4000205@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
On Friday 09 November 2007 08:39:56 Timothy Shimmin wrote:
> You mention -L/-P is like chown.
> However, -P for getattr isn't about not walking symlinks
> to directories,
> it's about skipping symlinks altogether, right?

Hmm, -L and -P define which files and directories are visited, and -h defines 
whether we are looking at symlinks or the files they point to. The two 
concepts are orthogonal. -P is not about skipping symlinks, only about not 
recursing into them.

You can do this (as root), for example:

        $ ln -s dead link
        $ setfattr -h -n trusted.name -v value link
        $ getfattr -h -m- -d -P link
        # file: link

With "getfattr -R -P -h" you get a physical dump of all attributes ("a real, 
complete dump"), while with "getfattr -R -L" you get a logical dump that 
treats all symlinks as the files they point to. I somewhat doubt that -L 
with -h has real value.


<Prev in Thread] Current Thread [Next in Thread>