From bc9e401fb4c0b9684968ee9cdbabdf2c925bc39e Mon Sep 17 00:00:00 2001 From: yeyuning Date: Fri, 14 Jun 2024 17:18:02 +0800 Subject: [PATCH] allow app/el1 restorecon Signed-off-by: yeyuning Change-Id: I664a05527f274c1e7f85eda62fdf1bab5156d23c --- libselinux/src/selinux_restorecon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c index dda6fb3a..1cc59dd4 100644 --- a/libselinux/src/selinux_restorecon.c +++ b/libselinux/src/selinux_restorecon.c @@ -628,7 +628,6 @@ out: return rc; } -#define DATA_APP_EL1 "/data/app/el1/" #define DATA_APP_EL2 "/data/app/el2/" #define DATA_APP_EL3 "/data/app/el3/" #define DATA_APP_EL4 "/data/app/el4/" @@ -643,8 +642,7 @@ static int restorecon_sb(const char *pathname, const struct stat *sb, int rc; const char *lookup_path = pathname; - if (!strncmp(pathname, DATA_APP_EL1, sizeof(DATA_APP_EL1) - 1) || - !strncmp(pathname, DATA_APP_EL2, sizeof(DATA_APP_EL2) - 1) || + if (!strncmp(pathname, DATA_APP_EL2, sizeof(DATA_APP_EL2) - 1) || !strncmp(pathname, DATA_APP_EL3, sizeof(DATA_APP_EL3) - 1) || !strncmp(pathname, DATA_APP_EL4, sizeof(DATA_APP_EL4) - 1) || !strncmp(pathname, DATA_ACCOUNTS_ACCOUNT_0, sizeof(DATA_ACCOUNTS_ACCOUNT_0) - 1)) { -- Gitee