summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Barisani <lcars@gentoo.org>2006-04-18 09:11:00 +0000
committerAndrea Barisani <lcars@gentoo.org>2006-04-18 09:11:00 +0000
commit72d6cb22b1fb10729aa02568002c4542665fecd9 (patch)
tree48ddf68c5098f1bd65c75696177da876c7441639 /sys-apps/systrace
parentadded systrace (diff)
downloadgentoo-2-72d6cb22b1fb10729aa02568002c4542665fecd9.tar.gz
gentoo-2-72d6cb22b1fb10729aa02568002c4542665fecd9.tar.bz2
gentoo-2-72d6cb22b1fb10729aa02568002c4542665fecd9.zip
resurrecting systrace
(Portage version: 2.0.54)
Diffstat (limited to 'sys-apps/systrace')
-rw-r--r--sys-apps/systrace/ChangeLog7
-rw-r--r--sys-apps/systrace/Manifest3
-rw-r--r--sys-apps/systrace/files/digest-systrace-1.6d1
-rw-r--r--sys-apps/systrace/files/systrace-regress.patch14
-rw-r--r--sys-apps/systrace/metadata.xml12
-rw-r--r--sys-apps/systrace/systrace-1.6d.ebuild45
6 files changed, 82 insertions, 0 deletions
diff --git a/sys-apps/systrace/ChangeLog b/sys-apps/systrace/ChangeLog
new file mode 100644
index 000000000000..2cba1e2b8b4f
--- /dev/null
+++ b/sys-apps/systrace/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for sys-apps/systrace
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systrace/ChangeLog,v 1.9 2006/04/18 09:11:00 lcars Exp $
+
+ 18 Apr 2006; Andrea Barisani <lcars@gentoo.org>
+ Resurrecting systrace.
+
diff --git a/sys-apps/systrace/Manifest b/sys-apps/systrace/Manifest
new file mode 100644
index 000000000000..866f6c985bc6
--- /dev/null
+++ b/sys-apps/systrace/Manifest
@@ -0,0 +1,3 @@
+MD5 272032d7c512e67c7dff7c0ab971a786 files/digest-systrace-1.6d 65
+MD5 cc2c0fd87a1ad91d7fafa55aa8652cb3 files/systrace-regress.patch 599
+MD5 a82eb9b1e49692d679b7beb0d97191b9 systrace-1.6d.ebuild 1186
diff --git a/sys-apps/systrace/files/digest-systrace-1.6d b/sys-apps/systrace/files/digest-systrace-1.6d
new file mode 100644
index 000000000000..9b006e8166f6
--- /dev/null
+++ b/sys-apps/systrace/files/digest-systrace-1.6d
@@ -0,0 +1 @@
+MD5 1fb1a66618769ba30f02d87e1c05656a systrace-1.6d.tar.gz 211154
diff --git a/sys-apps/systrace/files/systrace-regress.patch b/sys-apps/systrace/files/systrace-regress.patch
new file mode 100644
index 000000000000..2ec3f4d5a899
--- /dev/null
+++ b/sys-apps/systrace/files/systrace-regress.patch
@@ -0,0 +1,14 @@
+--- systrace-1.6d/regress/regress.sh 2006-03-24 04:17:16.000000000 +0100
++++ systrace-1.6d-regress_patch/regress/regress.sh 2006-04-18 00:43:48.000000000 +0200
+@@ -12,8 +12,9 @@ for POL in *.policy.$OS; do
+ fi
+
+ echo -n "$PROG:"
+- SYSTR_RES=`eval ../systrace -f $POL -a $PROG $ARGS 2>/dev/null`
+- # echo -e "\t(../systrace -f $POL -a $PROG $ARGS)"
++ SYSTR_POL=`eval ../systrace -t -d . -A $PROG $ARGS 2>/dev/null`
++ SYSTR_RES=`eval ../systrace -t -d . -a $PROG $ARGS 2>/dev/null`
++ echo -e "\t(../systrace -f $POL.learn -a $PROG $ARGS)"
+ NORM_RES=`$PROG $ARGS`
+
+ if [ -z "$SYSTR_RES" ] ; then
diff --git a/sys-apps/systrace/metadata.xml b/sys-apps/systrace/metadata.xml
new file mode 100644
index 000000000000..8279ee3c2f15
--- /dev/null
+++ b/sys-apps/systrace/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd></herd>
+<maintainer>
+ <email>lcars@gentoo.org</email>
+</maintainer>
+<longdescription>
+Systrace enforces system call policies for applications by constraining the
+application's access to the system.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/systrace/systrace-1.6d.ebuild b/sys-apps/systrace/systrace-1.6d.ebuild
new file mode 100644
index 000000000000..32222d9aeb53
--- /dev/null
+++ b/sys-apps/systrace/systrace-1.6d.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systrace/systrace-1.6d.ebuild,v 1.1 2006/04/18 09:11:00 lcars Exp $
+
+inherit eutils
+
+DESCRIPTION="Interactive Policy Generation for System Calls"
+HOMEPAGE="http://www.systrace.org/"
+SRC_URI="http://www.citi.umich.edu/u/provos/systrace/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86"
+
+RDEPEND="dev-libs/libevent"
+DEPEND="$RDEPEND
+ >=sys-devel/autoconf-2.58"
+
+SYSTR_HEADER="${ROOT}usr/src/linux/include/linux/systrace.h"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ if ! [ -f ${SYSTR_HEADER} ] ; then
+ einfo
+ einfo "${SYSTR_HEADER} not found. Using ptrace-based backend."
+ einfo
+ epatch "${FILESDIR}"/systrace-regress.patch
+ else
+ einfo
+ einfo "${SYSTR_HEADER} found. Using /dev/systrace."
+ einfo
+ sed -i -e "s/all:.\+/all:/" ./regress/Makefile.am
+ sed -i -e "s:linux\/systrace.h:${SYSTR_HEADER}:" ./configure
+ sed -i -e "s:<linux\/systrace.h>:\"${SYSTR_HEADER}\":" ./linux-syscalls.c
+ fi
+
+ export WANT_AUTOCONF=2.5
+}
+
+src_install() {
+ dobin systrace || die
+ doman systrace.1
+}