All of lore.kernel.org
 help / color / mirror / Atom feed
* I think this is equivalent to what we have now and more efficient.
@ 2007-02-22 14:36 Daniel J Walsh
  2007-02-22 14:45 ` Stephen Smalley
  2007-02-22 15:15 ` Steve Grubb
  0 siblings, 2 replies; 21+ messages in thread
From: Daniel J Walsh @ 2007-02-22 14:36 UTC (permalink / raw)
  To: Stephen Smalley, Steve Grubb, SE Linux

int is_selinux_enabled(void)
{
    security_context_t con;

    if (getcon_raw(&con) == 0) {
        int enabled = 1;
        if (!strcmp(con, "kernel"))
            enabled = 0;
        freecon(con);
        return enabled;
    } else {
        struct stat buf;
        return (stat("/proc/filesystems", &buf));
    }

}

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2007-02-26 15:11 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-22 14:36 I think this is equivalent to what we have now and more efficient Daniel J Walsh
2007-02-22 14:45 ` Stephen Smalley
2007-02-22 15:04   ` Daniel J Walsh
2007-02-22 15:10     ` Stephen Smalley
2007-02-22 15:36       ` Daniel J Walsh
2007-02-22 15:38         ` Stephen Smalley
2007-02-22 15:43           ` Stephen Smalley
2007-02-22 16:04             ` Daniel J Walsh
2007-02-22 16:10               ` Stephen Smalley
2007-02-22 16:56               ` Steve Grubb
2007-02-23 12:34                 ` Stephen Smalley
2007-02-25 19:36                   ` Steve Grubb
2007-02-26 13:55                     ` Stephen Smalley
2007-02-26 14:44                       ` Steve Grubb
2007-02-26 14:58                         ` Stephen Smalley
2007-02-26 15:01                           ` Stephen Smalley
2007-02-26 15:11                             ` Steve Grubb
2007-02-22 15:46           ` Daniel J Walsh
2007-02-22 15:15 ` Steve Grubb
2007-02-22 15:30   ` Daniel J Walsh
2007-02-22 15:36     ` Stephen Smalley

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.