diff options
author | Ned Ludd <solar@gentoo.org> | 2004-06-06 21:32:28 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2004-06-06 21:32:28 +0000 |
commit | 52574d99795d1c2cebfcb483a577a12fe441ca9a (patch) | |
tree | fcc7df62a96a86ea8970ba18e023ff340ff7066a | |
parent | stable on amd64 (Manifest recommit) (diff) | |
download | gentoo-2-52574d99795d1c2cebfcb483a577a12fe441ca9a.tar.gz gentoo-2-52574d99795d1c2cebfcb483a577a12fe441ca9a.tar.bz2 gentoo-2-52574d99795d1c2cebfcb483a577a12fe441ca9a.zip |
Updated chpax/paxctl init/conf scripts. Submitted by John Richard Moser. bug #40665
-rw-r--r-- | sys-apps/chpax/ChangeLog | 6 | ||||
-rw-r--r-- | sys-apps/chpax/Manifest | 18 | ||||
-rw-r--r-- | sys-apps/chpax/files/pax-conf.d | 53 | ||||
-rw-r--r-- | sys-apps/chpax/files/pax-init.d | 63 |
4 files changed, 84 insertions, 56 deletions
diff --git a/sys-apps/chpax/ChangeLog b/sys-apps/chpax/ChangeLog index c8fee70053bd..90946f93efa1 100644 --- a/sys-apps/chpax/ChangeLog +++ b/sys-apps/chpax/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/chpax # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/chpax/ChangeLog,v 1.20 2004/04/12 05:25:23 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/chpax/ChangeLog,v 1.21 2004/06/06 21:32:28 solar Exp $ + + 06 Jun 2004; <solar@gentoo.org> files/pax-conf.d, files/pax-init.d: + Updated chpax/paxctl init/conf scripts. Submitted by John Richard Moser. bug + #40665 11 Apr 2004; Jason Wever <weeve@gentoo.org> chpax-0.6.1.ebuild: Stable on sparc. diff --git a/sys-apps/chpax/Manifest b/sys-apps/chpax/Manifest index 538af31f5b65..dbdbcae56ba0 100644 --- a/sys-apps/chpax/Manifest +++ b/sys-apps/chpax/Manifest @@ -1,20 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 c0adbdf0edc9b770ffcc11e036f748de ChangeLog 2931 +MD5 3c52961edfec664489b6ef7cbcdc4493 ChangeLog 3090 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 7473d1cf44e5219c027ab7b882817fda chpax-0.5.ebuild 954 MD5 ca02d338bf2a6ec01d41689482c61749 chpax-0.6.1.ebuild 1062 -MD5 2b490b5e194b831376794358060fe618 files/pax-conf.d 1767 +MD5 280d975e799e2d088646a144a6a37436 files/pax-conf.d 2314 MD5 d95ac8cbc92ddd4a9e401455d79571f7 files/digest-chpax-0.5 59 -MD5 10acb7639b93302287f5c1b3f06bdb0d files/pax-init.d 1740 +MD5 48c3ae2e2fe82506ce17f8f42074dfc0 files/pax-init.d 2355 MD5 1ae95ccec87f81057389495cbc6bb641 files/digest-chpax-0.6.1 62 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.4 (GNU/Linux) - -iQCVAwUBQLzneJ4WFLgrx1GWAQIEKAQAoRkd6MOGSDrmogTfILNUXfq09xehalja -kzQVp3ROt+LKqrw0VsiILS3qUeeiBhQgxjdfG0mc5lv116ZdLrV/B6bx+AYWARyF -yLhKJo4k0Dori1UPQO7r34ucdEhVKZhxOWFLZHQF1YURtUYcze/bHmPuVoHOcTVH -c/UEBQ0ddU4= -=Sjo1 ------END PGP SIGNATURE----- diff --git a/sys-apps/chpax/files/pax-conf.d b/sys-apps/chpax/files/pax-conf.d index 0a9527b02328..48c0e9196e34 100644 --- a/sys-apps/chpax/files/pax-conf.d +++ b/sys-apps/chpax/files/pax-conf.d @@ -1,5 +1,5 @@ #################################################################### -# Copyright 1999-2004 Gentoo Technologies, Inc. # +# Copyright 1999-2003 Gentoo Technologies, Inc. # # Distributed under the terms of the GNU General Public License v2 # #################################################################### # chpax prefix description @@ -10,33 +10,48 @@ # s SE do not enforce segmentation based non-executable pages # x XE do not randomize ET_EXEC base [ELF only] -CHPAX=/sbin/chpax -#CHPAX=/sbin/paxctl +# NOTE: PS_EXEC_EXEMPT is {PAGE,SEGM}_EXEC_EXEMPT. For executables +# with BOTH, you should use this, as it enables -e and -m, to make +# sure that pax doesn't cry about odd flag settings in softmode -PE_wine=/usr/lib/wine/bin/{wine{,build,clipsrv,dump,gcc,server,wrap,-{k,p}thread},w{mc,rc,idl}} -PE_blkdwn_java=/opt/blackdown-{jdk-*/{,jre/},jre-*/}bin/{java{_vm},keytool,kinit,klist,ktab,orbd,policytool,rmi{d,registry},servertool,tnameserv} -PE_openoffice=/opt/OpenOffice.org*/program/soffice.bin +# "blkdwn_java" would be blackdown-jdk or blackdown-jre -PE_misc="/usr/X11R6/bin/XFree86 /usr/bin/xmms /usr/bin/mplayer /usr/bin/blender \ - /usr/bin/gxine /usr/bin/xine /usr/bin/totem /usr/bin/acme \ - /usr/bin/xfce4-panel /usr/bin/gnome-sound-recorder /usr/games/bin/bzflag" +# chpax command. If using multiple tools, can separate by spaces. +# This one hits BOTH chpax and paxctl +CHPAX="/sbin/chpax /sbin/paxctl" +#CHPAX="/sbin/paxctl" +#CHPAX="/sbin/chpax" + +# yes to be annoyed +VERBOSE="no" + +PSE_wine=/usr/lib/wine/bin/{wine{,build,clipsrv,dump,gcc,server,wrap,-{k,p}thread},w{mc,rc,idl}} +PSE_blkdwn_java=/opt/blackdown-{jdk-*/{,jre/},jre-*/}bin/{java{,_vm,c},keytool,kinit,klist,ktab,orbd,policytool,rmi{d,registry},servertool,tnameserv} +PSE_openoffice=/opt/OpenOffice.org*/program/soffice.bin +PSE_misc="/usr/X11R6/bin/XFree86 /usr/bin/xmms /usr/bin/{,g}mplayer \ + /usr/bin/blender /usr/bin/gxine /usr/bin/xine /usr/bin/totem /usr/bin/acme \ + /usr/bin/gnome-sound-recorder /usr/games/bin/bzflag /usr/bin/xfce4-panel" + +RE_blkdwn_java="${SPE_blkdwn_java} /usr/X11R6/bin/XFree86" + +ME_blkdwn_java="${PSE_blkdwn_java}" +# or plug-ins don't work +ME_misc=/usr/lib/MozillaFirefox/firefox{,-bin} + +XE_blkdwn_java="${PSE_blkdwn_java} /usr/X11R6/bin/XFree86" -RE_blkdwn_java="${PE_blkdwn_java}" -RE_wine="${PE_wine}" -ME_blkdwn_java="${PE_blkdwn_java}" -XE_blkdwn_java="${PE_blkdwn_java}" -XE_wine="${RE_wine}" #################################### # Settings are really applied here # #################################### -PAGEEXEC_EXEMPT="${PE_misc} ${PE_wine} ${PE_blkdwn_java} ${PE_gnome} ${PE_openoffice}" +PS_EXEC_EXEMPT="${PSE_misc} ${PSE_wine} ${PSE_blkdwn_java} ${PSE_openoffice}" +PAGEEXEC_EXEMPT="" TRAMPOLINE_EXEMPT="" -MPROTECT_EXEMPT="${ME_blkdwn_java}" -RANDMMAP_EXEMPT="${RE_wine}" +MPROTECT_EXEMPT="${ME_blkdwn_java} ${ME_misc}" +RANDMMAP_EXEMPT="${RE_blkdwn_java}" SEGMEXEC_EXEMPT="${PAGEEXEC_EXEMPT}" -RANDEXEC_EXEMPT="${XE_blkdwn_java} ${XE_wine}" +RANDEXEC_EXEMPT="${XE_blkdwn_java}" # when zero flag mask is set to "yes" it will remove all pax flags from all files on reboot/stop -ZERO_FLAG_MASK=no +ZERO_FLAG_MASK="yes" diff --git a/sys-apps/chpax/files/pax-init.d b/sys-apps/chpax/files/pax-init.d index baf31eea5441..412acccee334 100644 --- a/sys-apps/chpax/files/pax-init.d +++ b/sys-apps/chpax/files/pax-init.d @@ -8,22 +8,37 @@ depend() { checkconfig() { if [ "x$CHPAX" = "x" ]; then - #CHPAX=/sbin/paxctl - CHPAX=/sbin/chpax + CHPAX="/sbin/chpax /sbin/paxctl" fi - $CHPAX -v $CHPAX >/dev/null 2>&1 || return 1 + # Find non-existant chpaxes + REALCHPAX="" + for i in $CHPAX; do + REALCHPAX="$REALCHPAX`$i -v $i >/dev/null 2>&1 && echo \ $i`" + done + if [ "x$REALCHPAX" = "x" ]; then + eerror "error: none of the specified chpax commands exist!" + return 1 + fi + CHPAX="$REALCHPAX" } chpax_flag() { flag=$1 fname=$2 - #einfo "chpax -$flag ${fname}" - if [ -w ${fname} ]; then - einfo "$CHPAX -$flag ${fname}" - $CHPAX -$flag ${fname} - [ $? != 0 ] && eerror "error: $CHPAX -$flag ${fname}" - fi + #if [ -w ${fname} ]; then + #einfo "-${flag} flagging ${fname}" + for i in $CHPAX; do + #einfo " with $i" + # nonverbose is ultraquiet + if [ "$VERBOSE" = "yes" ]; then + $i -$flag ${fname} + [ $? != 0 ] && eerror "error: $i -$flag ${fname}" + else + $i -$flag ${fname} 2>/dev/null >/dev/null + fi + done + #fi } fix_exempts() { @@ -33,6 +48,7 @@ fix_exempts() { RANDMMAP_EXEMPT=`eval echo $RANDMMAP_EXEMPT` MPROTECT_EXEMPT=`eval echo $MPROTECT_EXEMPT` SEGMEXEC_EXEMPT=`eval echo $SEGMEXEC_EXEMPT` + PS_EXEC_EXEMPT=`eval echo $PS_EXEC_EXEMPT` RANDEXEC_EXEMPT=`eval echo $RANDEXEC_EXEMPT` } @@ -41,13 +57,16 @@ start() { fix_exempts - 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 + ebegin "Setting PaX flags on binaries" + 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 p in $PAGEEXEC_EXEMPT; do chpax_flag p ${p} ;done + for s in $SEGMEXEC_EXEMPT; do chpax_flag s ${s} ;done + for s in $PS_EXEC_EXEMPT; do chpax_flag psem ${s} ;done + for x in $RANDEXEC_EXEMPT; do chpax_flag x ${x} ;done + eend return 0 } @@ -57,13 +76,15 @@ stop() { [ "$ZERO_FLAG_MASK" = "yes" ] || return 0 fix_exempts 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 + for p in $PAGEEXEC_EXEMPT; do chpax_flag ze ${p} ;done + for e in $TRAMPOLINE_EXEMPT; do chpax_flag ze ${e} ;done + for r in $RANDMMAP_EXEMPT; do chpax_flag ze ${r} ;done + for m in $MPROTECT_EXEMPT; do chpax_flag ze ${m} ;done + for s in $SEGMEXEC_EXEMPT; do chpax_flag ze ${s} ;done + for s in $PS_EXEC_EXEMPT; do chpax_flag ze ${s} ;done + for x in $RANDEXEC_EXEMPT; do chpax_flag ze ${x} ;done return 0 } + |