增加权限管理调整头文件1

Signed-off-by: guduhanyan <xuyanjun27@163.com>
This commit is contained in:
liulinna
2022-03-22 11:32:17 +08:00
committed by guduhanyan
parent 4e28de175f
commit 89595d3024
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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)) {