| |
@@ -49,6 +49,7 @@
|
| |
struct oddjob_dbus_context {
|
| |
DBusBusType bustype;
|
| |
int reconnect_timeout;
|
| |
+ dbus_bool_t selinux_enabled;
|
| |
struct oddjob_dbus_service {
|
| |
struct oddjob_dbus_context *ctx;
|
| |
DBusConnection *conn;
|
| |
@@ -154,7 +155,7 @@
|
| |
|
| |
/* Create a new master state structure. */
|
| |
struct oddjob_dbus_context *
|
| |
- oddjob_dbus_listeners_new(DBusBusType bustype)
|
| |
+ oddjob_dbus_listeners_new(DBusBusType bustype, dbus_bool_t selinux_enabled)
|
| |
{
|
| |
struct oddjob_dbus_context *ctx;
|
| |
|
| |
@@ -167,6 +168,7 @@
|
| |
ctx->reconnect_timeout = 0;
|
| |
ctx->n_services = 0;
|
| |
ctx->services = NULL;
|
| |
+ ctx->selinux_enabled = selinux_enabled;
|
| |
|
| |
return ctx;
|
| |
}
|
| |
@@ -712,7 +714,7 @@
|
| |
}
|
| |
|
| |
/* Build our message structure. */
|
| |
- msg = oddjob_dbus_message_from_message(conn, message, FALSE, TRUE);
|
| |
+ msg = oddjob_dbus_message_from_message(conn, message, FALSE, ctx->selinux_enabled);
|
| |
if (msg == NULL) {
|
| |
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
| |
}
|
| |
Fix rhbz#1578150 by skipping SELinux operations if SELinux is disabled. Most of the code already did that except D-Bus handlers.