On 18.2.2010 13:53, Jiri Srain wrote:
[...]
> Have a look here:
> 
> http://en.opensuse.org/YaST/Web/Development/Tutorial#Standalone_D-Bus_service
> 
> at the tutorial. It describes how to create a generic D-Bus service with an 
> example how to make it run a command (which is passed through the interface, 
> which
> is not really secure). Hope you can use it.

Right now I am porting yast2-dbus-server from PolicyKit to polkit
(the successor of PolicyKit, actually it's a major redesign of PolicyKit with
incompatible API change) and I found that polkit package already contains a 
generic
wrapper for running scripts as root (or as any other user).

So you need only to create a *.policy file for the script and that's it.
No need to create a dedicated DBus service.

See 'man pkexec'.

Unfortunately polkit is not available in SLE11, so this is probably valid only 
for
SLE12...


--

Best Regards

Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o.                              e-mail: [email protected]
Lihovarská 1060/12                              tel: +420 284 028 960
190 00 Prague 9                                 fax: +420 284 028 951
Czech Republic                                  http://www.suse.cz/
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to