mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-24 03:59:41 +00:00
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:
parent
89ce96cac6
commit
f3a264c2e1
@ -282,7 +282,6 @@ int selinux_set_policy_root(const char *path)
|
||||
}
|
||||
policy_type++;
|
||||
|
||||
fini_selinuxmnt();
|
||||
fini_selinux_policyroot();
|
||||
|
||||
selinux_policyroot = strdup(path);
|
||||
|
Loading…
Reference in New Issue
Block a user