Re: How to find SELinux policy type?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Howarth wrote:
On Tue, 23 Sep 2008 16:32:16 -0700
"Mike Sweetser - Adhost" <mikesw@xxxxxxxxxx> wrote:

James,

The following command set should give you what you want:

grep '^SELINUXTYPE' /etc/selinux/config | awk '{split($0,a,"="); print
a[2];}'

When run against my targeted setup on RHEL 5.2, it gave me back
"targeted".

There's also the "sestatus" command:

# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted

Paul.

selinux_getpolicytype() is available to obtain the current policy type.
(It paerses /etc/selinux/config.)

But, there is no reasonable way to obtain the list of policy types.
Perhaps, I misunderstood the matter. :-)

Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@xxxxxxxxxxxxx>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux