From 839b31878536dc35126393b939736bedad491333 Mon Sep 17 00:00:00 2001 From: weishu Date: Sat, 1 Jul 2023 19:01:09 +0800 Subject: [PATCH] ksud: don't create dir when read --- userspace/ksud/src/profile.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/userspace/ksud/src/profile.rs b/userspace/ksud/src/profile.rs index 4e056297..7973d38f 100644 --- a/userspace/ksud/src/profile.rs +++ b/userspace/ksud/src/profile.rs @@ -12,7 +12,6 @@ pub fn set_sepolicy(pkg: String, policy: String) -> Result<()> { } pub fn get_sepolicy(pkg: String) -> Result<()> { - ensure_dir_exists(defs::PROFILE_SELINUX_DIR)?; let policy_file = Path::new(defs::PROFILE_SELINUX_DIR).join(pkg); let policy = std::fs::read_to_string(policy_file)?; println!("{policy}"); @@ -27,7 +26,6 @@ pub fn set_template(name: String, template: String) -> Result<()> { } pub fn get_template(name: String) -> Result<()> { - ensure_dir_exists(defs::PROFILE_TEMPLATE_DIR)?; let template_file = Path::new(defs::PROFILE_TEMPLATE_DIR).join(name); let template = std::fs::read_to_string(template_file)?; println!("{template}");