Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14480 - blackdown-jdk needs to detect and run chpax -p after installation
Summary: blackdown-jdk needs to detect and run chpax -p after installation
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-24 04:05 UTC by Tim Haynes (RETIRED)
Modified: 2003-08-10 07:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Haynes (RETIRED) gentoo-dev 2003-01-24 04:05:08 UTC
I was trying to install kawa but when it got to invoking javac as part of the
build, the PAX kernel patches (enabled in my build of gentoo-sources) killed javac.

It would be an improvement if blackdown-jdk checked for the existence of
/sbin/chpax, or installation of the gradm package, and ran
chpax -p /opt/blackdown-jdk-1.3.1/bin/i386/*/*
accordingly, as otherwise java won't work.
Comment 1 SpanKY gentoo-dev 2003-01-24 16:08:44 UTC
just because gradm is installed doesnt mean grsec is active in the kernel ... 
 
and i'd be against this ... i'd suggest adding an einfo to the end that says like 'if you are using 
grsecurity you may have to run chpax on the installed files' 
Comment 2 Tim Haynes (RETIRED) gentoo-dev 2003-01-24 16:18:37 UTC
OK; in that case a more refined test would be the sysctl kernel.grsecurity.execve_limiting = 1,  I think. 
Comment 3 SpanKY gentoo-dev 2003-01-24 16:25:40 UTC
that is, of course, if you enabled sysctl support (which is disabled by default) :) 
Comment 4 solar (RETIRED) gentoo-dev 2003-05-17 14:43:15 UTC
if [ -x /sbin/chpax ] ; then
file /opt/blackdown-jdk-*/bin/* | grep ELF | cut -d : -f 1 | while read elf ; do /sbin/chpax -rsmp $elf ; done
fi

You could add checks in java itself.. But I feel this would be kinda a hackfix, as other programs such as XFree86 would also need the same thing.

The gentoo way to do this would be to use PAGE_EXEC_EXEMPT= in /etc/conf.d/grsecurity. and rc-update add grsecurity default

Note: Starting with the gradm-1.9.9h-r1.ebuild chpax will longer be distributed as part of gradm. emerge chpax
Comment 5 solar (RETIRED) gentoo-dev 2003-07-16 15:13:20 UTC
java & pax

chpax -rs alone does the trick.

This bug should also be closed and any new ones that appear like this should be marked as invalid.
Comment 6 Adrian Almenar 2003-07-17 06:16:38 UTC
Its up to the user to handle security and other thing in their system.
Comment 7 solar (RETIRED) gentoo-dev 2003-08-10 07:34:31 UTC
Final note on this bug for archival reason.

The PaX author says chpax -rsp is what java* needs for completeness not just -rs. Or (preferably) use the grsec ACL system.