diff options
author | Clayton Shotwell <clayton.shotwell@rockwellcollins.com> | 2016-10-25 14:26:03 -0500 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-12-10 15:55:31 +0100 |
commit | cb328f77f8f07bfd89d6b69385c941a7b281732b (patch) | |
tree | 465125baab9a70a752c1df2970632ce475a8cc48 /package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch | |
parent | 8879424b4940771f9072f97eb3b340dc6248c8fe (diff) | |
download | buildroot-cb328f77f8f07bfd89d6b69385c941a7b281732b.tar.gz buildroot-cb328f77f8f07bfd89d6b69385c941a7b281732b.zip |
policycoreutils: new package
This package contains the core policy utilities that are required
for basic operation of an SELinux system.
Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
Tested-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
Signed-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
[Thomas:
- Move the Config.in comment at the top of the Config.in file rather
than between the main option and its sub-options, as this breaks
menuconfig indentation.
- Fix the propagation of the libsemanage dependencies. libsemanage
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS and
BR2_TOOLCHAIN_USES_GLIBC which were not accounted for. Since it
depends on BR2_TOOLCHAIN_USES_GLIBC, then all the gettext related
handling becomes useless and has been removed.
- Rename the prompt of the restorecond sub-option to just
"restorecond".
- Use TARGET_CONFIGURE_OPTS and HOST_CONFIGURE_OPTS instead of
passing LDFLAGS, CC, etc. manually.
- Use make "foreach" function for loops instead of shell "for" loops.
- Rework the explanation of why we're passing DESTDIR at build time.
- Minor formatting tweaks here and there.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch')
-rw-r--r-- | package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch b/package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch new file mode 100644 index 0000000000..37ffac8de8 --- /dev/null +++ b/package/policycoreutils/0005-Check-to-see-if-DBUS-is-enabled.patch @@ -0,0 +1,56 @@ +From d1bc28c5b2efe60a0ee04d9c171928d0f3475654 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <Aduskett@gmail.com> +Date: Thu, 14 Jul 2016 13:26:23 -0400 +Subject: [PATCH] Check to see if DBUS is enabled. + +Adds a condition to prevent linking against dbus when at build time +dbus has not been enabled. + +Updated for 2.5. + +Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> +Signed-off-by: Adam Duskett <AdamDuskett@outlook.com> +Signed-off-by: Adam Duskett <Aduskett@gmail.com> +--- + policycoreutils/restorecond/Makefile | 2 ++ + policycoreutils/restorecond/user.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/restorecond/Makefile b/restorecond/Makefile +index 92a4a4d..95f38a6 100644 +--- a/restorecond/Makefile ++++ b/restorecond/Makefile +@@ -11,8 +11,10 @@ autostart_DATA = sealertauto.desktop + INITDIR ?= $(DESTDIR)/etc/rc.d/init.d + SELINUXDIR = $(DESTDIR)/etc/selinux + ++ifdef ENABLE_DBUS + DBUSFLAGS = -DHAVE_DBUS -I$(DESTDIR)/usr/include/dbus-1.0 -I$(DESTDIR)/usr/lib64/dbus-1.0/include -I$(DESTDIR)/usr/lib/dbus-1.0/include + DBUSLIB = -ldbus-glib-1 -ldbus-1 ++endif + + CFLAGS ?= -g -Werror -Wall -W + override CFLAGS += -I$(DESTDIR)/usr/include $(DBUSFLAGS) -I$(DESTDIR)/usr/include/glib-2.0 \ +diff --git a/restorecond/user.c b/restorecond/user.c +index 714aae7..a04cddb 100644 +--- a/restorecond/user.c ++++ b/restorecond/user.c +@@ -54,7 +54,6 @@ static const char *PATH="/org/selinux/Restorecond"; + static const char *INTERFACE="org.selinux.RestorecondIface"; + static const char *RULE="type='signal',interface='org.selinux.RestorecondIface'"; + +-static int local_lock_fd = -1; + + static DBusHandlerResult + signal_filter (DBusConnection *connection __attribute__ ((__unused__)), DBusMessage *message, void *user_data) +@@ -101,6 +100,7 @@ static int dbus_server(GMainLoop *loop) { + #include <selinux/selinux.h> + #include <sys/file.h> + ++static int local_lock_fd = -1; + /* size of the event structure, not counting name */ + #define EVENT_SIZE (sizeof (struct inotify_event)) + /* reasonable guess as to size of 1024 events */ +-- +2.7.4 + |