diff options
author | Christopher Tate <ctate@google.com> | 2015-02-24 15:08:08 -0800 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2015-02-24 15:16:57 -0800 |
commit | 8dd7d01c1a07d9893ce1207c90869fe3d40fbced (patch) | |
tree | db5ed59b6923f3674af382d629c98bafcd79d01e | |
parent | a1879609890640bd26639fc3ce1fa482efd17e8d (diff) | |
download | frameworks_base-8dd7d01c1a07d9893ce1207c90869fe3d40fbced.zip frameworks_base-8dd7d01c1a07d9893ce1207c90869fe3d40fbced.tar.gz frameworks_base-8dd7d01c1a07d9893ce1207c90869fe3d40fbced.tar.bz2 |
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
-rw-r--r-- | services/backup/java/com/android/server/backup/Trampoline.java | 2 |
1 files changed, 2 insertions, 0 deletions
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); |