/system/core/libcutils/include/private/ |
H A D | fs_config.h | 47 uint16_t gid; member in struct:fs_path_config_from_file 55 unsigned gid; member in struct:fs_path_config 74 void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid,
|
/system/core/init/ |
H A D | service_test.cpp | 47 EXPECT_EQ(0U, service_in_old_memory->gid()); 67 EXPECT_EQ(0U, service_in_old_memory2->gid()); 96 args.push_back("root"); // gid. 98 args.push_back("root"); // Supplementary gid. 105 static void Test_make_temporary_oneshot_service(bool dash_dash, bool seclabel, bool uid, bool gid, argument 113 if (gid) { 114 args.push_back("shell"); // gid 116 args.push_back("system"); // supplementary gid 0 117 args.push_back("adb"); // supplementary gid 1 142 if (gid) { [all...] |
H A D | descriptors.h | 31 gid_t gid, int perm, const std::string& context); 44 gid_t gid() const { return gid_; } function in class:android::init::DescriptorInfo 65 gid_t gid, int perm, const std::string& context); 75 gid_t gid, int perm, const std::string& context);
|
H A D | descriptors.cpp | 37 gid_t gid, int perm, const std::string& context) 38 : name_(name), type_(type), uid_(uid), gid_(gid), perm_(perm), context_(context) { 74 gid_t gid, int perm, const std::string& context) 75 : DescriptorInfo(name, type, uid, gid, perm, context) { 88 return CreateSocket(name().c_str(), flags, passcred, perm(), uid(), gid(), context.c_str()); 96 gid_t gid, int perm, const std::string& context) 98 : DescriptorInfo(name, type, uid, gid, perm, context) { 36 DescriptorInfo(const std::string& name, const std::string& type, uid_t uid, gid_t gid, int perm, const std::string& context) argument 73 SocketInfo(const std::string& name, const std::string& type, uid_t uid, gid_t gid, int perm, const std::string& context) argument 95 FileInfo(const std::string& name, const std::string& type, uid_t uid, gid_t gid, int perm, const std::string& context) argument
|
H A D | devices.h | 38 Permissions(const std::string& name, mode_t perm, uid_t uid, gid_t gid); 44 gid_t gid() const { return gid_; } function in class:android::init::Permissions 61 gid_t gid) 62 : Permissions(name, perm, uid, gid), attribute_(attribute) {} 60 SysfsPermissions(const std::string& name, const std::string& attribute, mode_t perm, uid_t uid, gid_t gid) argument
|
H A D | ueventd_parser.cpp | 45 // args is now common to both sys and dev entries and contains: <perm> <uid> <gid> 63 return Error() << "invalid gid '" << gid_string << "'"; 65 gid_t gid = grp->gr_gid; local 68 out_sysfs_permissions->emplace_back(name, sysfs_attribute, perm, uid, gid); 70 out_dev_permissions->emplace_back(name, perm, uid, gid);
|
H A D | ueventd_test.cpp | 78 gid_t gid = 0; local 80 std::generate_n(std::back_inserter(files_and_gids), 100, [&gid, &dir]() { 81 gid++; 82 return std::pair(dir.path + "/gid_"s + std::to_string(gid), gid); 85 WriteFromMultipleThreads(files_and_gids, [](gid_t gid) { EXPECT_EQ(0, setegid(gid)); });
|
H A D | devices.cpp | 105 Permissions::Permissions(const std::string& name, mode_t perm, uid_t uid, gid_t gid) argument 106 : name_(name), perm_(perm), uid_(uid), gid_(gid), prefix_(false), wildcard_(false) { 147 LOG(VERBOSE) << "fixup " << attribute_file << " " << uid() << " " << gid() << " " << std::oct 151 if (chown(attribute_file.c_str(), uid(), gid()) != 0) { 152 PLOG(ERROR) << "chown(" << attribute_file << ", " << uid() << ", " << gid() 216 return {it->perm(), it->uid(), it->gid()}; 225 auto[mode, uid, gid] = GetDevicePermissions(path, links); 238 /* Temporarily change egid to avoid race condition setting the gid of the 241 * racy. Fixing the gid race at least fixed the issue with system_server 242 * opening dynamic input devices under the AID_INPUT gid [all...] |
/system/extras/su/ |
H A D | su.cpp | 29 void pwtoid(const char* tok, uid_t* uid, gid_t* gid) { argument 33 if (gid) *gid = pw->pw_gid; 38 if (errno != 0 || end == tok) error(1, errno, "invalid uid/gid '%s'", tok); 40 if (gid) *gid = tmpid; 44 void extract_uidgids(const char* uidgids, uid_t* uid, gid_t* gid, gid_t* gids, int* gids_count) { argument 51 *gid = *uid = 0; 60 pwtoid(tok, uid, gid); 63 /* gid i 102 gid_t gid = 0; local [all...] |
/system/core/libpackagelistparser/ |
H A D | packagelistparser.c | 60 gid_t gid; local 71 gid = strtoul(token, &endptr, 10); 80 if (gid > GID_MAX) { 81 CLOGE("A gid in field \"gid list\" greater than GID_MAX"); 85 gid_list[cmp++] = gid; 201 errmsg = "Could not get next token for field \"gid(s)\""; 206 * Parse the gid list, could be in the form of none, single gid or list: 208 * gid [all...] |
/system/core/libprocinfo/include/procinfo/ |
H A D | process.h | 55 uid_t gid; member in struct:android::procinfo::ProcessInfo
|
/system/core/logd/ |
H A D | LogCommand.cpp | 60 bool clientHasLogCredentials(uid_t uid, gid_t gid, pid_t pid) { argument 65 if ((gid == AID_ROOT) || (gid == AID_SYSTEM) || (gid == AID_LOG)) { 130 if ((gid == g[0]) && (gid == g[1]) && (gid == g[2]) && 131 (gid == g[3])) {
|
/system/core/run-as/ |
H A D | run-as.cpp | 78 // Must be owned by specific uid/gid. 193 uid_t gid = userAppId; local 196 minijail_change_gid(j.get(), gid);
|
/system/extras/runconuid/ |
H A D | runconuid.cpp | 47 static gid_t gid = -1; variable 75 if (gid != (gid_t) -1 && setresgid(gid, gid, gid) < 0) { 153 gid = lookup_gid(optarg);
|
/system/netd/server/ |
H A D | WakeupController.h | 38 int gid; member in struct:android::net::WakeupController::ReportArgs
|
/system/core/adb/ |
H A D | file_sync_service.h | 59 uint32_t gid; member in struct:syncmsg::__anon1540
|
H A D | file_sync_service.cpp | 73 gid_t gid = -1; local 86 fs_config(partial_path.c_str(), 1, nullptr, &uid, &gid, &mode, &capabilities); 93 if (chown(partial_path.c_str(), uid, gid) == -1) return false; 137 msg.stat_v2.gid = st.st_gid; 199 static bool handle_send_file(int s, const char* path, uid_t uid, gid_t gid, uint64_t capabilities, argument 227 if (fchown(fd, uid, gid) == -1) { 401 gid_t gid = -1; local 405 fs_config(path.c_str(), 0, nullptr, &uid, &gid, &broken_api_hack, &capabilities); 408 return handle_send_file(s, path.c_str(), uid, gid, capabilities, mode, buffer, do_unlink);
|
/system/core/libcutils/ |
H A D | canned_fs_config.cpp | 32 unsigned gid; member in struct:__anon1657 70 p->gid = atoi(strtok(NULL, " ")); 96 unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities) { 107 *gid = p->gid; 120 if (c_gid != *gid) printf("%s gid %d %d\n", path, *gid, c_gid); 95 canned_fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities) argument
|
H A D | fs.cpp | 42 static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t gid, argument 68 owner_match = ((sb.st_uid == uid) && (sb.st_gid == gid)); 77 path, uid, gid, sb.st_uid, sb.st_gid); 107 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) { 108 ALOGE("Failed to chown(%s, %d, %d): %s", path, uid, gid, strerror(errno)); 115 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument 116 return fs_prepare_path_impl(path, mode, uid, gid, /*allow_fixup*/ 1, /*prepare_as_dir*/ 1); 119 int fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument 120 return fs_prepare_path_impl(path, mode, uid, gid, /*allow_fixup*/ 0, /*prepare_as_dir*/ 1); 123 int fs_prepare_file_strict(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument [all...] |
H A D | fs_config.cpp | 289 void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, argument 334 *gid = get2LE((const uint8_t*)&(header.gid)); 350 *gid = pc->gid; 367 p->gid = get2LE((const uint8_t*)&(pc->gid));
|
/system/vold/ |
H A D | vold_prepare_subdirs.cpp | 19 * apply the context if it's absent. Also fixes mode, uid, gid. 57 static bool prepare_dir(struct selabel_handle* sehandle, mode_t mode, uid_t uid, gid_t gid, argument 65 LOG(DEBUG) << "Setting up mode " << std::oct << mode << std::dec << " uid " << uid << " gid " 66 << gid << " context " << secontext.get() << " on path: " << path; 73 if (fs_prepare_dir(path.c_str(), mode, uid, gid) != 0) {
|
/system/core/cpio/ |
H A D | mkbootfs.c | 40 int uid, gid, mode; member in struct:fs_config_entry 47 * gid, mode). */ 63 // Use the list of file uid/gid/modes loaded from the file 74 s->st_gid = p->gid; 80 s->st_gid = empty_path_config->gid; 316 cc->gid = atoi(strtok(NULL, " \n"));
|
/system/core/liblog/ |
H A D | logger_write.c | 62 gid_t gid = getgid(); local 63 if ((gid != AID_SYSTEM) && (gid != AID_ROOT) && (gid != AID_LOG)) { 64 gid = getegid(); 65 if ((gid != AID_SYSTEM) && (gid != AID_ROOT) && (gid != AID_LOG)) {
|
/system/core/libprocessgroup/ |
H A D | processgroup.cpp | 282 static bool MkdirAndChown(const std::string& path, mode_t mode, uid_t uid, gid_t gid) { argument 287 if (chown(path.c_str(), uid, gid) == -1) {
|
/system/core/sdcard/ |
H A D | sdcard.cpp | 91 static void drop_privs(uid_t uid, gid_t gid) { argument 94 minijail_change_gid(j.get(), gid); 101 uid_t fsuid, gid_t fsgid, bool multi_user, userid_t userid, gid_t gid, 111 auto opts = android::base::StringPrintf("fsuid=%d,fsgid=%d,%smask=%d,userid=%d,gid=%d", 112 fsuid, fsgid, new_opts.c_str(), mask, userid, gid); 125 gid_t gid, mode_t mask) { 126 std::string opts = android::base::StringPrintf("mask=%d,gid=%d", mask, gid); 147 bool multi_user, userid_t userid, gid_t gid, mode_t mask, 150 return sdcardfs_setup(source_path, dest_path, fsuid, fsgid, multi_user, userid, gid, mas 100 sdcardfs_setup(const std::string& source_path, const std::string& dest_path, uid_t fsuid, gid_t fsgid, bool multi_user, userid_t userid, gid_t gid, mode_t mask, bool derive_gid, bool default_normal, bool use_esdfs) argument 124 sdcardfs_setup_bind_remount(const std::string& source_path, const std::string& dest_path, gid_t gid, mode_t mask) argument 145 sdcardfs_setup_secondary(const std::string& default_path, const std::string& source_path, const std::string& dest_path, uid_t fsuid, gid_t fsgid, bool multi_user, userid_t userid, gid_t gid, mode_t mask, bool derive_gid, bool default_normal, bool use_esdfs) argument 157 run_sdcardfs(const std::string& source_path, const std::string& label, uid_t uid, gid_t gid, userid_t userid, bool multi_user, bool full_write, bool derive_gid, bool default_normal, bool use_esdfs) argument 220 gid_t gid = 0; local [all...] |