Skip to main content



      Home
Home » Newcomers » Newcomers » Eclipse with SELinux
Eclipse with SELinux [message #235346] Sat, 29 September 2007 04:32 Go to next message
Eclipse UserFriend
I have recently installed Eclipse onto Fedora 7 and am getting the
following error:

/opt/jdk1.6.0_02/bin/../jre/lib/i386/client/libjvm.so: cannot restore
segment prot after reloc: Permission denied

From various posts on the net this appears to be an SELinux problem, but I
have no isea how to fix it. Any suggestions would be appreciated.

Thanks
simon
Re: Eclipse with SELinux [message #235354 is a reply to message #235346] Sat, 29 September 2007 04:58 Go to previous messageGo to next message
Eclipse UserFriend
OK This is definitely a SELInux problem as I switched it off temporarily
and Eclipse worked. I will look into changing the policy for Eclipse.
Re: Eclipse with SELinux [message #235365 is a reply to message #235354] Sat, 29 September 2007 05:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mknauer.innoopract.com

Simon Meaden wrote:

> OK This is definitely a SELInux problem as I switched it off temporarily
> and Eclipse worked. I will look into changing the policy for Eclipse.

Should be a problem of your Java Virtual Machine and the things they are
doing inside. I don't expect it to be something specific to Eclipse.
Re: Eclipse with SELinux [message #235378 is a reply to message #235354] Sat, 29 September 2007 06:14 Go to previous message
Eclipse UserFriend
OK I found a fix.

Firstly I changed the security level from 'enforcing' to 'permissive'
using 'system-config-securitylevel' which allowed Eclipse to run. Now
according to my reading this is not a good idea in the long run so I
looked further.

The problem is in Java, NOT Eclipse. The java library libjvm.so is
attempting text relocation which is apparently a security problem. My
knowledge of SELinux is not good enough to know why.

When I looked in /var/log/messages I got the following error.

Sep 29 07:57:23 localhost setroubleshoot: SELinux is preventing
/opt/eclipse3.3/eclipse from loading
opt/jdk1.6.0_02/jre/lib/i386/client/libjvm.so which requires text
relocation. For complete SELinux messages. run sealert -l
e155295f-2962-4f25-bf80-4fd73620ca6b

I dutifully ran 'sealert -l e155295f-2962-4f25-bf80-4fd73620ca6b' and got
a long error message indicating the fault and it included several
suggestions. I tried the following advice.

Allowing Access
If you trust /opt/jdk1.6.0_02/jre/lib/i386/client/libjvm.so to run
correctly, you can change the file context to textrel_shlib_t. "chcon
-t
textrel_shlib_t /opt/jdk1.6.0_02/jre/lib/i386/client/libjvm.so"

The following command will allow this access:
chcon -t textrel_shlib_t /opt/jdk1.6.0_02/jre/lib/i386/client/libjvm.so

and this seems to have solved the problem. I turned the security level
back to enforcing and Eclipse still runs.

I will have to look further to see if this is a 'GOOD SOLUTION' in the
long run but at least it works.

Note that I am using Linux Fedora 7/Eclipse 3.3 and other distros might
not have system-config-securitylevel but there is a lot of info on
switching security levels on the web.
Previous Topic:Math.pow
Next Topic:Automating Builds
Goto Forum:
  


Current Time: Wed Nov 05 07:46:42 EST 2025

Powered by FUDForum. Page generated in 0.11235 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top