• Laurent Bigonville's avatar
    Return the dbus-daemon SELinux context when asking about org.freedesktop.DBus · dcf02f80
    Laurent Bigonville authored
    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's avatarSimon McVittie <smcv@collabora.com>
selinux.h 2.7 KB