* [gentoo-commits] gentoo-x86 commit in sys-fs/eudev/files: eudev-fix-selinux.patch
@ 2013-01-28 21:25 Ian Stakenvicius (axs)
0 siblings, 0 replies; only message in thread
From: Ian Stakenvicius (axs) @ 2013-01-28 21:25 UTC (permalink / raw
To: gentoo-commits
axs 13/01/28 21:25:21
Added: eudev-fix-selinux.patch
Log:
fix selinux for beta2, fix location of udev-init-scripts dep
(Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
Revision Changes Path
1.1 sys-fs/eudev/files/eudev-fix-selinux.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/files/eudev-fix-selinux.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/files/eudev-fix-selinux.patch?rev=1.1&content-type=text/plain
Index: eudev-fix-selinux.patch
===================================================================
commit 26e92619267df364bac4aed29376a36669fb53d3
Author: Ian Stakenvicius <axs@gentoo.org>
Date: Mon Jan 28 11:16:31 2013 -0500
Add missing selinux code to udev core (convenience lib)
Original Author: Alexey D. (TZ86)
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am
index 972c275..866d2c2 100644
--- a/src/udev/Makefile.am
+++ b/src/udev/Makefile.am
@@ -72,7 +72,8 @@ libudev_core_la_CFLAGS = \
libudev_core_la_LIBADD = \
$(top_builddir)/src/libudev/libudev-private.la \
- $(BLKID_LIBS)
+ $(BLKID_LIBS) \
+ $(SELINUX_LIBS)
if HAVE_MODULES
libudev_core_la_SOURCES += \
diff --git a/src/udev/label.c b/src/udev/label.c
index d353da5..7e8d8f9 100644
--- a/src/udev/label.c
+++ b/src/udev/label.c
@@ -31,12 +31,19 @@
#include "path-util.h"
#ifdef HAVE_SELINUX
-#include "selinux-util.h"
+#include <stdbool.h>
#include <selinux/selinux.h>
#include <selinux/label.h>
static struct selabel_handle *label_hnd = NULL;
+static int use_selinux_cached = -1;
+bool use_selinux(void) {
+ if (use_selinux_cached < 0)
+ use_selinux_cached = is_selinux_enabled() > 0;
+
+ return use_selinux_cached;
+}
#endif
int label_init(const char *prefix) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-28 21:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 21:25 [gentoo-commits] gentoo-x86 commit in sys-fs/eudev/files: eudev-fix-selinux.patch Ian Stakenvicius (axs)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox