kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jeffrey Walton <noloader@gmail.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: SElinux and its own error code?
Date: Sun, 3 May 2020 09:45:23 +0200	[thread overview]
Message-ID: <20200503074523.GB536697@kroah.com> (raw)
In-Reply-To: <CAH8yC8kjRr29R8=zeUuyE5NKVDMZsdHMh+Z9a9mgP51VWYu-jQ@mail.gmail.com>

On Sat, May 02, 2020 at 11:55:02PM -0400, Jeffrey Walton wrote:
> Hi Guys,
> 
> I lost about four hours chasing inaccurate messages from Apache. It
> turns out SElinux was denying access, so the EPERM was not really
> accurate. But Apache saw EPERM or EACCESS and logged a message related
> to Posix permissions.
> 
> As far as I know Posix does not authorize use of EPERM or EACCESS for
> SElinux. That is, SElinux should not be hijacking the error code.
> 
> I'm wondering why there is no error message for SElinux that would
> allow application to return a specific error when SElinux denies
> access to an object or operation.
> 
> Why does SElinux not have its own error code?

Because it does not need it, you do not have the correct permission to
access that resource, so it fails and tells you that.  All is good, and
posix has nothing to do with it at all, sorry.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-05-03  7:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  3:55 SElinux and its own error code? Jeffrey Walton
2020-05-03  7:45 ` Greg KH [this message]
2020-05-03  7:50 ` Valdis Klētnieks
2020-05-03  7:59   ` Jeffrey Walton
2020-05-03  9:18     ` Greg KH
2020-05-03 16:02 ` Bernd Petrovitsch

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=20200503074523.GB536697@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=noloader@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).