]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Add test against Graphene hardened malloc.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 8 Jan 2021 13:36:05 +0000 (00:36 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 8 Jan 2021 13:36:05 +0000 (00:36 +1100)
.github/setup_ci.sh
.github/workflows/c-cpp.yml

index 61349be118256fb235612d033585b76cbfc16033..2d489b7edfdf8b2d97d8610580a11381ca1c6f68 100755 (executable)
@@ -40,7 +40,10 @@ for TARGET in $TARGETS; do
     "--with-selinux")
         PACKAGES="$PACKAGES libselinux1-dev selinux-policy-dev"
         ;;
-    *) echo "Invalid option"
+    "--with-ldflags=-lhardened_malloc")
+        INSTALL_HARDENED_MALLOC=yes
+       ;;
+    *) echo "Invalid option '${TARGET}'"
         exit 1
         ;;
     esac
@@ -56,3 +59,10 @@ if [ "x" != "x$PACKAGES" ]; then
     sudo apt update -qq
     sudo apt install -qy $PACKAGES
 fi
+
+if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
+    (cd ${HOME} &&
+     git clone https://github.com/GrapheneOS/hardened_malloc.git &&
+     cd ${HOME}/hardened_malloc &&
+     make && sudo cp libhardened_malloc.so /usr/lib/)
+fi
index 5c5dd6bd80e8c6e05a9cf7924703023a7a5ecf70..c019d96e7ad109c9b5034bb2767aa234114516ea 100644 (file)
@@ -16,6 +16,7 @@ jobs:
         configs:
         - ""
         - "--with-kerberos5 --with-libedit --with-pam --with-security-key-builtin --with-selinux"
+        - "--with-ldflags=-lhardened_malloc"
 
     steps:
     - uses: actions/checkout@v2