From: Paul Moore <paul@paul-moore.com>
To: selinux@vger.kernel.org
Subject: Re: [PATCH] selinux: correct return values in selinux_socket_getpeersec_dgram()
Date: Fri, 2 Feb 2024 13:47:39 -0500 [thread overview]
Message-ID: <CAHC9VhRw4MoJhspYOmrY4JdXTTd=BibE4Cd5kHxhVgmJL+tLJg@mail.gmail.com> (raw)
In-Reply-To: <20240130232342.378342-2-paul@paul-moore.com>
On Tue, Jan 30, 2024 at 6:23 PM Paul Moore <paul@paul-moore.com> wrote:
>
> Instead of returning -EINVAL if any type of error occurs, limit
> -EINVAL to only those errors caused by passing a bad/invalid socket
> or packet/skb. In other cases where everything is correct but there
> isn't a valid peer label we return -ENOPROTOOPT.
>
> This helps make selinux_socket_getpeersec_dgram() more consistent
> with selinux_socket_getpeersec_stream().
>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
> ---
> security/selinux/hooks.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
Merged into selinux/dev.
--
paul-moore.com
prev parent reply other threads:[~2024-02-02 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 23:23 [PATCH] selinux: correct return values in selinux_socket_getpeersec_dgram() Paul Moore
2024-02-02 18:47 ` Paul Moore [this message]
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='CAHC9VhRw4MoJhspYOmrY4JdXTTd=BibE4Cd5kHxhVgmJL+tLJg@mail.gmail.com' \
--to=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).