title: SELinux Prevents Java from Running
body: <p>I recently installed Sun Java on a system with a fairly basic SELinux install on it.</p>
  
  <p>I'm running Debian Etch and installed the Sun Java package from the non-free package repository.</p>
  
  <p>Here are the error notices that appear in the syslog when I run <code>java -version</code>.</p>
  
  <p>`Feb  9 14:02:40 dev kernel: audit(1265742160.570:4107): avc:  denied  { execmem } for  pid=9882 comm="java" scontext=user_u:system_r:unconfined_t:s0 tcontext=user_u:system_r:unconfined_t:s0 tclass=process</p>
  
  <p>Feb  9 14:02:40 dev kernel: audit(1265742160.578:4108): avc:  denied  { execmem } for  pid=9882 comm="java" scontext=user_u:system_r:unconfined_t:s0 tcontext=user_u:system_r:unconfined_t:s0 tclass=process`</p>
  
  <p>I've googled around and it seems that I need to create an SELinux policy that permits Java to perform operations that violate the <code>execmem</code> constraints. Is this a correct assumption? If so, how should I get started?</p>
  
  <p>Updates: </p>
  
  <p>I looked for and found a targeted policy aimed at handling Java. I installed it using the following command:</p>
  
  <p><code>$ sudo semodule -i /usr/share/selinux/refpolicy-targeted/java.pp</code></p>
  
  <p>This did not help, however. I continue to see identical audit messages in the syslog.</p>