xfs
[Top] [All Lists]

acl and attr: Fix path walking code

To: linux-xfs@xxxxxxxxxxx, Timothy Shimmin <tes@xxxxxxx>
Subject: acl and attr: Fix path walking code
From: Andreas Gruenbacher <agruen@xxxxxxx>
Date: Sun, 28 Oct 2007 18:58:24 +0100
Cc: Gerald Bringhurst <gbringhurst@xxxxxxxxxx>, Brandon Philips <bphilips@xxxxxxx>
Organization: SUSE Labs, Novell
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: KMail/1.9.5
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

Attachment: walk-acl.diff
Description: Text Data

Attachment: walk-attr.diff
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>
  • acl and attr: Fix path walking code, Andreas Gruenbacher <=