All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: SElinux list <selinux@vger.kernel.org>
Cc: Richard Filo <rfilo@redhat.com>, Ondrej Mosnacek <omosnace@redhat.com>
Subject: Re: [PATCH v3] libselinux: Add missing errno setup
Date: Wed, 6 May 2020 16:10:29 +0200	[thread overview]
Message-ID: <20200506141029.GA52210@workstation> (raw)
In-Reply-To: <CAFqZXNsMAwyzKehCN2oHe7jreUGZOAysvBWXa+yC81B3Q22xVw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

On Mon, May 04, 2020 at 01:08:33PM +0200, Ondrej Mosnacek wrote:
> On Mon, May 4, 2020 at 12:39 PM Richard Filo <rfilo@redhat.com> wrote:
> > Errno is not set to ENOENT when lookup_all() doesn't find any match.
> >
> > fixes: https://src.fedoraproject.org/tests/selinux/issue/51
> >
> > Signed-off-by: Richard Filo <rfilo@redhat.com>
> > ---
> >         -removed check: result != NULL
> >
> >  libselinux/src/label_file.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
> > index 300625c2..74d2027e 100644
> > --- a/libselinux/src/label_file.c
> > +++ b/libselinux/src/label_file.c
> > @@ -948,6 +948,8 @@ static const struct spec **lookup_all(struct selabel_handle *rec,
> >                         goto finish;
> >                 }
> >         }
> > +       if (!result[0])
> > +               errno = ENOENT;
> >
> >  finish:
> >         free(clean_key);
> > --
> > 2.25.2
> 
> Acked-by: Ondrej Mosnacek <omosnace@redhat.com>
> 
> Thanks!
> 

^&^ git am v3-libselinux-Add-missing-errno-setup.patch 
Applying: libselinux: Add missing errno setup
.git/rebase-apply/patch:15: trailing whitespace.
        if (!result[0]) 
warning: 1 line adds whitespace errors.

I have fixed the trailing whitespace and applied it.

Thanks.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2020-05-06 14:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 14:16 [PATCH] libselinux: Add missing errno setup Richard Filo
2020-04-06 16:55 ` Ondrej Mosnacek
2020-05-04  8:45   ` [PATCH v2] " Richard Filo
2020-05-04  9:01     ` Ondrej Mosnacek
2020-05-04 10:38       ` [PATCH v3] " Richard Filo
2020-05-04 11:08         ` Ondrej Mosnacek
2020-05-06 14:10           ` Petr Lautrbach [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=20200506141029.GA52210@workstation \
    --to=plautrba@redhat.com \
    --cc=omosnace@redhat.com \
    --cc=rfilo@redhat.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 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.