mirror of
https://github.com/openharmony/miscservices_time.git
synced 2026-07-20 04:13:40 -04:00
@@ -4,7 +4,7 @@
|
||||
"path" : ["/system/bin/sa_main", "/system/profile/time_service.xml"],
|
||||
"uid" : "system",
|
||||
"gid" : ["system", "shell"],
|
||||
"caps" : ["SYS_TIME", "WAKE_ALARM"]
|
||||
"caps" : ["CAP_SYS_TIME", "WAKE_ALARM"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -204,8 +204,8 @@ napi_value ParseParametersBySetTimezone(const napi_env &env, const napi_value (&
|
||||
char timeZoneChars[MAX_TIME_ZONE_ID];
|
||||
size_t copied;
|
||||
napi_get_value_string_utf8(env, argv[0], timeZoneChars, MAX_TIME_ZONE_ID - 1, &copied);
|
||||
NAPI_ASSERT(env, copied == 0, "Wrong argument timezone. timezoneid length >0 expected.");
|
||||
timezoneId.assign(timeZoneChars, copied);
|
||||
|
||||
timezoneId = std::string(timeZoneChars);
|
||||
|
||||
// argv[1]:callback
|
||||
if (argc >= SET_TIMEZONE_MAX_PARA) {
|
||||
|
||||
@@ -38,7 +38,7 @@ bool TimePermission::CheckSelfPermission(std::string permName)
|
||||
bool TimePermission::CheckCallingPermission(int32_t uid, std::string permName)
|
||||
{
|
||||
if ((uid == SYSTEM_UID) || (uid == TEST_UID)) {
|
||||
TIME_HILOGD(TIME_MODULE_COMMON, "root uid return true");
|
||||
TIME_HILOGD(TIME_MODULE_COMMON, "system uid return true");
|
||||
return true;
|
||||
}
|
||||
if (IsSystemUid(uid)) {
|
||||
|
||||
Reference in New Issue
Block a user