require DUMP permission on dump()
Nick Kralevich [Tue, 21 Oct 2014 20:49:29 +0000 (13:49 -0700)]
Bug: 17983781
Change-Id: Ib8e9904da80d638abdcc74a5e183ce3d44e1e33b

src/java/com/android/internal/telephony/SubscriptionController.java

index cc60a3e..def9d62 100644 (file)
@@ -1371,6 +1371,8 @@ public class SubscriptionController extends ISub.Stub {
 
     @Override
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP,
+                "Requires DUMP");
         pw.println("SubscriptionController:");
         pw.println(" defaultSubId=" + getDefaultSubId());
         pw.println(" defaultDataSubId=" + getDefaultDataSubId());