diff --git a/plugins/selinux.c b/plugins/selinux.c index ea6853b69..27518159f 100644 --- a/plugins/selinux.c +++ b/plugins/selinux.c @@ -134,9 +134,6 @@ exit: freecon(fcon); freecon(mycon); - /* If selinux is not enforcing, we don't care either */ - if (rc && security_getenforce() < 1) - rc = RPMRC_OK; #else if (sehandle == NULL) return RPMRC_OK; @@ -149,6 +146,9 @@ exit: path, (xx < 0 ? strerror(errno) : "")); } #endif + /* If selinux is not enforcing, we don't care either */ + if (rc && security_getenforce() < 1) + rc = RPMRC_OK; return rc; }