Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/acl/files: 0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch 0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
Date: Thu, 02 Jul 2009 01:30:27
Message-Id: E1MMB85-0004Ib-Ek@stork.gentoo.org
1 vapier 09/07/02 01:30:25
2
3 Added:
4 0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch
5 0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
6 Log:
7 Add symlink fixes from upstream #265425 by Radek Podgorny.
8 (Portage version: 2.2_rc33/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch?rev=1.1&content-type=text/plain
15
16 Index: 0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch
17 ===================================================================
18 http://bugs.gentoo.org/265425
19
20 From 1a80c89ee88357137b598fa3357b576933c5746c Mon Sep 17 00:00:00 2001
21 From: Andreas Gruenbacher <agruen@××××.de>
22 Date: Tue, 23 Jun 2009 00:17:49 +0200
23 Subject: [PATCH] Introduce new WALK_TREE_DEREFERENCE_TOPLEVEL flag
24
25 This flag indicates to dereference top-level symlinks. (If non
26 top-level symlinks should be stat()ed as well, the
27 WALK_TREE_DEREFERENCE flag must be specified.)
28 ---
29 include/walk_tree.h | 9 +++++----
30 libmisc/walk_tree.c | 4 +++-
31 2 files changed, 8 insertions(+), 5 deletions(-)
32
33 diff --git a/include/walk_tree.h b/include/walk_tree.h
34 index 53a8fc5..9f1ec34 100644
35 --- a/include/walk_tree.h
36 +++ b/include/walk_tree.h
37 @@ -20,10 +20,11 @@
38 #ifndef __WALK_TREE_H
39 #define __WALK_TREE_H
40
41 -#define WALK_TREE_RECURSIVE 0x1
42 -#define WALK_TREE_PHYSICAL 0x2
43 -#define WALK_TREE_LOGICAL 0x4
44 -#define WALK_TREE_DEREFERENCE 0x8
45 +#define WALK_TREE_RECURSIVE 0x01
46 +#define WALK_TREE_PHYSICAL 0x02
47 +#define WALK_TREE_LOGICAL 0x04
48 +#define WALK_TREE_DEREFERENCE 0x08
49 +#define WALK_TREE_DEREFERENCE_TOPLEVEL 0x10
50
51 #define WALK_TREE_TOPLEVEL 0x100
52 #define WALK_TREE_SYMLINK 0x200
53 diff --git a/libmisc/walk_tree.c b/libmisc/walk_tree.c
54 index 2777145..30ff92a 100644
55 --- a/libmisc/walk_tree.c
56 +++ b/libmisc/walk_tree.c
57 @@ -78,7 +78,9 @@ static int walk_tree_rec(const char *path, int walk_flags,
58 return func(path, NULL, flags | WALK_TREE_FAILED, arg);
59 if (S_ISLNK(st.st_mode)) {
60 flags |= WALK_TREE_SYMLINK;
61 - if (flags & WALK_TREE_DEREFERENCE) {
62 + if ((flags & WALK_TREE_DEREFERENCE) ||
63 + ((flags & WALK_TREE_TOPLEVEL) &&
64 + (flags & WALK_TREE_DEREFERENCE_TOPLEVEL))) {
65 if (stat(path, &st) != 0)
66 return func(path, NULL,
67 flags | WALK_TREE_FAILED, arg);
68 --
69 1.6.3.3
70
71
72
73
74 1.1 sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
75
76 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch?rev=1.1&view=markup
77 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch?rev=1.1&content-type=text/plain
78
79 Index: 0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
80 ===================================================================
81 http://bugs.gentoo.org/265425
82
83 From 63451a06b7484d220750ed8574d3ee84e156daf5 Mon Sep 17 00:00:00 2001
84 From: Andreas Gruenbacher <agruen@××××.de>
85 Date: Tue, 23 Jun 2009 00:29:45 +0200
86 Subject: [PATCH] Make sure that getfacl -R only calls stat(2) on symlinks when it needs to
87
88 This fixes http://oss.sgi.com/bugzilla/show_bug.cgi?id=790
89 "getfacl follows symlinks, even without -L".
90 ---
91 getfacl/getfacl.c | 7 ++++---
92
93 diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c
94 index fc650e3..b3e6200 100644
95 --- a/getfacl/getfacl.c
96 +++ b/getfacl/getfacl.c
97 @@ -70,7 +70,7 @@ struct option long_options[] = {
98 const char *progname;
99 const char *cmd_line_options;
100
101 -int walk_flags = WALK_TREE_DEREFERENCE;
102 +int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL;
103 int opt_print_acl;
104 int opt_print_default_acl;
105 int opt_strip_leading_slash = 1;
106 @@ -642,7 +642,7 @@ int main(int argc, char *argv[])
107 case 'L': /* follow all symlinks */
108 if (posixly_correct)
109 goto synopsis;
110 - walk_flags |= WALK_TREE_LOGICAL;
111 + walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE;
112 walk_flags &= ~WALK_TREE_PHYSICAL;
113 break;
114
115 @@ -650,7 +650,8 @@ int main(int argc, char *argv[])
116 if (posixly_correct)
117 goto synopsis;
118 walk_flags |= WALK_TREE_PHYSICAL;
119 - walk_flags &= ~WALK_TREE_LOGICAL;
120 + walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE |
121 + WALK_TREE_DEREFERENCE_TOPLEVEL);
122 break;
123
124 case 's': /* skip files with only base entries */
125 --
126 1.6.3.3