Home
last modified time | relevance | path

Searched refs:gids (Results 1 – 5 of 5) sorted by relevance

/system/core/libpackagelistparser/
Dpackagelistparser.c40 static size_t get_gid_cnt(const char *gids) in get_gid_cnt() argument
44 if (*gids == '\0') { in get_gid_cnt()
48 if (!strcmp(gids, "none")) { in get_gid_cnt()
52 for (cnt = 1; gids[cnt]; gids[cnt] == ',' ? cnt++ : *gids++) in get_gid_cnt()
58 static bool parse_gids(char *gids, gid_t *gid_list, size_t *cnt) in parse_gids() argument
65 while ((token = strsep(&gids, ",\r\n"))) { in parse_gids()
211 pkg_info->gids.cnt = get_gid_cnt(cur); in packagelist_parse()
212 if (pkg_info->gids.cnt > 0) { in packagelist_parse()
214 pkg_info->gids.gids = calloc(pkg_info->gids.cnt, sizeof(gid_t)); in packagelist_parse()
215 if (!pkg_info->gids.gids) { in packagelist_parse()
[all …]
/system/extras/su/
Dsu.cpp44 void extract_uidgids(const char* uidgids, uid_t* uid, gid_t* gid, gid_t* gids, int* gids_count) { in extract_uidgids() argument
71 pwtoid(tok, NULL, gids); in extract_uidgids()
73 gids++; in extract_uidgids()
106 gid_t gids[10]; in main() local
107 int gids_count = sizeof(gids)/sizeof(gids[0]); in main()
108 extract_uidgids(*argv, &uid, &gid, gids, &gids_count); in main()
110 if (setgroups(gids_count, gids)) { in main()
/system/extras/simpleperf/simpleperf_app_runner/
Dsimpleperf_app_runner.cpp82 std::vector<gid_t> gids; in GetSupplementaryGids() local
83 int size = getgroups(0, &gids[0]); in GetSupplementaryGids()
87 gids.resize(size); in GetSupplementaryGids()
88 size = getgroups(size, &gids[0]); in GetSupplementaryGids()
89 if (size != static_cast<int>(gids.size())) { in GetSupplementaryGids()
96 gids.push_back(shared_app_gid); in GetSupplementaryGids()
97 return gids; in GetSupplementaryGids()
/system/core/run-as/
Drun-as.cpp146 std::vector<gid_t> gids; in get_supplementary_gids() local
147 int size = getgroups(0, &gids[0]); in get_supplementary_gids()
151 gids.resize(size); in get_supplementary_gids()
152 size = getgroups(size, &gids[0]); in get_supplementary_gids()
153 if (size != static_cast<int>(gids.size())) { in get_supplementary_gids()
160 gids.push_back(shared_app_gid); in get_supplementary_gids()
161 return gids; in get_supplementary_gids()
/system/core/libpackagelistparser/include/packagelistparser/
Dpackagelistparser.h45 gid_t *gids; member
54 gid_list gids; member