diff options
Diffstat (limited to 'plugins/selinux.c')
-rw-r--r-- | plugins/selinux.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/selinux.c b/plugins/selinux.c index 25e34783a..32c3b7529 100644 --- a/plugins/selinux.c +++ b/plugins/selinux.c @@ -161,13 +161,13 @@ static rpmRC selinux_fsm_file_prepare(rpmPlugin plugin, rpmfi fi, if (selabel_lookup_raw(sehandle, &scon, dest, file_mode) == 0) { int conrc = lsetfilecon(path, scon); - if (rpmIsDebug()) { - rpmlog(RPMLOG_DEBUG, "lsetfilecon: (%s, %s) %s\n", - path, scon, (rc < 0 ? strerror(errno) : "")); - } - if (conrc == 0 || (conrc < 0 && errno == EOPNOTSUPP)) rc = RPMRC_OK; + + rpmlog((rc != RPMRC_OK) ? RPMLOG_ERR : RPMLOG_DEBUG, + "lsetfilecon: (%s, %s) %s\n", + path, scon, (conrc < 0 ? strerror(errno) : "")); + freecon(scon); } else { /* No context for dest is not our headache */ |