mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-24 08:39:46 +00:00
Fix: l1_linux watchdog_service和ueventd降权
Signed-off-by: cheng_jinsong <chengjinsong2@huawei.com>
This commit is contained in:
parent
43c3f7ad0b
commit
2dba360e78
@ -3,3 +3,5 @@ bin:x:2:
|
||||
system:x:1000:
|
||||
servicectrl:x:1050:root,shell,system,samgr,hdf_devmgr
|
||||
shell:x:2000:
|
||||
watchdog:x:2001:root
|
||||
ueventd:x:2002:root
|
||||
|
@ -2,3 +2,5 @@ root:x:0:0:::/bin/false
|
||||
bin:x:2:2:::/bin/false
|
||||
system:x:1000:1000:::/bin/false
|
||||
shell:x:2000:2000:::/bin/false
|
||||
watchdog:x:2001:2001:::/bin/false
|
||||
ueventd:x:2002:2002:::/bin/false
|
||||
|
@ -629,12 +629,12 @@ static void CheckService(const cJSON* curItem)
|
||||
}
|
||||
|
||||
cJSON *filedJ = cJSON_GetObjectItem(curItem, "uid");
|
||||
EXPECT_TRUE(cJSON_IsNumber(filedJ));
|
||||
EXPECT_TRUE(cJSON_GetNumberValue(filedJ) >= 0.0);
|
||||
EXPECT_TRUE(cJSON_IsNumber(filedJ) || cJSON_IsString(filedJ));
|
||||
EXPECT_TRUE(cJSON_GetNumberValue(filedJ) >= 0.0 || cJSON_GetStringValue(filedJ));
|
||||
|
||||
filedJ = cJSON_GetObjectItem(curItem, "gid");
|
||||
EXPECT_TRUE(cJSON_IsNumber(filedJ));
|
||||
EXPECT_TRUE(cJSON_GetNumberValue(filedJ) >= 0.0);
|
||||
EXPECT_TRUE(cJSON_IsNumber(filedJ) || cJSON_IsArray(filedJ));
|
||||
EXPECT_TRUE(cJSON_GetNumberValue(filedJ) >= 0.0 || cJSON_GetArraySize(filedJ) >= 0);
|
||||
|
||||
filedJ = cJSON_GetObjectItem(curItem, "once");
|
||||
EXPECT_TRUE(cJSON_IsNumber(filedJ));
|
||||
@ -648,8 +648,8 @@ static void CheckService(const cJSON* curItem)
|
||||
EXPECT_TRUE(capsCnt <= MAX_CAPS_CNT_FOR_ONE_SERVICE);
|
||||
for (int i = 0; i < capsCnt; ++i) {
|
||||
cJSON *capJ = cJSON_GetArrayItem(filedJ, i);
|
||||
EXPECT_TRUE(cJSON_IsNumber(capJ));
|
||||
EXPECT_TRUE(cJSON_GetNumberValue(capJ) >= 0.0);
|
||||
EXPECT_TRUE(cJSON_IsNumber(capJ) || cJSON_GetStringValue(capJ));
|
||||
EXPECT_TRUE(cJSON_GetNumberValue(capJ) >= 0.0 || cJSON_GetStringValue(capJ));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
@ -15,3 +15,4 @@
|
||||
# <device name> <mode> <uid> <gid>
|
||||
/dev/binder 0666 0 0
|
||||
/dev/mmz_userdev 0666 0 0
|
||||
/dev/watchdog 0660 watchdog watchdog
|
||||
|
Loading…
Reference in New Issue
Block a user