From: Timothy Shimmin <tes@sgi.com>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: linux-xfs@oss.sgi.com, Gerald Bringhurst <gbringhurst@novell.com>,
Brandon Philips <bphilips@suse.de>
Subject: Re: acl and attr: Fix path walking code
Date: Fri, 09 Nov 2007 18:39:56 +1100 [thread overview]
Message-ID: <47340ECC.4000205@sgi.com> (raw)
In-Reply-To: <200710281858.24428.agruen@suse.de>
Andreas Gruenbacher wrote:
> Hello,
>
> the tree walking code in acl and attr broke when resolve_symlinks() was
> introduced (by me, unfortunately). Following symlinks passed in on the
> command line is the intended behavior for the tools (unless in -P mode). The
> first version was buggy, and so someone "fixed" it by replacing readlink()
> with realpath() in resolve_symlinks().
>
> The result is that the output of getfattr and getfacl will show pathnames that
> may point anywhere. When processing a directory tree it sometimes is helpful
> to treat symlinks as regular files, but resolving the pathnames is totally
> wrong.
>
> After runnig into problem after problem with nftw and never ending up with
> even half-way clean code, I think it's time to ditch it altogether and
> replace it with sane code. So here are two patches, one for attr and one for
> acl, that does that.
>
> Files include/walk_tree.h and libmisc/walk_tree.c are identical in both
> patches; that code is shared between the two packages.
>
> Okay to apply?
>
> Thanks,
> Andreas
>
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?
--Tim
next prev parent reply other threads:[~2007-11-09 7:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 17:58 acl and attr: Fix path walking code Andreas Gruenbacher
2007-11-09 5:41 ` Timothy Shimmin
2007-11-10 20:52 ` Andreas Gruenbacher
2007-11-14 5:08 ` Timothy Shimmin
2007-11-20 5:11 ` Timothy Shimmin
2007-11-23 12:24 ` Andreas Gruenbacher
2007-11-09 7:39 ` Timothy Shimmin [this message]
2007-11-10 21:36 ` Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47340ECC.4000205@sgi.com \
--to=tes@sgi.com \
--cc=agruen@suse.de \
--cc=bphilips@suse.de \
--cc=gbringhurst@novell.com \
--cc=linux-xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox