From 3fb782a1ad58a52693636a944d28adad75d1fe5e Mon Sep 17 00:00:00 2001 From: xSmurf Date: Thu, 24 Sep 2015 01:09:29 +0000 Subject: [PATCH] Setting pax flags on libcrypto --- board/coreboot/post_build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/board/coreboot/post_build.sh b/board/coreboot/post_build.sh index ffacac3..f3a23cc 100755 --- a/board/coreboot/post_build.sh +++ b/board/coreboot/post_build.sh @@ -4,10 +4,18 @@ set -e TARGET_DIR=$1 BOARD_DIR="$BR2_EXTERNAL/board/coreboot" +error_exit() { + if [ $1 -gt 0 ]; then + echo "Error occured !" + exit $1 + fi +} + # Copy the rootfs additions if [ -d "$BOARD_DIR/rootfs-additions" ]; then echo "Copying rootfs additions ..." rsync -va $BOARD_DIR/rootfs-additions/* $TARGET_DIR/ + error_exit $? else echo "No rootfs additions found !" fi @@ -16,10 +24,18 @@ fi if [ -e $TARGET_DIR/etc/init.d/S50dropbear ]; then echo "Disabling dropbear server ..." chmod a-x $TARGET_DIR/etc/init.d/S50dropbear + error_exit $? fi # Enable virtual terminals in inittab echo "Enabling virtual terminal 2..12 ..." for ii in {12..2}; do sed -E -i 's/GENERIC_SERIAL/GENERIC_SERIAL\ntty'$ii'::askfirst:-\/bin\/login/' "$TARGET_DIR/etc/inittab" + error_exit $? done + +echo "Setting paxflag on libcrypto ..." +/sbin/paxctl -c $TARGET_DIR/usr/lib/libcrypto.so.1.0.0 +error_exit $? +/sbin/paxctl -m $TARGET_DIR/usr/lib/libcrypto.so.1.0.0 +error_exit $?