All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: I think this is equivalent to what we have now and more efficient.
Date: Thu, 22 Feb 2007 10:30:37 -0500	[thread overview]
Message-ID: <45DDB71D.9060507@redhat.com> (raw)
In-Reply-To: <200702221015.21700.sgrubb@redhat.com>

Steve Grubb wrote:
> On Thursday 22 February 2007 09:36:48 Daniel J Walsh wrote:
>   
>>     } else {
>>         struct stat buf;
>>         return (stat("/proc/filesystems", &buf));
>>     }
>>     
>
> This doesn't tell you if a selinuxfs is available.
>
> -Steve
>   
That is the point.  The original code does not care whether selinuxfs is 
in /proc/filesystem or not it returns 0 if it could read it and the con 
was not "kernel". 

If I can read /proc/filesystem, either selinuxfs exists or it does not.  
Either way selinux is disabled.

If I can't tell, Ie I can't read /proc/filesystem return -1.

So the check becomes either selinux is enabled, or if I had a failure 
return -1;

--
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:[~2007-02-22 15:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-02-22 15:36     ` Stephen Smalley

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=45DDB71D.9060507@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=sgrubb@redhat.com \
    /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.