On 12/11/2010 03:50 PM, Per Bothner wrote:
We also need to do:
chcon -t execmem_exec_t linux_i486_compiler2/product/gamma

This command enables test_gamma to sucessfully run with
SELinux enabled.

The attached patch seems to work - this now works:

cd linux_i486_compiler2/product && ./test_gamma

However, a little further on I get:

cd linux_i486_compiler1/product && ./test_gamma
java full version "1.6.0_23-b05"
./gamma: error while loading shared libraries: libjvm.so: cannot enable executable stack as shared object requires: Permission denied

Perhaps there is some other place that needs the patch?

I'm doing a make clean and full re-build in case the problem
is a stale binary.
--
        --Per Bothner
per.both...@oracle.com   p...@bothner.com   http://per.bothner.com/
diff -r 3f3653ab7af8 make/linux/makefiles/launcher.make
--- a/make/linux/makefiles/launcher.make        Fri Dec 03 19:44:29 2010 -0800
+++ b/make/linux/makefiles/launcher.make        Sat Dec 11 16:07:57 2010 -0800
@@ -73,4 +73,15 @@
            $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) 
$(LIBS_LAUNCHER); \
            $(LINK_LAUNCHER/POST_HOOK) \
            [ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \
+            if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then                    \
+             if [ -x /usr/sbin/selinuxenabled ] ; then                 \
+               /usr/sbin/selinuxenabled;                               \
+                if [ $$? = 0 ] ; then                                  \
+                 /usr/bin/chcon -t execmem_exec_t $@;                  \
+                 if [ $$? != 0 ]; then                                 \
+                   echo "ERROR: Cannot chcon $@";                      \
+                 fi                                                    \
+               fi                                                      \
+             fi                                                        \
+            fi                                                                 
\
         }

Reply via email to