shared library and selinux

Stephen Smalley sds at epoch.ncsc.mil
Wed Apr 28 17:55:36 UTC 2004


On Wed, 2004-04-28 at 13:43, Stephen Smalley wrote:
> On Wed, 2004-04-28 at 13:29, J. Scott Amort wrote:
> > Thanks!  I suspect, however, that this will cause problems for anyone
> > not running an selinux enabled system.  Is there a conditional test for
> > selinux that could also be added to the makefile?  Thanks for any info.
> 
> selinuxenabled is a utility for that purpose, but you can't assume that
> it is installed on non-Fedora systems; usage would be if selinuxenabled;
> then restorecon ...; fi.  

I missed the obvious - you should be able to do:
if [ -x /usr/bin/selinuxenabled ] && selinuxenabled; then restorecon ...; fi

-- 
Stephen Smalley <sds at epoch.ncsc.mil>
National Security Agency





More information about the fedora-test-list mailing list