Improve error message for label file validation

This is cherry-picked from upstream
8c21eeeace

Signed-off-by: Kelvin Zhang <zhangxp1998@gmail.com>
Change-Id: I3745d2b45eb42e62f29823edc1b20629bf8ab9d7
This commit is contained in:
Kelvin Zhang 2021-08-16 09:54:59 -07:00 committed by Kelvin Zhang
parent ec15ebd030
commit 408093ee0a

View file

@ -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;
}