Lennart Poettering wrote on 20/08/14 14:58: > On Wed, 20.08.14 15:50, Michal Witanowski ([email protected]) wrote: > >> >> The inhibit locks mechanism seems to be the solution, but another problem >> appeared. I am unable to call Inhibit() method as non-root user. In the >> documentation I read "Taking inhibitor locks is a privileged operation. >> Depending on the action...". But how can I add a user to privileged users >> group? Note that I do NOT have PolicyKit in the system... > > Well, PK is how we open up those calls for unpriviliged clients... > > If you don't have PK then this functionality will not be available...
I suppose in an embedded env then creating a totally trivial setuid wrapper and shelling out to /usr/bin/systemd-inhibit would be a suitable alternative to PK. Not nice and obviously you have to be careful not to write an exploitable setuid wrapper, but might be what you need in this case? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
