Fix missing permission check when saving pattern/password

Fixes bug 28163930

Change-Id: Ic98ef20933b352159b88fdef331e83e9ef6e1f20
This commit is contained in:
Jim Miller
2016-04-13 16:35:36 -07:00
parent 825b713469
commit b5383455b6

View File

@@ -417,6 +417,7 @@ public class LockSettingsService extends ILockSettings.Stub {
@Override
public void setLockPattern(String pattern, String savedCredential, int userId)
throws RemoteException {
checkWritePermission(userId);
byte[] currentHandle = getCurrentHandle(userId);
if (pattern == null) {
@@ -445,6 +446,7 @@ public class LockSettingsService extends ILockSettings.Stub {
@Override
public void setLockPassword(String password, String savedCredential, int userId)
throws RemoteException {
checkWritePermission(userId);
byte[] currentHandle = getCurrentHandle(userId);
if (password == null) {