On 2/21/20 11:04 AM, Alexey Tikhonov wrote:
On Thu, Feb 20, 2020 at 11:19 AM Pavel Březina
<pbrezina(a)redhat.com> wrote:
>
> Hi devs,
>
> I'm thinking about ways to implement SSSD KCM notification that
> something has changed (i.e. user called kinit/kdestroy) [1]. The main
> use case is to notify Gnome Online Accounts (which is a daemon running
> under logged-in user) when something has changed and it is already a
> D-Bus service.
>
> The basic idea is that we would use D-Bus signals that would be emitted
> by SSSD KCM responder (sssd_kcm process). Signals are broadcasted
> messages that are delivered to client that chose to listen to them.
>
> The problem is that we
> 1) can't connect to specific user's session bus because KCM runs as
> root/sssd and connecting to other user's bus is not allowed
Why?
https://lists.freedesktop.org/archives/dbus/2010-May/012757.html
We can't use seteuid directly in kcm due to its asynchronous nature. We
can call it only for synchronous piece of code... but perhaps we could
create a child process for that... i.e. create child process that would
call seteuid, connect to the bus and send the notification then quit.