Re: Cmake and dbus daemon on the system bus

2019-10-12 Thread Luca Carlon
> Make sure you REALLY need to run as root. If you can run as some other, non- > privileged user, that's better. That can be as a result of dropping privileges > with setuid() or capset() after acquiring the resource you need. > > If you do that, connect to the bus AFTER you've dropped privileges.

Re: Cmake and dbus daemon on the system bus

2019-10-12 Thread Luca Carlon
Very sorry for the incredibly late answer, but I had to pause this task. On Mon, Sep 16, 2019 at 9:56 PM David Edmundson wrote: > > Kauth is a wrapper round using dbus activation on the system bus... Yes, and that is how my first implementation works. But it seemed less flexible: the only way I

Re: Cmake and dbus daemon on the system bus

2019-09-16 Thread Thiago Macieira
On Monday, 16 September 2019 12:56:32 PDT David Edmundson wrote: > You want to look for dbus-activation and set User=root in the > activation desktop file that you put in > /usr/share/dbus-1/system-services Make sure you REALLY need to run as root. If you can run as some other, non- privileged use

Re: Cmake and dbus daemon on the system bus

2019-09-16 Thread David Edmundson
Kauth is a wrapper round using dbus activation on the system bus... >I read the tutorials related to dbus in the techbase pages, but those seem >more oriented to the sessionBus. It's 99.9% the same. >and a way to automatically start with root privileges the daemon You want to look for dbus-act

Cmake and dbus daemon on the system bus

2019-09-16 Thread Luca Carlon
Hello, not sure if this is the right place to ask. I'm working on this new feature: https://bugs.kde.org/show_bug.cgi?id=410902. In the current implementation I used KAuth, but it seems to me a dbus daemon would be a better fit for this case. The daemon must be run as root, and should therefore pro