Dne 30.5.2011 14:27, Matteo Sessa napsal(a):
I'm regularly using spacewalk to issue remote commands on my systems after
configuration files deploy and I've noticed that the
/usr/share/rhn/actions/script.py library that perform the script execution
temporarily write the provided script inside /tmp/rhn-remote-script by default.
Well the /tmp is just usual directory. In fact it is create in directory
returned by python function:
tempfile.gettempdir()
You can see the algorithm it use here:
http://docs.python.org/library/tempfile.html#tempfile.tempdir
1 - Is there a global way of changing the temporary directory for
rhn-remote-script and if there's a suitable directory on a default install that
can host the file without raising SELinux AVCs ?
Yes, you can set one of those environment variables. Although I had to
admin is not perfect solution. :(
2 - Could Spacewalk provide a dedicate directory, let's say /var/spool/rhn with
proper labeling and permissions?
Yes, that would be better option. Feel free to file bugzilla requesting
this feature.
3 - Could spacewalk change the way a script is executed by not relying on the
shebang anymore so letting the user specify the executable ( /bin/sh for
example ) on a separate field and thus having /tmp/rhn-remote-script not
executable anymore and rather passed as an argument of the actual program?
Well I see nothing wrong on shebang (especially if 2 item will get
fixed), but you can file RFE for this.
But this is even bigger change then 2. item, so you should not hope for
quick implementation. Of course - unless you or somebody else send patch
for that.
Regards
Mirek Suchy
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel