selinux: how to query if selinux is enabled

Olga Kornievskaia aglo at umich.edu
Thu Oct 8 17:40:36 UTC 2020


On Thu, Oct 8, 2020 at 1:06 PM Casey Schaufler <casey at schaufler-ca.com> wrote:
>
> On 10/7/2020 5:40 PM, Olga Kornievskaia wrote:
> > Hi folks,
> >
> > >From some linux kernel module, is it possible to query and find out
> > whether or not selinux is currently enabled or not?
>
> % cat /sys/kernel/security/lsm
> capability,yamma,selinux

Thank you Casey, but it's frowned upon to read files from within a
kernel. I'm looking for a kernel api to use.

>
> >
> > Thank you.



More information about the Linux-security-module-archive mailing list