[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] sets the install chmod perms to 700 properly
commit 2600519c4de58577877dfed179377a8cd795e07c
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date: Sun Jan 15 10:43:49 2012 -0500
sets the install chmod perms to 700 properly
---
.../android/service/TorBinaryInstaller.java | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/org/torproject/android/service/TorBinaryInstaller.java b/src/org/torproject/android/service/TorBinaryInstaller.java
index 9a56004..68ce745 100644
--- a/src/org/torproject/android/service/TorBinaryInstaller.java
+++ b/src/org/torproject/android/service/TorBinaryInstaller.java
@@ -34,7 +34,8 @@ public class TorBinaryInstaller implements TorServiceConstants {
Context context;
private static int isARMv6 = -1;
-
+ private static String CHMOD_EXEC = "700";
+
public TorBinaryInstaller (Context context, File installFolder)
{
this.installFolder = installFolder;
@@ -116,7 +117,6 @@ public class TorBinaryInstaller implements TorServiceConstants {
}
while ((bytecount = stm.read(buffer)) > 0)
-
{
stmOut.write(buffer, 0, bytecount);
@@ -229,25 +229,16 @@ public class TorBinaryInstaller implements TorServiceConstants {
File file = new File(ctx.getDir("bin",0), "iptables");
if ((!file.exists()) && isARMv6()) {
- copyRawFile(ctx, R.raw.iptables_g1, file, "755");
+ copyRawFile(ctx, R.raw.iptables_g1, file, CHMOD_EXEC);
changed = true;
}
// Check iptables_n1
file = new File(ctx.getDir("bin",0), "iptables");
if ((!file.exists()) && (!isARMv6())) {
- copyRawFile(ctx, R.raw.iptables_n1, file, "755");
- changed = true;
- }
-
- // Check busybox
- /*
- file = new File(ctx.getDir("bin",0), "busybox_g1");
- if (!file.exists()) {
- copyRawFile(ctx, R.raw.busybox_g1, file, "755");
+ copyRawFile(ctx, R.raw.iptables_n1, file, CHMOD_EXEC);
changed = true;
}
- */
return true;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits