/base/startup/init/services/init/ |
D | init_capability.c | 102 if (service->servPerm.caps != NULL) { in GetServiceCaps() 103 free(service->servPerm.caps); in GetServiceCaps() 104 service->servPerm.caps = NULL; in GetServiceCaps() 106 service->servPerm.caps = (unsigned int *)calloc(1, sizeof(unsigned int) * capsCnt); in GetServiceCaps() 107 INIT_ERROR_CHECK(service->servPerm.caps != NULL, return SERVICE_FAILURE, in GetServiceCaps() 109 unsigned int caps = FULL_CAP; in GetServiceCaps() local 114 caps = (unsigned int)cJSON_GetNumberValue(capJson); in GetServiceCaps() 121 caps = GetCapByString(capStr); in GetServiceCaps() 123 if ((caps > CAP_LAST_CAP) && (caps != (unsigned int)FULL_CAP)) { in GetServiceCaps() 124 INIT_LOGE("service=%s not support caps = %s caps %d", service->name, capStr, caps); in GetServiceCaps() [all …]
|
D | init_common_service.c | 153 if (service->servPerm.caps[i] == FULL_CAP) { in SetPerms() 161 …capData[CAP_TO_INDEX(service->servPerm.caps[i])].effective |= CAP_TO_MASK(service->servPerm.caps[i… in SetPerms() 162 …capData[CAP_TO_INDEX(service->servPerm.caps[i])].permitted |= CAP_TO_MASK(service->servPerm.caps[i… in SetPerms() 163 …capData[CAP_TO_INDEX(service->servPerm.caps[i])].inheritable |= CAP_TO_MASK(service->servPerm.caps… in SetPerms() 169 if (service->servPerm.caps[i] == FULL_CAP) { in SetPerms() 172 … INIT_ERROR_CHECK(SetAmbientCapability(service->servPerm.caps[i]) == 0, return SERVICE_FAILURE, in SetPerms()
|
/base/startup/appspawn_lite/services/src/ |
D | appspawn_process.c | 47 static int SetCapability(unsigned int capsCnt, const unsigned int* caps) in SetCapability() argument 56 capData[CAP_TO_INDEX(caps[i])].effective |= CAP_TO_MASK(caps[i]); in SetCapability() 57 capData[CAP_TO_INDEX(caps[i])].permitted |= CAP_TO_MASK(caps[i]); in SetCapability() 58 capData[CAP_TO_INDEX(caps[i])].inheritable |= CAP_TO_MASK(caps[i]); in SetCapability() 66 if (SetAmbientCapability(caps[i]) != 0) { in SetCapability() 74 static int SetPerms(uid_t uID, gid_t gID, unsigned int capsCnt, const unsigned int* caps) in SetPerms() argument 126 if (SetCapability(capsCnt, caps) != 0) { in SetPerms() 153 if (SetPerms(msgSt->uID, msgSt->gID, msgSt->capsCnt, msgSt->caps) != 0) { in CreateProcess()
|
D | appspawn_message.c | 51 if (targetSt->caps != NULL) { in FreeMessageSt() 52 free(targetSt->caps); in FreeMessageSt() 53 targetSt->caps = NULL; in FreeMessageSt() 106 msgSt->caps = NULL; in GetCaps() 125 msgSt->caps = (unsigned int*)malloc(sizeof(unsigned int) * capsCnt); in GetCaps() 126 if (msgSt->caps == NULL) { in GetCaps() 135 free(msgSt->caps); in GetCaps() 136 msgSt->caps = NULL; in GetCaps() 139 msgSt->caps[i] = (unsigned int)cJSON_GetNumberValue(capJ); in GetCaps() 140 if (msgSt->caps[i] > CAP_LAST_CAP) { in GetCaps() [all …]
|
/base/startup/appspawn/lite/ |
D | appspawn_message.c | 52 if (targetSt->caps != NULL) { in FreeMessageSt() 53 free(targetSt->caps); in FreeMessageSt() 54 targetSt->caps = NULL; in FreeMessageSt() 107 msgSt->caps = NULL; in GetCaps() 126 msgSt->caps = (unsigned int *)malloc(sizeof(unsigned int) * capsCnt); in GetCaps() 127 if (msgSt->caps == NULL) { in GetCaps() 136 free(msgSt->caps); in GetCaps() 137 msgSt->caps = NULL; in GetCaps() 140 msgSt->caps[i] = (unsigned int)cJSON_GetNumberValue(capJ); in GetCaps() 141 if (msgSt->caps[i] > CAP_LAST_CAP) { in GetCaps() [all …]
|
D | appspawn_process.c | 56 static int SetCapability(unsigned int capsCnt, const unsigned int *caps) in SetCapability() argument 65 capData[CAP_TO_INDEX(caps[i])].effective |= CAP_TO_MASK(caps[i]); in SetCapability() 66 capData[CAP_TO_INDEX(caps[i])].permitted |= CAP_TO_MASK(caps[i]); in SetCapability() 67 capData[CAP_TO_INDEX(caps[i])].inheritable |= CAP_TO_MASK(caps[i]); in SetCapability() 75 if (SetAmbientCapability(caps[i]) != 0) { in SetCapability() 155 if (SetCapability(appProperty->message.capsCnt, appProperty->message.caps) != 0) { in SetCapabilities()
|
D | appspawn_message.h | 34 unsigned int *caps; member
|
/base/startup/appspawn_lite/services/test/unittest/common/ |
D | message_func_test.cpp | 148 EXPECT_EQ(msgSt.caps, nullptr); 187 msgSt.caps = (unsigned int*)malloc(MALLOC_TEST_LENGTH * sizeof(unsigned int)); 188 EXPECT_TRUE(msgSt.caps != nullptr); 190 EXPECT_EQ(msgSt.caps, nullptr); 195 msgSt.caps = (unsigned int*)malloc(MALLOC_TEST_LENGTH * sizeof(unsigned int)); 198 EXPECT_TRUE(msgSt.caps != nullptr); 207 EXPECT_EQ(msgSt.caps, nullptr); 295 std::vector<unsigned int> caps; variable 296 caps.push_back(0); // 0, test capability 297 caps.push_back(1); // 1, test capability [all …]
|
/base/startup/appspawn/test/unittest/app_spawn_lite_test/ |
D | app_spawn_lite_test.cpp | 202 EXPECT_EQ(msgSt.caps, nullptr); 241 msgSt.caps = (unsigned int*)malloc(MALLOC_TEST_LENGTH * sizeof(unsigned int)); 242 EXPECT_TRUE(msgSt.caps != nullptr); 244 EXPECT_EQ(msgSt.caps, nullptr); 249 msgSt.caps = (unsigned int*)malloc(MALLOC_TEST_LENGTH * sizeof(unsigned int)); 252 EXPECT_TRUE(msgSt.caps != nullptr); 261 EXPECT_EQ(msgSt.caps, nullptr); 349 std::vector<unsigned int> caps; variable 350 caps.push_back(0); // 0, test capability 351 caps.push_back(1); // 1, test capability [all …]
|
/base/startup/init/test/unittest/init/ |
D | service_unittest.cpp | 229 service->servPerm.caps = (unsigned int *)malloc(sizeof(unsigned int)); 230 ASSERT_NE(nullptr, service->servPerm.caps); 346 unsigned int *caps = (unsigned int *)calloc(1, sizeof(unsigned int) * 1); variable 347 ASSERT_NE(nullptr, caps); 348 caps[0] = FULL_CAP; 349 service->servPerm.caps = caps;
|
/base/startup/appspawn_lite/services/include/ |
D | appspawn_message.h | 29 unsigned int* caps; member
|
/base/inputmethod/imf/etc/init/ |
D | inputmethodservice.cfg | 15 "caps" : [],
|
/base/startup/init/services/etc/ |
D | ueventd.cfg | 22 "caps" : ["DAC_OVERRIDE", "MKNOD", "CHOWN", "FOWNER"],
|
/base/hiviewdfx/hidumper/services/native/etc/ |
D | hidumper_service.cfg | 20 "caps" : ["CAP_DAC_READ_SEARCH", "CAP_SYS_PTRACE"],
|
/base/time/time_service/services/etc/init/ |
D | timeservice.cfg | 16 "caps" : ["SYS_TIME", "WAKE_ALARM"],
|
/base/security/permission_lite/services/pms/include/ |
D | pms.h | 35 int QueryAppCapabilities(const char *identifier, unsigned int **caps, unsigned int *capNum);
|
/base/hiviewdfx/faultloggerd/services/config/ |
D | faultloggerd.cfg | 35 "caps" : ["CAP_KILL"],
|
/base/hiviewdfx/faultloggerd/test/funchook/config/ |
D | faultloggerd.cfg | 40 "caps" : ["CAP_KILL"],
|
/base/hiviewdfx/faultloggerd/services/config/bionic/ |
D | faultloggerd.cfg | 40 "caps" : ["CAP_KILL"],
|
/base/update/updater/services/etc/ |
D | init.cfg | 72 "caps" : [0, 1] 80 "caps" : [0, 1],
|
/base/hiviewdfx/faultloggerd/test/funchook/config/bionic/ |
D | faultloggerd.cfg | 40 "caps" : ["CAP_KILL"],
|
/base/hiviewdfx/hiview/service/config/ |
D | hiview.cfg | 47 "caps" : ["SYSLOG"],
|
/base/security/permission_lite/services/pms/src/ |
D | pms_impl.c | 329 int QueryAppCapabilities(const char *identifier, unsigned int **caps, unsigned int *capNum) in QueryAppCapabilities() argument 331 if (caps == NULL || capNum == NULL) { in QueryAppCapabilities() 370 *caps = (unsigned int *)HalMalloc(allocSize); in QueryAppCapabilities() 371 if (*caps == NULL) { in QueryAppCapabilities() 376 *(*caps + k) = capsBinded[k]; in QueryAppCapabilities()
|
/base/startup/init/services/init/include/ |
D | init_service.h | 111 unsigned int *caps; member
|
/base/startup/init/services/init/standard/ |
D | init_control_fd_service.c | 112 printf("\t\tservice perms capability %u \n", service->servPerm.caps[i]); in DumpOneService()
|