From 676bd07e7e80f8a270af7f0276443c68f4a99e25 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 2 Apr 2018 20:10:48 +0200 Subject: sys/linux: test various binfmt's in execve --- tools/create-gce-image.sh | 1 + tools/create-image.sh | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tools') 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 -- cgit mrf-deployment