!165 时间服务,权限修改

Merge pull request !165 from zhangjunxi/master
This commit is contained in:
openharmony_ci
2022-06-13 03:06:28 +00:00
committed by Gitee
2 changed files with 12 additions and 3 deletions
+11 -2
View File
@@ -1,9 +1,18 @@
{
"jobs" : [{
"name" : "boot",
"cmds" : [
"mkdir /data/service/el1/public/time 0770 time time",
"syncexec /system/bin/chown -R time:time /data/service/el1/public/time",
"start time_service"
]
}
],
"services" : [{
"name" : "time_service",
"path" : ["/system/bin/sa_main", "/system/profile/time_service.xml"],
"uid" : "system",
"gid" : ["system", "time", "shell"],
"uid" : "time",
"gid" : ["time", "shell"],
"caps" : ["SYS_TIME", "WAKE_ALARM"],
"secon" : "u:r:time_service:s0"
}
@@ -40,7 +40,7 @@ namespace MiscServices {
namespace {
constexpr uint64_t NANO_TO_MILLISECOND = 1000000;
constexpr uint64_t DAY_TO_MILLISECOND = 86400000;
const std::string AUTOTIME_FILE_PATH = "/data/misc/zoneinfo/autotime.json";
const std::string AUTOTIME_FILE_PATH = "/data/service/el1/public/time/autotime.json";
const std::string NETWORK_TIME_STATUS_ON = "ON";
const std::string NETWORK_TIME_STATUS_OFF = "OFF";
const std::string NTP_CN_SERVER = "ntp.aliyun.com";