All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Cain <cain@cshl.org>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: selinux@tycho.nsa.gov
Subject: Re: Determining if SELinux is installed
Date: Tue, 15 Feb 2005 11:48:46 -0500	[thread overview]
Message-ID: <1108486127.3297.55.camel@localhost.localdomain> (raw)
In-Reply-To: <1108485238.17854.110.camel@moss-spartans.epoch.ncsc.mil>

On Tue, 2005-02-15 at 11:33 -0500, Stephen Smalley wrote:
> On Tue, 2005-02-15 at 11:18, Scott Cain wrote:
> > Hello,
> > 
> > Is there a programmatic way to determine if SELinux is installed and
> > enabled?  I would like to know so that I can let the installer I've
> > written take appropriate action if it detects that it is there.
> 
> The libselinux function is is_selinux_enabled(3).
> There is also a libselinux utility called selinuxenabled(1) that can be
> used in a conditional, e.g. if selinuxenabled; then echo Yes; fi.
> Finally, you can also manually check for presence of selinuxfs in
> /proc/filesystems.

Thanks.  I guess it will have to be the last option, since the installer
is in perl, so I can't (directly) use is_selinux_enabled, and
since /usr/sbin isn't typically in a user's path, I can't count on that
either.  So `grep selinuxfs /proc/filesystems` it is!

Thanks,
Scott

-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                         cain@cshl.org
GMOD Coordinator (http://www.gmod.org/)                     216-392-3087
Cold Spring Harbor Laboratory


--
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.

  reply	other threads:[~2005-02-15 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-15 16:18 Determining if SELinux is installed Scott Cain
2005-02-15 16:33 ` Stephen Smalley
2005-02-15 16:48   ` Scott Cain [this message]
2005-02-15 16:51     ` Stephen Smalley
2005-02-15 17:13     ` Daniel J Walsh
2005-02-15 17:12       ` Stephen Smalley
2005-02-15 18:04       ` Scott Cain
2005-02-15 18:24         ` Daniel J Walsh

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=1108486127.3297.55.camel@localhost.localdomain \
    --to=cain@cshl.org \
    --cc=sds@epoch.ncsc.mil \
    --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.