Improve error message for label file validation
PATCH 1/1 Improve error message for label file validation
From: Kelvin Zhang <[email protected]>
Signed-off-by Kelvin Zhang <[email protected]>
--- libselinux/src/label_file.c | 3 +++ 1 file changed, 3 insertions(+)
libselinux/src/label_file.c +3 -0
@@ -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 ; }
Signature · 1 line
2.33.0.rc1.237.g0d66db33f3-goog
Quoted 4 lines · Kelvin Zhang
From: Kelvin Zhang <[email protected]>
Signed-off-by Kelvin Zhang <[email protected]>
This is not what I normally work on, but it looks fine to me.
Acked-by James Carter <[email protected]>
Quoted 21 lines
--- libselinux/src/label_file.c | 3 +++ 1 file changed, 3 insertions(+)libselinux/src/label_file.c +3
-1@@ -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
Quoted 11 lines · James Carter
Quoted 4 lines · Kelvin Zhang
From: Kelvin Zhang <[email protected]>
Signed-off-by Kelvin Zhang <[email protected]>This is not what I normally work on, but it looks fine to me.
Acked-by James Carter <[email protected]>
Merged.
Thanks,
Jim
Quoted 21 lines
Quoted 21 lines
--- libselinux/src/label_file.c | 3 +++ 1 file changed, 3 insertions(+)libselinux/src/label_file.c +3
-1@@ -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