From dbbd0ab9038349e6f085f575fc0fdfd4791710b3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Mar 2010 18:40:40 -0400 Subject: [PATCH] Show strerror for security_getenforce(). Patch by Colin Waters. Acked-by: Stephen Smalley --- libselinux/src/avc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c index 5c8def05..e9e35296 100644 --- a/libselinux/src/avc.c +++ b/libselinux/src/avc.c @@ -215,8 +215,9 @@ int avc_init(const char *prefix, rc = security_getenforce(); if (rc < 0) { avc_log(SELINUX_ERROR, - "%s: could not determine enforcing mode\n", - avc_prefix); + "%s: could not determine enforcing mode: %s\n", + avc_prefix, + strerror(errno)); goto out; } avc_enforcing = rc;