The way polkit works is that you have a privileged executable with a
well-known D-Bus object name, a defined D-Bus interface to it, and an
unprivileged executable which asks the system D-Bus for the object
with the interface.

The interface can be as fine-grained as you like. But you definitely
want to put all the privileged parts behind the interface (i.e.
implementations of the interface methods), and the unprivileged parts
in "front" of it (i.e. calling the interface methods).

Tim.
*/


On 15 March 2018 at 20:16, Ralph Corderoy <[email protected]> wrote:
> Hi Hamish,
>
>> One of the things I need to get to reasonably soon is sorting out
>> using polkit to escalate privileges rather than running my GUI
>> programs as root.
> ...
>> Would it be a better idea to make separate scripts for privileged
>> actions and polkit rules for them?
>
> What's the GUI doing that needs root privileges?  I assume this is on
> Raspbian on a Pi?  Access to GPIO or something else?
>
> Cheers, Ralph.
>
> --
> Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
> Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
> New thread:  mailto:[email protected] / CHECK IF YOU'RE REPLYING
> Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

-- 
Next meeting:  Bournemouth, Tuesday, 2018-04-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:[email protected] / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to