[yast-devel] Re: Help needed on how to run shell script as "root" in WebYaST webservice
Hi WebYaSTies, YaST/Web/Development/Tutorial on the openSUSE Wiki is outdated (I just created bnc#579012 to get this fixed) to get this question answered * Hai Shi <HShi@novell.com> [Feb 11. 2010 03:22]:
Do you have any document that I can follow to achieve this: running a shell script as "root" in WebYaST webservice?
Maybe its a good idea to create a set of 'common' D-Bus services for such scenarios ? Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Hi, Does anybody have update on this issue? Thanks, Hai
Klaus Kaempf <kkaempf@suse.de> 2/11/2010 4:37 AM >>> Hi WebYaSTies,
YaST/Web/Development/Tutorial on the openSUSE Wiki is outdated (I just created bnc#579012 to get this fixed) to get this question answered * Hai Shi <HShi@novell.com> [Feb 11. 2010 03:22]:
Do you have any document that I can follow to achieve this: running a shell script as "root" in WebYaST webservice?
Maybe its a good idea to create a set of 'common' D-Bus services for such scenarios ? Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
On 17.2.2010 19:53, Hai Shi wrote:
Hi, Does anybody have update on this issue?
Sorry, no update, but AFAIK Jiří (jsrain) is working on a generic vendor module. BTW PolicyKit supports so called annotaions see http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html#conf-declaring-ac... That's exactly what we need here. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz 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: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Dne středa 17 Únor 2010 20:23:52 Ladislav Slezak napsal(a):
On 17.2.2010 19:53, Hai Shi wrote:
Hi, Does anybody have update on this issue?
Sorry, no update, but AFAIK Jiří (jsrain) is working on a generic vendor module.
BTW PolicyKit supports so called annotaions see http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html#conf-declaring-a ctions-annotations
That's exactly what we need here.
I'm working on (mostly documenting and providing a tempate) general D-Bus service which can be then used by WebYaST. I expect to upload first version (partly skeleton of the documentation) later today to the openSUSE wiki. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 084 659 190 00 Praha 9 fax: +420 284 084 001 Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Dne čtvrtek 18 Únor 2010 09:50:42 Jiri Srain napsal(a):
Dne středa 17 Únor 2010 20:23:52 Ladislav Slezak napsal(a):
On 17.2.2010 19:53, Hai Shi wrote:
Hi, Does anybody have update on this issue?
Sorry, no update, but AFAIK Jiří (jsrain) is working on a generic vendor module.
BTW PolicyKit supports so called annotaions see http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html#conf-declaring -a ctions-annotations
That's exactly what we need here.
I'm working on (mostly documenting and providing a tempate) general D-Bus service which can be then used by WebYaST. I expect to upload first version (partly skeleton of the documentation) later today to the openSUSE wiki.
Have a look here: http://en.opensuse.org/YaST/Web/Development/Tutorial#Standalone_D-Bus_servic... 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. In case of any questions, please, get back to me so that I improve the documentation (or improve it yourself - it's a wiki :-) ). Be aware that this is the first dump I put to wiki and I intend to continue updating it. Of course, any feedback is welcome. Jiri -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 084 659 190 00 Praha 9 fax: +420 284 084 001 Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On 18.2.2010 13:53, Jiri Srain wrote: [...]
Have a look here:
http://en.opensuse.org/YaST/Web/Development/Tutorial#Standalone_D-Bus_servic...
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: lslezak@suse.cz 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: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (4)
-
Hai Shi
-
Jiri Srain
-
Klaus Kaempf
-
Ladislav Slezak