summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2003-06-11 21:05:25 +0000
committerNed Ludd <solar@gentoo.org>2003-06-11 21:05:25 +0000
commitb4cabb2ced51daceb90468fae6760266b2b660e1 (patch)
tree36fe2b5fc00025aa5a36fc55e6ddb68d53f6d191 /sys-apps/gradm2
parentInitial import of gradm2 to gentoo (diff)
downloadhistorical-b4cabb2ced51daceb90468fae6760266b2b660e1.tar.gz
historical-b4cabb2ced51daceb90468fae6760266b2b660e1.tar.bz2
historical-b4cabb2ced51daceb90468fae6760266b2b660e1.zip
Initial import of gradm2 to gentoo
Diffstat (limited to 'sys-apps/gradm2')
-rw-r--r--sys-apps/gradm2/Manifest3
-rw-r--r--sys-apps/gradm2/files/digest-gradm2-0.0_pre41
-rw-r--r--sys-apps/gradm2/gradm2-0.0_pre4.ebuild95
3 files changed, 98 insertions, 1 deletions
diff --git a/sys-apps/gradm2/Manifest b/sys-apps/gradm2/Manifest
index 112607a6d56c..e6d3e70c77e2 100644
--- a/sys-apps/gradm2/Manifest
+++ b/sys-apps/gradm2/Manifest
@@ -1,2 +1,3 @@
-MD5 e061b0b5fbb8df5a20baf03701358ffd gradm2-0.0_pre4.ebuild 2323
+MD5 223aa5ddd7ea661c1fd7b1c20064add8 gradm2-0.0_pre4.ebuild 2879
+MD5 b36b027ded4cd658f9a1f82b5502239c ChangeLog 346
MD5 7432a8b46c6440cc44b8a527a4fdd6c4 files/digest-gradm2-0.0_pre4 65
diff --git a/sys-apps/gradm2/files/digest-gradm2-0.0_pre4 b/sys-apps/gradm2/files/digest-gradm2-0.0_pre4
new file mode 100644
index 000000000000..89bb4c6cc6ec
--- /dev/null
+++ b/sys-apps/gradm2/files/digest-gradm2-0.0_pre4
@@ -0,0 +1 @@
+MD5 d26cfdf1d7c6d3d6403aa40194105606 gradm-2.0-pre4.tar.gz 32249
diff --git a/sys-apps/gradm2/gradm2-0.0_pre4.ebuild b/sys-apps/gradm2/gradm2-0.0_pre4.ebuild
new file mode 100644
index 000000000000..b5c534341697
--- /dev/null
+++ b/sys-apps/gradm2/gradm2-0.0_pre4.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gradm2/gradm2-0.0_pre4.ebuild,v 1.1 2003/06/11 21:05:19 solar Exp $
+
+MY_PV=2.0-pre4
+
+MAINTAINER="solar@gentoo.org"
+DESCRIPTION="Administrative interface for grsecuritys2 access control lists"
+SRC_URI="http://www.grsecurity.net/gradm-${MY_PV}.tar.gz"
+HOMEPAGE="http://www.grsecurity.net/"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~sparc"
+SLOT="0"
+
+IUSE=""
+DEPEND="virtual/glibc
+ sys-devel/bison
+ sys-devel/flex
+ sys-apps/chpax"
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A} || die "Cant unpack ${A}"
+ cd ${S}
+ mv Makefile{,.orig}
+ ebegin "Patching Makefile to use gentoo CFLAGS"
+ sed -e "s|-O2|${CFLAGS}|" Makefile.orig > Makefile
+ eend $?
+ ebegin "Patching manpage"
+ sed -e "s:gradm:gradm2:" -e "s:GRADM:GRADM2:" < gradm.8 > gradm2.8
+ eend $?
+ for f in Makefile acl gradm_defs.h grlearn.c; do
+ [ -f ${f} ] && {
+ ebegin "Patching ${f} to use /etc/grsec2"
+ sed -e "s:/etc/grsec:/etc/grsec2:" \
+ < ${f} > ${f}~ && cp ${f}~ ${f}
+ eend $?
+ }
+ done
+ # rm *~
+}
+
+src_compile() {
+ cd ${S}
+ emake CC="${CC}" || die "compile problem"
+}
+
+src_install() {
+ cd ${S}
+
+ mkdir -p ${D}/etc/grsec2
+ doman gradm2.8
+ dodoc acl
+ # Were not ready for init.d,script functions yet.
+ #exeinto /etc/init.d
+ #newexe ${FILESDIR}/grsecurity.rc grsecurity
+ #insinto /etc/conf.d
+ #doins ${FILESDIR}/grsecurity
+ into /
+ mv gradm{,2}
+ dosbin gradm2
+ dosbin grlearn
+
+ # Normal users can authenticate to special roles now and thus
+ # need execution permission on gradm2. We remove group,other readable bits
+ # to help ensure that our gradm2 binary is as protected from misbehaving users.
+ fperms 711 ${D}/sbin/gradm2
+}
+
+pkg_setup() {
+ if [ -e /usr/src/linux/grsecuirty ]; then
+ [ ! -e /usr/src/linux/grsecuirty/gracl_learn.c ] && {
+ ewarn "gradm2 was designed to be used with grsecurity2 but it looks like your using grsecurity1"
+ ewarn "we hope you know what your doing"
+ einfo "(hint try emerge sys-apps/gradm) If you need support for grsecuirty 1.x"
+ echo
+ }
+ else
+ ewarn "Your going to need to a grsecurity2 enabled kernel to take advantage of the tool"
+ fi
+}
+
+pkg_postinst() {
+ [ ! -d /proc/sys/kernel/grsecurity ] && ewarn "This kernel does not seem to be a grsec enabled kernel (or we are in chroot install?)"
+ if [ ! -f /usr/src/linux/grsecuirty/gracl_learn.c ]; then
+ ewarn "It does not seem that your are running a grsec2 enabled kernel"
+ einfo "(hint >=hardened-sources-2.4.20-r3) was the first kernel to include support"
+ else
+ einfo "Everything looks good and you seem to be using a grsec2 enabled kernel"
+ fi
+ einfo "Bugs can be reported to <${MAINTAINER}> using http://bugs.gentoo.org"
+}
+
+# grep "extern int grsec_" /usr/src/linux/include/linux/grinternal.h | sed s/'extern int grsec_*'/'# '/g | sed s:';':: | sort