summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Palmer <palmer@google.com>2009-07-10 17:37:17 -0700
committerChris Palmer <palmer@google.com>2009-07-10 17:38:26 -0700
commitb000782e81f9757ec9f6eb1711135cdaf622f6b0 (patch)
tree84ec744c536316b433076de8f07a41819a64e432
parentb381ead492251a797d2df4b260cb01eb1f64cfad (diff)
downloadextras-b000782e81f9757ec9f6eb1711135cdaf622f6b0.tar.gz
Test to ensure that /sdcard is mounted with security-critical options.
-rwxr-xr-xtests/fstest/mounts-test.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/fstest/mounts-test.sh b/tests/fstest/mounts-test.sh
new file mode 100755
index 00000000..80a2416a
--- /dev/null
+++ b/tests/fstest/mounts-test.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+rtrn=0
+
+adb shell mount | grep -q /sdcard
+if [ 0 -ne $? ]
+then
+ echo FAILURE: /sdcard is not mounted
+ exit 1
+fi
+
+for i in nosuid noexec
+do
+ adb shell mount | grep /sdcard | grep -q $i
+ if [ 0 -ne $? ]
+ then
+ echo FAILURE: /sdcard is not mounted $i
+ rtrn=$(expr $rtrn + 1)
+ fi
+done
+
+exit $rtrn
+