summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Sautereau2019-08-18 23:45:51 +0200
committerThibaut Sautereau2019-08-18 23:48:11 +0200
commitc81a87189a12e60c748855c024ce4aa4583aa9de (patch)
tree82b1774eef120771c70b9fce078c97bc91e698c8
downloadaur-c81a87189a12e60c748855c024ce4aa4583aa9de.tar.gz
Initial stable release of the standalone hardened_malloc project
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD30
-rw-r--r--preload.sh5
4 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..baa7bbd70b35
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = hardened_malloc
+ pkgdesc = Hardened allocator designed for modern systems
+ pkgver = 1
+ pkgrel = 1
+ url = https://github.com/GrapheneOS/hardened_malloc
+ arch = x86_64
+ license = MIT
+ depends = python
+ depends = bash
+ conflicts = hardened-malloc-git
+ source = https://github.com/GrapheneOS/hardened_malloc/archive/1.tar.gz
+ source = preload.sh
+ sha256sums = 4a0d496199af491c92a964729e61b11a844c5699082e4158632e71935d5a73fc
+ sha256sums = e6dbce7ac1d689fafbc94ffb17d8c4ae5271dd3580421828d35aac2c067b652d
+
+pkgname = hardened_malloc
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..72e8ffc0db8a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..da61fc2603eb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Thibaut Sautereau (thithib) <thibaut at sautereau dot fr>
+
+pkgname=hardened_malloc
+pkgver=1
+pkgrel=1
+pkgdesc="Hardened allocator designed for modern systems"
+arch=('x86_64')
+url="https://github.com/GrapheneOS/hardened_malloc"
+license=('MIT')
+depends=('python' 'bash')
+conflicts=('hardened-malloc-git')
+source=("https://github.com/GrapheneOS/$pkgname/archive/$pkgver.tar.gz"
+ 'preload.sh')
+sha256sums=('4a0d496199af491c92a964729e61b11a844c5699082e4158632e71935d5a73fc'
+ 'e6dbce7ac1d689fafbc94ffb17d8c4ae5271dd3580421828d35aac2c067b652d')
+
+build() {
+ cd "$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm755 --target-directory="$pkgdir/usr/lib" libhardened_malloc.so
+ install -Dm755 "$srcdir/preload.sh" "$pkgdir/usr/bin/hardened-malloc-preload"
+ install -Dm755 calculate_waste.py "$pkgdir/usr/bin/hardened-malloc-calculate-waste.py"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/preload.sh b/preload.sh
new file mode 100644
index 000000000000..4a80d32c5ba7
--- /dev/null
+++ b/preload.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+[[ $LD_PRELOAD ]] && LD_PRELOAD+=" "
+export LD_PRELOAD+="/usr/lib/libhardened_malloc.so"
+exec "$@"