#!/bin/sh
#***************************************************************************
#         Description:
#
# permanently allow JAC Servicetool java runtime for SE linux.
#
# execute this script as root ('su -') if you experience the following error
# during JAC Servicetool startup:
#   'Error: failed [MICS_HOME]/servicetool/jre/lib/i386/server/libjvm.so,'
#   'because [MICS_HOME]/servicetool/jre/lib/i386/server/libjvm.so:'
#   'cannot restore segment prot after reloc: Permission denied'
#***************************************************************************

/usr/bin/chcon -t textrel_shlib_t "$MICS_HOME/servicetool/jre/lib/i386/server/libjvm.so"
/usr/sbin/semanage fcontext -a -t textrel_shlib_t "$MICS_HOME/servicetool/jre/lib/i386/server/libjvm.so"

/usr/bin/chcon -t textrel_shlib_t "$MICS_HOME/servicetool/jre/lib/i386/client/libjvm.so"
/usr/sbin/semanage fcontext -a -t textrel_shlib_t "$MICS_HOME/servicetool/jre/lib/i386/client/libjvm.so"