* [PATCH] Improve error message for label file validation
@ 2021-08-16 16:54 Kelvin Zhang
2021-08-19 19:22 ` James Carter
0 siblings, 1 reply; 3+ messages in thread
From: Kelvin Zhang @ 2021-08-16 16:54 UTC (permalink / raw)
To: selinux; +Cc: Kelvin Zhang
From: Kelvin Zhang <zhangxp1998@gmail.com>
Signed-off-by: Kelvin Zhang <zhangxp1998@gmail.com>
---
libselinux/src/label_file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
index 56f499fa..2e28d047 100644
--- a/libselinux/src/label_file.c
+++ b/libselinux/src/label_file.c
@@ -188,6 +188,9 @@ static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec,
str_buf[entry_len] = '\0';
if ((strcmp(str_buf, reg_version) != 0)) {
+ COMPAT_LOG(SELINUX_ERROR,
+ "Regex version mismatch, expected: %s actual: %s\n",
+ reg_version, str_buf);
free(str_buf);
return -1;
}
--
2.33.0.rc1.237.g0d66db33f3-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Improve error message for label file validation
2021-08-16 16:54 [PATCH] Improve error message for label file validation Kelvin Zhang
@ 2021-08-19 19:22 ` James Carter
2021-08-23 14:30 ` James Carter
0 siblings, 1 reply; 3+ messages in thread
From: James Carter @ 2021-08-19 19:22 UTC (permalink / raw)
To: Kelvin Zhang; +Cc: SElinux list, Kelvin Zhang
On Mon, Aug 16, 2021 at 12:55 PM Kelvin Zhang <zhangkelvin@google.com> wrote:
>
> From: Kelvin Zhang <zhangxp1998@gmail.com>
>
> Signed-off-by: Kelvin Zhang <zhangxp1998@gmail.com>
This is not what I normally work on, but it looks fine to me.
Acked-by: James Carter <jwcart2@gmail.com>
> ---
> libselinux/src/label_file.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
> index 56f499fa..2e28d047 100644
> --- a/libselinux/src/label_file.c
> +++ b/libselinux/src/label_file.c
> @@ -188,6 +188,9 @@ static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec,
>
> str_buf[entry_len] = '\0';
> if ((strcmp(str_buf, reg_version) != 0)) {
> + COMPAT_LOG(SELINUX_ERROR,
> + "Regex version mismatch, expected: %s actual: %s\n",
> + reg_version, str_buf);
> free(str_buf);
> return -1;
> }
> --
> 2.33.0.rc1.237.g0d66db33f3-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Improve error message for label file validation
2021-08-19 19:22 ` James Carter
@ 2021-08-23 14:30 ` James Carter
0 siblings, 0 replies; 3+ messages in thread
From: James Carter @ 2021-08-23 14:30 UTC (permalink / raw)
To: Kelvin Zhang; +Cc: SElinux list, Kelvin Zhang
On Thu, Aug 19, 2021 at 3:22 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Mon, Aug 16, 2021 at 12:55 PM Kelvin Zhang <zhangkelvin@google.com> wrote:
> >
> > From: Kelvin Zhang <zhangxp1998@gmail.com>
> >
> > Signed-off-by: Kelvin Zhang <zhangxp1998@gmail.com>
>
> This is not what I normally work on, but it looks fine to me.
>
> Acked-by: James Carter <jwcart2@gmail.com>
>
Merged.
Thanks,
Jim
> > ---
> > libselinux/src/label_file.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
> > index 56f499fa..2e28d047 100644
> > --- a/libselinux/src/label_file.c
> > +++ b/libselinux/src/label_file.c
> > @@ -188,6 +188,9 @@ static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec,
> >
> > str_buf[entry_len] = '\0';
> > if ((strcmp(str_buf, reg_version) != 0)) {
> > + COMPAT_LOG(SELINUX_ERROR,
> > + "Regex version mismatch, expected: %s actual: %s\n",
> > + reg_version, str_buf);
> > free(str_buf);
> > return -1;
> > }
> > --
> > 2.33.0.rc1.237.g0d66db33f3-goog
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-23 14:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 16:54 [PATCH] Improve error message for label file validation Kelvin Zhang
2021-08-19 19:22 ` James Carter
2021-08-23 14:30 ` James Carter
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).