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:
parent
ec15ebd030
commit
408093ee0a
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue