What is the best way to find out (in a script) whether SElinux is used?

Russell Coker russell at coker.com.au
Fri Mar 19 10:29:18 UTC 2004


On Fri, 19 Mar 2004 21:08, Aleksey Nogin <aleksey at nogin.org> wrote:
> I want to have a script that acts slightly differently depending on
> whether SELinux is being used or not. What is the best way to do it?
>
> My initial attempts to use "-e /etc/security/selinux" or "-e
> /selinux/enforce" all create log messages:

I've attached my archive of man pages for SE Linux APIs.  See 
is_selinux_enabled(3).

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page
-------------- next part --------------
A non-text attachment was scrubbed...
Name: man.tgz
Type: application/x-tgz
Size: 3627 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-selinux-list/attachments/20040319/3c6da1b1/attachment.bin>


More information about the fedora-selinux-list mailing list