summaryrefslogtreecommitdiff
path: root/app-admin/paxtest
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/paxtest')
-rw-r--r--app-admin/paxtest/Manifest6
-rw-r--r--app-admin/paxtest/files/paxtest-0.9.13-Makefile.patch21
-rw-r--r--app-admin/paxtest/metadata.xml28
-rw-r--r--app-admin/paxtest/paxtest-0.9.15-r1.ebuild41
4 files changed, 96 insertions, 0 deletions
diff --git a/app-admin/paxtest/Manifest b/app-admin/paxtest/Manifest
new file mode 100644
index 000000000000..4c449f9485da
--- /dev/null
+++ b/app-admin/paxtest/Manifest
@@ -0,0 +1,6 @@
+AUX paxtest-0.9.13-Makefile.patch 675 SHA256 5e9513c9a621616d34156ef76217845ded571838867ce7573d5f718cdd267d52 SHA512 91447e797fcb320abade16bd8c0bd9ec53a112fe157165407790eddac15f02338e59244fb56715b5ada1d1ed526093bba600ec8b7c2a0f330315b7a821c7c276 WHIRLPOOL 9b80a1e0c04df449d9eb2c1cf34101abe93a3ec38f323cf930138a8bfcaf0363baa07be38914d5e8b4f75cfeb6bcc5e40b7511a59dc37b7c152ac9dd7b29df02
+DIST paxtest-0.9.15.tar.gz 37929 SHA256 d553848431fd8c2ab6c8361b62e5cedfed1cc1d60088241f4a33d2af15dd667f SHA512 e152f5ada943f69b3745b51ac6d80f35a4c1aff777e93360287ef18b117d07861216d9d0d2075d2511d33e2cb4ea07168bb9ff2f00e79de6060e546b6806c487 WHIRLPOOL db58265b8140209bb253f05de912bcd4017c06bd99e6b8247f052b93081f98b88b04030b4539993a9f180969722e9d4958f929bd8a0395a027ff4e7a25b48f26
+EBUILD paxtest-0.9.15-r1.ebuild 956 SHA256 c8456d982785c80e337dae2869743d4f08d070b71b8450e797c6654140e2a72b SHA512 5777b5c648ab9826c2cbbf7c0bf907a5fb663cf36f2516ab5ab5ccedf3805e0d2ffe121cf09cb33fcdf17bc4290df07540c5222a268ea8daccda28a3b061efaa WHIRLPOOL cf5efc0f7a009cdcf10bf960b3747fdd511da4d91f26587e46ac36af40890d5c717c60541a7e0953d1578e7e4545d58256dbd679aaf6c488048614f342fa7427
+MISC ChangeLog 3226 SHA256 73acb9a5252f2d6c15064356b5889f9500b7bfa59704d56b19e054ba528471eb SHA512 0d437ed53775975f35fec5ffb07fe2de00b5119bd8a3dbfca0a3da828412f3fa735e3e81fc156298cbe79e2775f7ea403756d78616c398fa475ef0f5d50589fb WHIRLPOOL 17bd9a2a7e0c403c3d6dfd99ba05710adb7ec64334bad467676e892f4385fd210c5289c0521379372c710eab2ade5d3846a7a64b88f00fc99e76b0214b7112d4
+MISC ChangeLog-2015 6761 SHA256 aa058bdfd7e0d7ea866e13003b29e7b777dbbb7b8bf5117dc0540fdff76045da SHA512 f8d5d7380d332fc73b9a64b4372dfd92038389e799e3467dcd1b5dd81a7fc7aab9fb3dcfb2ad5df644c5facdcf4fed1fa199290affe0d29f1a0abff556920ae1 WHIRLPOOL 1128d4d55afa382e2f0e18595dbea11c8b82b204b259949925e1021fb02adebfa203960b0204fb08d6d765406ffaa760bf9422e2bd76f28b1ea98fd6802d629b
+MISC metadata.xml 1188 SHA256 5a618d2afe8317f97425f3650b2addaf61b78a85a0c4bd5ab9b3c046cec21a16 SHA512 5224b34a3ee3e84ec703588292cb379d24091ec4a1b5a3b1f433b8b41c1212c82f467f14573834898c869f0321cc70344b882d4f4a64b244e64529f6daaec5f8 WHIRLPOOL 4edc620611ec67e5d623038045502c84fa4d2fc5b9e08681e8c26346e1b7feca6f415a3d510686d4261e368b661d5fe1b97fa43afc10a5efa69a4e19b3c2989f
diff --git a/app-admin/paxtest/files/paxtest-0.9.13-Makefile.patch b/app-admin/paxtest/files/paxtest-0.9.13-Makefile.patch
new file mode 100644
index 000000000000..1f8a99a689b2
--- /dev/null
+++ b/app-admin/paxtest/files/paxtest-0.9.13-Makefile.patch
@@ -0,0 +1,21 @@
+diff -Naur paxtest-0.9.13.orig/Makefile paxtest-0.9.13/Makefile
+--- paxtest-0.9.13.orig/Makefile 2014-12-09 19:53:48.000000000 -0500
++++ paxtest-0.9.13/Makefile 2014-12-12 13:07:55.715099100 -0500
+@@ -52,12 +52,14 @@
+ endif
+
+ # for some reason the .c files need it, else GNU_STACK=RWE
+-OPT_FLAGS := -O2 $(ASFLAGS)
++# Gentoo's CFLAGS should be honored
++OPT_FLAGS := $(CFLAGS) $(ASFLAGS)
+ PTHREAD := -lpthread
+ # define stripping of binaries/libs here, or set these on make's commandline,
+ # else you'll loose the chpax flags!
+-LDFLAGS :=
+-SHLDFLAGS :=
++# Gentoo's LDFLAGS should be honored
++LDFLAGS := $(LDFLAGS)
++SHLDFLAGS := $(LDFLAGS)
+ ifndef RUNDIR
+ RUNDIR := .
+ endif
diff --git a/app-admin/paxtest/metadata.xml b/app-admin/paxtest/metadata.xml
new file mode 100644
index 000000000000..a6679d4e410e
--- /dev/null
+++ b/app-admin/paxtest/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <description>Primary Maintainer</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>hardened@gentoo.org</email>
+ <name>Gentoo Hardened</name>
+ </maintainer>
+ <longdescription>Test suite for the PaX kernel patch
+ PaX is a Linux kernel patch which adds much stricter control on how memory
+ is being used by applications. A normal Linux kernel leaves the control to the
+ application and does not implement any enforcement. Especially buffer overflow
+ attacks benefit from the absense of kernel enforced memory control. PaX tries
+ to do its best to enforce this control of memory used by applications, thereby
+ making it harder to succesfully exploit buffer overflows.
+
+ Furthermore, it adds several randomisations, which also make it harder for
+ buffer overflows to succeed.
+
+ The test programs test all this functionality, but not all PaX functionality
+ is covered.
+
+ For more information about PaX, see http://pageexec.virtualave.net/.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-admin/paxtest/paxtest-0.9.15-r1.ebuild b/app-admin/paxtest/paxtest-0.9.15-r1.ebuild
new file mode 100644
index 000000000000..f90f07439b8e
--- /dev/null
+++ b/app-admin/paxtest/paxtest-0.9.15-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="PaX regression test suite"
+HOMEPAGE="http://pax.grsecurity.net"
+SRC_URI="http://grsecurity.net/~spender/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ sys-apps/paxctl"
+
+# EI_PAX flags are not strip safe.
+RESTRICT="strip"
+
+src_prepare() {
+ mv Makefile.psm Makefile
+ epatch "${FILESDIR}/${PN}-0.9.13-Makefile.patch"
+ sed -i "s/^CC := gcc/CC := $(tc-getCC)/" Makefile
+ sed -i "s/^LD := ld/LD := $(tc-getLD)/" Makefile
+ eapply_user
+}
+
+src_compile() {
+ emake RUNDIR=/usr/$(get_libdir)/paxtest || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" BINDIR=/usr/bin RUNDIR=/usr/$(get_libdir)/paxtest install || die
+
+ newman debian/manpage.1.ex paxtest.1 || die
+ dodoc ChangeLog README || die
+}