python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / policycoreutils / 0005-Check-to-see-if-DBUS-is-enabled.patch
blob37ffac8de86d463fc1be2a848e2f582968394163
1 From d1bc28c5b2efe60a0ee04d9c171928d0f3475654 Mon Sep 17 00:00:00 2001
2 From: Adam Duskett <Aduskett@gmail.com>
3 Date: Thu, 14 Jul 2016 13:26:23 -0400
4 Subject: [PATCH] Check to see if DBUS is enabled.
6 Adds a condition to prevent linking against dbus when at build time
7 dbus has not been enabled.
9 Updated for 2.5.
11 Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
12 Signed-off-by: Adam Duskett <AdamDuskett@outlook.com>
13 Signed-off-by: Adam Duskett <Aduskett@gmail.com>
14 ---
15 policycoreutils/restorecond/Makefile | 2 ++
16 policycoreutils/restorecond/user.c | 2 +-
17 2 files changed, 3 insertions(+), 1 deletion(-)
19 diff --git a/restorecond/Makefile b/restorecond/Makefile
20 index 92a4a4d..95f38a6 100644
21 --- a/restorecond/Makefile
22 +++ b/restorecond/Makefile
23 @@ -11,8 +11,10 @@ autostart_DATA = sealertauto.desktop
24 INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
25 SELINUXDIR = $(DESTDIR)/etc/selinux
27 +ifdef ENABLE_DBUS
28 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
29 DBUSLIB = -ldbus-glib-1 -ldbus-1
30 +endif
32 CFLAGS ?= -g -Werror -Wall -W
33 override CFLAGS += -I$(DESTDIR)/usr/include $(DBUSFLAGS) -I$(DESTDIR)/usr/include/glib-2.0 \
34 diff --git a/restorecond/user.c b/restorecond/user.c
35 index 714aae7..a04cddb 100644
36 --- a/restorecond/user.c
37 +++ b/restorecond/user.c
38 @@ -54,7 +54,6 @@ static const char *PATH="/org/selinux/Restorecond";
39 static const char *INTERFACE="org.selinux.RestorecondIface";
40 static const char *RULE="type='signal',interface='org.selinux.RestorecondIface'";
42 -static int local_lock_fd = -1;
44 static DBusHandlerResult
45 signal_filter (DBusConnection *connection __attribute__ ((__unused__)), DBusMessage *message, void *user_data)
46 @@ -101,6 +100,7 @@ static int dbus_server(GMainLoop *loop) {
47 #include <selinux/selinux.h>
48 #include <sys/file.h>
50 +static int local_lock_fd = -1;
51 /* size of the event structure, not counting name */
52 #define EVENT_SIZE (sizeof (struct inotify_event))
53 /* reasonable guess as to size of 1024 events */
54 --
55 2.7.4