[systemd-devel] logind-dbus-session question

Lennart Poettering lennart at poettering.net
Mon May 13 08:08:14 UTC 2019


On Sa, 11.05.19 16:29, Damian Ivanov (damianatorrpm at gmail.com) wrote:

> Hello folks.
>
> Thank you for being pioneers in the field!
>
> I am trying to get responses from the login1 system bus, but I get
> Access Denied messages.
> I am calling it as normal user (the user of the session - as root it
> works). SELinux is disabled.
>
> The methods in question are TakeControl/ReleaseControl for grabbing
> the input via busctl.
> ReleaseControl => You are not in control of this session
> TakeControl b true => Access denied

if "force" is true you have to be root. Pass false and have the EUID
of the session owner if you want unprivileged access.


> So another process is currently grabbing the input (for the
> console/VT I think).

The console/VT doesn't grab input from logind really. logind only
manages arbitration/grabbing for its own clients, i.e. only programs
talking to logind.

> Yet when you run weston it does grab the input by taking control, how
> does weston have the permission to kick the console controller out
> (weston is not run as root)? How can I check the pid of the process
> that owns the session control?

It shouldn't need that, unless you are running two Westons (or
Weston-like programs) on the same session.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list