summaryrefslogtreecommitdiff
path: root/libmisc
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-05-25 18:18:53 +0200
committerAndreas Gruenbacher <agruen@linbit.com>2011-05-27 14:05:48 +0200
commit3d80b8fa04cdc7fc89c49abff738bdbedb8ba758 (patch)
treeb006fff9ec663a2bd4adbd00666cfe3b3f2b9a98 /libmisc
parent088bcbb414116ba7e0432e4cb90a8102ea14a959 (diff)
downloadacl-3d80b8fa04cdc7fc89c49abff738bdbedb8ba758.tar.gz
walk_tree: do not follow symlink to directory with -h
Keep libmisc/walk_tree.c in sync with the version in the attr package; no change in functionality for getfacl or setfacl. Remove a related dead line of code from setfacl.
Diffstat (limited to 'libmisc')
-rw-r--r--libmisc/walk_tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmisc/walk_tree.c b/libmisc/walk_tree.c
index 30ff92a..2be9d47 100644
--- a/libmisc/walk_tree.c
+++ b/libmisc/walk_tree.c
@@ -60,7 +60,8 @@ static int walk_tree_rec(const char *path, int walk_flags,
void *), void *arg, int depth)
{
int follow_symlinks = (walk_flags & WALK_TREE_LOGICAL) ||
- (!(walk_flags & WALK_TREE_PHYSICAL) &&
+ ((walk_flags & WALK_TREE_DEREFERENCE) &&
+ !(walk_flags & WALK_TREE_PHYSICAL) &&
depth == 0);
int have_dir_stat = 0, flags = walk_flags, err;
struct entry_handle dir;