ensures binary permissions are set
This commit is contained in:
parent
14fab242af
commit
92d19e3402
|
@ -588,18 +588,29 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setBinaryPerms();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
logNotice("Error setting binary permissions: " + e.toString());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
private void setBinaryPerms () throws Exception
|
private void setBinaryPerms () throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
|
logNotice("Is Tor binary exec? " + fileTorOrig.canExecute());
|
||||||
|
logNotice("Is Tor binary exec? " + filePrivoxy.canExecute());
|
||||||
|
logNotice("Is Tor binary exec? " + fileObfsProxy.canExecute());
|
||||||
|
|
||||||
|
|
||||||
StringBuilder log = new StringBuilder ();
|
StringBuilder log = new StringBuilder ();
|
||||||
|
|
||||||
logNotice("(re)Setting permission on Tor binary");
|
logNotice("(re)Setting permission on Tor binary");
|
||||||
String[] cmd1 = {SHELL_CMD_CHMOD + ' ' + CHMOD_EXE_VALUE + ' ' + fileTor.getAbsolutePath()};
|
String[] cmd1 = {SHELL_CMD_CHMOD + ' ' + CHMOD_EXE_VALUE + ' ' + fileTorOrig.getAbsolutePath()};
|
||||||
TorServiceUtils.doShellCommand(cmd1, log, false, true);
|
TorServiceUtils.doShellCommand(cmd1, log, false, true);
|
||||||
|
|
||||||
logNotice("(re)Setting permission on Privoxy binary");
|
logNotice("(re)Setting permission on Privoxy binary");
|
||||||
|
@ -610,7 +621,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
||||||
String[] cmd3 = {SHELL_CMD_CHMOD + ' ' + CHMOD_EXE_VALUE + ' ' + fileObfsProxy.getAbsolutePath()};
|
String[] cmd3 = {SHELL_CMD_CHMOD + ' ' + CHMOD_EXE_VALUE + ' ' + fileObfsProxy.getAbsolutePath()};
|
||||||
TorServiceUtils.doShellCommand(cmd3, log, false, true);
|
TorServiceUtils.doShellCommand(cmd3, log, false, true);
|
||||||
|
|
||||||
}*/
|
}
|
||||||
|
|
||||||
private boolean mHasRoot = false;
|
private boolean mHasRoot = false;
|
||||||
private boolean mEnableTransparentProxy = false;
|
private boolean mEnableTransparentProxy = false;
|
||||||
|
|
Loading…
Reference in New Issue