From f21b2e138ca576de280716e9fed5ac75efd0acf4 Mon Sep 17 00:00:00 2001 From: Steve Lawrence Date: Tue, 2 Dec 2014 13:43:46 -0500 Subject: [PATCH] libsemanage: ensure migrated files have the correct types All files in /var/lib/selinux/ are now labeled the same as those in /etc/selinux//modules/active, which in refpolicy is semanage_store_t. Signed-off-by: Steve Lawrence Reviewed-by: Yuli Khodorkovskiy --- libsemanage/utils/semanage_migrate_store | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsemanage/utils/semanage_migrate_store b/libsemanage/utils/semanage_migrate_store index 0371e49b..03b492e0 100755 --- a/libsemanage/utils/semanage_migrate_store +++ b/libsemanage/utils/semanage_migrate_store @@ -138,8 +138,8 @@ def migrate_store(store): print("Migrating from %s to %s" % (oldstore, newstore)) # Build up new directory structure - create_dir_from(selinux.selinux_policy_root(), "%s/%s" % (newroot_path(), store), 0o755) - create_dir_from(oldmodules, newstore, 0o700) + create_dir_from(oldstore, "%s/%s" % (newroot_path(), store), 0o755) + create_dir_from(oldstore, newstore, 0o700) create_dir_from(oldstore, newmodules, 0o700) create_dir_from(oldstore, bottomdir, 0o700) create_dir_from(oldstore, disabledmodules, 0o700)