From: Daniel J Walsh <dwalsh@redhat.com>
Cc: selinux@tycho.nsa.gov, James Morris <jmorris@redhat.com>
Subject: Re: How to find SELinux policy type?
Date: Wed, 24 Sep 2008 07:27:00 -0400 [thread overview]
Message-ID: <48DA2404.8010306@redhat.com> (raw)
In-Reply-To: <17838240D9A5544AAA5FF95F8D52031604BE24FD@ad-exh01.adhost.lan>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mike Sweetser - Adhost 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".
>
> --------------------------
> Mike Sweetser | Systems Administrator
>
> Adhost Internet
> 140 Fourth Avenue North, Suite 360, Seattle, Washington 98109 USA
> P 206.404.9000 T 888.234.6781 (ADHOST-1) F 206.404.9050
> E mikesw@adhost.com W adhost.com
>
> Our brand new Adhost West data center is open - contact us for a tour at
> 1-888-234-6781 (ADHOST-1)
>
>
> -----Original Message-----
> From: owner-selinux@tycho.nsa.gov [mailto:owner-selinux@tycho.nsa.gov]
> On Behalf Of James Morris
> Sent: Tuesday, September 23, 2008 4:13 PM
> To: selinux@tycho.nsa.gov
> Subject: How to find SELinux policy type?
>
> Is there a programmatic way to determine the type of SELinux policy
> configured on a system? (e.g. "targeted")
>
> I've looked in the SELinux userspace and SETools repositories but not
> found a library call to do this.
>
>
> - James
selinux_getpolicytype()
No Man page.
python -c "import selinux; print selinux.selinux_getpolicytype()"
[0, 'targeted']
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkjaJAQACgkQrlYvE4MpobO+YgCgjCHmaHYdrgeOs0gnrpMPUsU7
3BUAmwdc99Nxbk8r7ZNemgbCIQ93RSG9
=YhtH
-----END PGP SIGNATURE-----
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2008-09-24 11:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 23:12 How to find SELinux policy type? James Morris
2008-09-23 23:32 ` Mike Sweetser - Adhost
2008-09-24 0:21 ` Paul Howarth
2008-09-24 0:41 ` KaiGai Kohei
2008-09-24 1:01 ` James Morris
2008-09-24 11:27 ` Daniel J Walsh [this message]
2008-09-24 0:18 ` KaiGai Kohei
2008-09-24 13:01 ` Daniel J Walsh
2008-09-24 13:30 ` Justin P. Mattock
2008-09-26 3:34 ` Valdis.Kletnieks
2008-09-26 3:50 ` KaiGai Kohei
2008-09-26 9:38 ` Dominick Grift
2008-09-26 10:25 ` KaiGai Kohei
2008-09-26 10:41 ` Dominick Grift
2008-09-26 13:32 ` KaiGai Kohei
2008-09-27 15:54 ` KaiGai Kohei
2008-09-30 4:19 ` sepostgresql.pp conflicts on F9 (Re: How to find SELinux policy type?) KaiGai Kohei
2008-09-30 7:24 ` Dominick Grift
2008-09-30 7:52 ` KaiGai Kohei
2008-09-30 8:06 ` Paul Howarth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48DA2404.8010306@redhat.com \
--to=dwalsh@redhat.com \
--cc=jmorris@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.