Use fdeCheckPassword error code to indicate pw failure
Plumb through the error code from cryptfs_check_password to decryptStorage that was lost in the switch to Binder, so that a wrong password (+ve return value) is not treated like a bad state (-ve return value). Bug: 110976442 Test: Switch walleye fstab to FDE, and test wrong password by hand Change-Id: Ic2d58483a230ab4520e3a0e6af08d2fac5e8156f
This commit is contained in:
@@ -81,6 +81,7 @@ import android.os.Process;
|
||||
import android.os.RemoteCallbackList;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.ServiceSpecificException;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
@@ -2254,6 +2255,9 @@ class StorageManagerService extends IStorageManager.Stub
|
||||
}
|
||||
}, DateUtils.SECOND_IN_MILLIS);
|
||||
return 0;
|
||||
} catch (ServiceSpecificException e) {
|
||||
Slog.e(TAG, "fdeCheckPassword failed", e);
|
||||
return e.errorCode;
|
||||
} catch (Exception e) {
|
||||
Slog.wtf(TAG, e);
|
||||
return StorageManager.ENCRYPTION_STATE_ERROR_UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user