Re: [Dorset] Using polkit to escalate privieges

2018-03-19 Thread Hamish MB
Thanks :) Hamish On 19/03/18 11:38, Tim Waugh wrote: > That's exactly the idea. :-) > > Tim. > */ > > > On 19 March 2018 at 11:37, Hamish MB wrote: >> Thanks Tim. >> >> Right, so I should be able to make a script to run processes as root, >> and then make a polkit action for that script, so the

Re: [Dorset] Using polkit to escalate privieges

2018-03-19 Thread Tim Waugh
That's exactly the idea. :-) Tim. */ On 19 March 2018 at 11:37, Hamish MB wrote: > Thanks Tim. > > Right, so I should be able to make a script to run processes as root, > and then make a polkit action for that script, so the dialogs are nicely > presented, rather than displaying script names an

Re: [Dorset] Using polkit to escalate privieges

2018-03-19 Thread Hamish MB
Thanks Tim. Right, so I should be able to make a script to run processes as root, and then make a polkit action for that script, so the dialogs are nicely presented, rather than displaying script names and things like that. Is that a hack/bad idea or does it sound okay? I'm sure there must be a ni

Re: [Dorset] Using polkit to escalate privieges

2018-03-16 Thread Tim Waugh
On 16 March 2018 at 14:05, Hamish MB wrote: > I see, I think. In that case it sounds like the wrong tool for what I'm > trying to do, though I'm sure that for example synaptic uses it. I'm thinking > specifically of using pkexec, does that work this way too? Yes, pkexec just uses the org.freede

Re: [Dorset] Using polkit to escalate privieges

2018-03-16 Thread Hamish MB
I see, I think. In that case it sounds like the wrong tool for what I'm trying to do, though I'm sure that for example synaptic uses it. I'm thinking specifically of using pkexec, does that work this way too? Hamish On 16 Mar 2018, at 10:11, Tim Waugh mailto:twa...@redhat.com>> wrote: The way

Re: [Dorset] Using polkit to escalate privieges

2018-03-16 Thread Tim Waugh
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 wan

Re: [Dorset] Using polkit to escalate privieges

2018-03-15 Thread Ralph Corderoy
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 tha

[Dorset] Using polkit to escalate privieges

2018-03-15 Thread Hamish MB
Hi everyone, 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. This is because Wayland doesn't allow GUI apps to run as root without a hack. Tim suggested I try using pkexec, but I can confirm thi