security_Minijail0: unbreak test-chroot

There were two problems:
1) If we don't bind-mount /usr/local into the chroot, we can't run the test
script;
2) There's no touch in the chroot, so use echo instead.

Change-Id: Ie7291ea1503ded95aeb4c346636b4a51db7569ca
Reviewed-on: https://gerrit.chromium.org/gerrit/13091
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Ready: Elly Jones <ellyjones@chromium.org>
Tested-by: Elly Jones <ellyjones@chromium.org>
diff --git a/client/site_tests/security_Minijail0/security_Minijail0.py b/client/site_tests/security_Minijail0/security_Minijail0.py
index fd6eb04..a1432fa 100644
--- a/client/site_tests/security_Minijail0/security_Minijail0.py
+++ b/client/site_tests/security_Minijail0/security_Minijail0.py
@@ -44,7 +44,6 @@
         if '%T' in args:
             td = td or tempfile.mkdtemp()
             args = args.replace('%T', td)
-
         ret = os.system('/sbin/minijail0 %s /bin/bash %s' % (args, path))
         if td:
             # The test better not have polluted our mount namespace :).
diff --git a/client/site_tests/security_Minijail0/src/test-chroot b/client/site_tests/security_Minijail0/src/test-chroot
index ad43fea..838e74b 100644
--- a/client/site_tests/security_Minijail0/src/test-chroot
+++ b/client/site_tests/security_Minijail0/src/test-chroot
@@ -2,8 +2,8 @@
 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
-# setup: mkdir -p "%T/c/lib" "%T/c/usr/lib" "%T/c/tmp-rw" "%T/c/tmp-ro" "%T/tmp"
-# args: -b /lib,/lib -b /usr/lib,/usr/lib -b %T/tmp,/tmp,1 -b %T/tmp,/tmp-ro -C "%T/c" -v
+# setup: mkdir -p "%T/c/lib" "%T/c/usr/lib" "%T/c/usr/local" "%T/c/tmp-rw" "%T/c/tmp-ro" "%T/tmp"
+# args: -b /lib,/lib -b /usr/lib,/usr/lib -b /usr/local,/usr/local -b %T/tmp,/tmp-rw,1 -b %T/tmp,/tmp-ro -C "%T/c" -v
 
 # Can't get at common.sh from here... oops :)
 die () {
@@ -16,6 +16,6 @@
 [ ! -d /lib ] && die "no /lib"
 [ ! -d /tmp-rw ] && die "no /tmp-rw"
 [ ! -d /tmp-ro ] && die "no /tmp-ro"
-touch /tmp-rw/test-rw || die "non-writeable /tmp-rw"
-touch /tmp-ro/test-ro && die "writeable /tmp-ro"
+echo 'x' > /tmp-rw/test-rw || die "non-writeable /tmp-rw"
+echo 'x' > /tmp-ro/test-ro && die "writeable /tmp-ro"
 exit 0