diff mbox series

[01/11] libselinux/man: mention errno for regex compilation failure

Message ID 20231219160943.334370-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 1daa91b2baae
Delegated to: Petr Lautrbach
Headers show
Series [01/11] libselinux/man: mention errno for regex compilation failure | expand

Commit Message

Christian Göttsche Dec. 19, 2023, 4:09 p.m. UTC
Selabel lookups might fail with errno set to EINVAL in the unlikely case
a regular expression from the file context definition failed to compile.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libselinux/man/man3/selabel_lookup.3            | 3 ++-
 libselinux/man/man3/selabel_lookup_best_match.3 | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

James Carter Jan. 5, 2024, 7:15 p.m. UTC | #1
On Tue, Dec 19, 2023 at 11:10 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Selabel lookups might fail with errno set to EINVAL in the unlikely case
> a regular expression from the file context definition failed to compile.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

For these 11 patches:
Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libselinux/man/man3/selabel_lookup.3            | 3 ++-
>  libselinux/man/man3/selabel_lookup_best_match.3 | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libselinux/man/man3/selabel_lookup.3 b/libselinux/man/man3/selabel_lookup.3
> index 4e47c3ec..e20345e6 100644
> --- a/libselinux/man/man3/selabel_lookup.3
> +++ b/libselinux/man/man3/selabel_lookup.3
> @@ -64,7 +64,8 @@ The
>  .I key
>  and/or
>  .I type
> -inputs are invalid, or the context being returned failed validation.
> +inputs are invalid, or the context being returned failed validation, or a
> +regular expression in the database failed to compile.
>  .TP
>  .B ENOMEM
>  An attempt to allocate memory failed.
> diff --git a/libselinux/man/man3/selabel_lookup_best_match.3 b/libselinux/man/man3/selabel_lookup_best_match.3
> index ef2efb4a..985a8600 100644
> --- a/libselinux/man/man3/selabel_lookup_best_match.3
> +++ b/libselinux/man/man3/selabel_lookup_best_match.3
> @@ -78,7 +78,8 @@ The
>  .I key
>  and/or
>  .I type
> -inputs are invalid, or the context being returned failed validation.
> +inputs are invalid, or the context being returned failed validation, or a
> +regular expression in the database failed to compile.
>  .TP
>  .B ENOMEM
>  An attempt to allocate memory failed.
> --
> 2.43.0
>
>
James Carter Jan. 25, 2024, 7:55 p.m. UTC | #2
On Fri, Jan 5, 2024 at 2:15 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Tue, Dec 19, 2023 at 11:10 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Selabel lookups might fail with errno set to EINVAL in the unlikely case
> > a regular expression from the file context definition failed to compile.
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> For these 11 patches:
> Acked-by: James Carter <jwcart2@gmail.com>
>

These 11 patches have been merged.
Thanks,
Jim

> > ---
> >  libselinux/man/man3/selabel_lookup.3            | 3 ++-
> >  libselinux/man/man3/selabel_lookup_best_match.3 | 3 ++-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/libselinux/man/man3/selabel_lookup.3 b/libselinux/man/man3/selabel_lookup.3
> > index 4e47c3ec..e20345e6 100644
> > --- a/libselinux/man/man3/selabel_lookup.3
> > +++ b/libselinux/man/man3/selabel_lookup.3
> > @@ -64,7 +64,8 @@ The
> >  .I key
> >  and/or
> >  .I type
> > -inputs are invalid, or the context being returned failed validation.
> > +inputs are invalid, or the context being returned failed validation, or a
> > +regular expression in the database failed to compile.
> >  .TP
> >  .B ENOMEM
> >  An attempt to allocate memory failed.
> > diff --git a/libselinux/man/man3/selabel_lookup_best_match.3 b/libselinux/man/man3/selabel_lookup_best_match.3
> > index ef2efb4a..985a8600 100644
> > --- a/libselinux/man/man3/selabel_lookup_best_match.3
> > +++ b/libselinux/man/man3/selabel_lookup_best_match.3
> > @@ -78,7 +78,8 @@ The
> >  .I key
> >  and/or
> >  .I type
> > -inputs are invalid, or the context being returned failed validation.
> > +inputs are invalid, or the context being returned failed validation, or a
> > +regular expression in the database failed to compile.
> >  .TP
> >  .B ENOMEM
> >  An attempt to allocate memory failed.
> > --
> > 2.43.0
> >
> >
diff mbox series

Patch

diff --git a/libselinux/man/man3/selabel_lookup.3 b/libselinux/man/man3/selabel_lookup.3
index 4e47c3ec..e20345e6 100644
--- a/libselinux/man/man3/selabel_lookup.3
+++ b/libselinux/man/man3/selabel_lookup.3
@@ -64,7 +64,8 @@  The
 .I key
 and/or
 .I type
-inputs are invalid, or the context being returned failed validation.
+inputs are invalid, or the context being returned failed validation, or a
+regular expression in the database failed to compile.
 .TP
 .B ENOMEM
 An attempt to allocate memory failed.
diff --git a/libselinux/man/man3/selabel_lookup_best_match.3 b/libselinux/man/man3/selabel_lookup_best_match.3
index ef2efb4a..985a8600 100644
--- a/libselinux/man/man3/selabel_lookup_best_match.3
+++ b/libselinux/man/man3/selabel_lookup_best_match.3
@@ -78,7 +78,8 @@  The
 .I key
 and/or
 .I type
-inputs are invalid, or the context being returned failed validation.
+inputs are invalid, or the context being returned failed validation, or a
+regular expression in the database failed to compile.
 .TP
 .B ENOMEM
 An attempt to allocate memory failed.