summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Montemayor <oam@google.com>2010-02-22 14:15:00 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-02-22 14:15:00 -0800
commit176160a3edc299a35901c4345a04a01024af48ed (patch)
tree64b2355babd7a884cc772f2f157d6be68126423f
parent1efc95f54ef28135d05db756f0b124a37341f90b (diff)
parent1ff8fee7c8e4fcd4ef12c6c5d1055b7eccf5809b (diff)
downloadframeworks_base-176160a3edc299a35901c4345a04a01024af48ed.zip
frameworks_base-176160a3edc299a35901c4345a04a01024af48ed.tar.gz
frameworks_base-176160a3edc299a35901c4345a04a01024af48ed.tar.bz2
Merge "Better file permissions enforcement on system keystore."
-rw-r--r--keystore/java/android/security/SystemKeyStore.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/keystore/java/android/security/SystemKeyStore.java b/keystore/java/android/security/SystemKeyStore.java
index 61a4293..abdb0ae 100644
--- a/keystore/java/android/security/SystemKeyStore.java
+++ b/keystore/java/android/security/SystemKeyStore.java
@@ -17,6 +17,7 @@
package android.security;
import android.os.Environment;
+import android.os.FileUtils;
import android.os.Process;
import java.io.File;
@@ -92,6 +93,8 @@ public class SystemKeyStore {
fos.write(retKey);
fos.flush();
fos.close();
+ FileUtils.setPermissions(keyFile.getName(), (FileUtils.S_IRUSR | FileUtils.S_IWUSR),
+ -1, -1);
} catch (IOException ioe) {
return null;
}