diff --git a/etc/init/edm.cfg b/etc/init/edm.cfg index 539285ae119a51206c07b6751908a7f95b431637..bdd59ed6a2ea1a059b45794fc3e30d5e13e9a681 100644 --- a/etc/init/edm.cfg +++ b/etc/init/edm.cfg @@ -3,9 +3,9 @@ "name" : "boot", "cmds" : [ "start edm_sa", - "mkdir /data/edm 0770 edm edm", - "chown edm edm /data/edm", - "chmod 0770 /data/edm" + "mkdir /data/service/el1/public/edm 0770 edm edm", + "chown edm edm /data/service/el1/public/edm", + "chmod 0770 /data/service/el1/public/edm" ] } ], diff --git a/services/edm/include/policy_manager.h b/services/edm/include/policy_manager.h index dcd092bb94b66835649a5444eee421ff913d1bfe..c44f5275e9e3c35539c7ae4cf44d6e552c2a51a6 100644 --- a/services/edm/include/policy_manager.h +++ b/services/edm/include/policy_manager.h @@ -29,7 +29,7 @@ using PolicyItemsMap = std::unordered_map; /* Poli using AdminValueItemsMap = std::unordered_map; /* AdminName and PolicyValue pair */ /* - * This class is used to load and store /data/edm/device_policies.json file. + * This class is used to load and store /data/service/el1/public/edm/device_policies.json file. * provide the Get and Set api to operate on json file, the read and write json * file depend on jsoncpp library */ diff --git a/services/edm/src/admin_manager.cpp b/services/edm/src/admin_manager.cpp index 8eaa552efa38b64e6401fff72162701c18d722b5..e062bf0bca4586b33c0e1ccef2f21dcae03bd2e1 100644 --- a/services/edm/src/admin_manager.cpp +++ b/services/edm/src/admin_manager.cpp @@ -26,7 +26,7 @@ namespace OHOS { namespace EDM { const std::string EDM_ADMIN_DOT = "."; -const std::string EDM_ADMIN_BASE = "/data/edm/"; +const std::string EDM_ADMIN_BASE = "/data/service/el1/public/edm/"; const std::string EDM_ADMIN_JSON_FILE = "admin_policies_"; const std::string EDM_ADMIN_JSON_EXT = ".json"; constexpr int32_t DEFAULT_USER_ID = 100; diff --git a/services/edm/src/policy_manager.cpp b/services/edm/src/policy_manager.cpp index 196c7eb6a3d0ad0e29d7fd1345fdb2a54f5d2bfc..fe0b65453b6589227226167631f66574bf8f6a79 100644 --- a/services/edm/src/policy_manager.cpp +++ b/services/edm/src/policy_manager.cpp @@ -22,8 +22,8 @@ namespace OHOS { namespace EDM { -const std::string EDM_POLICY_JSON_FILE = "/data/edm/device_policies.json"; -const std::string EDM_POLICY_JSON_FILE_BAK = "/data/edm/device_policies.json.bak"; +const std::string EDM_POLICY_JSON_FILE = "/data/service/el1/public/edm/device_policies.json"; +const std::string EDM_POLICY_JSON_FILE_BAK = "/data/service/el1/public/edm/device_policies.json.bak"; constexpr unsigned int INVALID_INDEX = -1; std::shared_ptr PolicyManager::instance_; diff --git a/test/unittest/src/admin_manager_test.cpp b/test/unittest/src/admin_manager_test.cpp index d03c82f53abee90b4e264de773692ca22c79cf50..e5861a919b69db022592a577d5e4496202c6d12a 100644 --- a/test/unittest/src/admin_manager_test.cpp +++ b/test/unittest/src/admin_manager_test.cpp @@ -25,7 +25,7 @@ namespace EDM { namespace TEST { constexpr int32_t DEFAULT_USER_ID = 100; constexpr int HUGE_ADMIN_SIZE = 100; -const std::string TEAR_DOWN_CMD = "rm /data/edm/admin_policies.json"; +const std::string TEAR_DOWN_CMD = "rm /data/service/el1/public/edm/admin_policies.json"; void AdminManagerTest::SetUp() { diff --git a/test/unittest/src/policy_manager_test.cpp b/test/unittest/src/policy_manager_test.cpp index 15c8dbea84a66642139b668fc1e65bb4915dfef3..b6d214a0083e6698f29c790d5abce8ec8fd169b6 100644 --- a/test/unittest/src/policy_manager_test.cpp +++ b/test/unittest/src/policy_manager_test.cpp @@ -30,7 +30,7 @@ const std::string TEST_ADMIN_NAME1 = "com.edm.test.demo1"; const std::string TEST_BOOL_POLICY_NAME = "testBoolPolicy"; const std::string TEST_STRING_POLICY_NAME = "testStringPolicy"; constexpr int HUGE_POLICY_SIZE = 65537; -const std::string TEAR_DOWN_CMD = "rm /data/edm/device_policies.json"; +const std::string TEAR_DOWN_CMD = "rm /data/service/el1/public/edm/device_policies.json"; class PolicyManagerTest : public testing::Test { public: