diff --git a/services/etc_lite/group b/services/etc_lite/group index 21443c612..42eb93b4b 100755 --- a/services/etc_lite/group +++ b/services/etc_lite/group @@ -2,4 +2,6 @@ root:x:0: bin:x:2: system:x:1000: servicectrl:x:1050:root,shell,system,samgr,hdf_devmgr -shell:x:2000: \ No newline at end of file +shell:x:2000: +watchdog:x:2001:root +ueventd:x:2002:root diff --git a/services/etc_lite/passwd b/services/etc_lite/passwd index 0605711f7..9254d6e79 100755 --- a/services/etc_lite/passwd +++ b/services/etc_lite/passwd @@ -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 diff --git a/test/unittest/lite/cmd_func_test.cpp b/test/unittest/lite/cmd_func_test.cpp index a1f55fa49..af65ac168 100644 --- a/test/unittest/lite/cmd_func_test.cpp +++ b/test/unittest/lite/cmd_func_test.cpp @@ -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)); } } diff --git a/ueventd/etc/ueventd_l1.config b/ueventd/etc/ueventd_l1.config index 4081506d0..6576bb601 100755 --- a/ueventd/etc/ueventd_l1.config +++ b/ueventd/etc/ueventd_l1.config @@ -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 @@ # /dev/binder 0666 0 0 /dev/mmz_userdev 0666 0 0 +/dev/watchdog 0660 watchdog watchdog