diff options
author | Oscar Montemayor <oam@google.com> | 2010-02-22 14:15:00 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-02-22 14:15:00 -0800 |
commit | 176160a3edc299a35901c4345a04a01024af48ed (patch) | |
tree | 64b2355babd7a884cc772f2f157d6be68126423f | |
parent | 1efc95f54ef28135d05db756f0b124a37341f90b (diff) | |
parent | 1ff8fee7c8e4fcd4ef12c6c5d1055b7eccf5809b (diff) | |
download | frameworks_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.java | 3 |
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; } |