From 15e26efd16916acf767fd079eb2e3dfd834e919b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 26 Apr 2017 16:26:21 -0400 Subject: [PATCH] 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 --- libselinux/src/selinux_config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c index d8e140c83..292728f3b 100644 --- a/libselinux/src/selinux_config.c +++ b/libselinux/src/selinux_config.c @@ -282,7 +282,6 @@ int selinux_set_policy_root(const char *path) } policy_type++; - fini_selinuxmnt(); fini_selinux_policyroot(); selinux_policyroot = strdup(path);