diff options
author | Oscar Montemayor <oam@google.com> | 2010-02-22 11:16:51 -0800 |
---|---|---|
committer | Oscar Montemayor <oam@google.com> | 2010-02-22 11:17:38 -0800 |
commit | 1ff8fee7c8e4fcd4ef12c6c5d1055b7eccf5809b (patch) | |
tree | 5c7f8f94fd6878b890a1f284eff87028f7301610 /keystore/java/android/security/SystemKeyStore.java | |
parent | bcea8124a1d85c610b4bd4e6d360a861d2f61793 (diff) | |
download | frameworks_base-1ff8fee7c8e4fcd4ef12c6c5d1055b7eccf5809b.zip frameworks_base-1ff8fee7c8e4fcd4ef12c6c5d1055b7eccf5809b.tar.gz frameworks_base-1ff8fee7c8e4fcd4ef12c6c5d1055b7eccf5809b.tar.bz2 |
Better file permissions enforcement on system keystore.
Diffstat (limited to 'keystore/java/android/security/SystemKeyStore.java')
-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; } |