summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorPaul Lawrence <paullawrence@google.com>2015-09-09 13:05:45 -0700
committerPaul Lawrence <paullawrence@google.com>2015-09-09 13:05:45 -0700
commit5096d9e13e2cdfe9f9e78ebc4e551327bfb2c171 (patch)
treecee0937446849b72243d367ce1043ed4ba4b3432 /services
parentf57d98564b26953b722ab0e14222f50e6515f36d (diff)
downloadframeworks_base-5096d9e13e2cdfe9f9e78ebc4e551327bfb2c171.zip
frameworks_base-5096d9e13e2cdfe9f9e78ebc4e551327bfb2c171.tar.gz
frameworks_base-5096d9e13e2cdfe9f9e78ebc4e551327bfb2c171.tar.bz2
Don't include password on default encryption command
Bug: 22989588 Change-Id: I6f5b84519cb357af8461257654e382980b874486
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/MountService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 0d64540..145eafd 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -2409,8 +2409,13 @@ class MountService extends IMountService.Stub
}
try {
- mCryptConnector.execute("cryptfs", "enablecrypto", "inplace", CRYPTO_TYPES[type],
- new SensitiveArg(password));
+ if (type == StorageManager.CRYPT_TYPE_DEFAULT) {
+ mCryptConnector.execute("cryptfs", "enablecrypto", "inplace",
+ CRYPTO_TYPES[type]);
+ } else {
+ mCryptConnector.execute("cryptfs", "enablecrypto", "inplace",
+ CRYPTO_TYPES[type], new SensitiveArg(password));
+ }
} catch (NativeDaemonConnectorException e) {
// Encryption failed
return e.getCode();