OSDN Git Service

Fix missing permission check when saving pattern/password
authorJim Miller <jaggies@google.com>
Wed, 13 Apr 2016 23:35:36 +0000 (16:35 -0700)
committerThe Android Automerger <android-build@google.com>
Fri, 27 May 2016 18:31:14 +0000 (11:31 -0700)
Fixes bug 28163930

Change-Id: Ic98ef20933b352159b88fdef331e83e9ef6e1f20

services/core/java/com/android/server/LockSettingsService.java

index f1d7da4..55682c2 100644 (file)
@@ -424,6 +424,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) {
@@ -452,6 +453,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) {