acl/acl-2.2.49-setfacl-walk.patch
2009-12-26 20:06:52 +00:00

31 lines
1.0 KiB
Diff

diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
index 091b9cc..be34e69 100644
--- a/setfacl/setfacl.c
+++ b/setfacl/setfacl.c
@@ -76,7 +76,7 @@ struct option long_options[] = {
const char *progname;
const char *cmd_line_options, *cmd_line_spec;
-int walk_flags = WALK_TREE_DEREFERENCE;
+int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL;
int opt_recalculate; /* recalculate mask entry (0=default, 1=yes, -1=no) */
int opt_promote; /* promote access ACL to default ACL */
int opt_test; /* do not write to the file system.
@@ -580,13 +580,14 @@ int main(int argc, char *argv[])
break;
case 'L': /* follow symlinks */
- walk_flags |= WALK_TREE_LOGICAL;
+ walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE;
walk_flags &= ~WALK_TREE_PHYSICAL;
break;
case 'P': /* do not follow symlinks */
walk_flags |= WALK_TREE_PHYSICAL;
- walk_flags &= ~WALK_TREE_LOGICAL;
+ walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE |
+ WALK_TREE_DEREFERENCE_TOPLEVEL);
break;
case 't': /* test mode */