/[pkgs]/devel/coreutils/coreutils-6.11-matchpathconinstall.patch
ViewVC logotype

Contents of /devel/coreutils/coreutils-6.11-matchpathconinstall.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Mon Jun 2 11:12:20 2008 UTC (17 months, 3 weeks ago) by ovasik
Branch: MAIN
CVS Tags: F-12-split, coreutils-6_12-11_fc10, coreutils-7_2-1_fc11, coreutils-6_12-10_fc10, coreutils-7_5-5_fc12, coreutils-6_12-4_fc10, coreutils-7_6-5_fc12, coreutils-6_12-13_fc10, coreutils-6_12-12_fc10, coreutils-7_2-2_fc12, coreutils-7_6-1_fc12, coreutils-7_0-2_fc11, coreutils-7_2-3_fc12, coreutils-7_4-2_fc12, coreutils-7_6-3_fc12, coreutils-7_1-3_fc11, coreutils-7_6-7_fc13, coreutils-6_12-17_fc10, F-10-split, coreutils-7_0-4_fc11, coreutils-7_1-2_fc11, F-11-split, coreutils-7_0-5_fc11, coreutils-6_12-15_fc10, coreutils-7_4-3_fc12, coreutils-7_0-6_fc11, coreutils-7_4-1_fc12, coreutils-6_12-9_fc10, coreutils-7_4-5_fc12, coreutils-6_12-1_fc10, coreutils-7_1-7_fc11, coreutils-8_0-2_fc13, coreutils-7_5-6_fc12, coreutils-6_12-16_fc10, coreutils-7_4-6_fc12, coreutils-6_12-5_fc10, coreutils-7_5-4_fc12, coreutils-7_1-6_fc11, coreutils-7_1-4_fc11, coreutils-7_1-5_fc11, coreutils-7_6-6_fc13, coreutils-7_6-6_fc12, coreutils-6_12-7_fc10, coreutils-7_6-2_fc12, coreutils-7_0-8_fc11, coreutils-6_12-6_fc10, coreutils-6_12-2_fc10, coreutils-7_5-3_fc12, coreutils-6_12-14_fc10, coreutils-6_12-3_fc10, coreutils-7_5-2_fc12, coreutils-7_1-1_fc11, coreutils-7_0-3_fc11, coreutils-7_5-1_fc12, coreutils-8_0-1_fc13, coreutils-7_0-7_fc11, coreutils-7_6-4_fc12, coreutils-7_4-4_fc12, coreutils-6_12-8_fc10, coreutils-7_0-1_fc11, HEAD
Changes since 1.1: +33 -73 lines
File MIME type: text/x-patch
new upstream releases 6.12 + adapted patches
1 From a089634c855312a28f2ff3c2e7c08df5d030e2f5 Mon Sep 17 00:00:00 2001
2 From: Jim Meyering <meyering <at> redhat.com>
3 Date: Tue, 20 May 2008 17:58:42 +0200
4 Subject: [PATCH] install: avoid a leak in currently-ifdef'd-out code
5
6 * src/install.c (setdefaultfilecon)
7 [ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
8 Call matchpathcon_init_prefix only once.
9 Suggestion from Stephen Smalley. Reported by Ben Webb in
10 <http://bugzilla.redhat.com/447410>.
11 ---
12 src/install.c | 5 ++++-
13 1 files changed, 4 insertions(+), 1 deletions(-)
14
15 diff --git a/src/install.c b/src/install.c
16 index 964ab36..b531f45 100644
17 --- a/src/install.c
18 +++ b/src/install.c
19 @@ -208,6 +208,8 @@ setdefaultfilecon (char const *file)
20 {
21 struct stat st;
22 security_context_t scontext = NULL;
23 + static bool first_call = true;
24 +
25 if (selinux_enabled != 1)
26 {
27 /* Indicate no context found. */
28 @@ -216,7 +218,7 @@ setdefaultfilecon (char const *file)
29 if (lstat (file, &st) != 0)
30 return;
31
32 - if (IS_ABSOLUTE_FILE_NAME (file))
33 + if (first_call && IS_ABSOLUTE_FILE_NAME (file))
34 {
35 /* Calling matchpathcon_init_prefix (NULL, "/first_component/")
36 is an optimization to minimize the expense of the following
37 @@ -247,6 +249,7 @@ setdefaultfilecon (char const *file)
38 }
39 }
40 }
41 + first_call = false;
42
43 /* If there's an error determining the context, or it has none,
44 return to allow default context */
45 --
46 1.5.5.1.249.g68ef3

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2