<div dir="ltr">Hello.<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 5, 2014 at 6:42 PM, Miguel Angel Ajo <span dir="ltr"><<a href="mailto:majopela@redhat.com" target="_blank">majopela@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2) What alternatives can we think about to improve this situation.<br>
<br>
   0) already being done: coalescing system calls. But I'm unsure that's enough. (if we coalesce 15 calls to 3 on this system we get: 192*3*0.3/60 ~=3 minutes overhead on a 10min operation).<br>
<br>
   a) Rewriting rules into sudo (to the extent that it's possible), and live with that.<br>
   b) How secure is neutron about command injection to that point? How much is user input filtered on the API calls?<br>
   c) Even if "b" is ok , I suppose that if the DB gets compromised, that could lead to command injection.<br>
<br>
   d) Re-writing rootwrap into C (it's 600 python LOCs now).</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   e) Doing the command filtering at neutron-side, as a library and live with sudo with simple filtering. (we kill the python/rootwrap startup overhead).<br></blockquote></div><div><br></div><div>Another option would be to allow rootwrap to run in daemon mode and provide RPC interface. This way Neutron can spawn rootwrap (with its CPython startup overhead) once and send new commands to be run later over UNIX socket.</div>

<div>This way we won't need learn new language (C/C++), adopt new toolchain (RPython, Cython, whatever else) and still get secure way to run commands with root priviledges.</div><div><br></div>-- <br><br><div>Kind regards, Yuriy.</div>


</div></div>