config: Don't finalize mount state in selinux_set_policy_root()

This breaks every further call to e.g. `is_selinux_enabled()` after a policy
root has been set.  This tripped up some code landed in libostree:
https://github.com/ostreedev/ostree/pull/797
Since in some cases we initialize a policy twice in process, and we'd
call `is_selinux_enabled()` each time.

More info in: http://marc.info/?l=selinux&m=149323809332417&w=2

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
Colin Walters 2017-04-26 16:26:21 -04:00 committed by Stephen Smalley
parent 89ce96cac6
commit f3a264c2e1

View File

@ -282,7 +282,6 @@ int selinux_set_policy_root(const char *path)
}
policy_type++;
fini_selinuxmnt();
fini_selinux_policyroot();
selinux_policyroot = strdup(path);