summaryrefslogtreecommitdiff
path: root/bus/selinux.h
diff options
context:
space:
mode:
authorLaurent Bigonville <bigon@bigon.be>2017-06-06 16:06:11 +0200
committerSimon McVittie <smcv@collabora.com>2017-06-12 11:56:13 +0100
commitdcf02f80656da21db501b8c9605ad9c67d7c4dc9 (patch)
tree7ba9c8ebbd935b9070e474d954af6447c9a8667f /bus/selinux.h
parent0203c48d5243a0cdc2c438b32fd9d9ad4d96f71a (diff)
downloaddbus-dcf02f80656da21db501b8c9605ad9c67d7c4dc9.tar.gz
Return the dbus-daemon SELinux context when asking about org.freedesktop.DBus
Currently when asked the SELinux context of the owner of org.freedesktop.DBus, the dbus-daemon is returning an error. In the same situation when asked about the Unix user or the PID, the daemon would return its own user or pid. Do the same for the SELinux context by returning the daemon one. In particular this avoids an issue seen with systemd --user, where dbus-daemon responds to UpdateActivationEnvironment() by passing on the new environment to systemd with o.fd.systemd1.Manager.SetEnvironment(), but systemd cannot get the caller's SELinux context and so rejects the SetEnvironment() call. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101315 [smcv: Extend commit message to describe the symptom this fixes] Reviewed-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'bus/selinux.h')
-rw-r--r--bus/selinux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/bus/selinux.h b/bus/selinux.h
index 8c7cb0a3..a0383cdd 100644
--- a/bus/selinux.h
+++ b/bus/selinux.h
@@ -33,6 +33,8 @@ void bus_selinux_shutdown (void);
dbus_bool_t bus_selinux_enabled (void);
+BusSELinuxID *bus_selinux_get_self (void);
+
DBusHashTable* bus_selinux_id_table_new (void);
BusSELinuxID* bus_selinux_id_table_lookup (DBusHashTable *service_table,
const DBusString *service_name);