summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2003-11-23 00:17:23 +0000
committerNed Ludd <solar@gentoo.org>2003-11-23 00:17:23 +0000
commit88e88e1fb0969ad6cc72b475ec4f0cdc078bec58 (patch)
treea2d6e3e42f0a57a33caeca54871d170976221568 /sys-apps
parentextended functionality added for initscript, added sane settings to conf.d sc... (diff)
downloadgentoo-2-88e88e1fb0969ad6cc72b475ec4f0cdc078bec58.tar.gz
gentoo-2-88e88e1fb0969ad6cc72b475ec4f0cdc078bec58.tar.bz2
gentoo-2-88e88e1fb0969ad6cc72b475ec4f0cdc078bec58.zip
extended functionality added for initscript, added sane settings to conf.d script to keep bugs down. no version bump needed
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/chpax/ChangeLog7
-rw-r--r--sys-apps/chpax/Manifest2
-rw-r--r--sys-apps/chpax/chpax-0.4.ebuild28
-rw-r--r--sys-apps/chpax/files/digest-chpax-0.41
-rw-r--r--sys-apps/chpax/files/pax-conf.d9
-rw-r--r--sys-apps/chpax/files/pax-init.d54
6 files changed, 42 insertions, 59 deletions
diff --git a/sys-apps/chpax/ChangeLog b/sys-apps/chpax/ChangeLog
index 370563369bb8..d17acae6e80d 100644
--- a/sys-apps/chpax/ChangeLog
+++ b/sys-apps/chpax/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/chpax
# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/chpax/ChangeLog,v 1.10 2003/10/27 23:23:01 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/chpax/ChangeLog,v 1.11 2003/11/23 00:17:20 solar Exp $
+
+ 22 Nov 2003; <solar@gentoo.org> chpax-0.4.ebuild, files/pax-conf.d,
+ files/pax-init.d:
+ extended functionality added for initscript, added sane settings to keep bugs
+ down. no version bump needed
27 Oct 2003; <solar@gentoo.org> chpax-0.5.ebuild, files/pax-conf.d,
files/pax-init.d:
diff --git a/sys-apps/chpax/Manifest b/sys-apps/chpax/Manifest
index e72c9c4a4a11..88c263a85bca 100644
--- a/sys-apps/chpax/Manifest
+++ b/sys-apps/chpax/Manifest
@@ -1,4 +1,4 @@
-MD5 0d91f7977eed1b1566140931758d6adb ChangeLog 1539
+MD5 87d273d855ba711e60cf5d29023d0d37 ChangeLog 1539
MD5 e3de83396baf3f43d8213367ba434daf metadata.xml 339
MD5 82787342d1c18dfb658c51de30c0e0cd chpax-0.5.ebuild 953
MD5 644b57ed00f0b489cab221da32fe7f1d files/pax-init.d 1261
diff --git a/sys-apps/chpax/chpax-0.4.ebuild b/sys-apps/chpax/chpax-0.4.ebuild
deleted file mode 100644
index 93cd5015a1d3..000000000000
--- a/sys-apps/chpax/chpax-0.4.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/chpax/chpax-0.4.ebuild,v 1.9 2003/09/26 23:21:01 mr_bones_ Exp $
-
-S=${WORKDIR}/chpax
-
-DESCRIPTION="Manages various PaX related flags for ELF32, ELF64, and a.out binaries."
-SRC_URI="http://pageexec.virtualave.net/chpax-${PV}.tar.gz"
-HOMEPAGE="http://pageexec.virtualave.net"
-KEYWORDS="x86 amd64 sparc ppc hppa"
-LICENSE="public-domain"
-SLOT="0"
-
-IUSE=""
-DEPEND="virtual/glibc"
-
-src_compile() {
- mv Makefile{,.orig}
- sed -e "s|-Wall|${CFLAGS} -Wall|" Makefile.orig > Makefile
- emake CC="${CC}" || die "Parallel Make Failed"
-}
-
-src_install() {
- into /
- dosbin chpax
- fperms 700 /sbin/chpax
- dodoc Changelog README
-}
diff --git a/sys-apps/chpax/files/digest-chpax-0.4 b/sys-apps/chpax/files/digest-chpax-0.4
deleted file mode 100644
index f49ba308ad8c..000000000000
--- a/sys-apps/chpax/files/digest-chpax-0.4
+++ /dev/null
@@ -1 +0,0 @@
-MD5 d8731ed8a0c851f9d4a74fc721991fb9 chpax-0.4.tar.gz 3891
diff --git a/sys-apps/chpax/files/pax-conf.d b/sys-apps/chpax/files/pax-conf.d
index 8e471830b8c2..b0d8c204ae85 100644
--- a/sys-apps/chpax/files/pax-conf.d
+++ b/sys-apps/chpax/files/pax-conf.d
@@ -10,9 +10,12 @@
# s do not enforce segmentation based non-executable pages
# x do not randomize ET_EXEC base [ELF only]
-PAGEEXEC_EXEMPT="/usr/X11R6/bin/XFree86 /usr/lib/wine/bin/wine"
+PAGEEXEC_EXEMPT="/usr/X11R6/bin/XFree86 /usr/lib/wine/bin/wine /opt/blackdown-jdk-*/jre/bin/[a-z]*"
TRAMPOLINE_EXEMPT=""
-MPROTECT_EXEMPT=""
+MPROTECT_EXEMPT="/opt/blackdown-jdk-*/jre/bin/[a-z]*"
RANDMMAP_EXEMPT=""
-SEGMEXEC_EXEMPT=""
+SEGMEXEC_EXEMPT="/usr/X11R6/bin/xinit /usr/X11R6/bin/XFree86 /opt/blackdown-jdk-*/jre/bin/[a-z]* /usr/bin/xmms /usr/bin/mplayer /usr/bin/blender /usr/bin/gxine /usr/bin/totem /usr/bin/acme"
RANDEXEC_EXEMPT=""
+
+# when zero flag mask is set to "yes" it will remove all pax flags from all files on reboot/stop
+ZERO_FLAG_MASK=no
diff --git a/sys-apps/chpax/files/pax-init.d b/sys-apps/chpax/files/pax-init.d
index eb00ec251048..474d632f5f20 100644
--- a/sys-apps/chpax/files/pax-init.d
+++ b/sys-apps/chpax/files/pax-init.d
@@ -10,38 +10,42 @@ checkconfig() {
/sbin/chpax -v /sbin/chpax >/dev/null 2>&1 || return 1
}
+chpax_flag() {
+ flag=$1
+ fname=$2
+
+ if [ -w "$fname" ]; then
+ #einfo "chpax $flags $fname"
+ /sbin/chpax -$flag ${fname}
+ [ $? != 0 ] && eerror "error: chpax -$flag ${fname}"
+ fi
+}
+
start() {
checkconfig || return 1
- local err_msg="error running chpax on "
-
- for x in ${PAGEEXEC_EXEMPT} ; do
- [ -f ${x} ] && /sbin/chpax -p ${x} || eerror ${err_msg} ${x}
- done
-
- for x in ${TRAMPOLINE_EXEMPT} ; do
- [ -f ${x} ] && /sbin/chpax -e ${x} || eerror ${err_msg} ${x}
- done
-
- for x in ${RANDMMAP_EXEMPT} ; do
- [ -f ${x} ] && /sbin/chpax -r ${x} || eerror ${err_msg} ${x}
- done
-
- for x in ${MPROTECT_EXEMPT} ; do
- [ -f ${x} ] && /sbin/chpax -m ${x} || eerror ${err_msg} ${x}
- done
-
- for x in ${SEGMEXEC_EXEMPT} ; do
- [ -f ${x} ] && /sbin/chpax -s ${x} || eerror ${err_msg} ${x}
- done
-
- for x in ${RANDEXEC_EXEMPT} ; do
- [ -f ${x} ] && /sbin/chpax -x ${x} || eerror ${err_msg} ${x}
- done
+ for p in $PAGEEXEC_EXEMPT; do chpax_flag p ${p} ;done
+ for e in $TRAMPOLINE_EXEMPT; do chpax_flag e ${e} ;done
+ for r in $RANDMMAP_EXEMPT; do chpax_flag r ${r} ;done
+ for m in $MPROTECT_EXEMPT; do chpax_flag m ${m} ;done
+ for s in $SEGMEXEC_EXEMPT; do chpax_flag s ${s} ;done
+ for x in $RANDEXEC_EXEMPT; do chpax_flag x ${x} ;done
+ return 0
}
stop() {
+ checkconfig || return 1
+
+ [ "$ZERO_FLAG_MASK" = "yes" ] || return 0
+ einfo "chpax zero flag masking"
+ for p in $PAGEEXEC_EXEMPT; do chpax_flag z ${p} ;done
+ for e in $TRAMPOLINE_EXEMPT; do chpax_flag z ${e} ;done
+ for r in $RANDMMAP_EXEMPT; do chpax_flag z ${r} ;done
+ for m in $MPROTECT_EXEMPT; do chpax_flag z ${m} ;done
+ for s in $SEGMEXEC_EXEMPT; do chpax_flag z ${s} ;done
+ for x in $RANDEXEC_EXEMPT; do chpax_flag z ${x} ;done
+
return 0
}