Re: [RFC PATCH v2 24/27] libselinux: set errno on label lookup failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 11, 2023 at 2:50 PM James Carter <jwcart2@xxxxxxxxx> wrote:
>
> On Mon, Aug 14, 2023 at 9:42 AM Christian Göttsche
> <cgzones@xxxxxxxxxxxxxx> wrote:
> >
> > selabel_lookup(3) is expected to set errno on lookup failure, i.e. when
> > it returns NULL.  Set errno if a regular expression failed to compile in
> > compile_regex().
> >
> > Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
>
> Acked-by: James Carter <jwcart2@xxxxxxxxx>
>
Merged.
Thanks,
Jim

> > ---
> > v2: add patch
> > ---
> >  libselinux/src/label_file.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/libselinux/src/label_file.h b/libselinux/src/label_file.h
> > index 3827b5c0..5365086b 100644
> > --- a/libselinux/src/label_file.h
> > +++ b/libselinux/src/label_file.h
> > @@ -407,6 +407,7 @@ static inline int compile_regex(struct spec *spec, const char **errbuf)
> >                         *errbuf = &regex_error_format_buffer[0];
> >                 }
> >                 __pthread_mutex_unlock(&spec->regex_lock);
> > +               errno = EINVAL;
> >                 return -1;
> >         }
> >
> > --
> > 2.40.1
> >




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux