1 |
axs 13/01/28 21:25:21 |
2 |
|
3 |
Added: eudev-fix-selinux.patch |
4 |
Log: |
5 |
fix selinux for beta2, fix location of udev-init-scripts dep |
6 |
|
7 |
(Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-fs/eudev/files/eudev-fix-selinux.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/files/eudev-fix-selinux.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/files/eudev-fix-selinux.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: eudev-fix-selinux.patch |
16 |
=================================================================== |
17 |
commit 26e92619267df364bac4aed29376a36669fb53d3 |
18 |
Author: Ian Stakenvicius <axs@g.o> |
19 |
Date: Mon Jan 28 11:16:31 2013 -0500 |
20 |
|
21 |
Add missing selinux code to udev core (convenience lib) |
22 |
|
23 |
Original Author: Alexey D. (TZ86) |
24 |
Signed-off-by: Ian Stakenvicius <axs@g.o> |
25 |
Signed-off-by: Matthew Thode <prometheanfire@g.o> |
26 |
|
27 |
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am |
28 |
index 972c275..866d2c2 100644 |
29 |
--- a/src/udev/Makefile.am |
30 |
+++ b/src/udev/Makefile.am |
31 |
@@ -72,7 +72,8 @@ libudev_core_la_CFLAGS = \ |
32 |
|
33 |
libudev_core_la_LIBADD = \ |
34 |
$(top_builddir)/src/libudev/libudev-private.la \ |
35 |
- $(BLKID_LIBS) |
36 |
+ $(BLKID_LIBS) \ |
37 |
+ $(SELINUX_LIBS) |
38 |
|
39 |
if HAVE_MODULES |
40 |
libudev_core_la_SOURCES += \ |
41 |
diff --git a/src/udev/label.c b/src/udev/label.c |
42 |
index d353da5..7e8d8f9 100644 |
43 |
--- a/src/udev/label.c |
44 |
+++ b/src/udev/label.c |
45 |
@@ -31,12 +31,19 @@ |
46 |
#include "path-util.h" |
47 |
|
48 |
#ifdef HAVE_SELINUX |
49 |
-#include "selinux-util.h" |
50 |
+#include <stdbool.h> |
51 |
#include <selinux/selinux.h> |
52 |
#include <selinux/label.h> |
53 |
|
54 |
static struct selabel_handle *label_hnd = NULL; |
55 |
+static int use_selinux_cached = -1; |
56 |
|
57 |
+bool use_selinux(void) { |
58 |
+ if (use_selinux_cached < 0) |
59 |
+ use_selinux_cached = is_selinux_enabled() > 0; |
60 |
+ |
61 |
+ return use_selinux_cached; |
62 |
+} |
63 |
#endif |
64 |
|
65 |
int label_init(const char *prefix) { |