am 12ee8935: BannedFilesTest: Add testNoRootCmdSocket
* commit '12ee8935b27621975674d8a3e6675c597af14783':
BannedFilesTest: Add testNoRootCmdSocket
diff --git a/tests/tests/security/src/android/security/cts/BannedFilesTest.java b/tests/tests/security/src/android/security/cts/BannedFilesTest.java
index 971b5cc..8b9003d 100644
--- a/tests/tests/security/src/android/security/cts/BannedFilesTest.java
+++ b/tests/tests/security/src/android/security/cts/BannedFilesTest.java
@@ -32,8 +32,18 @@
assertNotSetugid("/system/bin/sync_agent");
}
- public void testNoInitRunIt() {
+ /**
+ * Detect devices allowing shell commands to be executed as root
+ * through sockets.
+ *
+ * References:
+ *
+ * https://plus.google.com/+JustinCaseAndroid/posts/e1r6c9Z9jgg
+ * https://plus.google.com/+JustinCaseAndroid/posts/5ofgPNrSu3J
+ */
+ public void testNoRootCmdSocket() {
assertFalse("/dev/socket/init_runit", new File("/dev/socket/init_runit").exists());
+ assertFalse("/dev/socket/fotabinder", new File("/dev/socket/fotabinder").exists());
}
public void testNoSu() {