From: Kelvin Zhang <zhangkelvin@google.com>
To: selinux@vger.kernel.org
Cc: Kelvin Zhang <zhangxp1998@gmail.com>
Subject: [PATCH] Improve error message for label file validation
Date: Mon, 16 Aug 2021 09:54:59 -0700 [thread overview]
Message-ID: <20210816165459.1741490-1-zhangkelvin@google.com> (raw)
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
next reply other threads:[~2021-08-16 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 16:54 Kelvin Zhang [this message]
2021-08-19 19:22 ` [PATCH] Improve error message for label file validation James Carter
2021-08-23 14:30 ` James Carter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210816165459.1741490-1-zhangkelvin@google.com \
--to=zhangkelvin@google.com \
--cc=selinux@vger.kernel.org \
--cc=zhangxp1998@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).