diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-04-02 20:10:48 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-04-02 20:10:48 +0200 |
| commit | 676bd07e7e80f8a270af7f0276443c68f4a99e25 (patch) | |
| tree | 97d09aa6c4f6634165d8d12543ec83af7efb46e7 /tools | |
| parent | 3e679c51c03ac13a5b4b601873689925eda3cc16 (diff) | |
sys/linux: test various binfmt's in execve
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/create-gce-image.sh | 1 | ||||
| -rwxr-xr-x | tools/create-image.sh | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/create-gce-image.sh b/tools/create-gce-image.sh index 10cc5058a..348ebd8ca 100755 --- a/tools/create-gce-image.sh +++ b/tools/create-gce-image.sh @@ -76,6 +76,7 @@ sudo sed -i "/^root/ { s/:x:/::/ }" disk.mnt/etc/passwd echo "T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100" | sudo tee -a disk.mnt/etc/inittab echo -en "auto lo\niface lo inet loopback\nauto eth0\niface eth0 inet dhcp\n" | sudo tee disk.mnt/etc/network/interfaces echo "debugfs /sys/kernel/debug debugfs defaults 0 0" | sudo tee -a disk.mnt/etc/fstab +echo 'binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0' | sudo tee -a disk.mnt/etc/fstab for i in {0..31}; do echo "KERNEL==\"binder$i\", NAME=\"binder$i\", MODE=\"0666\"" | \ tee -a disk.mnt/etc/udev/50-binder.rules diff --git a/tools/create-image.sh b/tools/create-image.sh index cb37b6ebe..9f23183ad 100755 --- a/tools/create-image.sh +++ b/tools/create-image.sh @@ -9,15 +9,16 @@ set -eux # Create a minimal Debian-wheezy distributive as a directory. RELEASE=wheezy DIR=wheezy -sudo rm -rf $DIR -mkdir -p $DIR -sudo debootstrap --include=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sudo,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default $RELEASE $DIR +#sudo rm -rf $DIR +#mkdir -p $DIR +#sudo debootstrap --include=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sudo,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default $RELEASE $DIR # Set some defaults and enable promtless ssh to the machine for root. sudo sed -i '/^root/ { s/:x:/::/ }' $DIR/etc/passwd echo 'T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100' | sudo tee -a $DIR/etc/inittab printf '\nauto eth0\niface eth0 inet dhcp\n' | sudo tee -a $DIR/etc/network/interfaces echo 'debugfs /sys/kernel/debug debugfs defaults 0 0' | sudo tee -a $DIR/etc/fstab +echo 'binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0' | sudo tee -a $DIR/etc/fstab echo 'SELINUX=disabled' | sudo tee $DIR/etc/selinux/config echo "kernel.printk = 7 4 1 3" | sudo tee -a $DIR/etc/sysctl.conf echo 'debug.exception-trace = 0' | sudo tee -a $DIR/etc/sysctl.conf |
