Re: [systemd-devel] Unprivileged poweroff

2014-10-22 Thread Djalal Harouni
On Wed, Oct 22, 2014 at 12:59:45PM +0100, Simon McVittie wrote: > On 22/10/14 12:37, Lennart Poettering wrote: > > When used with kdbus we actually do check for that client-side > > capability. THis is not available on dbus1 however, since we cannot > > determine the capability racefreely and thus

Re: [systemd-devel] Unprivileged poweroff

2014-10-22 Thread Simon McVittie
On 22/10/14 12:37, Lennart Poettering wrote: > When used with kdbus we actually do check for that client-side > capability. THis is not available on dbus1 however, since we cannot > determine the capability racefreely and thus safely ... because the kernel doesn't give us that ability on Unix sock

Re: [systemd-devel] Unprivileged poweroff

2014-10-22 Thread Lennart Poettering
On Wed, 10.09.14 16:03, Michal Witanowski (m.witanow...@samsung.com) wrote: > Hi, > > I was wondering if there is a possibility to call "systemctl poweroff" as > non-root user in this scenario: > > 1.I have no PolicyKit on my system, so I get access denied. > > 2. Calling with "-f

Re: [systemd-devel] Unprivileged poweroff

2014-09-10 Thread Tom Gundersen
On Wed, Sep 10, 2014 at 4:03 PM, Michal Witanowski wrote: > I was wondering if there is a possibility to call “systemctl poweroff” as > non-root user in this scenario: > > 1.I have no PolicyKit on my system, so I get access denied. > > 2. Calling with “-f” parameter also fails, with

Re: [systemd-devel] Unprivileged poweroff

2014-09-10 Thread Simon McVittie
On 10/09/14 16:10, Simon McVittie wrote: > If you want to escalate privileges in a controlled way, you need a > controlled privilege-escalation tool. PolicyKit is one such tool; > systemctl is another; a setuid binary written by you [...] > is another possibility. Sorry, that should read "sudo is

Re: [systemd-devel] Unprivileged poweroff

2014-09-10 Thread Simon McVittie
On 10/09/14 15:03, Michal Witanowski wrote: > I was wondering if there is a possibility to call “systemctl poweroff” > as non-root user [without PolicyKit or sudo] ... > Theoretically there is no other way, am I right? If you want to escalate privileges in a controlled way, you need a controlled p

[systemd-devel] Unprivileged poweroff

2014-09-10 Thread Michal Witanowski
Hi, I was wondering if there is a possibility to call "systemctl poweroff" as non-root user in this scenario: 1.I have no PolicyKit on my system, so I get access denied. 2. Calling with "-f" parameter also fails, with "Must be root" error. 3. I'd like to avoid using "sudo".