Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90553 - ebuild for sun-jdk does not run paxctl on grsecurity systems
Summary: ebuild for sun-jdk does not run paxctl on grsecurity systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-04-26 16:03 UTC by Morten Mertner
Modified: 2005-05-05 04:38 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 Morten Mertner 2005-04-26 16:03:29 UTC
The installed sun-jdk is unuseable due to grsecurity restrictions. 

The ebuild must execute "paxctl -pemrxs <file>" on the following files in the jdk installation path:
    bin/jar
    bin/java
    bin/javac
    bin/javadoc
    jre/bin/java
    jre/bin/java_vm

Without this users are unable to auto-update their systems (as the jdk installs and subsequently removes the old jdk, leaving the user without a working copy).

Reproducible: Always
Steps to Reproduce:
1. emerge sun-jdk
2. java/javac/etc.
3.

Actual Results:  
Execution of any of the listed commands fails.

Expected Results:  
Executed without problems.

Applies to any grsecurity/hardened system with PaX enabled.
Comment 1 Jan Brinkmann (RETIRED) gentoo-dev 2005-04-27 00:48:39 UTC
we use chpax for it if it's on the system. just emerge chpax and afterwards a jdk, then you're set
Comment 2 Morten Mertner 2005-04-27 04:06:47 UTC
I already have chpax installed, and that didn't help:

james root # rc-update -s default | grep chpax         
chpax | default 
james root # /etc/init.d/chpax status
 * status:  started

Seems like the chpax tool isn't detecting new packages then. I waited more than an hour and still the newly emerged javadoc wouldn't run. I had to manually run both chpax and paxctl (not sure which of them fixed it) on the packages as described previously.
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2005-05-02 00:30:02 UTC
Jan - the ebuilds fail to set the PaX flags for javadoc, both in the sun-jdk and the blackdown-jdk.

Morten - currently /sbin/chpax is the only utility that works for foreign binaries, /sbin/paxctl is ineffective (but see bug #91122 if you're interested).  However you're talking about /etc/init.d/chpax, the boot-time utility solar put together to set flags on boot across the system.  It works, but you need to stop/start it after installing a package that needs it (this happens across a reboot, of course).

/etc/init.d/chpax stop
/etc/init.d/chpax start

Comment 4 Jan Brinkmann (RETIRED) gentoo-dev 2005-05-04 05:24:57 UTC
fixed in cvs, now we call chpax also for the javadoc binary.
Comment 5 Morten Mertner 2005-05-05 04:38:09 UTC
Thanks! (also to Kevin for the useful information bits)