Permit scriptlet exec context setting to fail in non-enforcing modes

for new code path, too.

See also 9c082fb868
This commit is contained in:
Florian Festi 2015-10-12 12:47:45 +02:00
parent 73ea59e0d5
commit 0d214a17e4
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}