Re: [PATCH] Improve error message for label file validation

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

 



On Mon, Aug 16, 2021 at 12:55 PM Kelvin Zhang <zhangkelvin@xxxxxxxxxx> wrote:
>
> From: Kelvin Zhang <zhangxp1998@xxxxxxxxx>
>
> Signed-off-by: Kelvin Zhang <zhangxp1998@xxxxxxxxx>

This is not what I normally work on, but it looks fine to me.

Acked-by: James Carter <jwcart2@xxxxxxxxx>

> ---
>  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
>



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

  Powered by Linux