From 8dd7d01c1a07d9893ce1207c90869fe3d40fbced Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 24 Feb 2015 15:08:08 -0800 Subject: Check DUMP permission in the backup service trampoline Make sure that even if backup is disabled outright (and hence there is no underlying service implementation for the trampoline to delegate to), the DUMP permission exception is thrown as expected. Bug 19422232 Change-Id: I6d1a17c5f85adcfad75af969b521920e786c05a8 --- services/backup/java/com/android/server/backup/Trampoline.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/backup/java/com/android/server/backup/Trampoline.java b/services/backup/java/com/android/server/backup/Trampoline.java index 8bd7132..2e84fbe 100644 --- a/services/backup/java/com/android/server/backup/Trampoline.java +++ b/services/backup/java/com/android/server/backup/Trampoline.java @@ -318,6 +318,8 @@ public class Trampoline extends IBackupManager.Stub { @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG); + BackupManagerService svc = mService; if (svc != null) { svc.dump(fd, pw, args); -- cgit v1.1