--- dev-java/sun-jre-bin/sun-jre-bin-1.4.2.10.ebuild.ORIG 2006-07-06 13:05:36.000000000 +0200 +++ dev-java/sun-jre-bin/sun-jre-bin-1.4.2.10.ebuild 2006-09-20 04:14:26.000000000 +0200 @@ -141,29 +141,15 @@ einfo " ln -sf /opt/${P}/jre/plugin/i386/ns4/libjavaplugin.so" fi - # if chpax is on the target system, set the appropriate PaX flags - # this will not hurt the binary, it modifies only unused ELF bits - # but may confuse things like AV scanners and automatic tripwire - if has_version sys-apps/chpax - then - echo - einfo "setting up conservative PaX flags for jar, javac and java" - - for paxkills in "java" - do - chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/$paxkills - done + ewarn "Disabling some PaX restrictions (${CHPAX_CONSERVATIVE_FLAGS})" - # /opt/sun-jdk-1.4.2.03/bin/java_vm - chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/java_vm - - einfo "you should have seen lots of chpax output above now" - ewarn "make sure the grsec ACL contains those entries also" - ewarn "because enabling it will override the chpax setting" - ewarn "on the physical files - help for PaX and grsecurity" - ewarn "can be given by #gentoo-hardened + hardened@gentoo.org" - fi + for paxkills in "java" + do + $(which scanelf) -Xxz ${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/$paxkills + done + $(which scanelf) -Xxz ${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/java_vm + if ! use X; then echo ewarn "Some parts of Sun's JDK require virtual/x11 to be installed."