diff --git a/services/common/database/BUILD.gn b/services/common/database/BUILD.gn index a30e43a00d3a94edfde8cc765e266e5c1621222d..c3f12420d5f60041f847626861045c0440587a8f 100644 --- a/services/common/database/BUILD.gn +++ b/services/common/database/BUILD.gn @@ -36,7 +36,6 @@ ohos_shared_library("accesstoken_database_cxx") { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] if (build_selinux) { - external_deps += [ "selinux:librestorecon" ] cflags_cc += [ "-DWITH_SELINUX" ] } } diff --git a/services/common/database/src/sqlite_helper.cpp b/services/common/database/src/sqlite_helper.cpp index b3f36752c06de427833851b96200983333501360..478739069c2cd820dfde5c96d91fdac504bddb46 100644 --- a/services/common/database/src/sqlite_helper.cpp +++ b/services/common/database/src/sqlite_helper.cpp @@ -16,9 +16,6 @@ #include "sqlite_helper.h" #include "accesstoken_log.h" -#ifdef WITH_SELINUX -#include -#endif // WITH_SELINUX namespace OHOS { namespace Security { @@ -49,10 +46,6 @@ void SqliteHelper::Open() return; } -#ifdef WITH_SELINUX - Restorecon(fileName.c_str()); -#endif // WITH_SELINUX - int32_t version = GetVersion(); if (version == currentVersion_) { return;