diff mbox

libselinux: kill logging check for selinux_enabled()

Message ID 1474658650-10685-1-git-send-email-william.c.roberts@intel.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Roberts, William C Sept. 23, 2016, 7:24 p.m. UTC
From: William Roberts <william.c.roberts@intel.com>

Drop the check for selinux_enabled() on logging. The
caller can silence the logs by setting the logging
callback and discarding the messages.

Change-Id: Ia6769ef7ad8cc2144ad2bb73e5bf7c76ebfe487b
Signed-off-by: William Roberts <william.c.roberts@intel.com>
---
 libselinux/src/callbacks.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/libselinux/src/callbacks.c b/libselinux/src/callbacks.c
index cdf7b63..c3cf98b 100644
--- a/libselinux/src/callbacks.c
+++ b/libselinux/src/callbacks.c
@@ -16,7 +16,6 @@  default_selinux_log(int type __attribute__((unused)), const char *fmt, ...)
 {
 	int rc;
 	va_list ap;
-	if (is_selinux_enabled() == 0) return 0;
 	va_start(ap, fmt);
 	rc = vfprintf(stderr, fmt, ap);
 	va_end(ap);