Magellan Linux

Contents of /trunk/acl/patches/acl-2.2.47-make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 949 - (show annotations) (download)
Tue Dec 22 22:35:23 2009 UTC (14 years, 4 months ago) by niro
File size: 1487 byte(s)
-added acl patches

1 http://bugs.gentoo.org/265425
2
3 From 63451a06b7484d220750ed8574d3ee84e156daf5 Mon Sep 17 00:00:00 2001
4 From: Andreas Gruenbacher <agruen@suse.de>
5 Date: Tue, 23 Jun 2009 00:29:45 +0200
6 Subject: [PATCH] Make sure that getfacl -R only calls stat(2) on symlinks when it needs to
7
8 This fixes http://oss.sgi.com/bugzilla/show_bug.cgi?id=790
9 "getfacl follows symlinks, even without -L".
10 ---
11 getfacl/getfacl.c | 7 ++++---
12
13 diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c
14 index fc650e3..b3e6200 100644
15 --- a/getfacl/getfacl.c
16 +++ b/getfacl/getfacl.c
17 @@ -70,7 +70,7 @@ struct option long_options[] = {
18 const char *progname;
19 const char *cmd_line_options;
20
21 -int walk_flags = WALK_TREE_DEREFERENCE;
22 +int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL;
23 int opt_print_acl;
24 int opt_print_default_acl;
25 int opt_strip_leading_slash = 1;
26 @@ -642,7 +642,7 @@ int main(int argc, char *argv[])
27 case 'L': /* follow all symlinks */
28 if (posixly_correct)
29 goto synopsis;
30 - walk_flags |= WALK_TREE_LOGICAL;
31 + walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE;
32 walk_flags &= ~WALK_TREE_PHYSICAL;
33 break;
34
35 @@ -650,7 +650,8 @@ int main(int argc, char *argv[])
36 if (posixly_correct)
37 goto synopsis;
38 walk_flags |= WALK_TREE_PHYSICAL;
39 - walk_flags &= ~WALK_TREE_LOGICAL;
40 + walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE |
41 + WALK_TREE_DEREFERENCE_TOPLEVEL);
42 break;
43
44 case 's': /* skip files with only base entries */
45 --
46 1.6.3.3
47