[Commotion-dev] [PATCH] Refactor MeshService to support stopping olsrd.

Nathan of Guardian nathan at guardianproject.info
Mon Jul 9 20:30:22 UTC 2012


On 07/09/2012 10:54 AM, Will Hawkins wrote:
> Thanks for sending this along. This looks incredibly promising. It looks like you may have already implemented what I had outlined as a solution. I have not yet had a chance to fully digest the code, but when I do I may send along some questions. Thanks very much for sending this!

Agreed, that is a nice bit of code!

However, what it comes down to is that if you call "su" as your exec
command, then write to the outputstream after that, then the user will
only be prompted once for root.

Process proc = Runtime.getRuntime().exec("su");
proc.getOutputStream().write("foobin arg1 arg2");

Our less elegant doShellCommand() here is an example of this same
phenomenon:
https://gitweb.torproject.org/n8fr8/orbot.git/blob/HEAD:/src/org/torproject/android/service/TorServiceUtils.java#l173

+n



More information about the Commotion-dev mailing list